From 27d3b51e6d9793ce7ec256ac749f7a3992e00e25 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 5 Apr 2012 20:02:48 +0400 Subject: [PATCH 001/562] S:165106 [+] Clean URLs support has been added [!] Some minor fixes for the admin area controllers [*] Code style corrections --- src/.htaccess | 24 +++++ src/Includes/Utils/ConfigParser.php | 1 - src/Includes/Utils/Converter.php | 35 +++++- src/classes/XLite.php | 36 +++---- src/classes/XLite/Controller/AController.php | 40 ++++--- src/classes/XLite/Controller/Admin/AAdmin.php | 1 - .../XLite/Controller/Admin/Category.php | 22 ++-- .../XLite/Controller/Admin/ImportExport.php | 22 ++-- src/classes/XLite/Controller/Admin/Order.php | 19 ++-- .../XLite/Controller/Admin/Product.php | 100 +++++++++++++----- .../XLite/Controller/Admin/Promotions.php | 6 +- .../XLite/Controller/Admin/Settings.php | 29 ++--- .../XLite/Controller/Customer/OrderList.php | 23 ++-- .../XLite/Controller/Customer/Product.php | 16 ++- src/classes/XLite/Core/Converter.php | 92 ++++++++++------ .../Controller/Admin/Product.php | 6 +- .../Controller/Admin/Product.php | 38 ++----- .../CDev/SalesTax/Controller/Admin/Taxes.php | 12 ++- .../CDev/VAT/Controller/Admin/Taxes.php | 12 ++- .../XLite/View/Form/Product/Modify/Single.php | 2 +- .../XLite/View/TopMenu/Node/Promotions.php | 9 +- src/etc/config.default.php | 3 + .../admin/en/product/parts/clean_url.tpl | 26 ++++- src/top.inc.PHP53.php | 3 + 24 files changed, 381 insertions(+), 196 deletions(-) create mode 100644 src/.htaccess diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 0000000000..6f16376680 --- /dev/null +++ b/src/.htaccess @@ -0,0 +1,24 @@ +# vim: set ts=2 sw=2 sts=2 et: +# +# Apache/PHP settings +# +# @author Creative Development LLC +# @copyright Copyright (c) 2010 Creative Development LLC . All rights reserved +# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +# @link http://www.litecommerce.com/ +# @see ____file_see____ +# @since 1.0.21 + +Options -Indexes +DirectoryIndex cart.php + + + RewriteEngine on + RewriteRule "(^|/)\." - [F] + RewriteBase /~vvs/xlite/src/ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^([a-z0-9-]+)(/)?$ cart.php?target=category&clean_url_cat=$1 [NC] [L] + RewriteRule ^([a-z0-9-]+)/([a-z0-9-]+)\.htm(l)?$ cart.php?target=product&clean_url_prod=$2&clean_url_cat=$1 [NC] [L] + RewriteRule ^([a-z0-9-]+)\.htm(l)?$ cart.php?target=product&clean_url_prod=$1 [NC] [L] + diff --git a/src/Includes/Utils/ConfigParser.php b/src/Includes/Utils/ConfigParser.php index f357a3b381..e952c36eb5 100644 --- a/src/Includes/Utils/ConfigParser.php +++ b/src/Includes/Utils/ConfigParser.php @@ -228,7 +228,6 @@ protected static function setWebDirWOSlash() = \Includes\Utils\URLManager::trimTrailingSlashes(static::$options['host_details']['web_dir']); } - /** * Parse both config files * diff --git a/src/Includes/Utils/Converter.php b/src/Includes/Utils/Converter.php index 613c12902e..863b613c03 100644 --- a/src/Includes/Utils/Converter.php +++ b/src/Includes/Utils/Converter.php @@ -47,7 +47,6 @@ abstract class Converter extends \Includes\Utils\AUtils */ protected static $byteMultipliers = array('b', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); - /** * Generate query string * @@ -293,4 +292,38 @@ public static function removeCRLF($value) { return trim(preg_replace('/[\r\n]+/', '', ((string)$value))); } + + /** + * Compose URL from target, action and additional params + * + * @param string $target Page identifier OPTIONAL + * @param string $action Action to perform OPTIONAL + * @param array $params Additional params OPTIONAL + * @param string $interface Interface script OPTIONAL + * + * @return string + * @see ____func_see____ + * @since 1.0.20 + */ + public static function buildURL($target = '', $action = '', array $params = array(), $interface = null) + { + $result = $interface; + $urlParams = array(); + + if (!empty($target)) { + $urlParams['target'] = $target; + } + + if (!empty($action)) { + $urlParams['action'] = $action; + } + + $params = $urlParams + $params; + + if (!empty($params)) { + $result .= '?' . http_build_query($params); + } + + return $result; + } } diff --git a/src/classes/XLite.php b/src/classes/XLite.php index be4b4700f9..f7a2a99cbc 100644 --- a/src/classes/XLite.php +++ b/src/classes/XLite.php @@ -116,7 +116,7 @@ class XLite extends \XLite\Base */ public static function isAdminZone() { - return self::$adminZone; + return static::$adminZone; } /** @@ -142,20 +142,20 @@ public static function setCleanUpCacheFlag($flag) */ public static function getController() { - if (!isset(self::$controller)) { - $class = self::getControllerClass(); + if (!isset(static::$controller)) { + $class = static::getControllerClass(); if (!\XLite\Core\Operator::isClassExists($class)) { - \XLite\Core\Request::getInstance()->target = self::TARGET_DEFAULT; + \XLite\Core\Request::getInstance()->target = static::TARGET_DEFAULT; \XLite\Logger::getInstance()->log('Controller class ' . $class . ' not found!', LOG_ERR); - \XLite\Core\Request::getInstance()->target = self::TARGET_404; - $class = self::getControllerClass(); + \XLite\Core\Request::getInstance()->target = static::TARGET_404; + $class = static::getControllerClass(); } - self::$controller = new $class(\XLite\Core\Request::getInstance()->getData()); - self::$controller->init(); + static::$controller = new $class(\XLite\Core\Request::getInstance()->getData()); + static::$controller->init(); } - return self::$controller; + return static::$controller; } /** @@ -171,7 +171,7 @@ public static function getController() public static function setController($controller = null) { if (is_null($controller) || $controller instanceof \XLite\Controller\AController) { - self::$controller = $controller; + static::$controller = $controller; } } @@ -185,7 +185,7 @@ public static function setController($controller = null) protected static function getTarget() { if (empty(\XLite\Core\Request::getInstance()->target)) { - \XLite\Core\Request::getInstance()->target = self::TARGET_DEFAULT; + \XLite\Core\Request::getInstance()->target = static::TARGET_DEFAULT; } return \XLite\Core\Request::getInstance()->target; @@ -200,7 +200,7 @@ protected static function getTarget() */ protected static function getControllerClass() { - return \XLite\Core\Converter::getControllerClass(self::getTarget()); + return \XLite\Core\Converter::getControllerClass(static::getTarget()); } /** @@ -240,7 +240,7 @@ public function __destruct() */ public function getScript() { - return self::isAdminZone() ? self::ADMIN_SELF : self::CART_SELF; + return static::isAdminZone() ? static::ADMIN_SELF : static::CART_SELF; } /** @@ -354,10 +354,10 @@ public function processRequest() public function run($adminZone = false) { // Set current area - self::$adminZone = (bool)$adminZone; + static::$adminZone = (bool)$adminZone; // Clear some data - self::clearDataOnStartup(); + static::clearDataOnStartup(); // Initialize logger \XLite\Logger::getInstance(); @@ -370,7 +370,7 @@ public function run($adminZone = false) // Set skin for console interface \XLite\Core\Layout::getInstance()->setConsoleSkin(); - } elseif (true === self::$adminZone) { + } elseif (true === static::$adminZone) { // Set skin for admin interface \XLite\Core\Layout::getInstance()->setAdminSkin(); @@ -390,7 +390,7 @@ public function getCurrency() { if (!isset($this->currentCurrency)) { $this->currentCurrency = \XLite\Core\Database::getRepo('XLite\Model\Currency') - ->find(\XLite\Core\Config::getInstance()->General->shop_currency ?: self::SHOP_CURRENCY_DEFAULT); + ->find(\XLite\Core\Config::getInstance()->General->shop_currency ?: static::SHOP_CURRENCY_DEFAULT); } return $this->currentCurrency; @@ -417,7 +417,7 @@ protected function getAction() */ protected function clearDataOnStartup() { - self::$controller = null; + static::$controller = null; \XLite\Model\CachingFactory::clearCache(); } diff --git a/src/classes/XLite/Controller/AController.php b/src/classes/XLite/Controller/AController.php index 0faa5b5349..8fdacf06c1 100644 --- a/src/classes/XLite/Controller/AController.php +++ b/src/classes/XLite/Controller/AController.php @@ -54,7 +54,6 @@ abstract class AController extends \XLite\Core\Handler */ const RETURN_URL = 'returnURL'; - /** * Object to keep action status * @@ -82,7 +81,6 @@ abstract class AController extends \XLite\Core\Handler */ protected $params = array('target'); - /** * Validity flag * TODO - check where it's really needed @@ -144,8 +142,11 @@ protected static function getTargetByClassName() return \Includes\Utils\Converter::convertFromCamelCase(lcfirst(array_pop($parts))); } + // {{{ Pages + /** * Get current page + * FIXME: to revise * * @return string * @see ____func_see____ @@ -153,36 +154,38 @@ protected static function getTargetByClassName() */ public function getPage() { - $page = $this->page; + $page = $this->page; $pages = $this->getPages(); return $page && isset($pages[$page]) ? $page : key($pages); } /** - * Return list of page templates + * getPages * - * @return array + * @return void * @see ____func_see____ - * @since 1.0.17 + * @since 1.0.0 */ - protected function getPageTemplates() + public function getPages() { return array(); } /** - * getPages + * Return list of page templates * - * @return void + * @return array * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.17 */ - public function getPages() + protected function getPageTemplates() { return array(); } + // }}} + /** * Get controlelr parameters * TODO - check this method @@ -709,7 +712,20 @@ public function getRootCategoryId() */ public function getCategoryId() { - return intval(\XLite\Core\Request::getInstance()->category_id) ?: $this->getRootCategoryId(); + $categoryID = \XLite\Core\Request::getInstance()->category_id; + + if (!isset($categoryID)) { + $cleanURL = \XLite\Core\Request::getInstance()->clean_url_cat; + + if (!empty($cleanURL)) { + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); + $categoryID = isset($category) ? $category->getCategoryId() : false; + + \XLite\Core\Request::getInstance()->category_id = $categoryID; + } + } + + return $categoryID ?: $this->getRootCategoryId(); } /** diff --git a/src/classes/XLite/Controller/Admin/AAdmin.php b/src/classes/XLite/Controller/Admin/AAdmin.php index 1f43067926..3c47986e8f 100644 --- a/src/classes/XLite/Controller/Admin/AAdmin.php +++ b/src/classes/XLite/Controller/Admin/AAdmin.php @@ -74,7 +74,6 @@ public function postprocess() parent::postprocess(); if ($this->dumpStarted) { - $this->displayPageFooter(); } } diff --git a/src/classes/XLite/Controller/Admin/Category.php b/src/classes/XLite/Controller/Admin/Category.php index ee91baf6d8..9cf70d3fdf 100644 --- a/src/classes/XLite/Controller/Admin/Category.php +++ b/src/classes/XLite/Controller/Admin/Category.php @@ -44,6 +44,8 @@ class Category extends \XLite\Controller\Admin\Base\Catalog */ public $params = array('target', 'category_id', 'mode'); + // {{{ Pages + /** * Get pages sections * @@ -53,9 +55,10 @@ class Category extends \XLite\Controller\Admin\Base\Catalog */ public function getPages() { - return array( - 'category_modify' => ($this->getCategory()->getCategoryId()) ? 'Modify category' : 'Add new category' - ); + $list = parent::getPages(); + $list['category_modify'] = $this->getCategory()->isPersistent() ? 'Modify category' : 'Add new category'; + + return $list; } /** @@ -65,14 +68,17 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - return array( - 'category_modify' => 'categories/add_modify_body.tpl', - 'default' => 'categories/add_modify_body.tpl', - ); + $list = parent::getPageTemplates(); + $list['category_modify'] = 'categories/add_modify_body.tpl'; + $list['default'] = 'categories/add_modify_body.tpl'; + + return $list; } + // }}} + /** * Return current (or default) category object * diff --git a/src/classes/XLite/Controller/Admin/ImportExport.php b/src/classes/XLite/Controller/Admin/ImportExport.php index 4a9962233b..18b3d9fe82 100644 --- a/src/classes/XLite/Controller/Admin/ImportExport.php +++ b/src/classes/XLite/Controller/Admin/ImportExport.php @@ -99,7 +99,7 @@ class ImportExport extends \XLite\Controller\Admin\AAdmin */ protected $importCell; - // {{{ Tabs + // {{{ Pages /** * Get pages sections @@ -110,10 +110,11 @@ class ImportExport extends \XLite\Controller\Admin\AAdmin */ public function getPages() { - return array( - 'import' => 'Import', - 'export' => 'Export', - ); + $list = parent::getPages(); + $list['import'] = 'Import'; + $list['export'] = 'Export'; + + return $list; } /** @@ -123,12 +124,13 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - return array( - 'import' => 'import_export/import.tpl', - 'export' => 'import_export/export.tpl', - ); + $list = parent::getPageTemplates(); + $list['import'] = 'import_export/import.tpl'; + $list['export'] = 'import_export/export.tpl'; + + return $list; } // }}} diff --git a/src/classes/XLite/Controller/Admin/Order.php b/src/classes/XLite/Controller/Admin/Order.php index 965694f727..78575018c8 100644 --- a/src/classes/XLite/Controller/Admin/Order.php +++ b/src/classes/XLite/Controller/Admin/Order.php @@ -109,7 +109,7 @@ protected function getViewerTemplate() return $result; } - // {{{ Tabs + // {{{ Pages /** * Get pages sections @@ -120,9 +120,10 @@ protected function getViewerTemplate() */ public function getPages() { - return array( - 'default' => 'General info', - ); + $list = parent::getPages(); + $list['default'] = 'General info'; + + return $list; } /** @@ -132,13 +133,13 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - return array( - 'default' => 'order/info.tpl', - ); + $list = parent::getPageTemplates(); + $list['default'] = 'order/info.tpl'; + + return $list; } // }}} - } diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index fa85a8ecce..fab54431ee 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -44,6 +44,8 @@ class Product extends \XLite\Controller\Admin\AAdmin */ public $params = array('target', 'id', 'page', 'backURL'); + // {{{ Pages + /** * Get pages sections * @@ -53,18 +55,15 @@ class Product extends \XLite\Controller\Admin\AAdmin */ public function getPages() { - $pages = array( - 'info' => 'Product info', - ); + $list = parent::getPages(); + $list['info'] = 'Product info'; if (!$this->isNew()) { - $pages += array( - 'images' => 'Product images', - 'inventory' => 'Inventory tracking', - ); + $list['images'] = 'Product images'; + $list['inventory'] = 'Inventory tracking'; } - return $pages; + return $list; } /** @@ -74,23 +73,22 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - $tpls = array( - 'info' => 'product/info.tpl', - 'default' => 'product/info.tpl', - ); + $list = parent::getPageTemplates(); + $list['info'] = 'product/info.tpl'; + $list['default'] = 'product/info.tpl'; if (!$this->isNew()) { - $tpls += array( - 'images' => 'product/product_images.tpl', - 'inventory' => 'product/inventory.tpl', - ); + $list['images'] = 'product/product_images.tpl'; + $list['inventory'] = 'product/inventory.tpl'; } - return $tpls; + return $list; } + // }}} + /** * Alias * @@ -147,7 +145,6 @@ public function getCategoryId() $categoryId = parent::getCategoryId(); if (empty($categoryId) && !$this->isNew()) { - $categoryId = $this->getProduct()->getCategoryId(); } @@ -239,6 +236,8 @@ protected function getClasses(\XLite\Model\Product $product) return array('classes' => $data); } + // {{{ Clean URL routines + /** * Set error * @@ -252,7 +251,7 @@ protected function setCleanURLError($cleanURL) { \XLite\Core\TopMessage::addError( 'The "{{clean_url}}" clean URL is already defined', - array('clean_url' => $data['clean_url']) + array('clean_url' => $cleanURL) ); } @@ -281,6 +280,28 @@ protected function checkCleanURL($cleanURL) return $result; } + /** + * Generate clean URL + * + * @param string $name Product name + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + protected function generateCleanURL($name) + { + $result = null; + + if (isset($name)) { + $separator = \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')); + $result = strtolower(preg_replace('/\W+/S', $separator ?: '-', $name)); + } + + return $result; + } + + // }}} /** * doActionModify @@ -305,7 +326,7 @@ protected function doActionModify() */ protected function doActionAdd() { - $form = new \XLite\View\Form\Product\Modify\Single; + $form = new \XLite\View\Form\Product\Modify\Single(); $requestData = $form->getRequestData(); if ($form->getValidationMessage()) { @@ -345,7 +366,7 @@ protected function doActionAdd() */ protected function doActionUpdate() { - $form = new \XLite\View\Form\Product\Modify\Single; + $form = new \XLite\View\Form\Product\Modify\Single(); $requestData = $form->getRequestData(); if ($form->getValidationMessage()) { @@ -356,7 +377,7 @@ protected function doActionUpdate() // Clear all category associates \XLite\Core\Database::getRepo('\XLite\Model\CategoryProducts')->deleteInBatch( - $product->getCategoryProducts() + $product->getCategoryProducts()->toArray() ); $product->getClasses()->clear(); @@ -473,15 +494,36 @@ protected function doActionUpdateInventory() */ protected function getPostedData($field = null) { - $value = parent::getPostedData($field); + $result = parent::getPostedData($field); + + foreach (array('arrivalDate', 'cleanURL') as $name) { + $value = isset($field) + ? ($name === $field ? $result : null) + : \Includes\Utils\ArrayManager::getIndex($result, $name); + + switch ($name) { + case 'arrivalDate': + $value = strtotime($value) ?: time(); + break; + + case 'cleanURL': + if (parent::getPostedData('autogenerateCleanURL')) { + $value = $this->generateCleanURL(parent::getPostedData('name')); + } + break; + + default: + // ... + } - if ('arrivalDate' == $field) { - $value = intval(strtotime($value)) ?: time(); + if (isset($field)) { + $result = $value; - } elseif (!isset($field) && isset($value['arrivalDate'])) { - $value['arrivalDate'] = intval(strtotime($value['arrivalDate'])) ?: time(); + } else { + $result[$name] = $value; + } } - return $value; + return $result; } } diff --git a/src/classes/XLite/Controller/Admin/Promotions.php b/src/classes/XLite/Controller/Admin/Promotions.php index cfb95dc53b..cfd86fe273 100644 --- a/src/classes/XLite/Controller/Admin/Promotions.php +++ b/src/classes/XLite/Controller/Admin/Promotions.php @@ -44,6 +44,8 @@ class Promotions extends \XLite\Controller\Admin\AAdmin */ protected $params = array('target', 'page'); + // {{{ Pages + /** * Get pages static * @@ -81,7 +83,7 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { $list = array(); @@ -91,4 +93,6 @@ public function getPageTemplates() return $list; } + + // }}} } diff --git a/src/classes/XLite/Controller/Admin/Settings.php b/src/classes/XLite/Controller/Admin/Settings.php index 69cebe2013..83f907dc68 100644 --- a/src/classes/XLite/Controller/Admin/Settings.php +++ b/src/classes/XLite/Controller/Admin/Settings.php @@ -78,6 +78,8 @@ public function getTitle() return 'General settings'; } + // {{{ Pages + /** * Get tab names * @@ -87,14 +89,15 @@ public function getTitle() */ public function getPages() { - return array( - 'General' => 'General', - 'Company' => 'Company', - 'Email' => 'Email', - 'Security' => 'Security', - 'Environment' => 'Environment', - 'Performance' => 'Performance', - ); + $list = parent::getPages(); + $list['General'] = 'General'; + $list['Company'] = 'Company'; + $list['Email'] = 'Email'; + $list['Security'] = 'Security'; + $list['Environment'] = 'Environment'; + $list['Performance'] = 'Performance'; + + return $list; } /** @@ -104,12 +107,12 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - $list = $this->getPages(); + $list = parent::getPageTemplates(); - foreach ($list as $k => $v) { - $list[$k] = 'settings/base.tpl'; + foreach ($this->getPages() as $name => $title) { + $list[$name] = 'settings/base.tpl'; } $list['Environment'] = 'summary.tpl'; @@ -117,6 +120,8 @@ public function getPageTemplates() return $list; } + // }}} + /** * Get options for current tab (category) * diff --git a/src/classes/XLite/Controller/Customer/OrderList.php b/src/classes/XLite/Controller/Customer/OrderList.php index 135cbc36c4..247c613f2e 100644 --- a/src/classes/XLite/Controller/Customer/OrderList.php +++ b/src/classes/XLite/Controller/Customer/OrderList.php @@ -77,10 +77,7 @@ public function handleRequest() */ public function checkAccess() { - $auth = \XLite\Core\Auth::getInstance(); - - return parent::checkAccess() - && $auth->isLogged(); + return parent::checkAccess() && \XLite\Core\Auth::getInstance()->isLogged(); } /** @@ -255,7 +252,7 @@ protected function doActionReset() $this->setReturnURL($this->buildURL('order_list')); } - // {{{ Tabs + // {{{ Pages /** * Get pages sections @@ -266,9 +263,10 @@ protected function doActionReset() */ public function getPages() { - return array( - 'default' => 'Orders', - ); + $list = parent::getPages(); + $list['default'] = 'Orders'; + + return $list; } /** @@ -278,11 +276,12 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - return array( - 'default' => 'order/list.tpl', - ); + $list = parent::getPages(); + $list['default'] = 'order/list.tpl'; + + return $list; } // }}} diff --git a/src/classes/XLite/Controller/Customer/Product.php b/src/classes/XLite/Controller/Customer/Product.php index da5d4fe1d7..fda223504d 100644 --- a/src/classes/XLite/Controller/Customer/Product.php +++ b/src/classes/XLite/Controller/Customer/Product.php @@ -44,7 +44,6 @@ class Product extends \XLite\Controller\Customer\Catalog */ protected $params = array('target', 'product_id'); - /** * Check whether the title is to be displayed in the content area * @@ -133,7 +132,20 @@ protected function getLocation() */ protected function getProductId() { - return intval(\XLite\Core\Request::getInstance()->product_id); + $productID = \XLite\Core\Request::getInstance()->product_id; + + if (!isset($productID)) { + $cleanURL = \XLite\Core\Request::getInstance()->clean_url_prod; + + if (!empty($cleanURL)) { + $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); + $productID = isset($product) ? $product->getProductId() : false; + + \XLite\Core\Request::getInstance()->product_id = $productID; + } + } + + return $productID; } /** diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index e340ccce66..6386a9389d 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -152,6 +152,8 @@ public static function getControllerClass($target) . (empty($target) ? '' : '\\' . self::convertToCamelCase($target)); } + // {{{ URL routines + /** * Compose URL from target, action and additional params * @@ -166,26 +168,21 @@ public static function getControllerClass($target) */ public static function buildURL($target = '', $action = '', array $params = array(), $interface = null) { - $url = isset($interface) ? $interface : \XLite::getInstance()->getScript(); - - $urlParams = array(); - - if ($target) { - $urlParams['target'] = $target; - } - - if ($action) { - $urlParams['action'] = $action; + $result = null; + + if (LC_USE_CLEAN_URLS && !\XLite::isAdminZone()) { + $result = static::buildCleanURL($target, $action, $params); + } + + if (!isset($result)) { + if (!isset($interface)) { + $interface = \XLite::getInstance()->getScript(); + } + + $result = \Includes\Utils\Converter::buildURL($target, $action, $params, $interface); } - - $params = $urlParams + $params; - - if (!empty($params)) { - uksort($params, array(get_called_class(), 'sortURLParams')); - $url .= '?' . http_build_query($params); - } - - return $url; + + return $result; } /** @@ -204,6 +201,48 @@ public static function buildFullURL($target = '', $action = '', array $params = return \XLite::getInstance()->getShopURL(static::buildURL($target, $action, $params)); } + /** + * Compose clean URL + * + * @param string $target Page identifier OPTIONAL + * @param string $action Action to perform OPTIONAL + * @param array $params additional params OPTIONAL + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + public static function buildCleanURL($target = '', $action = '', array $params = array()) + { + $result = null; + $urlParams = array(); + + if ('category' === $target && !empty($params['category_id'])) { + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->find($params['category_id']); + + if (isset($category) && $category->getCleanURL()) { + $urlParams[0] = $category->getCleanURL(); + } + } + + if ('product' === $target && !empty($params['product_id'])) { + $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($params['product_id']); + + if (isset($product) && $product->getCleanURL()) { + $urlParams[1] = $product->getCleanURL() . '.html'; + } + } + + if (!empty($urlParams)) { + $result = \Includes\Utils\ConfigParser::getOptions(array('host_details', 'web_dir_wo_slash')); + $result .= '/' . implode('/', $urlParams); + } + + return $result; + } + + // }}} + /** * Convert to one-dimensional array * @@ -433,21 +472,6 @@ protected static function setLocaleToUTF8() } } - /** - * Sort URL parameters (callback) - * - * @param string $a First parameter - * @param string $b Second parameter - * - * @return integer - * @see ____func_see____ - * @since 1.0.0 - */ - protected static function sortURLParams($a, $b) - { - return ('target' == $b || ('action' == $b && 'target' != $a)) ? 1 : 0; - } - /** * Prepare human-readable output for file size * diff --git a/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php b/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php index dd28f6d8a7..1721e11e1e 100644 --- a/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php +++ b/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php @@ -35,6 +35,8 @@ */ class Product extends \XLite\Controller\Admin\Product implements \XLite\Base\IDecorator { + // {{{ Pages + /** * Get pages sections * @@ -60,7 +62,7 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { $list = parent::getPageTemplates(); @@ -71,6 +73,8 @@ public function getPageTemplates() return $list; } + // }}} + /** * Remove file * diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php b/src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php index 5a1c0394af..e4a967becc 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php @@ -35,24 +35,7 @@ */ class Product extends \XLite\Controller\Admin\Product implements \XLite\Base\IDecorator { - /** - * Constructor - * - * @param array $params Parameters - * - * @return void - * @see ____func_see____ - * @since 1.0.0 - */ - public function __construct(array $params) - { - parent::__construct($params); - - if (!in_array('language', $this->params)) { - $this->params[] = 'language'; - } - - } + // {{{ Pages /** * Get pages sections @@ -63,15 +46,13 @@ public function __construct(array $params) */ public function getPages() { - $pages = parent::getPages(); + $list = parent::getPages(); if (!$this->isNew()) { - $pages += array( - 'product_options' => 'Product options', - ); + $list['product_options'] = 'Product options'; } - return $pages; + return $list; } /** @@ -81,19 +62,18 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { - $tpls = parent::getPageTemplates(); + $list = parent::getPageTemplates(); if (!$this->isNew()) { - $tpls += array( - 'product_options' => 'modules/CDev/ProductOptions/product_options_lander.tpl', - ); + $list['product_options'] = 'modules/CDev/ProductOptions/product_options_lander.tpl'; } - return $tpls; + return $list; } + // }}} /** * Update option groups list diff --git a/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php b/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php index 553a2500dc..9fc7d13306 100644 --- a/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php +++ b/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php @@ -40,6 +40,8 @@ abstract class Taxes extends \XLite\Controller\Admin\Taxes implements \XLite\Bas */ const PAGE_SALES_TAX = 'salesTax'; + // {{{ Pages + /** * Get pages sections * @@ -50,7 +52,7 @@ abstract class Taxes extends \XLite\Controller\Admin\Taxes implements \XLite\Bas public function getPages() { $list = parent::getPages(); - $list[self::PAGE_SALES_TAX] = 'Sales tax'; + $list[static::PAGE_SALES_TAX] = 'Sales tax'; return $list; } @@ -62,14 +64,16 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { $list = parent::getPageTemplates(); - $list[self::PAGE_SALES_TAX] = 'modules/CDev/SalesTax/edit.tpl'; + $list[static::PAGE_SALES_TAX] = 'modules/CDev/SalesTax/edit.tpl'; return $list; } + // }}} + // {{{ Widget-specific getters /** @@ -83,7 +87,7 @@ public function getTax() { $tax = parent::getTax(); - if (!$tax && $this->getPage() == self::PAGE_SALES_TAX) { + if (!$tax && static::PAGE_SALES_TAX === $this->getPage()) { $tax = \XLite\Core\Database::getRepo('XLite\Module\CDev\SalesTax\Model\Tax')->getTax(); } diff --git a/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php b/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php index db7fd44431..f841f02784 100644 --- a/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php +++ b/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php @@ -40,6 +40,8 @@ abstract class Taxes extends \XLite\Controller\Admin\Taxes implements \XLite\Bas */ const PAGE_VAT_TAX = 'vatTax'; + // {{{ Pages + /** * Get pages sections * @@ -50,7 +52,7 @@ abstract class Taxes extends \XLite\Controller\Admin\Taxes implements \XLite\Bas public function getPages() { $list = parent::getPages(); - $list[self::PAGE_VAT_TAX] = 'VAT'; + $list[static::PAGE_VAT_TAX] = 'VAT'; return $list; } @@ -62,14 +64,16 @@ public function getPages() * @see ____func_see____ * @since 1.0.0 */ - public function getPageTemplates() + protected function getPageTemplates() { $list = parent::getPageTemplates(); - $list[self::PAGE_VAT_TAX] = 'modules/CDev/VAT/edit.tpl'; + $list[static::PAGE_VAT_TAX] = 'modules/CDev/VAT/edit.tpl'; return $list; } + // }}} + // {{{ Widget-specific getters /** @@ -83,7 +87,7 @@ public function getTax() { $tax = parent::getTax(); - if (!$tax && $this->getPage() == self::PAGE_VAT_TAX) { + if (!$tax && static::PAGE_VAT_TAX === $this->getPage()) { $tax = \XLite\Core\Database::getRepo('XLite\Module\CDev\VAT\Model\Tax')->getTax(); } diff --git a/src/classes/XLite/View/Form/Product/Modify/Single.php b/src/classes/XLite/View/Form/Product/Modify/Single.php index 0457495548..747386b8e2 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Single.php @@ -101,6 +101,6 @@ protected function setDataValidators(&$data) $data->addPair('description', new \XLite\Core\Validator\String(), null, 'Full description'); $data->addPair('meta_tags', new \XLite\Core\Validator\String(), null, 'Meta keywords'); $data->addPair('meta_desc', new \XLite\Core\Validator\String(), null, 'Meta description'); - $data->addPair('clean_url', new \XLite\Core\Validator\String(), null, 'Clean URL'); + $data->addPair('cleanURL', new \XLite\Core\Validator\String\RegExp(true, '/^[\w-]+$/S'), null, 'Clean URL'); } } diff --git a/src/classes/XLite/View/TopMenu/Node/Promotions.php b/src/classes/XLite/View/TopMenu/Node/Promotions.php index 3acc69f5e3..e0695598d0 100644 --- a/src/classes/XLite/View/TopMenu/Node/Promotions.php +++ b/src/classes/XLite/View/TopMenu/Node/Promotions.php @@ -48,8 +48,8 @@ protected function defineWidgetParams() { parent::defineWidgetParams(); - $this->widgetParams[self::PARAM_TITLE]->setValue(static::t('Promotions')); - $this->widgetParams[self::PARAM_TARGET]->setValue('promotions'); + $this->widgetParams[static::PARAM_TITLE]->setValue('Promotions'); + $this->widgetParams[static::PARAM_TARGET]->setValue('promotions'); } /** @@ -61,9 +61,6 @@ protected function defineWidgetParams() */ protected function isVisible() { - return parent::isVisible() - && \XLite\Controller\Admin\Promotions::getPagesStatic(); + return parent::isVisible() && \XLite\Controller\Admin\Promotions::getPagesStatic(); } - } - diff --git a/src/etc/config.default.php b/src/etc/config.default.php index e21aeea431..ede598fbab 100644 --- a/src/etc/config.default.php +++ b/src/etc/config.default.php @@ -83,6 +83,9 @@ https_host = "" web_dir = "" +[clean_urls] +enabled = off +default_separator = "-" ; ; ----------------- diff --git a/src/skins/admin/en/product/parts/clean_url.tpl b/src/skins/admin/en/product/parts/clean_url.tpl index 44bbe606ef..1dd24d50fc 100644 --- a/src/skins/admin/en/product/parts/clean_url.tpl +++ b/src/skins/admin/en/product/parts/clean_url.tpl @@ -8,10 +8,34 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ * @since 1.0.0 + * * @ListChild (list="product.modify.list", weight="1040") *} + {t(#Clean URL#)} - + + +

+ + + + + diff --git a/src/top.inc.PHP53.php b/src/top.inc.PHP53.php index bfae709914..7fa694855c 100644 --- a/src/top.inc.PHP53.php +++ b/src/top.inc.PHP53.php @@ -82,6 +82,9 @@ // So called "developer" mode. Set it to "false" in production mode! define('LC_DEVELOPER_MODE', (bool) \Includes\Utils\ConfigParser::getOptions(array('performance', 'developer_mode'))); +// Clean URLs support +define('LC_USE_CLEAN_URLS', (bool) \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'enabled'))); + // Correct error handling mode ini_set('display_errors', LC_DEVELOPER_MODE); From 0fcce1ba6cd7c8f62ef53bbe0badeb91a63ed0f1 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 10 Apr 2012 20:06:59 +0400 Subject: [PATCH 002/562] S:165106 [+] Clean URLs support has been added [!] The "Product" and "Category" admin area controllers have been completely refactored [*] Code style corrections --- .dev/tests/Classes/Model/Product.php | 2 +- .../Model/Repo/sql/category/restore.sql | 142 +++++----- .../Classes/Model/Repo/sql/category/setup.sql | 32 +-- .../Model/Repo/sql/product/restore.sql | 142 +++++----- .../Classes/Model/Repo/sql/product/setup.sql | 24 +- src/classes/XLite/Controller/AController.php | 15 +- .../XLite/Controller/Admin/Base/Catalog.php | 174 ++++++++++++ .../XLite/Controller/Admin/Categories.php | 35 ++- .../XLite/Controller/Admin/Category.php | 220 ++++++++------- .../XLite/Controller/Admin/ImportExport.php | 2 +- .../XLite/Controller/Admin/Product.php | 259 +++++++----------- .../XLite/Controller/Admin/ProductClass.php | 2 - .../XLite/Controller/Admin/Profile.php | 5 +- .../XLite/Controller/Customer/ACustomer.php | 25 ++ .../XLite/Controller/Customer/Product.php | 4 +- src/classes/XLite/Core/Converter.php | 1 - src/classes/XLite/Core/Handler.php | 1 - .../XLite/Core/Validator/AValidator.php | 1 + src/classes/XLite/Core/Validator/Enum.php | 44 +-- .../XLite/Core/Validator/Enum/AEnum.php | 63 +++++ .../XLite/Core/Validator/Enum/Boolean.php | 4 +- src/classes/XLite/Model/AEntity.php | 6 +- src/classes/XLite/Model/Product.php | 4 +- src/classes/XLite/Model/Repo/Category.php | 2 +- src/classes/XLite/Model/Repo/Product.php | 6 +- .../Controller/Admin/SelectFile.php | 6 +- .../View/ModifyProductOptions.php | 10 +- .../XLite/View/Button/APopupButton.php | 2 +- .../XLite/View/Button/FileSelector.php | 20 +- src/classes/XLite/View/Category.php | 3 +- .../XLite/View/Form/Category/ACategory.php | 38 +++ .../View/Form/Category/Modify/AModify.php | 38 +++ .../View/Form/Category/Modify/Single.php | 119 ++++++++ .../XLite/View/Form/Product/AProduct.php | 6 +- .../View/Form/Product/Modify/Base/Single.php | 2 +- .../XLite/View/Form/Product/Modify/Single.php | 26 +- .../View/ItemsList/Model/Product/AProduct.php | 1 - .../ItemsList/Model/Product/Admin/AAdmin.php | 2 - .../ItemsList/Model/Product/Admin/Search.php | 66 ++--- src/classes/XLite/View/MembershipSelect.php | 9 +- .../admin/en/categories/add_modify_body.tpl | 187 ------------- src/skins/admin/en/categories/body.tpl | 7 +- src/skins/admin/en/categories/modify/body.tpl | 21 ++ .../en/categories/modify/parts/buttons.tpl | 20 ++ .../en/categories/modify/parts/clean_url.tpl | 41 +++ .../categories/modify/parts/description.tpl | 21 ++ .../en/categories/modify/parts/enabled.tpl | 24 ++ .../en/categories/modify/parts/image.tpl | 24 ++ .../en/categories/modify/parts/membership.tpl | 21 ++ .../en/categories/modify/parts/meta_desc.tpl | 21 ++ .../en/categories/modify/parts/meta_tags.tpl | 21 ++ .../en/categories/modify/parts/meta_title.tpl | 21 ++ .../admin/en/categories/modify/parts/name.tpl | 21 ++ .../en/categories/modify/parts/separator.tpl | 17 ++ .../en/categories/modify/parts/title.tpl | 24 ++ .../modify/brief/parts/columns/name.tpl | 2 +- .../modify/common/parts/columns/name.tpl | 2 +- .../product/table/parts/columns/name.tpl | 2 +- .../FeaturedProducts/featured_products.tpl | 2 +- .../product/featured/parts/columns/name.tpl | 2 +- .../CDev/FileAttachments/parts/row.remove.tpl | 5 +- .../admin/en/product/parts/clean_url.tpl | 14 +- src/skins/admin/en/top_sellers.tpl | 2 +- 63 files changed, 1268 insertions(+), 817 deletions(-) create mode 100644 src/classes/XLite/Core/Validator/Enum/AEnum.php create mode 100644 src/classes/XLite/View/Form/Category/ACategory.php create mode 100644 src/classes/XLite/View/Form/Category/Modify/AModify.php create mode 100644 src/classes/XLite/View/Form/Category/Modify/Single.php delete mode 100644 src/skins/admin/en/categories/add_modify_body.tpl create mode 100644 src/skins/admin/en/categories/modify/body.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/buttons.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/clean_url.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/description.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/enabled.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/image.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/membership.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/meta_desc.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/meta_tags.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/meta_title.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/name.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/separator.tpl create mode 100644 src/skins/admin/en/categories/modify/parts/title.tpl diff --git a/.dev/tests/Classes/Model/Product.php b/.dev/tests/Classes/Model/Product.php index 5ce4b5fd79..bd21ed99ce 100644 --- a/.dev/tests/Classes/Model/Product.php +++ b/.dev/tests/Classes/Model/Product.php @@ -53,7 +53,7 @@ protected function getProductData() 'enabled' => array(true, null), 'weight' => array(2.88, null), 'free_shipping' => array(true, null), - 'clean_url' => array('test_url', null), + 'cleanURL' => array('test_url', null), 'javascript' => array('test_js', null), 'name' => array('test name', null), 'description' => array('test description', null), diff --git a/.dev/tests/Classes/Model/Repo/sql/category/restore.sql b/.dev/tests/Classes/Model/Repo/sql/category/restore.sql index e14e8e7d2c..ef5c66fd77 100644 --- a/.dev/tests/Classes/Model/Repo/sql/category/restore.sql +++ b/.dev/tests/Classes/Model/Repo/sql/category/restore.sql @@ -18,14 +18,14 @@ DELETE FROM xlite_products; DELETE FROM xlite_product_translations; DELETE FROM xlite_product_images; -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1,null,1,16,null,1,'',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1002,1,2,3,null,1,'apparel',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (3002,1,4,5,null,1,'downloadables',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1004,1,6,15,null,1,'toys',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1003,1004,7,8,null,1,'cube-goodies',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (4003,1004,9,10,null,1,'science-toys',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (4004,1004,11,12,null,1,'puzzles',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (4002,1004,13,14,null,1,'rc-toys',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1,null,1,16,null,1,'',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1002,1,2,3,null,1,'apparel',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (3002,1,4,5,null,1,'downloadables',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1004,1,6,15,null,1,'toys',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1003,1004,7,8,null,1,'cube-goodies',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (4003,1004,9,10,null,1,'science-toys',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (4004,1004,11,12,null,1,'puzzles',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (4002,1004,13,14,null,1,'rc-toys',1); INSERT INTO xlite_category_quick_flags VALUES (1,1,3,3); INSERT INTO xlite_category_quick_flags VALUES (2,1002,0,0); @@ -46,69 +46,69 @@ INSERT INTO `xlite_category_translations` (label_id, code, id, name, description INSERT INTO `xlite_category_translations` (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (107,'en',1002,'Apparel','Category-1','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,'', 0, 0); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (1,'en',4003,'Planet Express Babydoll','','','','',''); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (2,'en',4004,'Digital Angel','','','','',''); diff --git a/.dev/tests/Classes/Model/Repo/sql/category/setup.sql b/.dev/tests/Classes/Model/Repo/sql/category/setup.sql index 793872e51c..6671bae8a8 100644 --- a/.dev/tests/Classes/Model/Repo/sql/category/setup.sql +++ b/.dev/tests/Classes/Model/Repo/sql/category/setup.sql @@ -17,13 +17,13 @@ UPDATE xlite_option_groups SET product_id = null; DELETE FROM xlite_products; DELETE FROM xlite_product_translations; -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (1,null,1,14,-1,null,1,'',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14015,1,2,9,0,null,1,'fruit',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14009,1,10,13,0,null,0,'vegetables',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14016,14015,3,4,1,null,1,'fruit_1',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14017,14015,5,6,1,null,0,'fruit_2',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14018,14015,7,8,1,null,1,'fruit_3',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14019,14009,11,12,1,null,1,'vegetables_1',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (1,null,1,14,-1,null,1,'',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14015,1,2,9,0,null,1,'fruit',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14009,1,10,13,0,null,0,'vegetables',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14016,14015,3,4,1,null,1,'fruit_1',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14017,14015,5,6,1,null,0,'fruit_2',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14018,14015,7,8,1,null,1,'fruit_3',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14019,14009,11,12,1,null,1,'vegetables_1',1); INSERT INTO xlite_category_quick_flags VALUES (1,1,2,2); INSERT INTO xlite_category_quick_flags VALUES (2,14015,3,2); @@ -45,15 +45,15 @@ INSERT INTO xlite_category_translations (label_id, code, id, name, description, INSERT INTO xlite_category_translations (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (7,'en',14019,'','','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,'','', 0, 0, 0); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (1,'en',15090,'Apple','

Apple
\n

The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family Rosaceae. It is one of the most widely cultivated tree fruits. The tree is small and deciduous, reaching 3 to 12 metres (9.8 to 39 ft) tall, with a broad, often densely twiggy crown. The leaves are alternately arranged simple ovals 5 to 12 cm long and 3–6 centimetres (1.2–2.4 in) broad on a 2 to 5 centimetres (0.79 to 2.0 in) petiole with an acute tip, serrated margin and a slightly downy underside. Blossoms are produced in spring simultaneously with the budding of the leaves. The flowers are white with a pink tinge that gradually fades, five petaled, and 2.5 to 3.5 centimetres (0.98 to 1.4 in) in diameter. The fruit matures in autumn, and is typically 5 to 9 centimetres (2.0 to 3.5 in) diameter. The center of the fruit contains five carpels arranged in a five-point star, each carpel containing one to three seeds.

\n

The tree originated from Central Asia, where its wild ancestor is still found today. There are more than 7,500 known cultivars of apples resulting in a range of desired characteristics. Cultivars vary in their yield and the ultimate size of the tree, even when grown on the same rootstock.

\n

vAt least 55 million tonnes of apples were grown worldwide in 2005, with a value of about $10 billion. China produced about 35% of this total. The United States is the second leading producer, with more than 7.5% of the world production. Turkey, France, Italy, and Iran are also among the leading apple exporters.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (2,'en',16281,'Radish','
Radish
\n

The radish (Raphanus sativus) is an edible root vegetable of the Brassicaceae family that was domesticated in Europe in pre-Roman times. They are grown and consumed throughout the world. Radishes have numerous varieties, varying in size, color and duration of required cultivation time. There are some radishes that are grown for their seeds; oilseed radishes are grown, as the name implies, for oil production.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); diff --git a/.dev/tests/Classes/Model/Repo/sql/product/restore.sql b/.dev/tests/Classes/Model/Repo/sql/product/restore.sql index 19f9d525d5..317f91eb9f 100644 --- a/.dev/tests/Classes/Model/Repo/sql/product/restore.sql +++ b/.dev/tests/Classes/Model/Repo/sql/product/restore.sql @@ -18,14 +18,14 @@ DELETE FROM xlite_products; DELETE FROM xlite_product_translations; DELETE FROM xlite_product_images; -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1,null,1,16,null,1,'',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1002,1,2,3,null,1,'apparel',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (3002,1,4,5,null,1,'downloadables',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1004,1,6,15,null,1,'toys',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (1003,1004,7,8,null,1,'cube-goodies',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (4003,1004,9,10,null,1,'science-toys',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (4004,1004,11,12,null,1,'puzzles',1); -INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanUrl, show_title) VALUES (4002,1004,13,14,null,1,'rc-toys',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1,null,1,16,null,1,'',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1002,1,2,3,null,1,'apparel',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (3002,1,4,5,null,1,'downloadables',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1004,1,6,15,null,1,'toys',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (1003,1004,7,8,null,1,'cube-goodies',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (4003,1004,9,10,null,1,'science-toys',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (4004,1004,11,12,null,1,'puzzles',1); +INSERT INTO `xlite_categories` (category_id, parent_id, lpos, rpos, membership_id, enabled, cleanURL, show_title) VALUES (4002,1004,13,14,null,1,'rc-toys',1); INSERT INTO xlite_category_quick_flags VALUES (1,1,3,3); INSERT INTO xlite_category_quick_flags VALUES (2,1002,0,0); @@ -45,69 +45,69 @@ INSERT INTO `xlite_category_translations` (label_id, code, id, name, description INSERT INTO `xlite_category_translations` (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (106,'en',4002,'RC Toys','','','',''); INSERT INTO `xlite_category_translations` (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (107,'en',1002,'Apparel','Category-1','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,'', 0, 0); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (1,'en',4003,'Planet Express Babydoll','','','','',''); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (2,'en',4004,'Digital Angel','','','','',''); diff --git a/.dev/tests/Classes/Model/Repo/sql/product/setup.sql b/.dev/tests/Classes/Model/Repo/sql/product/setup.sql index 4accafe81c..7cbc84e609 100644 --- a/.dev/tests/Classes/Model/Repo/sql/product/setup.sql +++ b/.dev/tests/Classes/Model/Repo/sql/product/setup.sql @@ -18,9 +18,9 @@ DELETE FROM xlite_products; DELETE FROM xlite_product_translations; DELETE FROM xlite_product_images; -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (1,null,1,6,-1,null,1,'',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14015,1,2,3,0,null,1,'fruit',1); -INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanUrl, show_title) VALUES (14009,1,4,5,0,null,1,'vegetables',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (1,null,1,6,-1,null,1,'',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14015,1,2,3,0,null,1,'fruit',1); +INSERT INTO xlite_categories (category_id, parent_id, lpos, rpos, depth, membership_id, enabled, cleanURL, show_title) VALUES (14009,1,4,5,0,null,1,'vegetables',1); INSERT INTO xlite_category_quick_flags VALUES (1,1,2,2); INSERT INTO xlite_category_quick_flags VALUES (2,14015,0,0); @@ -30,15 +30,15 @@ INSERT INTO xlite_category_translations (label_id, code, id, name, description, INSERT INTO xlite_category_translations (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (2,'en',14015,'Fruit','

In botany, a fruit is the ripened ovary, together with its seeds, of a flowering plant. In cuisine, when discussing fruit as food, the term usually refers to just those plant fruits that are sweet and fleshy, examples of which would be plum, apple, and orange. However, a great many common vegetables, as well as nuts and grains, are the fruit of the plants they come from. Fruits that might not be considered such in a culinary context include gourds (e.g. squash and pumpkin), maize, tomatoes, and green peppers. These are fruits to a botanist, but are generally treated as vegetables in cooking. Some spices, such as allspice and nutmeg, are fruits. Rarely, culinary \"fruits\" are not fruits in the botanical sense, such as rhubarb in which only the sweet leaf petiole is edible.

\n

The term false fruit is sometimes applied to a fruit, like the fig (a multiple-accessory fruit) or to a plant structure that resembles a fruit but is not derived from a flower or flowers. Some gymnosperms, such as yew, have fleshy arils that resemble fruits and some junipers have berry-like, fleshy cones.

\n
From www.knowledgerush.com
','','',''); INSERT INTO xlite_category_translations (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (3,'en',14009,'Vegetables','

Vegetable is a nutritional and culinary term denoting any part of a plant that is commonly consumed by humans as food, but is not regarded as a culinary fruit, nut, herb, spice, or grain. In common usage, vegetables include the leaves (e.g. lettuce), stems (asparagus), and roots (carrot) of various plants. But the term can also encompass non-sweet fruits such as seed-pods (beans), cucumbers, squashes, pumpkins, tomatoes, avocadoes, green peppers, etc.; even some seeds (peas and beans) that are easily softened by soaking.

\n
From www.knowledgerush.com
','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0,'test','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',0,'0.32',0,'disabled','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `clean_url`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0,'test','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',0,'0.32',0,'disabled','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,'','', 0, 0, 0); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (1,'en',15090,'Apple','
Apple
\n

The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family Rosaceae. It is one of the most widely cultivated tree fruits. The tree is small and deciduous, reaching 3 to 12 metres (9.8 to 39 ft) tall, with a broad, often densely twiggy crown. The leaves are alternately arranged simple ovals 5 to 12 cm long and 3–6 centimetres (1.2–2.4 in) broad on a 2 to 5 centimetres (0.79 to 2.0 in) petiole with an acute tip, serrated margin and a slightly downy underside. Blossoms are produced in spring simultaneously with the budding of the leaves. The flowers are white with a pink tinge that gradually fades, five petaled, and 2.5 to 3.5 centimetres (0.98 to 1.4 in) in diameter. The fruit matures in autumn, and is typically 5 to 9 centimetres (2.0 to 3.5 in) diameter. The center of the fruit contains five carpels arranged in a five-point star, each carpel containing one to three seeds.

\n

The tree originated from Central Asia, where its wild ancestor is still found today. There are more than 7,500 known cultivars of apples resulting in a range of desired characteristics. Cultivars vary in their yield and the ultimate size of the tree, even when grown on the same rootstock.

\n

vAt least 55 million tonnes of apples were grown worldwide in 2005, with a value of about $10 billion. China produced about 35% of this total. The United States is the second leading producer, with more than 7.5% of the world production. Turkey, France, Italy, and Iran are also among the leading apple exporters.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (2,'en',16281,'Radish','
Radish
\n

The radish (Raphanus sativus) is an edible root vegetable of the Brassicaceae family that was domesticated in Europe in pre-Roman times. They are grown and consumed throughout the world. Radishes have numerous varieties, varying in size, color and duration of required cultivation time. There are some radishes that are grown for their seeds; oilseed radishes are grown, as the name implies, for oil production.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); diff --git a/src/classes/XLite/Controller/AController.php b/src/classes/XLite/Controller/AController.php index 8fdacf06c1..915214a1a7 100644 --- a/src/classes/XLite/Controller/AController.php +++ b/src/classes/XLite/Controller/AController.php @@ -712,20 +712,7 @@ public function getRootCategoryId() */ public function getCategoryId() { - $categoryID = \XLite\Core\Request::getInstance()->category_id; - - if (!isset($categoryID)) { - $cleanURL = \XLite\Core\Request::getInstance()->clean_url_cat; - - if (!empty($cleanURL)) { - $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); - $categoryID = isset($category) ? $category->getCategoryId() : false; - - \XLite\Core\Request::getInstance()->category_id = $categoryID; - } - } - - return $categoryID ?: $this->getRootCategoryId(); + return \XLite\Core\Request::getInstance()->category_id; } /** diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index f52498fd14..87d11d1766 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -35,6 +35,66 @@ */ abstract class Catalog extends \XLite\Controller\Admin\AAdmin { + /** + * Use this char as separator, if the default one is not set in the config + */ + const CLEAN_URL_DEFAULT_SEPARATOR = '-'; + + // {{{ Abstract methods + + /** + * Check if we need to create new product or modify an existsing one + * + * NOTE: this function is public since it's neede for widgets + * + * @return boolean + * @see ____func_see____ + * @since 1.0.21 + */ + abstract public function isNew(); + + /** + * Return class name for the controller main form + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + abstract protected function getFormClass(); + + /** + * Check if specified clean URL is unique or not + * + * @param string $cleanURL Clean URL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.21 + */ + abstract protected function checkCleanURL($cleanURL); + + /** + * Add new entity + * + * @return void + * @see ____func_see____ + * @since 1.0.21 + */ + abstract protected function doActionAdd(); + + /** + * Modify existing entity + * + * @return void + * @see ____func_see____ + * @since 1.0.21 + */ + abstract protected function doActionUpdate(); + + // }}} + + // {{{ Data management + /** * Return current (or default) category object * @@ -46,4 +106,118 @@ public function getCategory() { return \XLite\Core\Database::getRepo('XLite\Model\Category')->getCategory($this->getCategoryId()); } + + /** + * Get posted data + * + * @param string $field Name of the field to retrieve OPTIONAL + * + * @return mixed + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getPostedData($field = null) + { + $result = parent::getPostedData($field); + + if (!isset($field) || 'cleanURL' === $field) { + $value = $this->generateCleanURL( + parent::getPostedData(parent::getPostedData('autogenerateCleanURL') ? 'name' : 'cleanURL') + ); + + if (isset($field)) { + $result = $value; + + } else { + $result['cleanURL'] = $value; + } + } + + return $result; + } + + // }}} + + // {{{ Clean URL routines + + /** + * For validation in forms + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + public function getCleanURLPattern() + { + return '/[\w' . static::CLEAN_URL_DEFAULT_SEPARATOR . ']+/S'; + } + + /** + * Set error + * + * @param string $cleanURL Clean URL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function setCleanURLError($cleanURL) + { + \XLite\Core\TopMessage::addError( + 'The "{{clean_url}}" clean URL is already defined', + array('clean_url' => $cleanURL) + ); + } + + /** + * Generate clean URL + * + * @param string $name Product name + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + protected function generateCleanURL($name) + { + $result = ''; + + if (isset($name)) { + $separator = \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')); + $result .= strtolower(preg_replace('/\W+/S', $separator ?: static::CLEAN_URL_DEFAULT_SEPARATOR, $name)); + } + + return $result; + } + + // }}} + + // {{{ Action handlers + + /** + * doActionModify + * + * @return void + * @see ____func_see____ + * @since 1.0.21 + */ + protected function doActionModify() + { + if ($this->checkCleanURL($this->getPostedData('cleanURL'))) { + $form = \Includes\Pattern\Factory::create($this->getFormClass()); + $form->getRequestData(); + + if ($form->getValidationMessage()) { + \XLite\Core\TopMessage::addError($form->getValidationMessage()); + + } elseif ($this->isNew()) { + $this->doActionAdd(); + + } else { + $this->doActionUpdate(); + } + } + } + + // }}} } diff --git a/src/classes/XLite/Controller/Admin/Categories.php b/src/classes/XLite/Controller/Admin/Categories.php index a77b4f14eb..042c27b70e 100644 --- a/src/classes/XLite/Controller/Admin/Categories.php +++ b/src/classes/XLite/Controller/Admin/Categories.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -class Categories extends \XLite\Controller\Admin\Base\Catalog +class Categories extends \XLite\Controller\Admin\AAdmin { /** * Return the current page title (for the content area) @@ -46,7 +46,8 @@ public function getTitle() { $category = $this->getCategory(); - return ($category && $this->getRootCategoryId() !== $category->getCategoryId()) + // DO NOT use "!==" here + return ($category && $this->getRootCategoryId() != $category->getCategoryId()) ? $category->getName() : 'Manage categories'; } @@ -63,6 +64,36 @@ public function getMemberships() return \XLite\Core\Database::getRepo('\XLite\Model\Membership')->findAllMemberships(); } + /** + * Return current category Id + * + * @return integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCategoryId() + { + return parent::getCategoryId() ?: $this->getRootCategoryId(); + } + + /** + * Return current (or default) category object + * + * @return \XLite\Model\Category + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCategory() + { + $category = \XLite\Core\Database::getRepo('XLite\Model\Category')->getCategory($this->getCategoryId()); + + if (!isset($category)) { + $category = new \XLite\Model\Category(); + } + + return $category; + } + /** * Return full list of categories * diff --git a/src/classes/XLite/Controller/Admin/Category.php b/src/classes/XLite/Controller/Admin/Category.php index 9cf70d3fdf..9cb986d982 100644 --- a/src/classes/XLite/Controller/Admin/Category.php +++ b/src/classes/XLite/Controller/Admin/Category.php @@ -44,6 +44,36 @@ class Category extends \XLite\Controller\Admin\Base\Catalog */ public $params = array('target', 'category_id', 'mode'); + // {{{ Abstract method implementations + + /** + * Check if we need to create new product or modify an existsing one + * + * NOTE: this function is public since it's neede for widgets + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isNew() + { + return !$this->getCategory()->isPersistent(); + } + + /** + * Return class name for the controller main form + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + protected function getFormClass() + { + return '\XLite\View\Form\Category\Modify\Single'; + } + + // }}} + // {{{ Pages /** @@ -71,14 +101,29 @@ public function getPages() protected function getPageTemplates() { $list = parent::getPageTemplates(); - $list['category_modify'] = 'categories/add_modify_body.tpl'; - $list['default'] = 'categories/add_modify_body.tpl'; + $list['category_modify'] = + $list['default'] = 'categories/modify/body.tpl'; return $list; } // }}} + // {{{ Data management + + /** + * Check current category + * + * @return boolean + * @see ____func_see____ + * @since 1.0.21 + */ + public function isRoot() + { + // DO NOT use "===" here + return $this->getCategory()->getCategoryId() == $this->getRootCategoryId(); + } + /** * Return current (or default) category object * @@ -88,13 +133,33 @@ protected function getPageTemplates() */ public function getCategory() { - $category = ('add_child' === \XLite\Core\Request::getInstance()->mode) - ? new \XLite\Model\Category() - : parent::getCategory(); + $category = parent::getCategory(); + + if (!isset($category)) { + $category = new \XLite\Model\Category(); + } return $category; } + /** + * Return ID for parent category + * + * @return integer + * @see ____func_see____ + * @since 1.0.21 + */ + public function getParentCategoryId() + { + $result = intval(\XLite\Core\Request::getInstance()->parent_id); + + if (0 >= $result) { + $result = $this->getRootCategoryId(); + } + + return $result; + } + /** * Return TRUE if category can have image * Return FALSE if category cannot have image (new or root one) @@ -105,8 +170,7 @@ public function getCategory() */ public function hasImage() { - return 'add_child' !== \XLite\Core\Request::getInstance()->mode - && $this->getRootCategoryId() !== $this->getCategoryId(); + return !$this->isNew() && !$this->isRoot(); } /** @@ -118,144 +182,76 @@ public function hasImage() */ public function getTitle() { - return ('add_child' === \XLite\Core\Request::getInstance()->mode) - ? 'Add category' - : parent::getCategory()->getName(); + return $this->isNew() ? 'Add category' : $this->getCategory()->getName(); } - /** - * doActionAddChild - * - * @return void - * @see ____func_see____ - * @since 1.0.0 - */ - protected function doActionAddChild() - { - $properties = $this->validateCategoryData(true); - - if ($properties) { - $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->insert( - array('parent_id' => $this->getCategoryId()) + $properties - ); - - \XLite\Core\Database::getRepo('\XLite\Model\Category')->update($category, $properties); + // }}} - $this->setReturnURL($this->buildURL('categories', '', array('category_id' => $category->getCategoryId()))); - } - } + // {{{ Clean URL routines /** - * doActionModify + * Check if specified clean URL is unique or not * - * @return void + * @param string $cleanURL Clean URL + * + * @return boolean * @see ____func_see____ * @since 1.0.0 */ - protected function doActionModify() + protected function checkCleanURL($cleanURL) { - $properties = $this->validateCategoryData(); + $result = empty($cleanURL); - if ($properties) { + if (!$result) { + $entity = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); + // DO NOT use "===" here + $result = !isset($entity) || $entity->getCategoryId() == $this->getCategoryId(); - \XLite\Core\Database::getRepo('\XLite\Model\Category') - ->update($this->getCategory(), $properties); - - $this->setReturnURL($this->buildURL('categories', '', array('category_id' => $properties['category_id']))); + if (!$result) { + $this->setCleanURLError($cleanURL); + } } + + return $result; } + // }}} + + // {{{ Action handlers + /** - * Validate values passed from the REQUEST for updating/creating category + * doActionAdd * - * @param boolean $isNewObject Flag - is a data for a new category or for updaing existing category OPTIONAL - * - * @return array + * @return void * @see ____func_see____ * @since 1.0.0 */ - protected function validateCategoryData($isNewObject = false) + protected function doActionAdd() { - $postedData = \XLite\Core\Request::getInstance()->getData(); - - $data = array(); - $isValid = true; - - $fieldsSet = array( - 'name', - 'description', - 'meta_tags', - 'meta_desc', - 'meta_title', - 'enabled', - 'membership_id', - 'clean_url', - 'show_title', + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->insert( + array('parent_id' => $this->getParentCategoryId()) + $this->getPostedData() ); - if (!$isNewObject) { - $data['category_id'] = intval($postedData['category_id']); - } - - foreach ($fieldsSet as $field) { - - if (isset($postedData[$field])) { - $data[$field] = $postedData[$field]; - } - - // 'Clean URL' is optional field and must be a unique - if ('clean_url' === $field && isset($data['clean_url'])) { - - $data['clean_url'] = $this->sanitizeCleanURL($data['clean_url']); - - if ( - !empty($data['clean_url']) - && !$this->isCleanURLUnique($data['clean_url'], (!$isNewObject ? $data['category_id'] : null)) - ) { - - \XLite\Core\TopMessage::addError( - 'The Clean URL you specified is already in use. Please specify another Clean URL' - ); - - $isValid = false; - } - - } elseif ('name' === $field) { - // 'Name' is a mandatory field + if (isset($category)) { + \XLite\Core\TopMessage::addInfo('New category has been added successfully'); - if (!isset ($data['name']) || 0 == strlen(trim($data['name']))) { - - \XLite\Core\TopMessage::addError( - 'Not empty category name must be specified' - ); - - $isValid = false; - } - - } elseif ('enabled' === $field) { - // 'Enabled' field value must be either 0 or 1 - $data['enabled'] = ((isset($data['enabled']) && $data['enabled'] == '1') ? 1 : 0); - } + $this->setReturnURL($this->buildURL('categories', '', array('category_id' => $category->getCategoryId()))); } - - return $isValid ? $data : false; } /** - * Check - specified clean URL unique or not + * doActionUpdate * - * @param string $cleanURL Clean URL - * @param integer $categoryId Category Id OPTIONAL - * - * @return boolean + * @return void * @see ____func_see____ * @since 1.0.0 */ - protected function isCleanURLUnique($cleanURL, $categoryId = null) + protected function doActionUpdate() { - $result = \XLite\Core\Database::getRepo('XLite\Model\Category')->findOneByCleanURL($cleanURL); + \XLite\Core\Database::getRepo('\XLite\Model\Category')->update($this->getCategory(), $this->getPostedData()); - return !isset($result) - || (!is_null($categoryId) && intval($categoryId) == intval($result->getCategoryId())); + \XLite\Core\TopMessage::addInfo('Category has been successfully updated'); } + + // }}} } diff --git a/src/classes/XLite/Controller/Admin/ImportExport.php b/src/classes/XLite/Controller/Admin/ImportExport.php index 18b3d9fe82..429f3236e8 100644 --- a/src/classes/XLite/Controller/Admin/ImportExport.php +++ b/src/classes/XLite/Controller/Admin/ImportExport.php @@ -204,7 +204,7 @@ protected function defineProductColumns() 'enabled' => array('type' => static::TYPE_BOOLEAN), 'weight' => array('type' => static::TYPE_FLOAT), 'freeShipping' => array('type' => static::TYPE_BOOLEAN), - 'cleanUrl' => array('type' => static::TYPE_STRING, 'length' => 255), + 'cleanURL' => array('type' => static::TYPE_STRING, 'length' => 255), 'arrivalDate' => array('type' => static::TYPE_DATE), ); } diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index fab54431ee..a5183080f2 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -class Product extends \XLite\Controller\Admin\AAdmin +class Product extends \XLite\Controller\Admin\Base\Catalog { /** * FIXME- backward compatibility @@ -42,7 +42,37 @@ class Product extends \XLite\Controller\Admin\AAdmin * @see ____var_see____ * @since 1.0.0 */ - public $params = array('target', 'id', 'page', 'backURL'); + public $params = array('target', 'id', 'product_id', 'page', 'backURL'); + + // {{{ Abstract method implementations + + /** + * Check if we need to create new product or modify an existsing one + * + * NOTE: this function is public since it's neede for widgets + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isNew() + { + return !$this->getProduct()->isPersistent(); + } + + /** + * Return class name for the controller main form + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + protected function getFormClass() + { + return '\XLite\View\Form\Product\Modify\Single'; + } + + // }}} // {{{ Pages @@ -89,6 +119,8 @@ protected function getPageTemplates() // }}} + // {{{ Data management + /** * Alias * @@ -98,9 +130,7 @@ protected function getPageTemplates() */ public function getProduct() { - if (!$this->isNew()) { - $result = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($this->getProductId()); - } + $result = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($this->getProductId()); if (!isset($result)) { $result = new \XLite\Model\Product(); @@ -162,23 +192,13 @@ public function getCategoryId() */ public function getProductId() { - return isset(\XLite\Core\Request::getInstance()->id) - ? intval(\XLite\Core\Request::getInstance()->id) - : intval(\XLite\Core\Request::getInstance()->product_id); - } + $result = intval(\XLite\Core\Request::getInstance()->product_id); - /** - * Check if we need to create new product or modify an existsing one - * - * NOTE: this function is public since it's neede for widgets - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - public function isNew() - { - return 0 >= $this->getProductId(); + if (0 >= $result) { + $result = intval(\XLite\Core\Request::getInstance()->id); + } + + return $result; } /** @@ -197,7 +217,7 @@ protected function getCategoryProducts(\XLite\Model\Product $product) foreach ((array) $this->getPostedData('category_ids') as $categoryId) { $data[] = new \XLite\Model\CategoryProducts( array( - 'id' => $product->getProductId(), + 'product_id' => $product->getProductId(), 'category_id' => $categoryId, 'category' => \XLite\Core\Database::getRepo('\XLite\Model\Category')->find($categoryId), 'product' => $product, @@ -236,25 +256,37 @@ protected function getClasses(\XLite\Model\Product $product) return array('classes' => $data); } - // {{{ Clean URL routines - /** - * Set error + * Get posted data * - * @param string $cleanURL Clean URL + * @param string $field Name of the field to retrieve OPTIONAL * - * @return boolean + * @return mixed * @see ____func_see____ * @since 1.0.0 */ - protected function setCleanURLError($cleanURL) + protected function getPostedData($field = null) { - \XLite\Core\TopMessage::addError( - 'The "{{clean_url}}" clean URL is already defined', - array('clean_url' => $cleanURL) - ); + $result = parent::getPostedData($field); + + if (!isset($field) || 'arrivalDate' === $field) { + $value = strtotime(parent::getPostedData('arrivalDate')) ?: time(); + + if (isset($field)) { + $result = $value; + + } else { + $result['arrivalDate'] = $value; + } + } + + return $result; } + // }}} + + // {{{ Clean URL routines + /** * Check if specified clean URL is unique or not * @@ -265,13 +297,14 @@ protected function setCleanURLError($cleanURL) * @since 1.0.0 */ protected function checkCleanURL($cleanURL) - { + { $result = empty($cleanURL); - + if (!$result) { - $entity = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneByCleanURL($cleanURL); - $result = !isset($entity) || $entity->getProductId() === $this->getProductId(); - + $entity = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); + // DO NOT use "===" here + $result = !isset($entity) || $entity->getProductId() == $this->getProductId(); + if (!$result) { $this->setCleanURLError($cleanURL); } @@ -280,42 +313,9 @@ protected function checkCleanURL($cleanURL) return $result; } - /** - * Generate clean URL - * - * @param string $name Product name - * - * @return string - * @see ____func_see____ - * @since 1.0.21 - */ - protected function generateCleanURL($name) - { - $result = null; - - if (isset($name)) { - $separator = \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')); - $result = strtolower(preg_replace('/\W+/S', $separator ?: '-', $name)); - } - - return $result; - } - // }}} - /** - * doActionModify - * - * @return void - * @see ____func_see____ - * @since 1.0.0 - */ - protected function doActionModify() - { - if ($this->checkCleanURL($this->getPostedData('clean_url'))) { - $this->isNew() ? $this->doActionAdd() : $this->doActionUpdate(); - } - } + // {{{ Action handlers /** * doActionAdd @@ -326,34 +326,25 @@ protected function doActionModify() */ protected function doActionAdd() { - $form = new \XLite\View\Form\Product\Modify\Single(); - $requestData = $form->getRequestData(); + $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->insert($this->getPostedData()); + + if (isset($product)) { + $inventory = new \XLite\Model\Inventory(); + $inventory->setProduct($product); + + // Create associations (categories and images) + \XLite\Core\Database::getRepo('\XLite\Model\Product')->update( + $product, + $this->getCategoryProducts($product) + + array( + 'inventory' => $inventory, + ) + ); - if ($form->getValidationMessage()) { - \XLite\Core\TopMessage::addError($form->getValidationMessage()); + \XLite\Core\TopMessage::addInfo('New product has been added successfully'); - } else { - // Insert record into main table - $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->insert($this->getPostedData()); - - if ($product) { - $inventory = new \XLite\Model\Inventory(); - $inventory->setProduct($product); - - // Create associations (categories and images) - \XLite\Core\Database::getRepo('\XLite\Model\Product')->update( - $product, - $this->getCategoryProducts($product) - + array( - 'inventory' => $inventory, - ) - ); - - \XLite\Core\TopMessage::addInfo('New product has been added successfully'); - - // Add the ID of created product to the return URL - $this->setReturnURL($this->buildURL('product', '', array('id' => $product->getProductId()))); - } + // Add the ID of created product to the return URL + $this->setReturnURL($this->buildURL('product', '', array('product_id' => $product->getProductId()))); } } @@ -366,30 +357,24 @@ protected function doActionAdd() */ protected function doActionUpdate() { - $form = new \XLite\View\Form\Product\Modify\Single(); - $requestData = $form->getRequestData(); - - if ($form->getValidationMessage()) { - \XLite\Core\TopMessage::addError($form->getValidationMessage()); - - } else { - $product = $this->getProduct(); + $product = $this->getProduct(); - // Clear all category associates - \XLite\Core\Database::getRepo('\XLite\Model\CategoryProducts')->deleteInBatch( - $product->getCategoryProducts()->toArray() - ); + // Clear all category associates + \XLite\Core\Database::getRepo('\XLite\Model\CategoryProducts')->deleteInBatch( + $product->getCategoryProducts()->toArray() + ); - $product->getClasses()->clear(); - $data = $this->getCategoryProducts($product) + $this->getClasses($product) + $this->getPostedData(); + $product->getClasses()->clear(); + $data = $this->getCategoryProducts($product) + $this->getClasses($product) + $this->getPostedData(); - // Update all data - \XLite\Core\Database::getRepo('\XLite\Model\Product')->update($product, $data); + // Update all data + \XLite\Core\Database::getRepo('\XLite\Model\Product')->update($product, $data); - \XLite\Core\TopMessage::addInfo('Product info has been updated successfully'); - } + \XLite\Core\TopMessage::addInfo('Product info has been updated successfully'); } + // TODO: refactor + /** * Delete detailed image * @@ -483,47 +468,5 @@ protected function doActionUpdateInventory() \XLite\Core\Database::getEM()->flush(); } - /** - * Get posted data - * - * @param string $field Name of the field to retrieve OPTIONAL - * - * @return mixed - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getPostedData($field = null) - { - $result = parent::getPostedData($field); - - foreach (array('arrivalDate', 'cleanURL') as $name) { - $value = isset($field) - ? ($name === $field ? $result : null) - : \Includes\Utils\ArrayManager::getIndex($result, $name); - - switch ($name) { - case 'arrivalDate': - $value = strtotime($value) ?: time(); - break; - - case 'cleanURL': - if (parent::getPostedData('autogenerateCleanURL')) { - $value = $this->generateCleanURL(parent::getPostedData('name')); - } - break; - - default: - // ... - } - - if (isset($field)) { - $result = $value; - - } else { - $result[$name] = $value; - } - } - - return $result; - } + // }}} } diff --git a/src/classes/XLite/Controller/Admin/ProductClass.php b/src/classes/XLite/Controller/Admin/ProductClass.php index 8b32dd933d..814c6fa10d 100644 --- a/src/classes/XLite/Controller/Admin/ProductClass.php +++ b/src/classes/XLite/Controller/Admin/ProductClass.php @@ -43,7 +43,6 @@ class ProductClass extends \XLite\Controller\Admin\AAdmin const STATUS_SUCCESS = 'success'; const STATUS_FAILED = 'failed'; - /** * data * @@ -56,7 +55,6 @@ class ProductClass extends \XLite\Controller\Admin\AAdmin 'data' => '', ); - /** * Remove product class * diff --git a/src/classes/XLite/Controller/Admin/Profile.php b/src/classes/XLite/Controller/Admin/Profile.php index 8ad38a8ef8..1321f80519 100644 --- a/src/classes/XLite/Controller/Admin/Profile.php +++ b/src/classes/XLite/Controller/Admin/Profile.php @@ -59,7 +59,6 @@ public function getTitle() return 'Edit profile'; } - /** * Check if current page is accessible * @@ -84,7 +83,6 @@ public function isRegisterMode() return self::getRegisterMode() === \XLite\Core\Request::getInstance()->mode; } - /** * Alias * @@ -196,11 +194,10 @@ protected function actionPostprocessModify() */ protected function doActionDelete() { - $userLogin = $this->getProfile()->getLogin(); $result = $this->getModelForm()->performAction('delete'); // Send notification to the user - \XLite\Core\Mailer::sendProfileDeletedAdminNotification($userLogin); + \XLite\Core\Mailer::sendProfileDeletedAdminNotification($this->getProfile()->getLogin()); $this->setReturnURL($this->buildURL('profile_list')); } diff --git a/src/classes/XLite/Controller/Customer/ACustomer.php b/src/classes/XLite/Controller/Customer/ACustomer.php index 057ea716d7..0d2e3d2893 100644 --- a/src/classes/XLite/Controller/Customer/ACustomer.php +++ b/src/classes/XLite/Controller/Customer/ACustomer.php @@ -145,6 +145,31 @@ protected function addLocationNode($name, $link = null, array $subnodes = null) // }}} + /** + * Return current category Id + * + * @return integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCategoryId() + { + $categoryID = parent::getCategoryId(); + + if (LC_USE_CLEAN_URLS && !isset($categoryID)) { + $cleanURL = \XLite\Core\Request::getInstance()->cleanURLCat; + + if (!empty($cleanURL)) { + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); + $categoryID = isset($category) ? $category->getCategoryId() : false; + + \XLite\Core\Request::getInstance()->category_id = $categoryID; + } + } + + return $categoryID ?: $this->getRootCategoryId(); + } + /** * Return cart instance * diff --git a/src/classes/XLite/Controller/Customer/Product.php b/src/classes/XLite/Controller/Customer/Product.php index fda223504d..d7bdf161b3 100644 --- a/src/classes/XLite/Controller/Customer/Product.php +++ b/src/classes/XLite/Controller/Customer/Product.php @@ -134,8 +134,8 @@ protected function getProductId() { $productID = \XLite\Core\Request::getInstance()->product_id; - if (!isset($productID)) { - $cleanURL = \XLite\Core\Request::getInstance()->clean_url_prod; + if (LC_USE_CLEAN_URLS && !isset($productID)) { + $cleanURL = \XLite\Core\Request::getInstance()->cleanURLProd; if (!empty($cleanURL)) { $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index 6386a9389d..12bf972b6f 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -42,7 +42,6 @@ class Converter extends \XLite\Base\Singleton const MEGABYTE = 1048576; const KILOBYTE = 1024; - /** * Method name translation records * diff --git a/src/classes/XLite/Core/Handler.php b/src/classes/XLite/Core/Handler.php index 0d33824f5b..726f1c8fac 100644 --- a/src/classes/XLite/Core/Handler.php +++ b/src/classes/XLite/Core/Handler.php @@ -52,7 +52,6 @@ abstract class Handler extends \XLite\Base const PARAM_AJAX_TARGET = 'target'; const PARAM_AJAX_WIDGET = 'widget'; - /** * Widget params * diff --git a/src/classes/XLite/Core/Validator/AValidator.php b/src/classes/XLite/Core/Validator/AValidator.php index 89003cf6a3..58d48ac9b2 100644 --- a/src/classes/XLite/Core/Validator/AValidator.php +++ b/src/classes/XLite/Core/Validator/AValidator.php @@ -76,6 +76,7 @@ protected function throwError($message, array $arguments = array(), $pathItem = { $exception = new \XLite\Core\Validator\Exception($message); $exception->setLabelArguments($arguments); + if (isset($pathItem)) { $exception->addPathItem($pathItem); } diff --git a/src/classes/XLite/Core/Validator/Enum.php b/src/classes/XLite/Core/Validator/Enum.php index 5104a2061d..b6addf5559 100644 --- a/src/classes/XLite/Core/Validator/Enum.php +++ b/src/classes/XLite/Core/Validator/Enum.php @@ -33,17 +33,8 @@ * @see ____class_see____ * @since 1.0.0 */ -class Enum extends \XLite\Core\Validator\Scalar +class Enum extends \XLite\Core\Validator\Enum\AEnum { - /** - * Items list - * - * @var \Doctrine\Common\Collections\ArrayCollection - * @see ____var_see____ - * @since 1.0.0 - */ - protected $list; - /** * Constructor * @@ -51,37 +42,8 @@ class Enum extends \XLite\Core\Validator\Scalar * @see ____func_see____ * @since 1.0.0 */ - public function __construct() - { - $this->list = new \Doctrine\Common\Collections\ArrayCollection; - } - - /** - * Get list - * - * @return \Doctrine\Common\Collections\ArrayCollection - * @see ____func_see____ - * @since 1.0.0 - */ - public function getList() - { - return $this->list; - } - - /** - * Validate - * - * @param mixed $data Data - * - * @return void - * @throws \XLite\Core\Validator\Exception - * @see ____func_see____ - * @since 1.0.0 - */ - public function validate($data) + public function __construct(array $list) { - if (!$this->list->contains($data)) { - throw $this->throwError('Value is forbidden'); - } + $this->list = $list; } } diff --git a/src/classes/XLite/Core/Validator/Enum/AEnum.php b/src/classes/XLite/Core/Validator/Enum/AEnum.php new file mode 100644 index 0000000000..1e3fa89537 --- /dev/null +++ b/src/classes/XLite/Core/Validator/Enum/AEnum.php @@ -0,0 +1,63 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.21 + */ + +namespace XLite\Core\Validator\Enum; + +/** + * AEnum + * + * @see ____class_see____ + * @since 1.0.21 + */ +abstract class AEnum extends \XLite\Core\Validator\Scalar +{ + /** + * Items list + * + * @var \Doctrine\Common\Collections\ArrayCollection + * @see ____var_see____ + * @since 1.0.0 + */ + protected $list = array(); + + /** + * Validate + * + * @param mixed $data Data + * + * @return void + * @throws \XLite\Core\Validator\Exception + * @see ____func_see____ + * @since 1.0.0 + */ + public function validate($data) + { + if (!in_array($data, $this->list)) { + throw $this->throwError('Unallowed value'); + } + } +} diff --git a/src/classes/XLite/Core/Validator/Enum/Boolean.php b/src/classes/XLite/Core/Validator/Enum/Boolean.php index 85aa445cd3..43f9899804 100644 --- a/src/classes/XLite/Core/Validator/Enum/Boolean.php +++ b/src/classes/XLite/Core/Validator/Enum/Boolean.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -class Boolean extends \XLite\Core\Validator\Enum +class Boolean extends \XLite\Core\Validator\Enum\AEnum { /** * Constructor @@ -44,8 +44,6 @@ class Boolean extends \XLite\Core\Validator\Enum */ public function __construct() { - parent::__construct(); - $this->list[] = '1'; $this->list[] = '0'; } diff --git a/src/classes/XLite/Model/AEntity.php b/src/classes/XLite/Model/AEntity.php index ec0e467caf..c4b10a6083 100644 --- a/src/classes/XLite/Model/AEntity.php +++ b/src/classes/XLite/Model/AEntity.php @@ -256,7 +256,7 @@ public function __call($method, array $args = array()) */ public function isPersistent() { - return (bool) $this->{'get' . $this->getMethodName($this->getRepository()->getPrimaryKeyField())}(); + return (bool) $this->getUniqueIdentifier(); } /** @@ -268,9 +268,7 @@ public function isPersistent() */ public function getUniqueIdentifier() { - $method = 'get' . $this->getMethodName($this->getRepository()->getPrimaryKeyField()); - - return $this->$method(); + return $this->{'get' . $this->getMethodName($this->getRepository()->getPrimaryKeyField())}(); } /** diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index 49732b180d..75299fff15 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -40,7 +40,7 @@ * @Index (name="sku", columns={"sku"}), * @Index (name="weight", columns={"weight"}), * @Index (name="free_shipping", columns={"free_shipping"}), - * @Index (name="clean_url", columns={"clean_url"}), + * @Index (name="cleanURL", columns={"cleanURL"}), * @Index (name="customerArea", columns={"enabled","arrivalDate"}) * } * ) @@ -125,7 +125,7 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder * * @Column (type="string", length="255", nullable=false) */ - protected $clean_url = ''; + protected $cleanURL = ''; /** * Custom javascript code diff --git a/src/classes/XLite/Model/Repo/Category.php b/src/classes/XLite/Model/Repo/Category.php index 3e894e4332..0cdbadcc3a 100644 --- a/src/classes/XLite/Model/Repo/Category.php +++ b/src/classes/XLite/Model/Repo/Category.php @@ -67,7 +67,7 @@ class Category extends \XLite\Model\Repo\Base\I18n */ public function getRootCategoryId() { - return self::CATEGORY_ID_ROOT; + return static::CATEGORY_ID_ROOT; } /** diff --git a/src/classes/XLite/Model/Repo/Product.php b/src/classes/XLite/Model/Repo/Product.php index 199df07d77..5733187942 100644 --- a/src/classes/XLite/Model/Repo/Product.php +++ b/src/classes/XLite/Model/Repo/Product.php @@ -27,9 +27,6 @@ namespace XLite\Model\Repo; -// TODO - requires the multiple inheritance -// TODO - must also extends \XLite\Model\Repo\the \XLite\Model\Repo\Base\Searchable - /** * The "product" model repository * @@ -41,7 +38,6 @@ class Product extends \XLite\Model\Repo\Base\I18n implements \XLite\Base\IREST /** * Allowable search params */ - const P_SKU = 'SKU'; const P_CATEGORY_ID = 'categoryId'; const P_SUBSTRING = 'substring'; @@ -177,7 +173,7 @@ public function createQueryBuilder($alias = null) public function findOneByCleanURL($url) { return $this->createQueryBuilder('p') - ->andWhere('p.clean_url = :url') + ->andWhere('p.cleanURL = :url') ->setParameter('url', $url) ->setMaxResults(1) ->getSingleResult(); diff --git a/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php b/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php index 8d308fc293..ea1a06be35 100644 --- a/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php +++ b/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php @@ -160,9 +160,9 @@ protected function getParamsObjectAttachment() $attachment = $this->getAttachment(); return array( - 'target' => 'product', - 'page' => \XLite\Core\Request::getInstance()->fileObject, - 'id' => $attachment->getProduct()->getProductId(), + 'target' => 'product', + 'page' => \XLite\Core\Request::getInstance()->fileObject, + 'product_id' => $attachment->getProduct()->getProductId(), ); } diff --git a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php index 571a70c2ec..f290ca5c45 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php @@ -40,7 +40,6 @@ class ModifyProductOptions extends \XLite\View\AView */ const PARAM_PRODUCT = 'product'; - /** * Option groups list (cache) * @@ -97,10 +96,10 @@ public function getOptionGroupLink(\XLite\Module\CDev\ProductOptions\Model\Optio 'product', '', array( - 'page' => 'product_options', - 'id' => $this->getProductId(), - 'groupId' => $option->getGroupId(), - 'language' => \XLite\Core\Request::getInstance()->language, + 'page' => 'product_options', + 'product_id' => $this->getProductId(), + 'groupId' => $option->getGroupId(), + 'language' => \XLite\Core\Request::getInstance()->language, ) ); } @@ -115,7 +114,6 @@ public function getOptionGroupLink(\XLite\Module\CDev\ProductOptions\Model\Optio public function getCSSFiles() { $list = parent::getCSSFiles(); - $list[] = 'modules/CDev/ProductOptions/style.css'; return $list; diff --git a/src/classes/XLite/View/Button/APopupButton.php b/src/classes/XLite/View/Button/APopupButton.php index c14f74e87a..3a4a84c8be 100644 --- a/src/classes/XLite/View/Button/APopupButton.php +++ b/src/classes/XLite/View/Button/APopupButton.php @@ -98,7 +98,7 @@ public function getCommonFiles() */ protected function getButtonContent() { - return $this->getParam(self::PARAM_LABEL) ?: $this->getDefaultLabel(); + return $this->getParam(static::PARAM_LABEL) ?: $this->getDefaultLabel(); } /** diff --git a/src/classes/XLite/View/Button/FileSelector.php b/src/classes/XLite/View/Button/FileSelector.php index 8cf295b0f5..867d2535e2 100644 --- a/src/classes/XLite/View/Button/FileSelector.php +++ b/src/classes/XLite/View/Button/FileSelector.php @@ -82,9 +82,7 @@ public function getJSFiles() public function getCSSFiles() { $list = parent::getCSSFiles(); - $list[] = 'file_selector/style.css'; - // TODO: dynamic CSS inclusion $list[] = 'browse_server/style.css'; @@ -102,10 +100,10 @@ protected function prepareURLParams() { return array( 'target' => 'select_file', - 'object' => $this->getParam(self::PARAM_OBJECT), - 'objectId' => $this->getParam(self::PARAM_OBJECT_ID), - 'fileObject' => $this->getParam(self::PARAM_FILE_OBJECT), - 'fileObjectId' => $this->getParam(self::PARAM_FILE_OBJECT_ID), + 'object' => $this->getParam(static::PARAM_OBJECT), + 'objectId' => $this->getParam(static::PARAM_OBJECT_ID), + 'fileObject' => $this->getParam(static::PARAM_FILE_OBJECT), + 'fileObjectId' => $this->getParam(static::PARAM_FILE_OBJECT_ID), 'widget' => '\XLite\View\FileSelectorDialog', ); } @@ -134,10 +132,10 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - self::PARAM_OBJECT => new \XLite\Model\WidgetParam\String('Object', 'product'), - self::PARAM_OBJECT_ID => new \XLite\Model\WidgetParam\Int('Object ID', 0), - self::PARAM_FILE_OBJECT => new \XLite\Model\WidgetParam\String('File object', 'image'), - self::PARAM_FILE_OBJECT_ID => new \XLite\Model\WidgetParam\Int('File object ID', 0), + static::PARAM_OBJECT => new \XLite\Model\WidgetParam\String('Object', 'product'), + static::PARAM_OBJECT_ID => new \XLite\Model\WidgetParam\Int('Object ID', 0), + static::PARAM_FILE_OBJECT => new \XLite\Model\WidgetParam\String('File object', 'image'), + static::PARAM_FILE_OBJECT_ID => new \XLite\Model\WidgetParam\Int('File object ID', 0), ); } @@ -150,6 +148,6 @@ protected function defineWidgetParams() */ protected function getClass() { - return 'file-selector-button ' . ($this->getParam(self::PARAM_STYLE) ?: ''); + return 'file-selector-button ' . ($this->getParam(static::PARAM_STYLE) ?: ''); } } diff --git a/src/classes/XLite/View/Category.php b/src/classes/XLite/View/Category.php index 6943a558ce..da79ee9f78 100644 --- a/src/classes/XLite/View/Category.php +++ b/src/classes/XLite/View/Category.php @@ -42,7 +42,6 @@ class Category extends \XLite\View\AView */ const WEB_LC_ROOT = '{{WEB_LC_ROOT}}'; - /** * Return list of targets allowed for this widget * @@ -109,7 +108,7 @@ protected function getDescription() protected function getWebPreprocessingTags() { return array( - self::WEB_LC_ROOT, + static::WEB_LC_ROOT, ); } diff --git a/src/classes/XLite/View/Form/Category/ACategory.php b/src/classes/XLite/View/Form/Category/ACategory.php new file mode 100644 index 0000000000..e8f4a59e56 --- /dev/null +++ b/src/classes/XLite/View/Form/Category/ACategory.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.21 + */ + +namespace XLite\View\Form\Category; + +/** + * ACategory + * + * @see ____class_see____ + * @since 1.0.21 + */ +abstract class ACategory extends \XLite\View\Form\AForm +{ +} diff --git a/src/classes/XLite/View/Form/Category/Modify/AModify.php b/src/classes/XLite/View/Form/Category/Modify/AModify.php new file mode 100644 index 0000000000..67030fd69c --- /dev/null +++ b/src/classes/XLite/View/Form/Category/Modify/AModify.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.21 + */ + +namespace XLite\View\Form\Category\Modify; + +/** + * AModify + * + * @see ____class_see____ + * @since 1.0.21 + */ +abstract class AModify extends \XLite\View\Form\Category\ACategory +{ +} diff --git a/src/classes/XLite/View/Form/Category/Modify/Single.php b/src/classes/XLite/View/Form/Category/Modify/Single.php new file mode 100644 index 0000000000..c8fbaab8b9 --- /dev/null +++ b/src/classes/XLite/View/Form/Category/Modify/Single.php @@ -0,0 +1,119 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.21 + */ + +namespace XLite\View\Form\Category\Modify; + +/** + * Single + * + * @see ____class_see____ + * @since 1.0.21 + */ +class Single extends \XLite\View\Form\Category\Modify\AModify +{ + /** + * getDefaultTarget + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTarget() + { + return 'category'; + } + + /** + * getDefaultAction + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultAction() + { + return 'modify'; + } + + /** + * getDefaultParams + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultParams() + { + $list = parent::getDefaultParams(); + $list['category_id'] = $this->getCategoryId(); + $list['parent_id'] = $this->getParentCategoryId(); + + return $list; + } + + /** + * Get validator + * + * @return \XLite\Core\Validator\HashArray + * @see ____func_see____ + * @since 1.0.21 + */ + protected function getValidator() + { + $validator = parent::getValidator(); + $this->setDataValidators($validator->addPair('postedData', new \XLite\Core\Validator\HashArray())); + + return $validator; + } + + /** + * Set validators pairs for products data + * + * @param mixed $data Data + * + * @return null + * @see ____func_see____ + * @since 1.0.21 + */ + protected function setDataValidators($data) + { + $data->addPair('name', new \XLite\Core\Validator\String(true), null, 'Category name'); + $data->addPair('show_title', new \XLite\Core\Validator\Enum\Boolean(), null, 'Category title'); + $data->addPair('description', new \XLite\Core\Validator\String(), null, 'Description'); + $data->addPair('enabled', new \XLite\Core\Validator\Enum\Boolean(), null, 'Availability'); + $data->addPair('meta_title', new \XLite\Core\Validator\String(), null, 'Meta title'); + $data->addPair('meta_tags', new \XLite\Core\Validator\String(), null, 'Meta keywords'); + $data->addPair('meta_desc', new \XLite\Core\Validator\String(), null, 'Meta description'); + + $data->addPair( + 'cleanURL', + new \XLite\Core\Validator\String\RegExp(false, $this->getCleanURLPattern()), + null, + 'Clean URL' + ); + } +} diff --git a/src/classes/XLite/View/Form/Product/AProduct.php b/src/classes/XLite/View/Form/Product/AProduct.php index fc1a60c44f..ca91bca97b 100644 --- a/src/classes/XLite/View/Form/Product/AProduct.php +++ b/src/classes/XLite/View/Form/Product/AProduct.php @@ -38,10 +38,8 @@ abstract class AProduct extends \XLite\View\Form\AForm /** * Widget parameter names */ - const PARAM_PRODUCT = 'product'; - /** * Define widget parameters * @@ -54,7 +52,7 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - self::PARAM_PRODUCT => new \XLite\Model\WidgetParam\Object( + static::PARAM_PRODUCT => new \XLite\Model\WidgetParam\Object( 'Product', null, false, '\XLite\Model\Product' ), ); @@ -69,6 +67,6 @@ protected function defineWidgetParams() */ protected function getProduct() { - return $this->getParam(self::PARAM_PRODUCT); + return $this->getParam(static::PARAM_PRODUCT); } } diff --git a/src/classes/XLite/View/Form/Product/Modify/Base/Single.php b/src/classes/XLite/View/Form/Product/Modify/Base/Single.php index c1270e89af..2c7379e6e0 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Base/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Base/Single.php @@ -56,6 +56,6 @@ protected function getDefaultTarget() */ protected function getDefaultParams() { - return parent::getDefaultParams() + array('id' => $this->getProductId()); + return parent::getDefaultParams() + array('product_id' => $this->getProductId()); } } diff --git a/src/classes/XLite/View/Form/Product/Modify/Single.php b/src/classes/XLite/View/Form/Product/Modify/Single.php index 747386b8e2..0072357734 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Single.php @@ -69,8 +69,7 @@ protected function isMultipart() protected function getValidator() { $validator = parent::getValidator(); - $data = $validator->addPair('postedData', new \XLite\Core\Validator\HashArray()); - $this->setDataValidators($data); + $this->setDataValidators($validator->addPair('postedData', new \XLite\Core\Validator\HashArray())); return $validator; } @@ -88,12 +87,8 @@ protected function setDataValidators(&$data) { $data->addPair('sku', new \XLite\Core\Validator\String(), null, 'SKU'); $data->addPair('name', new \XLite\Core\Validator\String(true), null, 'Product Name'); - $data->addPair('category_ids', new \XLite\Core\Validator\PlainArray(), \XLite\Core\Validator\Pair\APair::SOFT, 'Category') - ->setValidator(new \XLite\Core\Validator\Integer()); - $data->addPair('price', new \XLite\Core\Validator\Float(), null, 'Price') - ->setRange(0); - $data->addPair('weight', new \XLite\Core\Validator\Float(), null, 'Weight') - ->setRange(0); + $data->addPair('price', new \XLite\Core\Validator\Float(), null, 'Price')->setRange(0); + $data->addPair('weight', new \XLite\Core\Validator\Float(), null, 'Weight')->setRange(0); $data->addPair('free_shipping', new \XLite\Core\Validator\Enum\Boolean(), null, 'Shippable'); $data->addPair('enabled', new \XLite\Core\Validator\Enum\Boolean(), null, 'Available for sale'); $data->addPair('meta_title', new \XLite\Core\Validator\String(), null, 'Product page title'); @@ -101,6 +96,19 @@ protected function setDataValidators(&$data) $data->addPair('description', new \XLite\Core\Validator\String(), null, 'Full description'); $data->addPair('meta_tags', new \XLite\Core\Validator\String(), null, 'Meta keywords'); $data->addPair('meta_desc', new \XLite\Core\Validator\String(), null, 'Meta description'); - $data->addPair('cleanURL', new \XLite\Core\Validator\String\RegExp(true, '/^[\w-]+$/S'), null, 'Clean URL'); + + $data->addPair( + 'category_ids', + new \XLite\Core\Validator\PlainArray(), + \XLite\Core\Validator\Pair\APair::SOFT, + 'Category' + )->setValidator(new \XLite\Core\Validator\Integer()); + + $data->addPair( + 'cleanURL', + new \XLite\Core\Validator\String\RegExp(false, $this->getCleanURLPattern()), + null, + 'Clean URL' + ); } } diff --git a/src/classes/XLite/View/ItemsList/Model/Product/AProduct.php b/src/classes/XLite/View/ItemsList/Model/Product/AProduct.php index 7d83e9ba7f..24b5660f5c 100644 --- a/src/classes/XLite/View/ItemsList/Model/Product/AProduct.php +++ b/src/classes/XLite/View/ItemsList/Model/Product/AProduct.php @@ -70,5 +70,4 @@ protected function getContainerClass() { return parent::getContainerClass() . ' products'; } - } diff --git a/src/classes/XLite/View/ItemsList/Model/Product/Admin/AAdmin.php b/src/classes/XLite/View/ItemsList/Model/Product/Admin/AAdmin.php index 1b17655b1d..55103f4730 100644 --- a/src/classes/XLite/View/ItemsList/Model/Product/Admin/AAdmin.php +++ b/src/classes/XLite/View/ItemsList/Model/Product/Admin/AAdmin.php @@ -74,6 +74,4 @@ protected function getCreateURL() { return \XLite\Core\Converter::buildUrl('add_product'); } - } - diff --git a/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php b/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php index c53fe033b2..c63e1b4aa2 100644 --- a/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php +++ b/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php @@ -38,7 +38,6 @@ class Search extends \XLite\View\ItemsList\Model\Product\Admin\AAdmin /** * Allowed sort criterions */ - const SORT_BY_MODE_PRICE = 'p.price'; const SORT_BY_MODE_NAME = 'translations.name'; const SORT_BY_MODE_SKU = 'p.sku'; @@ -55,7 +54,6 @@ class Search extends \XLite\View\ItemsList\Model\Product\Admin\AAdmin const PARAM_BY_DESCR = 'by_descr'; const PARAM_INVENTORY = 'inventory'; - /** * Define and set widget attributes; initialize widget * @@ -68,10 +66,10 @@ class Search extends \XLite\View\ItemsList\Model\Product\Admin\AAdmin public function __construct(array $params = array()) { $this->sortByModes += array( - self::SORT_BY_MODE_PRICE => 'Price', - self::SORT_BY_MODE_NAME => 'Name', - self::SORT_BY_MODE_SKU => 'SKU', - self::SORT_BY_MODE_AMOUNT => 'Amount', + static::SORT_BY_MODE_PRICE => 'Price', + static::SORT_BY_MODE_NAME => 'Name', + static::SORT_BY_MODE_SKU => 'SKU', + static::SORT_BY_MODE_AMOUNT => 'Amount', ); parent::__construct($params); @@ -87,7 +85,6 @@ public function __construct(array $params = array()) public function getCSSFiles() { $list = parent::getCSSFiles(); - $list[] = $this->getDir() . '/' . $this->getPageBodyDir() . '/product/style.css'; return $list; @@ -160,13 +157,13 @@ protected function getPanelClass() static public function getSearchParams() { return array( - \XLite\Model\Repo\Product::P_SUBSTRING => self::PARAM_SUBSTRING, - \XLite\Model\Repo\Product::P_CATEGORY_ID => self::PARAM_CATEGORY_ID, - \XLite\Model\Repo\Product::P_SKU => self::PARAM_SKU, - \XLite\Model\Repo\Product::P_SEARCH_IN_SUBCATS => self::PARAM_SEARCH_IN_SUBCATS, - \XLite\Model\Repo\Product::P_BY_TITLE => self::PARAM_BY_TITLE, - \XLite\Model\Repo\Product::P_BY_DESCR => self::PARAM_BY_DESCR, - \XLite\Model\Repo\Product::P_INVENTORY => self::PARAM_INVENTORY, + \XLite\Model\Repo\Product::P_SUBSTRING => static::PARAM_SUBSTRING, + \XLite\Model\Repo\Product::P_CATEGORY_ID => static::PARAM_CATEGORY_ID, + \XLite\Model\Repo\Product::P_SKU => static::PARAM_SKU, + \XLite\Model\Repo\Product::P_SEARCH_IN_SUBCATS => static::PARAM_SEARCH_IN_SUBCATS, + \XLite\Model\Repo\Product::P_BY_TITLE => static::PARAM_BY_TITLE, + \XLite\Model\Repo\Product::P_BY_DESCR => static::PARAM_BY_DESCR, + \XLite\Model\Repo\Product::P_INVENTORY => static::PARAM_INVENTORY, ); } @@ -182,27 +179,13 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - self::PARAM_SUBSTRING => new \XLite\Model\WidgetParam\String( - 'Substring', '' - ), - self::PARAM_CATEGORY_ID => new \XLite\Model\WidgetParam\Int( - 'Category ID', 0 - ), - self::PARAM_SKU => new \XLite\Model\WidgetParam\String( - 'SKU', '' - ), - self::PARAM_SEARCH_IN_SUBCATS => new \XLite\Model\WidgetParam\Checkbox( - 'Search in subcategories', 0 - ), - self::PARAM_BY_TITLE => new \XLite\Model\WidgetParam\Checkbox( - 'Search in title', 0 - ), - self::PARAM_BY_DESCR => new \XLite\Model\WidgetParam\Checkbox( - 'Search in description', 0 - ), - self::PARAM_INVENTORY => new \XLite\Model\WidgetParam\String( - 'Inventory', 'all' - ), + static::PARAM_SUBSTRING => new \XLite\Model\WidgetParam\String('Substring', ''), + static::PARAM_CATEGORY_ID => new \XLite\Model\WidgetParam\Int('Category ID', 0), + static::PARAM_SKU => new \XLite\Model\WidgetParam\String('SKU', ''), + static::PARAM_SEARCH_IN_SUBCATS => new \XLite\Model\WidgetParam\Checkbox('Search in subcategories', 0), + static::PARAM_BY_TITLE => new \XLite\Model\WidgetParam\Checkbox('Search in title', 0), + static::PARAM_BY_DESCR => new \XLite\Model\WidgetParam\Checkbox('Search in description', 0), + static::PARAM_INVENTORY => new \XLite\Model\WidgetParam\String('Inventory', 'all'), ); } @@ -217,10 +200,7 @@ protected function defineRequestParams() { parent::defineRequestParams(); - $this->requestParams = array_merge( - $this->requestParams, - static::getSearchParams() - ); + $this->requestParams = array_merge($this->requestParams, static::getSearchParams()); } /** @@ -241,9 +221,9 @@ protected function getSearchCondition() $result->$modelParam = $this->getParam($requestParam); } - if (empty($result->{self::PARAM_CATEGORY_ID})) { - unset($result->{self::PARAM_CATEGORY_ID}); - unset($result->{self::PARAM_SEARCH_IN_SUBCATS}); + if (empty($result->{static::PARAM_CATEGORY_ID})) { + unset($result->{static::PARAM_CATEGORY_ID}); + unset($result->{static::PARAM_SEARCH_IN_SUBCATS}); } return $result; @@ -286,7 +266,7 @@ protected function getOrderBy() */ protected function getSortByModeDefault() { - return self::SORT_BY_MODE_NAME; + return static::SORT_BY_MODE_NAME; } // }}} diff --git a/src/classes/XLite/View/MembershipSelect.php b/src/classes/XLite/View/MembershipSelect.php index 858523532b..81ab27aad7 100644 --- a/src/classes/XLite/View/MembershipSelect.php +++ b/src/classes/XLite/View/MembershipSelect.php @@ -43,7 +43,6 @@ class MembershipSelect extends \XLite\View\FormField const PARAM_ALL_OPTION = 'allOption'; const PARAM_PENDING_OPTION = 'pendingOption'; - /** * Get active memberships * @@ -81,10 +80,10 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - self::PARAM_FIELD_NAME => new \XLite\Model\WidgetParam\String('Field', 'membership', false), - self::PARAM_VALUE => new \XLite\Model\WidgetParam\String('Value', '%', false), - self::PARAM_ALL_OPTION => new \XLite\Model\WidgetParam\Bool('Display All option', false, false), - self::PARAM_PENDING_OPTION => new \XLite\Model\WidgetParam\Bool('Display Pending option', false, false) + static::PARAM_FIELD_NAME => new \XLite\Model\WidgetParam\String('Field', 'membership', false), + static::PARAM_VALUE => new \XLite\Model\WidgetParam\String('Value', '%', false), + static::PARAM_ALL_OPTION => new \XLite\Model\WidgetParam\Bool('Display All option', false, false), + static::PARAM_PENDING_OPTION => new \XLite\Model\WidgetParam\Bool('Display Pending option', false, false), ); } } diff --git a/src/skins/admin/en/categories/add_modify_body.tpl b/src/skins/admin/en/categories/add_modify_body.tpl deleted file mode 100644 index 66e758e4ea..0000000000 --- a/src/skins/admin/en/categories/add_modify_body.tpl +++ /dev/null @@ -1,187 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Add/Modify category template - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - *} - -{*TODO: refactor it.*} - -

- -{t(#Mandatory fields are marked with an asterisk#)} (*).

- -{t(#Note#)}: {t(#Use the navigation bar above this dialog to navigate through the catalog categories#)}. - -


- -

>> {t(#Category has been updated successfully#)} <<

- -

>> {t(#Category has been added successfully#)} <<

- -

>> {t(#There are errors in the form. Category has not been added#)} <<

- -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{t(#Category name#)}* - -  << {t(#Required field#)} -
{t(#Category page title#)}  - -
{t(#Description#)} 
- {t(#Image#)} -   - - - -
- - -
{t(#Membership#)}* - -
{t(#Availability#)}* - -
{t(#HTML title ('title' tag)#)} 
{t(#Meta keywords#)} 
{t(#Meta description#)} 
{t(#Clean URL#)} 
 
- - -
- -
- -{* TODO: restore it - -{if:category.category_id&!getRootCategoryId()=category.getCategoryId()} -


- -Change category location -
- -
- -Not available right now - -
- - - - - - - - - - - - - - - - - - - - -
Select category: - -
 
- -     - -
- -
-{end:} -*} diff --git a/src/skins/admin/en/categories/body.tpl b/src/skins/admin/en/categories/body.tpl index 65417fdff1..569de19b1a 100644 --- a/src/skins/admin/en/categories/body.tpl +++ b/src/skins/admin/en/categories/body.tpl @@ -88,7 +88,7 @@ class="\XLite\View\Button\Regular" id="modify-root" label="{t(#Modify root category (the front shop page)#)}" - jsCode="self.location='{buildURL(#category#,##,_ARRAY_(#category_id#^getRootCategoryId(),#mode#^#modify#))}'" /> + jsCode="self.location='{buildURL(#category#,##,_ARRAY_(#category_id#^getRootCategoryId()))}'" />

@@ -98,7 +98,6 @@ - @@ -183,12 +182,12 @@ function onAddChildClick(category_id) { - document.location = "admin.php?target=category&category_id=" + category_id + "&mode=add_child"; + document.location = "admin.php?target=category&parent_id=" + category_id; } function onModifyClick(category_id) { - document.location = "admin.php?target=category&category_id=" + category_id + "&mode=modify"; + document.location = "admin.php?target=category&category_id=" + category_id; } diff --git a/src/skins/admin/en/categories/modify/body.tpl b/src/skins/admin/en/categories/modify/body.tpl new file mode 100644 index 0000000000..6286356f08 --- /dev/null +++ b/src/skins/admin/en/categories/modify/body.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Add/Modify category template + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +

{t(#Mandatory fields are marked with an asterisk#)} (*).

+ + + +

+ +
+ + diff --git a/src/skins/admin/en/categories/modify/parts/buttons.tpl b/src/skins/admin/en/categories/modify/parts/buttons.tpl new file mode 100644 index 0000000000..19eed8c19d --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/buttons.tpl @@ -0,0 +1,20 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Buttons + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="1200") + *} + + + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/clean_url.tpl b/src/skins/admin/en/categories/modify/parts/clean_url.tpl new file mode 100644 index 0000000000..3b92b66122 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/clean_url.tpl @@ -0,0 +1,41 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category clean URL + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="1000") + *} + + + {t(#Clean URL#)} + + + +

+ + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/description.tpl b/src/skins/admin/en/categories/modify/parts/description.tpl new file mode 100644 index 0000000000..c3edf8f5b5 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/description.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category description + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="300") + *} + + + {t(#Description#)} + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/enabled.tpl b/src/skins/admin/en/categories/modify/parts/enabled.tpl new file mode 100644 index 0000000000..09d7318711 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/enabled.tpl @@ -0,0 +1,24 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category availability + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="600") + *} + + + {t(#Availability#)} + * + + + + diff --git a/src/skins/admin/en/categories/modify/parts/image.tpl b/src/skins/admin/en/categories/modify/parts/image.tpl new file mode 100644 index 0000000000..79c05f1f72 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/image.tpl @@ -0,0 +1,24 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category image + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="400") + *} + + + {t(#Image#)} + + + + +
+ + + diff --git a/src/skins/admin/en/categories/modify/parts/membership.tpl b/src/skins/admin/en/categories/modify/parts/membership.tpl new file mode 100644 index 0000000000..4731c0edf5 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/membership.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category membership + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="500") + *} + + + {t(#Membership#)} + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/meta_desc.tpl b/src/skins/admin/en/categories/modify/parts/meta_desc.tpl new file mode 100644 index 0000000000..cfac8ae4d8 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/meta_desc.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category meta description + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="900") + *} + + + {t(#Meta description#)} + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/meta_tags.tpl b/src/skins/admin/en/categories/modify/parts/meta_tags.tpl new file mode 100644 index 0000000000..b83656f99f --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/meta_tags.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category meta tags + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="800") + *} + + + {t(#Meta keywords#)} + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/meta_title.tpl b/src/skins/admin/en/categories/modify/parts/meta_title.tpl new file mode 100644 index 0000000000..687cafc9dc --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/meta_title.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category meta title + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="700") + *} + + + {t(#HTML title ('title' tag)#)} + + + + + diff --git a/src/skins/admin/en/categories/modify/parts/name.tpl b/src/skins/admin/en/categories/modify/parts/name.tpl new file mode 100644 index 0000000000..d185211928 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/name.tpl @@ -0,0 +1,21 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category name + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="100") + *} + + + {t(#Category name#)} + * + + + + diff --git a/src/skins/admin/en/categories/modify/parts/separator.tpl b/src/skins/admin/en/categories/modify/parts/separator.tpl new file mode 100644 index 0000000000..3f93545c24 --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/separator.tpl @@ -0,0 +1,17 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Separator + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="1100") + *} + + +   + diff --git a/src/skins/admin/en/categories/modify/parts/title.tpl b/src/skins/admin/en/categories/modify/parts/title.tpl new file mode 100644 index 0000000000..6dcd3cbc1e --- /dev/null +++ b/src/skins/admin/en/categories/modify/parts/title.tpl @@ -0,0 +1,24 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Category title + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.21 + * + * @ListChild (list="category.modify.list", weight="200") + *} + + + {t(#Category page title#)} + + + + + diff --git a/src/skins/admin/en/items_list/product/modify/brief/parts/columns/name.tpl b/src/skins/admin/en/items_list/product/modify/brief/parts/columns/name.tpl index 93c7b53ab4..536ee66daa 100644 --- a/src/skins/admin/en/items_list/product/modify/brief/parts/columns/name.tpl +++ b/src/skins/admin/en/items_list/product/modify/brief/parts/columns/name.tpl @@ -11,4 +11,4 @@ * @ListChild (list="itemsList.product.modify.brief.admin.columns", weight="30") *} -{if:product.getName()}{product.getName():h}{else:}N/A{end:} +{if:product.getName()}{product.getName():h}{else:}N/A{end:} diff --git a/src/skins/admin/en/items_list/product/modify/common/parts/columns/name.tpl b/src/skins/admin/en/items_list/product/modify/common/parts/columns/name.tpl index 4f41954a37..08cac1f7f5 100644 --- a/src/skins/admin/en/items_list/product/modify/common/parts/columns/name.tpl +++ b/src/skins/admin/en/items_list/product/modify/common/parts/columns/name.tpl @@ -11,4 +11,4 @@ * @ListChild (list="itemsList.product.modify.common.admin.columns", weight="30") *} -{if:product.getName()}{product.getName():h}{else:}N/A{end:} +{if:product.getName()}{product.getName():h}{else:}N/A{end:} diff --git a/src/skins/admin/en/items_list/product/table/parts/columns/name.tpl b/src/skins/admin/en/items_list/product/table/parts/columns/name.tpl index 2c782358bc..16d432f546 100644 --- a/src/skins/admin/en/items_list/product/table/parts/columns/name.tpl +++ b/src/skins/admin/en/items_list/product/table/parts/columns/name.tpl @@ -11,4 +11,4 @@ * @ListChild (list="itemsList.product.table.admin.search.columns", weight="30") *} -{if:product.getName()}{product.getName():h}{else:}N/A{end:} +{if:product.getName()}{product.getName():h}{else:}N/A{end:} diff --git a/src/skins/admin/en/modules/CDev/FeaturedProducts/featured_products.tpl b/src/skins/admin/en/modules/CDev/FeaturedProducts/featured_products.tpl index ca9c7b662c..690099a9cf 100644 --- a/src/skins/admin/en/modules/CDev/FeaturedProducts/featured_products.tpl +++ b/src/skins/admin/en/modules/CDev/FeaturedProducts/featured_products.tpl @@ -25,7 +25,7 @@ - {featuredProduct.product.name:h} + {featuredProduct.product.name:h}    ({t(#not available for sale#)}) diff --git a/src/skins/admin/en/modules/CDev/FeaturedProducts/items_list/product/featured/parts/columns/name.tpl b/src/skins/admin/en/modules/CDev/FeaturedProducts/items_list/product/featured/parts/columns/name.tpl index 5e9a78d7d6..1bb4e1d721 100644 --- a/src/skins/admin/en/modules/CDev/FeaturedProducts/items_list/product/featured/parts/columns/name.tpl +++ b/src/skins/admin/en/modules/CDev/FeaturedProducts/items_list/product/featured/parts/columns/name.tpl @@ -11,4 +11,4 @@ * @ListChild (list="itemsList.product.admin.featured.columns", weight="30") *} -{if:product.getName()}{product.getName():h}{else:}N/A{end:} +{if:product.getName()}{product.getName():h}{else:}N/A{end:} diff --git a/src/skins/admin/en/modules/CDev/FileAttachments/parts/row.remove.tpl b/src/skins/admin/en/modules/CDev/FileAttachments/parts/row.remove.tpl index ddb6f306eb..46251b59a4 100644 --- a/src/skins/admin/en/modules/CDev/FileAttachments/parts/row.remove.tpl +++ b/src/skins/admin/en/modules/CDev/FileAttachments/parts/row.remove.tpl @@ -11,4 +11,7 @@ * * @ListChild (list="product.attachments.row", weight="500", zone="admin") *} - + + + + diff --git a/src/skins/admin/en/product/parts/clean_url.tpl b/src/skins/admin/en/product/parts/clean_url.tpl index 1dd24d50fc..cca596ad53 100644 --- a/src/skins/admin/en/product/parts/clean_url.tpl +++ b/src/skins/admin/en/product/parts/clean_url.tpl @@ -16,26 +16,26 @@ {t(#Clean URL#)} - +

- - + + diff --git a/src/skins/admin/en/top_sellers.tpl b/src/skins/admin/en/top_sellers.tpl index 75c9a5b697..95c0be7b87 100644 --- a/src/skins/admin/en/top_sellers.tpl +++ b/src/skins/admin/en/top_sellers.tpl @@ -24,7 +24,7 @@ {if:val} {if:val.product.product_id} - {val.name} + {val.name} {else:} {val.name} ({t(#deleted#)}) {end:} From d3f4d1ab687d47b6af29a8b2fa61b6d6ac72382a Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 10 Apr 2012 23:59:14 +0400 Subject: [PATCH 003/562] S:165106 [+] Clean URLs support has been added --- src/.htaccess | 5 ++--- src/classes/XLite/Core/Converter.php | 24 ++++++++++++++---------- src/classes/XLite/Model/Category.php | 14 +++++++++++++- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/.htaccess b/src/.htaccess index 6f16376680..d06cb0acef 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -18,7 +18,6 @@ DirectoryIndex cart.php RewriteBase /~vvs/xlite/src/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^([a-z0-9-]+)(/)?$ cart.php?target=category&clean_url_cat=$1 [NC] [L] - RewriteRule ^([a-z0-9-]+)/([a-z0-9-]+)\.htm(l)?$ cart.php?target=product&clean_url_prod=$2&clean_url_cat=$1 [NC] [L] - RewriteRule ^([a-z0-9-]+)\.htm(l)?$ cart.php?target=product&clean_url_prod=$1 [NC] [L] + RewriteRule ^(([/_a-z0-9-]+)/)?([_a-z0-9-]+)(/)?$ cart.php?target=category&cleanURLCat=$3 [NC] [L] + RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)\.htm(l)?$ cart.php?target=product&cleanURLProd=$5&cleanURLCat=$4 [NC] [L] diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index 12bf972b6f..2d1d9cf419 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -216,25 +216,29 @@ public static function buildCleanURL($target = '', $action = '', array $params = $result = null; $urlParams = array(); - if ('category' === $target && !empty($params['category_id'])) { - $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->find($params['category_id']); - - if (isset($category) && $category->getCleanURL()) { - $urlParams[0] = $category->getCleanURL(); + if ('product' === $target && !empty($params['product_id'])) { + $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($params['product_id']); + + if (isset($product) && $product->getCleanURL()) { + $urlParams[] = $product->getCleanURL() . '.html'; } } - if ('product' === $target && !empty($params['product_id'])) { - $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($params['product_id']); + if (('category' === $target || ('product' === $target && !empty($urlParams))) && !empty($params['category_id'])) { + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->find($params['category_id']); - if (isset($product) && $product->getCleanURL()) { - $urlParams[1] = $product->getCleanURL() . '.html'; + if (isset($category) && $category->getCleanURL()) { + foreach (array_reverse($category->getPath()) as $node) { + if ($node->getCleanURL()) { + $urlParams[] = $node->getCleanURL(); + } + } } } if (!empty($urlParams)) { $result = \Includes\Utils\ConfigParser::getOptions(array('host_details', 'web_dir_wo_slash')); - $result .= '/' . implode('/', $urlParams); + $result .= '/' . implode('/', array_reverse($urlParams)); } return $result; diff --git a/src/classes/XLite/Model/Category.php b/src/classes/XLite/Model/Category.php index a8cac1ff8e..ed825e8883 100644 --- a/src/classes/XLite/Model/Category.php +++ b/src/classes/XLite/Model/Category.php @@ -348,6 +348,18 @@ public function getSiblings($hasSelf = false) return $this->getRepository()->getSiblings($this, $hasSelf); } + /** + * Get category path + * + * @return array + * @see ____func_see____ + * @since 1.0.21 + */ + public function getPath() + { + return $this->getRepository()->getCategoryPath($this->getCategoryId()); + } + /** * Gets full path to the category as a string: /.../ * @@ -359,7 +371,7 @@ public function getStringPath() { $path = array(); - foreach ($this->getRepository()->getCategoryPath($this->getCategoryId()) as $category) { + foreach ($this->getPath() as $category) { $path[] = $category->getName(); } From 7565190b78c1b7103267f3a2613fa48a727599de Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 11 Apr 2012 01:54:53 +0400 Subject: [PATCH 004/562] S:165106 [+] Clean URLs support has been added --- src/.htaccess | 7 +++++-- src/Includes/install/install.php | 32 +++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/.htaccess b/src/.htaccess index d06cb0acef..e052a1f190 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -14,10 +14,13 @@ DirectoryIndex cart.php RewriteEngine on - RewriteRule "(^|/)\." - [F] - RewriteBase /~vvs/xlite/src/ + RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d + + RewriteRule "(^|/)\." - [F] RewriteRule ^(([/_a-z0-9-]+)/)?([_a-z0-9-]+)(/)?$ cart.php?target=category&cleanURLCat=$3 [NC] [L] RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)\.htm(l)?$ cart.php?target=product&cleanURLProd=$5&cleanURLCat=$4 [NC] [L] + + # RewriteBase ____WEB_DIR____ diff --git a/src/Includes/install/install.php b/src/Includes/install/install.php index 0bfcd05d89..f29a7f15aa 100644 --- a/src/Includes/install/install.php +++ b/src/Includes/install/install.php @@ -1253,6 +1253,36 @@ function doUpdateConfig(&$params, $silentMode = false) return $configUpdated; } +/** + * Modify main .htaccess file + * + * @param array &$params Database access data and other parameters + * @param boolean $silentMode Flag OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.21 + */ +function doUpdateMainHtaccess(&$params, $silentMode = false) +{ + if (!empty($params['xlite_web_dir'])) { + + if (!$silentMode) { + echo '
' . xtr('Updating .htaccess...') . '
'; + } + + $util = '\Includes\Utils\FileManager'; + + $util::replace( + $util::getDir($util::getDir(__DIR__)) . LC_DS . '.htaccess', + '\1RewriteBase ' . $params['xlite_web_dir'], + '/^(\s*)#\s*RewriteBase\s+____WEB_DIR____\s*$/mi' + ); + } + + return true; +} + /** * Prepare to remove a cache of classes * @@ -3338,7 +3368,7 @@ function module_install_dirs(&$params) { global $error, $lcSettings; - $result = doUpdateConfig($params, true); + $result = doUpdateConfig($params, true) && doUpdateMainHtaccess($params); if ($result) { From 9505c055133cc155f22be6522c10313cffc99826 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 13 Apr 2012 03:44:59 +0400 Subject: [PATCH 005/562] E:0041113 [!] Fixes for the CleanURLs --- src/classes/XLite/Controller/Customer/ACustomer.php | 2 +- src/classes/XLite/Controller/Customer/Category.php | 1 - src/classes/XLite/Controller/Customer/Product.php | 2 +- src/classes/XLite/View/Form/Product/Modify/Single.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/Controller/Customer/ACustomer.php b/src/classes/XLite/Controller/Customer/ACustomer.php index 0d2e3d2893..6d1d29e113 100644 --- a/src/classes/XLite/Controller/Customer/ACustomer.php +++ b/src/classes/XLite/Controller/Customer/ACustomer.php @@ -161,7 +161,7 @@ public function getCategoryId() if (!empty($cleanURL)) { $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); - $categoryID = isset($category) ? $category->getCategoryId() : false; + $categoryID = $this->category_id = isset($category) ? $category->getCategoryId() : false; \XLite\Core\Request::getInstance()->category_id = $categoryID; } diff --git a/src/classes/XLite/Controller/Customer/Category.php b/src/classes/XLite/Controller/Customer/Category.php index db536fa12e..979cca3370 100644 --- a/src/classes/XLite/Controller/Customer/Category.php +++ b/src/classes/XLite/Controller/Customer/Category.php @@ -97,5 +97,4 @@ protected function doNoAction() \XLite\Core\Session::getInstance()->continueShoppingURL = $this->getURL(); } } - } diff --git a/src/classes/XLite/Controller/Customer/Product.php b/src/classes/XLite/Controller/Customer/Product.php index d7bdf161b3..7094b13712 100644 --- a/src/classes/XLite/Controller/Customer/Product.php +++ b/src/classes/XLite/Controller/Customer/Product.php @@ -139,7 +139,7 @@ protected function getProductId() if (!empty($cleanURL)) { $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); - $productID = isset($product) ? $product->getProductId() : false; + $productID = $this->product_id = isset($product) ? $product->getProductId() : false; \XLite\Core\Request::getInstance()->product_id = $productID; } diff --git a/src/classes/XLite/View/Form/Product/Modify/Single.php b/src/classes/XLite/View/Form/Product/Modify/Single.php index 0072357734..59b6676f50 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Single.php @@ -83,7 +83,7 @@ protected function getValidator() * @see ____func_see____ * @since 1.0.0 */ - protected function setDataValidators(&$data) + protected function setDataValidators($data) { $data->addPair('sku', new \XLite\Core\Validator\String(), null, 'SKU'); $data->addPair('name', new \XLite\Core\Validator\String(true), null, 'Product Name'); From 248caf2c5b36d2ed25472e7c3c15c4df8df2750f Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 13 Apr 2012 04:35:29 +0400 Subject: [PATCH 006/562] E:0041111 [!] Fixes for the CleanURLs --- .../en/items_list/product/parts/common.quicklook-button.tpl | 2 +- src/skins/default/en/items_list/product/products_list.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skins/default/en/items_list/product/parts/common.quicklook-button.tpl b/src/skins/default/en/items_list/product/parts/common.quicklook-button.tpl index 1324303103..d059e4786f 100644 --- a/src/skins/default/en/items_list/product/parts/common.quicklook-button.tpl +++ b/src/skins/default/en/items_list/product/parts/common.quicklook-button.tpl @@ -16,7 +16,7 @@

diff --git a/src/skins/default/en/items_list/product/products_list.js b/src/skins/default/en/items_list/product/products_list.js index 985e30a8d8..c54fd67621 100644 --- a/src/skins/default/en/items_list/product/products_list.js +++ b/src/skins/default/en/items_list/product/products_list.js @@ -123,6 +123,7 @@ ProductsListView.prototype.postprocess = function(isSuccess, initial) target: 'quick_look', action: '', product_id: core.getValueFromClass(this, 'quicklook-link'), + category_id: core.getValueFromClass(this, 'quicklook-link-category'), only_center: 1 }), 'product-quicklook', From 0ac42d732fa68ad96cd76f53b0cd2e43954b82bf Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 13 Apr 2012 05:50:41 +0400 Subject: [PATCH 007/562] E:0041110 [!] Fixes for the CleanURLs --- src/Includes/Utils/URLManager.php | 28 ++++++++++++++----- src/classes/XLite.php | 2 +- src/classes/XLite/Controller/AController.php | 5 ++-- .../XLite/Controller/Customer/ACustomer.php | 9 ++++-- .../XLite/Controller/Customer/Login.php | 7 ++--- src/classes/XLite/Core/Request.php | 9 ++---- src/classes/XLite/View/Category.php | 3 +- .../XLite/View/Form/Product/Modify/Single.php | 5 ++-- .../View/Upgrade/Step/Completed/Backup.php | 2 +- src/skins/default/en/header/parts/base.tpl | 15 ++++++++++ 10 files changed, 58 insertions(+), 27 deletions(-) create mode 100644 src/skins/default/en/header/parts/base.tpl diff --git a/src/Includes/Utils/URLManager.php b/src/Includes/Utils/URLManager.php index f546e26f9e..9800d104b2 100644 --- a/src/Includes/Utils/URLManager.php +++ b/src/Includes/Utils/URLManager.php @@ -71,15 +71,18 @@ public static function trimTrailingSlashes($url) */ public static function getShopURL( $url = '', - $isSecure = false, + $isSecure = null, array $params = array(), $output = self::URL_OUTPUT_FULL ) { - $hostDetails = \Includes\Utils\ConfigParser::getOptions('host_details'); + if (!isset($isSecure)) { + $isSecure = static::isHTTPS(); + } + $hostDetails = \Includes\Utils\ConfigParser::getOptions('host_details'); $host = $hostDetails['http' . ($isSecure ? 's' : '') . '_host']; - if ($host) { + if ($host) { $proto = ($isSecure ? 'https' : 'http') . '://'; if ('/' != substr($url, 0, 1)) { @@ -95,7 +98,7 @@ public static function getShopURL( $url .= (false !== strpos($url, '?') ? '&' : '?') . $name . '=' . $value; } - if (self::URL_OUTPUT_FULL == $output) { + if (static::URL_OUTPUT_FULL == $output) { $url = $proto . $host . $url; } } @@ -103,6 +106,19 @@ public static function getShopURL( return $url; } + /** + * Check for secure connection + * + * @return boolean + * @see ____func_see____ + * @since 1.0.21 + */ + public static function isHTTPS() + { + return (isset($_SERVER['HTTPS']) && ('on' === strtolower($_SERVER['HTTPS']) || '1' == $_SERVER['HTTPS'])) + || (isset($_SERVER['SERVER_PORT']) && '443' == $_SERVER['SERVER_PORT']); + } + /** * Return current URI * @@ -125,8 +141,7 @@ public static function getSelfURI() */ public static function getCurrentURL() { - return (\XLite\Core\Request::getInstance()->isHTTPS() ? 'https' : 'http') - . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + return 'http' . (static::isHTTPS() ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } /** @@ -141,7 +156,6 @@ public static function getCurrentURL() public static function isValidURLHost($str) { $urlData = parse_url('http://' . $str . '/path'); - $host = $urlData['host'] . (isset($urlData['port']) ? ':' . $urlData['port'] : ''); return ($host == $str); diff --git a/src/classes/XLite.php b/src/classes/XLite.php index f7a2a99cbc..d098c21580 100644 --- a/src/classes/XLite.php +++ b/src/classes/XLite.php @@ -254,7 +254,7 @@ public function getScript() * @see ____func_see____ * @since 1.0.0 */ - public function getShopURL($url = '', $isSecure = false, array $params = array()) + public function getShopURL($url = '', $isSecure = null, array $params = array()) { return \Includes\Utils\URLManager::getShopURL($url, $isSecure, $params); } diff --git a/src/classes/XLite/Controller/AController.php b/src/classes/XLite/Controller/AController.php index 915214a1a7..2e01bbaee4 100644 --- a/src/classes/XLite/Controller/AController.php +++ b/src/classes/XLite/Controller/AController.php @@ -255,14 +255,15 @@ public function getAction() * * @param string $url Relative URL OPTIONAL * @param boolean $secure Flag to use HTTPS OPTIONAL + * @param array $params Optional URL params OPTIONAL * * @return string * @see ____func_see____ * @since 1.0.0 */ - public function getShopURL($url = '', $secure = false) + public function getShopURL($url = '', $secure = null, array $params = array()) { - return \XLite::getInstance()->getShopURL($url, $secure); + return \XLite::getInstance()->getShopURL($url, $secure, $params); } /** diff --git a/src/classes/XLite/Controller/Customer/ACustomer.php b/src/classes/XLite/Controller/Customer/ACustomer.php index 6d1d29e113..bb5c481713 100644 --- a/src/classes/XLite/Controller/Customer/ACustomer.php +++ b/src/classes/XLite/Controller/Customer/ACustomer.php @@ -188,14 +188,19 @@ public function getCart() * * @param string $url Relative URL OPTIONAL * @param boolean $secure Flag to use HTTPS OPTIONAL + * @param array $params Optional URL params OPTIONAL * * @return string * @see ____func_see____ * @since 1.0.0 */ - public function getShopURL($url = '', $secure = false) + public function getShopURL($url = '', $secure = null, array $params = array()) { - return parent::getShopURL($url, \XLite\Core\Config::getInstance()->Security->full_customer_security ?: $secure); + if (!isset($secure) && \XLite\Core\Config::getInstance()->Security->full_customer_security) { + $secure = true; + } + + return parent::getShopURL($url, $secure, $params); } /** diff --git a/src/classes/XLite/Controller/Customer/Login.php b/src/classes/XLite/Controller/Customer/Login.php index 5d1ec6b1f4..a9809bcaeb 100644 --- a/src/classes/XLite/Controller/Customer/Login.php +++ b/src/classes/XLite/Controller/Customer/Login.php @@ -40,7 +40,6 @@ class Login extends \XLite\Controller\Customer\ACustomer */ const SECURE_TOKEN = 'secureToken'; - /** * Controlelr parameters * @@ -59,7 +58,6 @@ class Login extends \XLite\Controller\Customer\ACustomer */ protected $profile; - /** * handleRequest * @@ -102,16 +100,17 @@ public function redirectFromLogin() * * @param string $url Relative URL OPTIONAL * @param boolean $secure Flag to use HTTPS OPTIONAL + * @param array $params Optional URL params OPTIONAL * * @return string * @see ____func_see____ * @since 1.0.0 */ - public function getShopURL($url = '', $secure = false) + public function getShopURL($url = '', $secure = null, array $params = array()) { $add = (strpos($url, '?') ? '&' : '?') . 'feed=' . \XLite\Core\Request::getInstance()->action; - return parent::getShopURL($url . $add, $secure); + return parent::getShopURL($url . $add, $secure, $params); } diff --git a/src/classes/XLite/Core/Request.php b/src/classes/XLite/Core/Request.php index 7cf5fda95f..18787d6326 100644 --- a/src/classes/XLite/Core/Request.php +++ b/src/classes/XLite/Core/Request.php @@ -169,7 +169,7 @@ public function isAJAX() } /** - * Check - is secure connection or not + * Check for secure connection * * @return boolean * @see ____func_see____ @@ -177,12 +177,7 @@ public function isAJAX() */ public function isHTTPS() { - return (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS'] == 'on') || $_SERVER['HTTPS'] == '1')) - || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') - || ( - isset($_SERVER['REMOTE_ADDR']) - && \XLite::getInstance()->getOptions(array('host_details', 'remote_addr')) == $_SERVER['REMOTE_ADDR'] - ); + return \Includes\Utils\URLManager::isHTTPS(); } /** diff --git a/src/classes/XLite/View/Category.php b/src/classes/XLite/View/Category.php index da79ee9f78..6ee92e3d4b 100644 --- a/src/classes/XLite/View/Category.php +++ b/src/classes/XLite/View/Category.php @@ -122,7 +122,8 @@ protected function getWebPreprocessingTags() protected function getWebPreprocessingURL() { // Get URL of shop. If the HTTPS is used then it should be cleaned from ?xid= construction - $url = \Xlite::getInstance()->getShopURL(null, \XLite\Core\Request::getInstance()->isHTTPS()); + $url = \Xlite::getInstance()->getShopURL(); + // We are cleaning URL from unnecessary here construction $url = preg_replace('/(\?.*)/', '', $url); diff --git a/src/classes/XLite/View/Form/Product/Modify/Single.php b/src/classes/XLite/View/Form/Product/Modify/Single.php index 59b6676f50..c5f63b494b 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Single.php @@ -69,7 +69,8 @@ protected function isMultipart() protected function getValidator() { $validator = parent::getValidator(); - $this->setDataValidators($validator->addPair('postedData', new \XLite\Core\Validator\HashArray())); + $tmp = $validator->addPair('postedData', new \XLite\Core\Validator\HashArray()); + $this->setDataValidators($tmp); return $validator; } @@ -83,7 +84,7 @@ protected function getValidator() * @see ____func_see____ * @since 1.0.0 */ - protected function setDataValidators($data) + protected function setDataValidators(&$data) { $data->addPair('sku', new \XLite\Core\Validator\String(), null, 'SKU'); $data->addPair('name', new \XLite\Core\Validator\String(true), null, 'Product Name'); diff --git a/src/classes/XLite/View/Upgrade/Step/Completed/Backup.php b/src/classes/XLite/View/Upgrade/Step/Completed/Backup.php index a988ced4c9..5777a60639 100644 --- a/src/classes/XLite/View/Upgrade/Step/Completed/Backup.php +++ b/src/classes/XLite/View/Upgrade/Step/Completed/Backup.php @@ -82,6 +82,6 @@ protected function getHead() */ protected function getShopURL() { - return \Includes\Utils\URLManager::getShopURL(); + return \XLite::getInstance()->getShopURL(); } } diff --git a/src/skins/default/en/header/parts/base.tpl b/src/skins/default/en/header/parts/base.tpl new file mode 100644 index 0000000000..aacc76e0bb --- /dev/null +++ b/src/skins/default/en/header/parts/base.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * "Base" tag + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.4 + * + * @ListChild (list="head", weight="1200") + *} + + From bd0c65a646b5c2676beff758bb8eb559a60a8100 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 16 Apr 2012 12:12:57 +0400 Subject: [PATCH 008/562] [*] Add Amazon S3 images module --- .../Controller/Admin/S3Migrate.php | 80 + .../AmazonS3Images/Core/EventListener.php | 53 + .../Core/EventListener/MigrateFromS3.php | 130 ++ .../Core/EventListener/MigrateToS3.php | 129 ++ .../Module/CDev/AmazonS3Images/Core/S3.php | 296 +++ .../XLite/Module/CDev/AmazonS3Images/Main.php | 97 + .../CDev/AmazonS3Images/Model/Base/Image.php | 383 ++++ .../AmazonS3Images/Model/Repo/Base/Image.php | 183 ++ .../CDev/AmazonS3Images/View/Form/Migrate.php | 50 + .../CDev/AmazonS3Images/View/Migrate.php | 254 +++ .../XLite/Module/CDev/AmazonS3Images/icon.png | Bin 0 -> 6800 bytes .../Module/CDev/AmazonS3Images/install.yaml | 54 + .../Module/CDev/AmazonS3Images/lib/S3.php | 1728 +++++++++++++++++ .../CDev/AmazonS3Images/images/fs_to_s3.png | Bin 0 -> 6173 bytes .../CDev/AmazonS3Images/images/s3_to_fs.png | Bin 0 -> 7582 bytes .../modules/CDev/AmazonS3Images/migrate.css | 117 ++ .../en/modules/CDev/AmazonS3Images/migrate.js | 21 + .../modules/CDev/AmazonS3Images/migrate.tpl | 47 + 18 files changed, 3622 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Main.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Model/Repo/Base/Image.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/View/Form/Migrate.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/icon.png create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php create mode 100644 src/skins/admin/en/modules/CDev/AmazonS3Images/images/fs_to_s3.png create mode 100644 src/skins/admin/en/modules/CDev/AmazonS3Images/images/s3_to_fs.png create mode 100644 src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.css create mode 100644 src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js create mode 100644 src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php new file mode 100644 index 0000000000..a63ef54dd1 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php @@ -0,0 +1,80 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Controller\Admin; + +/** + * Amazon S3 migrate + * + * @see ____class_see____ + * @since 1.0.19 + */ +class S3Migrate extends \XLite\Controller\Admin\AAdmin +{ + /** + * Migrate to Amazon S3 + * + * @return void + * @see ____func_see____ + * @since 1.0.19 + */ + protected function doActionMigrateToS3() + { + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateToS3Info')); + if (!$info) { + $info = new \XLite\Model\TmpVar; + $info->setName('migrateToS3Info'); + \XLite\Core\Database::getEM()->persist($info); + } + $info->setValue(serialize(array('position' => 0, 'length' => 0))); + \XLite\Core\Database::getEM()->flush(); + + \XLite\Core\EventTask::migrateToS3(); + } + + /** + * Migrate from Amazon S3 + * + * @return void + * @see ____func_see____ + * @since 1.0.19 + */ + protected function doActionMigrateFromS3() + { + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateFromS3Info')); + if (!$info) { + $info = new \XLite\Model\TmpVar; + $info->setName('migrateFromS3Info'); + \XLite\Core\Database::getEM()->persist($info); + } + $info->setValue(serialize(array('position' => 0, 'length' => 0))); + \XLite\Core\Database::getEM()->flush(); + + \XLite\Core\EventTask::migrateFromS3(); + } +} + diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener.php new file mode 100644 index 0000000000..c716d106eb --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener.php @@ -0,0 +1,53 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Core; + +/** + * Event listener (common) + * + * @see ____class_see____ + * @since 1.0.19 + */ +abstract class EventListener extends \XLite\Core\EventListener implements \XLite\Base\IDecorator +{ + /** + * Get listeners + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getListeners() + { + return parent::getListeners() + + array( + 'migrateToS3' => array('\XLite\Module\CDev\AmazonS3Images\Core\EventListener\MigrateToS3'), + 'migrateFromS3' => array('\XLite\Module\CDev\AmazonS3Images\Core\EventListener\MigrateFromS3'), + ); + } +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php new file mode 100644 index 0000000000..aaac43cbec --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php @@ -0,0 +1,130 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Core\EventListener; + +/** + * Migrate from Amazon S3 + * + * @see ____class_see____ + * @since 1.0.19 + */ +class MigrateFromS3 extends \XLite\Core\EventListener\AEventListener +{ + const CHUNK_LENGTH = 100; + + /** + * Handle event (internal, after checking) + * + * @param string $name Event name + * @param array $arguments Event arguments OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function handleEvent($name, array $arguments) + { + if (0 < $this->getLength() && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid()) { + + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateFromS3Info')); + if (!$info) { + $info = new \XLite\Model\TmpVar; + $info->setName('migrateFromS3Info'); + \XLite\Core\Database::getEM()->persist($info); + } + $rec = $info->getValue() ? unserialize($info->getValue()) : array('position' => 0, 'length' => 0); + + if (0 == $rec['length']) { + $rec['length'] = $this->getLength(); + } + + foreach ($this->getChunk() as $image) { + $path = tempnam(LC_DIR_TMP, 'migrate_file'); + file_put_contents($path, $image->getBody()); + + if (file_exists($path)) { + $image->setS3Forbid(true); + if ($image->loadFromLocalFile($path, $image->getFileName() ?: basename($image->getPath()))) { + $rec['position']++; + $info->setValue(serialize($rec)); + \XLite\Core\Database::getEM()->flush(); + } + unlink($path); + } + } + + \XLite\Core\Database::getEM()->flush(); + + if (0 < $this->getLength()) { + \XLite\Core\EventTask::migrateFromS3(); + } + } + + return true; + } + + /** + * Get images list length + * + * @return integer + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getLength() + { + $count = 0; + + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + $count += \XLite\Core\Database::getRepo($class)->countS3Images(); + } + + return $count; + } + + /** + * Get images chunk + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getChunk() + { + $chunk = array(); + + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + if (0 < \XLite\Core\Database::getRepo($class)->countS3Images()) { + $chunk = \XLite\Core\Database::getRepo($class)->findS3Images(static::CHUNK_LENGTH); + break; + } + } + + return $chunk; + } +} + diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php new file mode 100644 index 0000000000..86013c07cd --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php @@ -0,0 +1,129 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Core\EventListener; + +/** + * Migrate to Amazon S3 + * + * @see ____class_see____ + * @since 1.0.19 + */ +class MigrateToS3 extends \XLite\Core\EventListener\AEventListener +{ + const CHUNK_LENGTH = 100; + + /** + * Handle event (internal, after checking) + * + * @param string $name Event name + * @param array $arguments Event arguments OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function handleEvent($name, array $arguments) + { + if (0 < $this->getLength() && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid()) { + + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateToS3Info')); + if (!$info) { + $info = new \XLite\Model\TmpVar; + $info->setName('migrateToS3Info'); + \XLite\Core\Database::getEM()->persist($info); + } + $rec = $info->getValue() ? unserialize($info->getValue()) : array('position' => 0, 'length' => 0); + + if (0 == $rec['length']) { + $rec['length'] = $this->getLength(); + } + + foreach ($this->getChunk() as $image) { + $path = tempnam(LC_DIR_TMP, 'migrate_file'); + file_put_contents($path, $image->getBody()); + + if (file_exists($path)) { + if ($image->loadFromLocalFile($path, $image->getFileName() ?: basename($image->getPath()))) { + $rec['position']++; + $info->setValue(serialize($rec)); + \XLite\Core\Database::getEM()->flush(); + } + unlink($path); + } + } + + \XLite\Core\Database::getEM()->flush(); + + if (0 < $this->getLength()) { + \XLite\Core\EventTask::migrateToS3(); + } + } + + return true; + } + + /** + * Get images list length + * + * @return integer + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getLength() + { + $count = 0; + + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + $count += \XLite\Core\Database::getRepo($class)->countNoS3Images(); + } + + return $count; + } + + /** + * Get images chunk + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getChunk() + { + $chunk = array(); + + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + if (0 < \XLite\Core\Database::getRepo($class)->countNoS3Images()) { + $chunk = \XLite\Core\Database::getRepo($class)->findNoS3Images(static::CHUNK_LENGTH); + break; + } + } + + return $chunk; + } +} + diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php new file mode 100644 index 0000000000..aa195d5752 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php @@ -0,0 +1,296 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Core; + +/** + * AWS S3 client + * + * @see ____class_see____ + * @since 1.0.19 + */ +class S3 extends \XLite\Base\Singleton +{ + const GENERATION_LIMIT = 100; + + /** + * AWS S3 client + * + * @var \S3 + * @see ____var_see____ + * @since 1.0.19 + */ + protected $client; + + /** + * Valid status + * + * @var boolean + * @see ____var_see____ + * @since 1.0.19 + */ + protected $valid = false; + + /** + * URL prefix + * + * @var string + * @see ____var_see____ + * @since 1.0.19 + */ + protected $urlPrefix; + + /** + * Constructor + * + * @return void + * @see ____func_see____ + * @since 1.0.19 + */ + protected function __construct() + { + require_once LC_DIR_CLASSES . '/XLite/Module/CDev/AmazonS3Images/lib/S3.php'; + + $config = \XLite\Core\Config::getInstance()->CDev->AmazonS3Images; + + $this->client = new \S3($config->access_key, $config->secret_key); + \S3::setExceptions(true); + + try { + if (!$this->client->getBucketLocation($config->bucket)) { + $this->client->putBucket($config->bucket); + } + $this->valid = true; + + } catch (\S3Exception $e) { + \XLite\Logger::getInstance()->registerException($e); + } + } + + /** + * Check valid status + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function isValid() + { + return $this->valid; + } + + /** + * Write + * + * @param string $path Short path + * @param string $data Data + * @param array $httpHeaders HTTP headers OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function write($path, $data, array $httpHeaders = array()) + { + $result = false; + + try { + $result = $this->client->putObject( + $data, + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path, + \S3::ACL_PUBLIC_READ, + array(), + $httpHeaders + ); + $result = (bool)$result; + $message = true; + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + + return $result; + } + + /** + * Copy + * + * @param string $from Full path + * @param string $to Short path + * @param array $httpHeaders HTTP headers OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function copy($from, $to, array $httpHeaders = array()) + { + $result = false; + if (file_exists($from)) { + try { + $result = $this->client->putObjectFile( + $from, + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $to, + \S3::ACL_PUBLIC_READ, + array(), + $httpHeaders + ); + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + } + + return $result; + } + + /** + * Read + * + * @param string $path Short path + * + * @return string + * @see ____func_see____ + * @since 1.0.19 + */ + public function read($path) + { + try { + $result = $this->client->getObject(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $path); + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + + return is_object($result) ? $result->body : null; + } + + /** + * Delete + * + * @param string $path Short path + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function delete($path) + { + $result = false; + try { + $result = $this->client->deleteObject(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $path); + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + + return $result; + } + + /** + * Get URL by short path + * + * @param string $path Short path + * + * @return string + * @see ____func_see____ + * @since 1.0.19 + */ + public function getURL($path) + { + if (!isset($this->urlPrefix)) { + $config = \XLite\Core\Config::getInstance()->CDev->AmazonS3Images; + + $this->urlPrefix = $config->cloudfront_domain + ? ('http://' . $config->cloudfront_domain . '/') + : (rtrim($config->server, '/') . '/' . $config->bucket . '/'); + } + + return $this->urlPrefix . $path; + } + + /** + * Check - file is exists or not + * + * @param string $path Short path + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function isExists($path) + { + try { + $result = $this->client->getObjectInfo(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $path, false); + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + + return $result; + } + + /** + * Generate unique path + * + * @param string $path Short path + * + * @return string + * @see ____func_see____ + * @since 1.0.19 + */ + public function generateUniquePath($path) + { + if ($this->isExists($path)) { + if (preg_match('/^(.+)\.([^\.]+)$/Ss', $path, $match)) { + $base = $match[1] . '.'; + $ext = '.' . $match[2]; + + } else { + $base = $path . '.'; + $ext = ''; + } + + $i = 0; + do { + $path = $base . uniqid('', true) . $ext; + $i++; + } while ($this->isExists($path) && self::GENERATION_LIMIT > $i); + } + + return $path; + } + +} + diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Main.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Main.php new file mode 100644 index 0000000000..c56211b650 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Main.php @@ -0,0 +1,97 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\AmazonS3Images; + +/** + * Amazon S3 images torage module main class + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class Main extends \XLite\Module\AModule +{ + /** + * Author name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAuthorName() + { + return 'Creative Development LLC'; + } + + /** + * Module version + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getMinorVersion() + { + return '0'; + } + + /** + * Module name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getModuleName() + { + return 'Amazon S3 images storage'; + } + + /** + * Module description + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getDescription() + { + return ''; + } + + /** + * Determines if we need to show settings form link + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public static function showSettingsForm() + { + return true; + } +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php new file mode 100644 index 0000000000..4eddf84426 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php @@ -0,0 +1,383 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Model\Base; + +/** + * Image abstract store + * + * @see ____class_see____ + * @since 1.0.0 + * + * @MappedSuperclass + * + * @MappedSuperclass + */ +abstract class Image extends \XLite\Model\Base\Image implements \XLite\Base\IDecorator +{ + const STORAGE_S3 = '3'; + + const IMAGES_NAMESPACE = 'images'; + + /** + * AWS S3 client + * + * @var \XLite\Module\CDev\AmazonS3Images\Core\S3 + * @see ____var_see____ + * @since 1.0.19 + */ + protected $s3; + + /** + * Forbid Amazon S3 storage for loading + * + * @var boolean + * @see ____var_see____ + * @since 1.0.19 + */ + protected $s3Forbid = false; + + /** + * Set S3 forbid + * + * @param boolean $flag Flag + * + * @return void + * @see ____func_see____ + * @since 1.0.19 + */ + public function setS3Forbid($flag = false) + { + $this->s3Forbid = $flag; + } + + // {{{ Getters + + /** + * Get body + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getBody() + { + if (self::STORAGE_S3 == $this->getStorageType()) { + $body = $this->getS3() ? $this->getS3()->read($this->generateS3Path()) : null; + + } else { + $body = parent::getBody(); + } + + return $body; + } + + /** + * Read output + * + * @param integer $start Start popsition + * @param integer $length Length + * + * @return boolean + * @see ____func_see____ + * @since 1.0.11 + */ + public function readOutput($start = null, $length = null) + { + if (self::STORAGE_S3 == $this->getStorageType()) { + $result = false; + $body = $this->getBody(); + if ($body) { + if (isset($start)) { + $body = isset($length) ? substr($body, $start, $length) : substr($body, $start); + } + $result = true; + print $body; + } + + } else { + $result = parent::readOutput($start, $length); + } + + return $result; + } + + /** + * Check if file exists + * + * @param string $path Path to check OPTIONAL + * @param boolean $forceFile Flag OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.12 + */ + public function isFileExists($path = null, $forceFile = false) + { + if (self::STORAGE_S3 == $this->getStorageType() && !$forceFile) { + $exists = $this->getS3() ? $this->getS3()->isExists($this->generateS3Path($path)) : false; + + } else { + $exists = parent::isFileExists($path, $forceFile); + } + + return $exists; + } + + /** + * Get URL + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getURL() + { + if (self::STORAGE_S3 == $this->getStorageType()) { + $url = $this->getS3() ? $this->getS3()->getURL($this->generateS3Path()) : null; + + } else { + $url = parent::getURL(); + } + + return $url; + } + + /** + * Get file extension + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getExtension() + { + return self::STORAGE_S3 == $this->getStorageType() ? $this->getExtensionByMIME() : parent::getExtension(); + } + + // }}} + + // {{{ Loading and service + + /** + * Load from request + * + * @param string $key Key in $_FILES service array + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function loadFromRequest($key) + { + if (!$this->s3Forbid && $this->getS3()) { + + $result = false; + $path = \Includes\Utils\FileManager::moveUploadedFile($key, LC_DIR_TMP); + if ($path) { + $result = $this->loadFromLocalFile($path, $_FILES[$key]['name']); + \Includes\Utils\FileManager::deleteFile($path); + + } else { + \XLite\Logger::getInstance()->log('The file was not loaded', LOG_ERR); + } + + } else { + $result = parent::loadFromRequest($key); + } + + return $result; + } + + /** + * Load from local file + * + * @param string $path Absolute path + * @param string $basename File name OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function loadFromLocalFile($path, $basename = null) + { + if (!$this->s3Forbid && $this->getS3()) { + $result = false; + + if (\Includes\Utils\FileManager::isExists($path)) { + $data = @getimagesize($path); + if (is_array($data)) { + $basename = $basename ?: basename($path); + $s3Path = $this->generateS3Path($basename); + $s3Path = $this->getS3()->generateUniquePath($s3Path); + + $headers = array( + 'Content-Type' => $data['mime'], + 'Content-Disposition' => 'inline; filename="' . $basename . '"', + ); + + if ($this->getS3()->copy($path, $s3Path, $headers)) { + $this->setStorageType(static::STORAGE_S3); + $this->setMime($data['mime']); + + if ($this->savePath($s3Path)) { + $result = true; + } + } + } + } + + } else { + $result = parent::loadFromLocalFile($path, $basename); + } + + return $result; + } + + /** + * Remove file + * + * @param string $path Path OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function removeFile($path = null) + { + if (self::STORAGE_S3 == $this->getStorageType()) { + $this->getS3()->delete($this->getStoragePath($path)); + + } else { + parent::removeFile($path); + } + } + + /** + * Get storage path + * + * @param string $path Path to use OPTIONAL + * + * @return string + * @see ____func_see____ + * @since 1.0.12 + */ + protected function getStoragePath($path = null) + { + if (self::STORAGE_S3 == $this->getStorageType()) { + $result = $this->generateS3Path($path); + + } else { + $result = parent::getStoragePath($path); + } + + return $result; + } + + /** + * Get local path for file-based PHP functions + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getLocalPath() + { + if (self::STORAGE_S3 == $this->getStorageType()) { + + $path = tempnam(LC_DIR_TMP, 'analyse_file'); + $result = \Includes\Utils\FileManager::write( + $path, + $this->getS3()->read($this->getStoragePath()) + ); + + if (!$result) { + \XLite\Logger::getInstance()->log( + 'Unable to write data to file \'' . $path . '\'.', + LOG_ERR + ); + $path = false; + } + + $result = array($path, true); + + } else { + $result = parent::getLocalPath(); + } + + return $result; + } + + /** + * Update file path - change file extension taken from MIME information. + * + * @return boolean + * @see ____func_see____ + * @since 1.0.8 + */ + protected function updatePathByMIME() + { + return self::STORAGE_S3 == $this->getStorageType() ? true : parent::updatePathByMIME(); + } + + /** + * Get S3 client + * + * @return \XLite\Module\CDev\AmazonS3Images\Core\S3 + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getS3() + { + if (!isset($this->s3)) { + $this->s3 = \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance(); + if (!$this->s3->isValid()) { + $this->s3 = false; + } + } + + return $this->s3; + } + + /** + * Generate AWS S3 short path + * + * @param string $path Path from DB OPTIONAL + * + * @return string + * @see ____func_see____ + * @since 1.0.19 + */ + protected function generateS3Path($path = null) + { + return self::IMAGES_NAMESPACE + . '/' . $this->getRepository()->getStorageName() + . '/' . ($path ?: $this->getPath()); + } + + // }}} +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Repo/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Repo/Base/Image.php new file mode 100644 index 0000000000..53d20f45de --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Repo/Base/Image.php @@ -0,0 +1,183 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Model\Repo\Base; + +/** + * Image abstract repository + * + * @see ____class_see____ + * @since 1.0.0 + * + * @MappedSuperclass + */ +abstract class Image extends \XLite\Model\Repo\Base\Image implements \XLite\Base\IDecorator +{ + /** + * Get managed image repositories + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + public static function getManagedRepositories() + { + return array( + 'XLite\Model\Image\Product\Image', + 'XLite\Model\Image\Category\Image', + ); + } + + /** + * Count S3 images + * + * @return integer + * @see ____func_see____ + * @since 1.0.19 + */ + public function countS3Images() + { + return intval($this->defineCountS3ImagesQuery()->getSingleScalarResult()); + } + + /** + * Count non-S3 images + * + * @return integer + * @see ____func_see____ + * @since 1.0.19 + */ + public function countNoS3Images() + { + return intval($this->defineCountNoS3ImagesQuery()->getSingleScalarResult()); + } + + /** + * Find S3 images + * + * @param integer $limit Limit OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + public function findS3Images($limit = null) + { + return $this->defineFindS3ImagesQuery($limit)->getResult(); + } + + /** + * Find non-S3 images + * + * @param integer $limit Limit OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + public function findNoS3Images($limit = null) + { + return $this->defineFindNoS3ImagesQuery($limit)->getResult(); + } + + /** + * Define query for countS3Images() method + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.19 + */ + protected function defineCountS3ImagesQuery() + { + $qb = $this->defineCountQuery(); + $alias = $this->getMainAlias($qb); + + return $qb->andWhere($alias . '.storageType = :type') + ->setParameter('type', \XLite\Model\Base\Image::STORAGE_S3); + } + + /** + * Define query for countNoS3Images() method + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.19 + */ + protected function defineCountNoS3ImagesQuery() + { + $qb = $this->defineCountQuery(); + $alias = $this->getMainAlias($qb); + + return $qb->andWhere($alias . '.storageType != :type') + ->setParameter('type', \XLite\Model\Base\Image::STORAGE_S3); + } + + /** + * Define query for findS3Images() method + * + * @param integer $limit Limit + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.19 + */ + protected function defineFindS3ImagesQuery($limit) + { + $qb = $this->createQueryBuilder('i') + ->andWhere('i.storageType = :type') + ->setParameter('type', \XLite\Model\Base\Image::STORAGE_S3); + + if ($limit) { + $qb->setMaxResults($limit); + } + + return $qb; + } + + /** + * Define query for findNoS3Images() method + * + * @param integer $limit Limit + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.19 + */ + protected function defineFindNoS3ImagesQuery($limit) + { + $qb = $this->createQueryBuilder('i') + ->andWhere('i.storageType != :type') + ->setParameter('type', \XLite\Model\Base\Image::STORAGE_S3); + + if ($limit) { + $qb->setMaxResults($limit); + } + + return $qb; + } + +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Form/Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Form/Migrate.php new file mode 100644 index 0000000000..2f9619731f --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Form/Migrate.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\AmazonS3Images\View\Form; + +/** + * Migrate form + * + * @see ____class_see____ + * @since 1.0.19 + */ +class Migrate extends \XLite\View\Form\AForm +{ + /** + * Return default value for the "target" parameter + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTarget() + { + return 's3_migrate'; + } + +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php new file mode 100644 index 0000000000..62e98c7f22 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php @@ -0,0 +1,254 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\AmazonS3Images\View; + +/** + * Migrate images + * + * @see ____class_see____ + * @since 1.0.19 + * + * @ListChild (list="crud.settings.footer", zone="admin", weight="100") + */ +class Migrate extends \XLite\View\AView +{ + /** + * Return list of allowed targets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAllowedTargets() + { + $list = parent::getAllowedTargets(); + + $list[] = 'module'; + + return $list; + } + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/AmazonS3Images/migrate.css'; + + return $list; + } + + /** + * Register JS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + $list[] = 'modules/CDev/AmazonS3Images/migrate.js'; + + return $list; + } + + /** + * Return widget default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'modules/CDev/AmazonS3Images/migrate.tpl'; + } + + /** + * Check if widget is visible + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isVisible() + { + return parent::isVisible() + && 'CDev\\AmazonS3Images' == $this->getModule()->getActualName() + && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid(); + } + + /** + * Check - migrate started or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + protected function isMigrateStarted() + { + $result = false; + + $repo = \XLite\Core\Database::getRepo('XLite\Model\TmpVar'); + if ( + $repo->findOneBy(array('name' => 'migrateFromS3Info')) + || $repo->findOneBy(array('name' => 'migrateToS3Info')) + ) { + $result = 100 != $this->getPercentMigrate(); + } + + return $result; + } + + /** + * Get migrate percent + * + * @return integer + * @see ____func_see____ + * @since 1.0.19 + */ + protected function getPercentMigrate() + { + $percent = 0; + + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateFromS3Info')); + + if ($info) { + $rec = unserialize($info->getValue()); + if (0 < $rec['length']) { + $percent = min(100, round($rec['position'] / $rec['length'] * 100)); + } + } + + if (!$info || 100 == $percent) { + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateToS3Info')); + + if ($info) { + $rec = unserialize($info->getValue()); + if (0 < $rec['length']) { + $percent = min(100, round($rec['position'] / $rec['length'] * 100)); + } + } + } + + return $percent; + } + + // {{{ Migrate from S3 + + /** + * Check - has S3 images or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + protected function hasS3Images() + { + $result = true; + + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + if (0 < \XLite\Core\Database::getRepo($class)->countNoS3Images()) { + $result = false; + break; + } + } + + if ($result) { + $result = false; + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + if (0 < \XLite\Core\Database::getRepo($class)->countS3Images()) { + $result = true; + break; + } + } + } + + return $result; + } + + /** + * Check migrate from Amazon S3 form visibility + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + protected function isMigrateFromS3Visible() + { + return !$this->isMigrateStarted() && $this->hasS3Images(); + } + + // }}} + + // {{{ Migrate to S3 + + /** + * Check - has non-S3 images or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + protected function hasNoS3Images() + { + $result = false; + + foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { + if (0 < \XLite\Core\Database::getRepo($class)->countNoS3Images()) { + $result = true; + break; + } + } + + return $result; + } + + /** + * Check migrate to Amazon S3 form visibility + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + protected function isMigrateToS3Visible() + { + return !$this->isMigrateStarted() && $this->hasNoS3Images(); + } + + // }}} +} + diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/icon.png b/src/classes/XLite/Module/CDev/AmazonS3Images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c357f9477cedf5177f71014fded358f2c9649953 GIT binary patch literal 6800 zcmV;B8gJ!^P)*%FLa8?%v(!i(2N+Wf~Qe)@7#ON z>C@l&x9>lH&xj|VejZmkj(>2(pqF?&p2(P{nN~`rgb5!F5^@8KN(-V_ZuOB{k{1@*XI{N;1|Lq6k^j$p)Y}-O~O6V_s{!=kHxXDVT)7`sv zY}@^rTlf6aK!5L@e*^%2B*3F%tTs#U9#BO|AsFMjEOiZ(Lu|Es@g z19ScQp+qK=S@VUv|NQUn`poVBk;`SaXbo67L^hM&c>U&059V{(>Y20Whf}F^{oujZ z-K|@<&j*yj?C)O{&*$@N|N6oE9^1KX>o>`Mm@7DTph}pmSvBxyYgVr+9y@;W9r7#H zciw(O2B3y&Tqt%~*<7yo3-^5P@3(9me0T-AD<6yzW5t*;cERU{FP%m*k<8w>WBctl z?cDJQt-^|mf3&0u#)>gx>=?rk&`c&9OQ$mfpSf-CKU$WVSb^*64#tWxW9%41Z9`+J zgeVk>g}t}jbl2^BcmKnRbT015Wi#u?Cnn#xG&(l&?mGwTtovp>ktp7@Yv+9|$rQ}4 zptMNsXY3BX^X}{Peuh;(M!|YlUr+ZbT(VwIDz0~`U z_Oq5^eZ3c@Cl(BLxf@j86}f@#V?fNCNOT;phl*Hw31vwAgCV$W1b!Ufz}8e7 za%zD~w@GE>y@*J_m~&w_iP*@RCW=P93z<|Ol05@J zApNGdG{3`DYVQUZ#uJBdfw}lIU zC^{~zB6dSW?FM^R!yx;o$j;S~Hb}kYEZoXPG%Keud1(ZzZYrWFEsVea95T)aNQx>< z!=bJUP2^}0?|n?zG)|e+-ht~(z#bpQOz9Y$sRq{F`bCVNB-?!Hmq?2#I_nexI20%t zsFMBU{$9=lpOBYVffG_K>1Q}>GCl!etga@c7^2ej%hhIl~P5B zpAn9yL?m+|Ja?y5BroIzr=$^qKM-DD9k&`wB0Ec>p2C;5%Q1|WHy16(71&MHDe6Yc zS!s1QL(l3(5uz2iw;2l$1aECcltqLHN)5U2l|#1X8BR*+cr~git;;MetGOiV$-#FU z!||oAC3&s!qVa0z-1#OJU{;3VH4b83*H4NC7CI2QHdXW^gfM}oyhxW>ky0u`K#VZ@ zP!Z6CAtDPG%vtygAg?|)zZM%Bdh2Lx=}*+~rHdVlYLn0QMH3ObY4B+pZ7j>PY0{&Q zfwTzG(qpZ%k&m^&sYpbuEoy5Hd?`Z{Sw9UNL@M5*Lj~ap&pYPX-X(DR#e4aPdPW_N zwrPe|F#XEy7*s@7oF^Pecj%bl*()tU(z|_&z;$S9E_rfECcqF<-)3lTqriDan%UNE59v$`d40gUGfqkYvr*sgEn&Fc#3V61LWg6AVVbrJ25Uo6qx|2ac#^`2a zsHkqZ@jQ&&CZu||>7ZSt*Fjl*a8w-m>%I)NZa=Z26EwyV)TWQaA*N-!DY{;a2yPlp zu^O>VFO5NLj7Wo--$V;DK;!2qL^JgwE`M@F$8{`a6gXQAlFDhId;yKglQijbB&{*J z!7Z@zTVSMCQ)Aw;P7!`qD>NZ6btXtrU*|*O&%U*YKs2hB21gDY3nzi%7RZH-7?Z_89ExLlEVY zuPOYw2&->5dIxVqamx_jB?a~|Bnn$e{>kn+o>_HW8HPcgiI+qt zO})cw7+o~)0?dIe$P-viA_D3DRr-FK^u4T!NQ~<{TZQFyN;*y?MKOsILd?Ln&!aZ^ zK8(5J#5%@lDiuuu*^AotEDTqX#56UFiDkO!`y!2zp~bM_R7)hGGbr@MkTci7nV5zu z*WolJNlAmV$E1~6lGI-G_N)bZa)?=FqM+w!);)Cg5}h>lJ-aU1V(B>+5qN!ef|7l@ zs{xi_TuEj~nm&aVVLT!Hl$QomEq!NwQBFyFcg$ku>~9e_O33xDL9zcYA?y24of<)- zbOQBRQh6%@qqrHlp6f^|NeZka8kJE@oj69O;CjNT3!{gAfvg}~Ij~Wm=K39wRZ{86 zv#3p7LOhj6p??S_**EsYjaf1&r+2Q69ooTYQ$C2}ZfBr<7o0CAYj5&G;slqcSTNc54tU4umTCS?1!BfshM z&96WdsXU?1n=e>RVcI@4|7kAxt zSA-mj(7pcjsi*M#^Q{LrxZQyR2aw5RmZI@j@040`CxtYm@+_gT#sxTICr~M6F->Y~ z_S}rVoez>UoyWwx&%$b)LW~m-sKHVWMFRXZPE+4Z%#=u)91gj9d%_{ zpt_Gd{s|=J-bTinq;}G`O@?Q;e5nek9b=-$;cX2$LH2Nz+Lv`ED5b^-^hy|VdA#57 zf^ePK@Mz;xBxMZd(9jU>z4u-%k%8*IK+^a83oqc!H{Zm|ue^f0?z~ff_X2&!U=9ur z;^BuMroMwHmB#R+A3d(e;_q2fKY@LDk77!n=LV?@(;%M0ai|W?*^6`1Sb7Q>I0-Kf z32l>T3({pIVI&Z+>(JZswUmL*eE{xt=+Ghk{;Oa8D)#K%<2Uzm3=Hsr0}tr$j~+e} z64O934?OrF25BL9Hhp~qc;ErAt(Nv{rJk2l`OeKYiB^S~GJ?!g$Bw8+>?0`=KUF7G zXz5!SDCyy>LY9wEC{>Vm7M|DUyc%Zc&XiKNl{yb#3bHM%f@86I8ckK7mi(U@u zTaP^AF}g@{CyD`&CByu{GD>JG1?Hz7q@P;$Q+nR#5pNl~QqjIir`sDkXR2jU89v^v zoM+HDFyGQkUV8K~lzfF9J9g-wpLpU4t=eIRF0$7ZNOmaUK~g-DlipR&4r)G^rb(@42hO1>+NP8 zE=g_chKGkk2gJv=ZQHae50Q=BvwKfO+Ji8vRYSl){`ki~*6;iJ`tbFye_i*#+HBLJ zolPfSsjLJx0}@mo#+>&!KM{Dho;dt;~%;Vm(C_ zE`4W*2A#XHt-OQIhsZhAs#Wc&8DIvM%>f^G+;K-owF__$fz2m>`sTqm@x)J_(Cs;f zWn22OJEbuDu2(jT?#=hW?pa3x{s*Yco`yl72xmr9I^ipo?GVKy?kp*2M{Y{`)@ZyUv>X?)z`(u|- zo&fV@FAhz@NNqtPwGPQu`-rcX;7k$aoH&U}xe8Ym(KH4iyZ0g4*NbE~F`HBxZnaDc za0)XgUPhxffn>Uun9)Y0h^ObTzYTeL8)~Id)SKj~(FKve5xK2vknI_QN^gK8vm})y zt*)WXj_-o;>MO6}$tR!G()rLs56!D?;kmQw{^Tb=(dt~OR6G_G*=^`VH{(lXm85)G zoKoj^rpeqgO{AE8+QgjVEn+&M(w~7tT(3D>p$5nQNgG1UQkB^TNIRC0u zHF}fmp#J@bKh)C3_B9BYci(c0er4$nLq0mV|7)+krh#YmU)J>9d@1(gP(jRyQ)#ZH zA1H-eIg8O_Pa~JMk?9|TwQ(o4xf$-<1m;S^D9=tHUF<`5-;k~=VsGt|{j3~+9doq= zdUhN@JX@f#MYw$=blp=>=Ez##+Qa8C=Z6H^$jAtudFB~?b{-7+17uSJsb$-E?AS5w zu)g-Sugz=!m9Knd(GF>e8T(dz*|tlr(`epG8#;r36pe`yR4$|mwADy;Z9<%EW^vO# z6qBT4^$9d5j-zt%52#O)Q>$NsLEhd>Zlv(3;>E4e9aUEMXyHPTVxxcTfF6DHQM~xl zOE?w@m-t|=&XRWb-FJJTmamrF=iAihzX<%7s9$gdZ8uQA=(hMWZX>I(JSM0^Y?%WU zvX6x6>coa2$otpE;8c!a`oaJbYySd;8}7l_vEM0YD{ND}Q)irGtu8@Aq;54pD$BRgr$yLly=i9Ia>PdVlHT2{{Z_G@I<;0M>_R|p3mvXP(onM)2 zd%NRIxMCDV#3LE@R@SMl9#uuM>XAAtvCuAUv`9F@<25@A=xwKj2Kk5OPTz?uI4O@? zw<_p$zA~ubkO)l#{K72}y?odu+F$v(*PyB-QuZS{ODWMNanTf^YE$KoELsO}B1*MC zi9(0=QbZAEeBf`EImGj=whFqi>=V&x3v})(suuW~qf@Nvim=)w*gI-RXdw+!^H`Gz ztN&U?L0w6G!}83_zN6hp6OMd`v$xqU$AmOXicfv1bbu~q7q8p-X59+gk-M9qHEhA<&JcW)F z&Js`6j;LwJU>kWjDWaYEodjft#^HsrywXR1Zc??PhiIK$xX!Ah-Y+cfZ8P5sKDi?1 ziKe=0DZNH7kFadoo4DcEReE-gQ*e&ikNlSV5p%eF<}?NHykCC`4MI34lRDMMdCi*Y zg%u}S+D&YV0{?Vw3q{=P;ffvt6uNjJES>ZpjA*L>jM~V~67&e5tt5AAOC@wfe%a}~ z`1UeU!^d7M))`Q@b`*kr9s<-&(ha8I5?JxoyO3E$!F~N4YU9HYW{SS=f?2#7nVuUE z@422pTt_Nj@al><0quH^Axa_JAC8!}rQKdFy7dwN_2~+I8YE`9Z9BFXHQN)X8XvV$H&aHF|^3amilV!e?1gukP)v;v?u^Th!4O z?6)dF475Ke5pCberex>yr;B7uOQ4>SNk^W96K(fx_}&(99CAl&E?uvvmaAaApvm+= z^cTW=?}qiGs!bCXe(W+Dv|sMw-LTF-+D=6rR3uD_j-xuM;PL_5S?hFlsw1UucV(wL zP#x{srBYmBcyZNBzwj3#3iQWh2|khMOm zB^}qT(fiEGZ^l`?A7Sj2|D>(q`2pD|mn&1@!vrhG)vGvRM%Ycbu3LxqOFG~-n~k{- z$4Vb~yO}G;Vh+ZPusdPf%`#)jfI5vvWBSdv-+ehAkE@m6$GSLmXUrHo#*neJJV5KS zhmIb5Z{*zh!~MNIJ9(RU<+wWOWXu>l#*jX;wSug-Qd zR*V^A#~5mr_y1Brooqnq*zx1P|Me@c{dYE-#fs`*S=AXM#)>gx>=;AFG7v?U(%D+A zI{f0Ve*M(Jciwv?pU-2(NiD4Aj16PNSTSad9b>4!=fAYDb?bI@{DUJLKG}3Oj~zd8 zk-|}H+t%wglV}^fSF|FPf>b=oC#(6hKYRAMCu_CZA;+;V(brXyPPa2T!XH#fd@pc< z;`v|xs&@R;>62f$`}1Ggym4?dIVxe>w%&--Pp*B+2>=7g(#U5l7K3G3>eTSasb^pM z)z43!I`w+JUO(=-&IQKI$Ij~){cAP+_dtA*GbEUOu~>Wqg#{Zo4h`4p)7@40V*qqwa%zTvtDQb`_VgQXzkP7{%*df;vpGyccb0^%bdl083|3DfSV(YoFWiM>9s^ZPtbRB?1Z>Y z=b!%(m-~xf{@=E+d|=c5$q$ y+3(OKU~PXOD{_9C!R!RpiJbE!vh(;q0R{jKpHh+?&vb790000 +# @copyright Copyright (c) 2010 Creative Development LLC . All rights reserved +# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +# @link http://www.litecommerce.com/ +# @since 1.0.0 +XLite\Model\Config: + - name: access_key + category: CDev\AmazonS3Images + type: 'XLite\View\FormField\Input\Text' + orderby: 100 + value: '' + translations: + - code: en + option_name: AWS access key + - name: secret_key + category: CDev\AmazonS3Images + type: 'XLite\View\FormField\Input\Password' + orderby: 200 + value: '' + translations: + - code: en + option_name: AWS secret key + - name: bucket + category: CDev\AmazonS3Images + type: 'XLite\View\FormField\Input\Text' + orderby: 300 + value: '' + translations: + - code: en + option_name: S3 bucket name + - name: server + category: CDev\AmazonS3Images + type: 'XLite\View\FormField\Input\Text\URL' + orderby: 400 + value: 'https://s3.amazonaws.com/' + translations: + - code: en + option_name: S3 server + - name: cloudfront_domain + category: CDev\AmazonS3Images + type: 'XLite\View\FormField\Input\Text' + orderby: 500 + value: '' + translations: + - code: en + option_name: Amazon CloudFront domain name +XLite\Model\LanguageLabel: + - { name: 'Content images are currently stored on file system.', translations: [{ code: en, label: 'Content images are currently stored on file system.' }] } + - { name: 'Clicking the button will start the image transferring process. It will take some time, depending on server and application settings', translations: [{ code: en, label: 'Clicking the button will start the image transferring process. It will take some time, depending on server and application settings.
After the migration is completed all content images will be stored on Amazon S3 server.' }] } + diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php new file mode 100644 index 0000000000..16090ee2f4 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php @@ -0,0 +1,1728 @@ + $host, 'type' => $type, 'user' => null, 'pass' => 'null'); + } + + + /** + * Set the error mode to exceptions + * + * @param boolean $enabled Enable exceptions + * @return void + */ + public static function setExceptions($enabled = true) + { + self::$useExceptions = $enabled; + } + + + /** + * Internal error handler + * + * @internal Internal error handler + * @param string $message Error message + * @param string $file Filename + * @param integer $line Line number + * @param integer $code Error code + * @return void + */ + private static function __triggerError($message, $file, $line, $code = 0) + { + if (self::$useExceptions) + throw new S3Exception($message, $file, $line, $code); + else + trigger_error($message, E_USER_WARNING); + } + + + /** + * Get a list of buckets + * + * @param boolean $detailed Returns detailed bucket list when true + * @return array | false + */ + public static function listBuckets($detailed = false) + { + $rest = new S3Request('GET', '', '', self::$endpoint); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::listBuckets(): [%s] %s", $rest->error['code'], + $rest->error['message']), __FILE__, __LINE__); + return false; + } + $results = array(); + if (!isset($rest->body->Buckets)) return $results; + + if ($detailed) + { + if (isset($rest->body->Owner, $rest->body->Owner->ID, $rest->body->Owner->DisplayName)) + $results['owner'] = array( + 'id' => (string)$rest->body->Owner->ID, 'name' => (string)$rest->body->Owner->ID + ); + $results['buckets'] = array(); + foreach ($rest->body->Buckets->Bucket as $b) + $results['buckets'][] = array( + 'name' => (string)$b->Name, 'time' => strtotime((string)$b->CreationDate) + ); + } else + foreach ($rest->body->Buckets->Bucket as $b) $results[] = (string)$b->Name; + + return $results; + } + + + /* + * Get contents for a bucket + * + * If maxKeys is null this method will loop through truncated result sets + * + * @param string $bucket Bucket name + * @param string $prefix Prefix + * @param string $marker Marker (last file listed) + * @param string $maxKeys Max keys (maximum number of keys to return) + * @param string $delimiter Delimiter + * @param boolean $returnCommonPrefixes Set to true to return CommonPrefixes + * @return array | false + */ + public static function getBucket($bucket, $prefix = null, $marker = null, $maxKeys = null, $delimiter = null, $returnCommonPrefixes = false) + { + $rest = new S3Request('GET', $bucket, '', self::$endpoint); + if ($prefix !== null && $prefix !== '') $rest->setParameter('prefix', $prefix); + if ($marker !== null && $marker !== '') $rest->setParameter('marker', $marker); + if ($maxKeys !== null && $maxKeys !== '') $rest->setParameter('max-keys', $maxKeys); + if ($delimiter !== null && $delimiter !== '') $rest->setParameter('delimiter', $delimiter); + $response = $rest->getResponse(); + if ($response->error === false && $response->code !== 200) + $response->error = array('code' => $response->code, 'message' => 'Unexpected HTTP status'); + if ($response->error !== false) + { + self::__triggerError(sprintf("S3::getBucket(): [%s] %s", + $response->error['code'], $response->error['message']), __FILE__, __LINE__); + return false; + } + + $results = array(); + + $nextMarker = null; + if (isset($response->body, $response->body->Contents)) + foreach ($response->body->Contents as $c) + { + $results[(string)$c->Key] = array( + 'name' => (string)$c->Key, + 'time' => strtotime((string)$c->LastModified), + 'size' => (int)$c->Size, + 'hash' => substr((string)$c->ETag, 1, -1) + ); + $nextMarker = (string)$c->Key; + } + + if ($returnCommonPrefixes && isset($response->body, $response->body->CommonPrefixes)) + foreach ($response->body->CommonPrefixes as $c) + $results[(string)$c->Prefix] = array('prefix' => (string)$c->Prefix); + + if (isset($response->body, $response->body->IsTruncated) && + (string)$response->body->IsTruncated == 'false') return $results; + + if (isset($response->body, $response->body->NextMarker)) + $nextMarker = (string)$response->body->NextMarker; + + // Loop through truncated results if maxKeys isn't specified + if ($maxKeys == null && $nextMarker !== null && (string)$response->body->IsTruncated == 'true') + do + { + $rest = new S3Request('GET', $bucket, '', self::$endpoint); + if ($prefix !== null && $prefix !== '') $rest->setParameter('prefix', $prefix); + $rest->setParameter('marker', $nextMarker); + if ($delimiter !== null && $delimiter !== '') $rest->setParameter('delimiter', $delimiter); + + if (($response = $rest->getResponse(true)) == false || $response->code !== 200) break; + + if (isset($response->body, $response->body->Contents)) + foreach ($response->body->Contents as $c) + { + $results[(string)$c->Key] = array( + 'name' => (string)$c->Key, + 'time' => strtotime((string)$c->LastModified), + 'size' => (int)$c->Size, + 'hash' => substr((string)$c->ETag, 1, -1) + ); + $nextMarker = (string)$c->Key; + } + + if ($returnCommonPrefixes && isset($response->body, $response->body->CommonPrefixes)) + foreach ($response->body->CommonPrefixes as $c) + $results[(string)$c->Prefix] = array('prefix' => (string)$c->Prefix); + + if (isset($response->body, $response->body->NextMarker)) + $nextMarker = (string)$response->body->NextMarker; + + } while ($response !== false && (string)$response->body->IsTruncated == 'true'); + + return $results; + } + + + /** + * Put a bucket + * + * @param string $bucket Bucket name + * @param constant $acl ACL flag + * @param string $location Set as "EU" to create buckets hosted in Europe + * @return boolean + */ + public static function putBucket($bucket, $acl = self::ACL_PRIVATE, $location = false) + { + $rest = new S3Request('PUT', $bucket, '', self::$endpoint); + $rest->setAmzHeader('x-amz-acl', $acl); + + if ($location !== false) + { + $dom = new DOMDocument; + $createBucketConfiguration = $dom->createElement('CreateBucketConfiguration'); + $locationConstraint = $dom->createElement('LocationConstraint', strtoupper($location)); + $createBucketConfiguration->appendChild($locationConstraint); + $dom->appendChild($createBucketConfiguration); + $rest->data = $dom->saveXML(); + $rest->size = strlen($rest->data); + $rest->setHeader('Content-Type', 'application/xml'); + } + $rest = $rest->getResponse(); + + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::putBucket({$bucket}, {$acl}, {$location}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Delete an empty bucket + * + * @param string $bucket Bucket name + * @return boolean + */ + public static function deleteBucket($bucket) + { + $rest = new S3Request('DELETE', $bucket, '', self::$endpoint); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 204) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::deleteBucket({$bucket}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Create input info array for putObject() + * + * @param string $file Input file + * @param mixed $md5sum Use MD5 hash (supply a string if you want to use your own) + * @return array | false + */ + public static function inputFile($file, $md5sum = true) + { + if (!file_exists($file) || !is_file($file) || !is_readable($file)) + { + self::__triggerError('S3::inputFile(): Unable to open input file: '.$file, __FILE__, __LINE__); + return false; + } + return array('file' => $file, 'size' => filesize($file), 'md5sum' => $md5sum !== false ? + (is_string($md5sum) ? $md5sum : base64_encode(md5_file($file, true))) : ''); + } + + + /** + * Create input array info for putObject() with a resource + * + * @param string $resource Input resource to read from + * @param integer $bufferSize Input byte size + * @param string $md5sum MD5 hash to send (optional) + * @return array | false + */ + public static function inputResource(&$resource, $bufferSize, $md5sum = '') + { + if (!is_resource($resource) || $bufferSize < 0) + { + self::__triggerError('S3::inputResource(): Invalid resource or buffer size', __FILE__, __LINE__); + return false; + } + $input = array('size' => $bufferSize, 'md5sum' => $md5sum); + $input['fp'] =& $resource; + return $input; + } + + + /** + * Put an object + * + * @param mixed $input Input data + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param constant $acl ACL constant + * @param array $metaHeaders Array of x-amz-meta-* headers + * @param array $requestHeaders Array of request headers or content type as a string + * @param constant $storageClass Storage class constant + * @return boolean + */ + public static function putObject($input, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $requestHeaders = array(), $storageClass = self::STORAGE_CLASS_STANDARD) + { + if ($input === false) return false; + $rest = new S3Request('PUT', $bucket, $uri, self::$endpoint); + + if (is_string($input)) $input = array( + 'data' => $input, 'size' => strlen($input), + 'md5sum' => base64_encode(md5($input, true)) + ); + + // Data + if (isset($input['fp'])) + $rest->fp =& $input['fp']; + elseif (isset($input['file'])) + $rest->fp = @fopen($input['file'], 'rb'); + elseif (isset($input['data'])) + $rest->data = $input['data']; + + // Content-Length (required) + if (isset($input['size']) && $input['size'] >= 0) + $rest->size = $input['size']; + else { + if (isset($input['file'])) + $rest->size = filesize($input['file']); + elseif (isset($input['data'])) + $rest->size = strlen($input['data']); + } + + // Custom request headers (Content-Type, Content-Disposition, Content-Encoding) + if (is_array($requestHeaders)) + foreach ($requestHeaders as $h => $v) $rest->setHeader($h, $v); + elseif (is_string($requestHeaders)) // Support for legacy contentType parameter + $input['type'] = $requestHeaders; + + // Content-Type + if (!isset($input['type'])) + { + if (isset($requestHeaders['Content-Type'])) + $input['type'] =& $requestHeaders['Content-Type']; + elseif (isset($input['file'])) + $input['type'] = self::__getMimeType($input['file']); + else + $input['type'] = 'application/octet-stream'; + } + + if ($storageClass !== self::STORAGE_CLASS_STANDARD) // Storage class + $rest->setAmzHeader('x-amz-storage-class', $storageClass); + + // We need to post with Content-Length and Content-Type, MD5 is optional + if ($rest->size >= 0 && ($rest->fp !== false || $rest->data !== false)) + { + $rest->setHeader('Content-Type', $input['type']); + if (isset($input['md5sum'])) $rest->setHeader('Content-MD5', $input['md5sum']); + + $rest->setAmzHeader('x-amz-acl', $acl); + foreach ($metaHeaders as $h => $v) $rest->setAmzHeader('x-amz-meta-'.$h, $v); + $rest->getResponse(); + } else + $rest->response->error = array('code' => 0, 'message' => 'Missing input parameters'); + + if ($rest->response->error === false && $rest->response->code !== 200) + $rest->response->error = array('code' => $rest->response->code, 'message' => 'Unexpected HTTP status'); + if ($rest->response->error !== false) + { + self::__triggerError(sprintf("S3::putObject(): [%s] %s", + $rest->response->error['code'], $rest->response->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Put an object from a file (legacy function) + * + * @param string $file Input file path + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param constant $acl ACL constant + * @param array $metaHeaders Array of x-amz-meta-* headers + * @param string $contentType Content type + * @return boolean + */ + public static function putObjectFile($file, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $contentType = null) + { + return self::putObject(self::inputFile($file), $bucket, $uri, $acl, $metaHeaders, $contentType); + } + + + /** + * Put an object from a string (legacy function) + * + * @param string $string Input data + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param constant $acl ACL constant + * @param array $metaHeaders Array of x-amz-meta-* headers + * @param string $contentType Content type + * @return boolean + */ + public static function putObjectString($string, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $contentType = 'text/plain') + { + return self::putObject($string, $bucket, $uri, $acl, $metaHeaders, $contentType); + } + + + /** + * Get an object + * + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param mixed $saveTo Filename or resource to write to + * @return mixed + */ + public static function getObject($bucket, $uri, $saveTo = false) + { + $rest = new S3Request('GET', $bucket, $uri, self::$endpoint); + if ($saveTo !== false) + { + if (is_resource($saveTo)) + $rest->fp =& $saveTo; + else + if (($rest->fp = @fopen($saveTo, 'wb')) !== false) + $rest->file = realpath($saveTo); + else + $rest->response->error = array('code' => 0, 'message' => 'Unable to open save file for writing: '.$saveTo); + } + if ($rest->response->error === false) $rest->getResponse(); + + if ($rest->response->error === false && $rest->response->code !== 200) + $rest->response->error = array('code' => $rest->response->code, 'message' => 'Unexpected HTTP status'); + if ($rest->response->error !== false) + { + self::__triggerError(sprintf("S3::getObject({$bucket}, {$uri}): [%s] %s", + $rest->response->error['code'], $rest->response->error['message']), __FILE__, __LINE__); + return false; + } + return $rest->response; + } + + + /** + * Get object information + * + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param boolean $returnInfo Return response information + * @return mixed | false + */ + public static function getObjectInfo($bucket, $uri, $returnInfo = true) + { + $rest = new S3Request('HEAD', $bucket, $uri, self::$endpoint); + $rest = $rest->getResponse(); + if ($rest->error === false && ($rest->code !== 200 && $rest->code !== 404)) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::getObjectInfo({$bucket}, {$uri}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return $rest->code == 200 ? $returnInfo ? $rest->headers : true : false; + } + + + /** + * Copy an object + * + * @param string $bucket Source bucket name + * @param string $uri Source object URI + * @param string $bucket Destination bucket name + * @param string $uri Destination object URI + * @param constant $acl ACL constant + * @param array $metaHeaders Optional array of x-amz-meta-* headers + * @param array $requestHeaders Optional array of request headers (content type, disposition, etc.) + * @param constant $storageClass Storage class constant + * @return mixed | false + */ + public static function copyObject($srcBucket, $srcUri, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $requestHeaders = array(), $storageClass = self::STORAGE_CLASS_STANDARD) + { + $rest = new S3Request('PUT', $bucket, $uri, self::$endpoint); + $rest->setHeader('Content-Length', 0); + foreach ($requestHeaders as $h => $v) $rest->setHeader($h, $v); + foreach ($metaHeaders as $h => $v) $rest->setAmzHeader('x-amz-meta-'.$h, $v); + if ($storageClass !== self::STORAGE_CLASS_STANDARD) // Storage class + $rest->setAmzHeader('x-amz-storage-class', $storageClass); + $rest->setAmzHeader('x-amz-acl', $acl); // Added rawurlencode() for $srcUri (thanks a.yamanoi) + $rest->setAmzHeader('x-amz-copy-source', sprintf('/%s/%s', $srcBucket, rawurlencode($srcUri))); + if (sizeof($requestHeaders) > 0 || sizeof($metaHeaders) > 0) + $rest->setAmzHeader('x-amz-metadata-directive', 'REPLACE'); + + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::copyObject({$srcBucket}, {$srcUri}, {$bucket}, {$uri}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return isset($rest->body->LastModified, $rest->body->ETag) ? array( + 'time' => strtotime((string)$rest->body->LastModified), + 'hash' => substr((string)$rest->body->ETag, 1, -1) + ) : false; + } + + + /** + * Set logging for a bucket + * + * @param string $bucket Bucket name + * @param string $targetBucket Target bucket (where logs are stored) + * @param string $targetPrefix Log prefix (e,g; domain.com-) + * @return boolean + */ + public static function setBucketLogging($bucket, $targetBucket, $targetPrefix = null) + { + // The S3 log delivery group has to be added to the target bucket's ACP + if ($targetBucket !== null && ($acp = self::getAccessControlPolicy($targetBucket, '')) !== false) + { + // Only add permissions to the target bucket when they do not exist + $aclWriteSet = false; + $aclReadSet = false; + foreach ($acp['acl'] as $acl) + if ($acl['type'] == 'Group' && $acl['uri'] == 'http://acs.amazonaws.com/groups/s3/LogDelivery') + { + if ($acl['permission'] == 'WRITE') $aclWriteSet = true; + elseif ($acl['permission'] == 'READ_ACP') $aclReadSet = true; + } + if (!$aclWriteSet) $acp['acl'][] = array( + 'type' => 'Group', 'uri' => 'http://acs.amazonaws.com/groups/s3/LogDelivery', 'permission' => 'WRITE' + ); + if (!$aclReadSet) $acp['acl'][] = array( + 'type' => 'Group', 'uri' => 'http://acs.amazonaws.com/groups/s3/LogDelivery', 'permission' => 'READ_ACP' + ); + if (!$aclReadSet || !$aclWriteSet) self::setAccessControlPolicy($targetBucket, '', $acp); + } + + $dom = new DOMDocument; + $bucketLoggingStatus = $dom->createElement('BucketLoggingStatus'); + $bucketLoggingStatus->setAttribute('xmlns', 'http://s3.amazonaws.com/doc/2006-03-01/'); + if ($targetBucket !== null) + { + if ($targetPrefix == null) $targetPrefix = $bucket . '-'; + $loggingEnabled = $dom->createElement('LoggingEnabled'); + $loggingEnabled->appendChild($dom->createElement('TargetBucket', $targetBucket)); + $loggingEnabled->appendChild($dom->createElement('TargetPrefix', $targetPrefix)); + // TODO: Add TargetGrants? + $bucketLoggingStatus->appendChild($loggingEnabled); + } + $dom->appendChild($bucketLoggingStatus); + + $rest = new S3Request('PUT', $bucket, '', self::$endpoint); + $rest->setParameter('logging', null); + $rest->data = $dom->saveXML(); + $rest->size = strlen($rest->data); + $rest->setHeader('Content-Type', 'application/xml'); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::setBucketLogging({$bucket}, {$uri}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Get logging status for a bucket + * + * This will return false if logging is not enabled. + * Note: To enable logging, you also need to grant write access to the log group + * + * @param string $bucket Bucket name + * @return array | false + */ + public static function getBucketLogging($bucket) + { + $rest = new S3Request('GET', $bucket, '', self::$endpoint); + $rest->setParameter('logging', null); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::getBucketLogging({$bucket}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + if (!isset($rest->body->LoggingEnabled)) return false; // No logging + return array( + 'targetBucket' => (string)$rest->body->LoggingEnabled->TargetBucket, + 'targetPrefix' => (string)$rest->body->LoggingEnabled->TargetPrefix, + ); + } + + + /** + * Disable bucket logging + * + * @param string $bucket Bucket name + * @return boolean + */ + public static function disableBucketLogging($bucket) + { + return self::setBucketLogging($bucket, null); + } + + + /** + * Get a bucket's location + * + * @param string $bucket Bucket name + * @return string | false + */ + public static function getBucketLocation($bucket) + { + $rest = new S3Request('GET', $bucket, '', self::$endpoint); + $rest->setParameter('location', null); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::getBucketLocation({$bucket}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return (isset($rest->body[0]) && (string)$rest->body[0] !== '') ? (string)$rest->body[0] : 'US'; + } + + + /** + * Set object or bucket Access Control Policy + * + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param array $acp Access Control Policy Data (same as the data returned from getAccessControlPolicy) + * @return boolean + */ + public static function setAccessControlPolicy($bucket, $uri = '', $acp = array()) + { + $dom = new DOMDocument; + $dom->formatOutput = true; + $accessControlPolicy = $dom->createElement('AccessControlPolicy'); + $accessControlList = $dom->createElement('AccessControlList'); + + // It seems the owner has to be passed along too + $owner = $dom->createElement('Owner'); + $owner->appendChild($dom->createElement('ID', $acp['owner']['id'])); + $owner->appendChild($dom->createElement('DisplayName', $acp['owner']['name'])); + $accessControlPolicy->appendChild($owner); + + foreach ($acp['acl'] as $g) + { + $grant = $dom->createElement('Grant'); + $grantee = $dom->createElement('Grantee'); + $grantee->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + if (isset($g['id'])) + { // CanonicalUser (DisplayName is omitted) + $grantee->setAttribute('xsi:type', 'CanonicalUser'); + $grantee->appendChild($dom->createElement('ID', $g['id'])); + } + elseif (isset($g['email'])) + { // AmazonCustomerByEmail + $grantee->setAttribute('xsi:type', 'AmazonCustomerByEmail'); + $grantee->appendChild($dom->createElement('EmailAddress', $g['email'])); + } + elseif ($g['type'] == 'Group') + { // Group + $grantee->setAttribute('xsi:type', 'Group'); + $grantee->appendChild($dom->createElement('URI', $g['uri'])); + } + $grant->appendChild($grantee); + $grant->appendChild($dom->createElement('Permission', $g['permission'])); + $accessControlList->appendChild($grant); + } + + $accessControlPolicy->appendChild($accessControlList); + $dom->appendChild($accessControlPolicy); + + $rest = new S3Request('PUT', $bucket, $uri, self::$endpoint); + $rest->setParameter('acl', null); + $rest->data = $dom->saveXML(); + $rest->size = strlen($rest->data); + $rest->setHeader('Content-Type', 'application/xml'); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::setAccessControlPolicy({$bucket}, {$uri}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Get object or bucket Access Control Policy + * + * @param string $bucket Bucket name + * @param string $uri Object URI + * @return mixed | false + */ + public static function getAccessControlPolicy($bucket, $uri = '') + { + $rest = new S3Request('GET', $bucket, $uri, self::$endpoint); + $rest->setParameter('acl', null); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::getAccessControlPolicy({$bucket}, {$uri}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + + $acp = array(); + if (isset($rest->body->Owner, $rest->body->Owner->ID, $rest->body->Owner->DisplayName)) + $acp['owner'] = array( + 'id' => (string)$rest->body->Owner->ID, 'name' => (string)$rest->body->Owner->DisplayName + ); + + if (isset($rest->body->AccessControlList)) + { + $acp['acl'] = array(); + foreach ($rest->body->AccessControlList->Grant as $grant) + { + foreach ($grant->Grantee as $grantee) + { + if (isset($grantee->ID, $grantee->DisplayName)) // CanonicalUser + $acp['acl'][] = array( + 'type' => 'CanonicalUser', + 'id' => (string)$grantee->ID, + 'name' => (string)$grantee->DisplayName, + 'permission' => (string)$grant->Permission + ); + elseif (isset($grantee->EmailAddress)) // AmazonCustomerByEmail + $acp['acl'][] = array( + 'type' => 'AmazonCustomerByEmail', + 'email' => (string)$grantee->EmailAddress, + 'permission' => (string)$grant->Permission + ); + elseif (isset($grantee->URI)) // Group + $acp['acl'][] = array( + 'type' => 'Group', + 'uri' => (string)$grantee->URI, + 'permission' => (string)$grant->Permission + ); + else continue; + } + } + } + return $acp; + } + + + /** + * Delete an object + * + * @param string $bucket Bucket name + * @param string $uri Object URI + * @return boolean + */ + public static function deleteObject($bucket, $uri) + { + $rest = new S3Request('DELETE', $bucket, $uri, self::$endpoint); + $rest = $rest->getResponse(); + if ($rest->error === false && $rest->code !== 204) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::deleteObject(): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Get a query string authenticated URL + * + * @param string $bucket Bucket name + * @param string $uri Object URI + * @param integer $lifetime Lifetime in seconds + * @param boolean $hostBucket Use the bucket name as the hostname + * @param boolean $https Use HTTPS ($hostBucket should be false for SSL verification) + * @return string + */ + public static function getAuthenticatedURL($bucket, $uri, $lifetime, $hostBucket = false, $https = false) + { + $expires = time() + $lifetime; + $uri = str_replace('%2F', '/', rawurlencode($uri)); // URI should be encoded (thanks Sean O'Dea) + return sprintf(($https ? 'https' : 'http').'://%s/%s?AWSAccessKeyId=%s&Expires=%u&Signature=%s', + $hostBucket ? $bucket : $bucket.'.s3.amazonaws.com', $uri, self::$__accessKey, $expires, + urlencode(self::__getHash("GET\n\n\n{$expires}\n/{$bucket}/{$uri}"))); + } + + + /** + * Get upload POST parameters for form uploads + * + * @param string $bucket Bucket name + * @param string $uriPrefix Object URI prefix + * @param constant $acl ACL constant + * @param integer $lifetime Lifetime in seconds + * @param integer $maxFileSize Maximum filesize in bytes (default 5MB) + * @param string $successRedirect Redirect URL or 200 / 201 status code + * @param array $amzHeaders Array of x-amz-meta-* headers + * @param array $headers Array of request headers or content type as a string + * @param boolean $flashVars Includes additional "Filename" variable posted by Flash + * @return object + */ + public static function getHttpUploadPostParams($bucket, $uriPrefix = '', $acl = self::ACL_PRIVATE, $lifetime = 3600, $maxFileSize = 5242880, $successRedirect = "201", $amzHeaders = array(), $headers = array(), $flashVars = false) + { + // Create policy object + $policy = new stdClass; + $policy->expiration = gmdate('Y-m-d\TH:i:s\Z', (time() + $lifetime)); + $policy->conditions = array(); + $obj = new stdClass; $obj->bucket = $bucket; array_push($policy->conditions, $obj); + $obj = new stdClass; $obj->acl = $acl; array_push($policy->conditions, $obj); + + $obj = new stdClass; // 200 for non-redirect uploads + if (is_numeric($successRedirect) && in_array((int)$successRedirect, array(200, 201))) + $obj->success_action_status = (string)$successRedirect; + else // URL + $obj->success_action_redirect = $successRedirect; + array_push($policy->conditions, $obj); + + if ($acl !== self::ACL_PUBLIC_READ) + array_push($policy->conditions, array('eq', '$acl', $acl)); + + array_push($policy->conditions, array('starts-with', '$key', $uriPrefix)); + if ($flashVars) array_push($policy->conditions, array('starts-with', '$Filename', '')); + foreach (array_keys($headers) as $headerKey) + array_push($policy->conditions, array('starts-with', '$'.$headerKey, '')); + foreach ($amzHeaders as $headerKey => $headerVal) + { + $obj = new stdClass; + $obj->{$headerKey} = (string)$headerVal; + array_push($policy->conditions, $obj); + } + array_push($policy->conditions, array('content-length-range', 0, $maxFileSize)); + $policy = base64_encode(str_replace('\/', '/', json_encode($policy))); + + // Create parameters + $params = new stdClass; + $params->AWSAccessKeyId = self::$__accessKey; + $params->key = $uriPrefix.'${filename}'; + $params->acl = $acl; + $params->policy = $policy; unset($policy); + $params->signature = self::__getHash($params->policy); + if (is_numeric($successRedirect) && in_array((int)$successRedirect, array(200, 201))) + $params->success_action_status = (string)$successRedirect; + else + $params->success_action_redirect = $successRedirect; + foreach ($headers as $headerKey => $headerVal) $params->{$headerKey} = (string)$headerVal; + foreach ($amzHeaders as $headerKey => $headerVal) $params->{$headerKey} = (string)$headerVal; + return $params; + } + + + /** + * Create a CloudFront distribution + * + * @param string $bucket Bucket name + * @param boolean $enabled Enabled (true/false) + * @param array $cnames Array containing CNAME aliases + * @param string $comment Use the bucket name as the hostname + * @return array | false + */ + public static function createDistribution($bucket, $enabled = true, $cnames = array(), $comment = '') + { + if (!extension_loaded('openssl')) + { + self::__triggerError(sprintf("S3::createDistribution({$bucket}, ".(int)$enabled.", [], '$comment'): %s", + "CloudFront functionality requires SSL"), __FILE__, __LINE__); + return false; + } + $useSSL = self::$useSSL; + + self::$useSSL = true; // CloudFront requires SSL + $rest = new S3Request('POST', '', '2008-06-30/distribution', 'cloudfront.amazonaws.com'); + $rest->data = self::__getCloudFrontDistributionConfigXML($bucket.'.s3.amazonaws.com', $enabled, $comment, (string)microtime(true), $cnames); + $rest->size = strlen($rest->data); + $rest->setHeader('Content-Type', 'application/xml'); + $rest = self::__getCloudFrontResponse($rest); + + self::$useSSL = $useSSL; + + if ($rest->error === false && $rest->code !== 201) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::createDistribution({$bucket}, ".(int)$enabled.", [], '$comment'): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } elseif ($rest->body instanceof SimpleXMLElement) + return self::__parseCloudFrontDistributionConfig($rest->body); + return false; + } + + + /** + * Get CloudFront distribution info + * + * @param string $distributionId Distribution ID from listDistributions() + * @return array | false + */ + public static function getDistribution($distributionId) + { + if (!extension_loaded('openssl')) + { + self::__triggerError(sprintf("S3::getDistribution($distributionId): %s", + "CloudFront functionality requires SSL"), __FILE__, __LINE__); + return false; + } + $useSSL = self::$useSSL; + + self::$useSSL = true; // CloudFront requires SSL + $rest = new S3Request('GET', '', '2008-06-30/distribution/'.$distributionId, 'cloudfront.amazonaws.com'); + $rest = self::__getCloudFrontResponse($rest); + + self::$useSSL = $useSSL; + + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::getDistribution($distributionId): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + elseif ($rest->body instanceof SimpleXMLElement) + { + $dist = self::__parseCloudFrontDistributionConfig($rest->body); + $dist['hash'] = $rest->headers['hash']; + return $dist; + } + return false; + } + + + /** + * Update a CloudFront distribution + * + * @param array $dist Distribution array info identical to output of getDistribution() + * @return array | false + */ + public static function updateDistribution($dist) + { + if (!extension_loaded('openssl')) + { + self::__triggerError(sprintf("S3::updateDistribution({$dist['id']}): %s", + "CloudFront functionality requires SSL"), __FILE__, __LINE__); + return false; + } + + $useSSL = self::$useSSL; + + self::$useSSL = true; // CloudFront requires SSL + $rest = new S3Request('PUT', '', '2008-06-30/distribution/'.$dist['id'].'/config', 'cloudfront.amazonaws.com'); + $rest->data = self::__getCloudFrontDistributionConfigXML($dist['origin'], $dist['enabled'], $dist['comment'], $dist['callerReference'], $dist['cnames']); + $rest->size = strlen($rest->data); + $rest->setHeader('If-Match', $dist['hash']); + $rest = self::__getCloudFrontResponse($rest); + + self::$useSSL = $useSSL; + + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::updateDistribution({$dist['id']}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } else { + $dist = self::__parseCloudFrontDistributionConfig($rest->body); + $dist['hash'] = $rest->headers['hash']; + return $dist; + } + return false; + } + + + /** + * Delete a CloudFront distribution + * + * @param array $dist Distribution array info identical to output of getDistribution() + * @return boolean + */ + public static function deleteDistribution($dist) + { + if (!extension_loaded('openssl')) + { + self::__triggerError(sprintf("S3::deleteDistribution({$dist['id']}): %s", + "CloudFront functionality requires SSL"), __FILE__, __LINE__); + return false; + } + + $useSSL = self::$useSSL; + + self::$useSSL = true; // CloudFront requires SSL + $rest = new S3Request('DELETE', '', '2008-06-30/distribution/'.$dist['id'], 'cloudfront.amazonaws.com'); + $rest->setHeader('If-Match', $dist['hash']); + $rest = self::__getCloudFrontResponse($rest); + + self::$useSSL = $useSSL; + + if ($rest->error === false && $rest->code !== 204) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::deleteDistribution({$dist['id']}): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + return true; + } + + + /** + * Get a list of CloudFront distributions + * + * @return array + */ + public static function listDistributions() + { + if (!extension_loaded('openssl')) + { + self::__triggerError(sprintf("S3::listDistributions(): [%s] %s", + "CloudFront functionality requires SSL"), __FILE__, __LINE__); + return false; + } + + $useSSL = self::$useSSL; + + self::$useSSL = true; // CloudFront requires SSL + $rest = new S3Request('GET', '', '2008-06-30/distribution', 'cloudfront.amazonaws.com'); + $rest = self::__getCloudFrontResponse($rest); + + self::$useSSL = $useSSL; + + if ($rest->error === false && $rest->code !== 200) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + self::__triggerError(sprintf("S3::listDistributions(): [%s] %s", + $rest->error['code'], $rest->error['message']), __FILE__, __LINE__); + return false; + } + elseif ($rest->body instanceof SimpleXMLElement && isset($rest->body->DistributionSummary)) + { + $list = array(); + if (isset($rest->body->Marker, $rest->body->MaxItems, $rest->body->IsTruncated)) + { + //$info['marker'] = (string)$rest->body->Marker; + //$info['maxItems'] = (int)$rest->body->MaxItems; + //$info['isTruncated'] = (string)$rest->body->IsTruncated == 'true' ? true : false; + } + foreach ($rest->body->DistributionSummary as $summary) + $list[(string)$summary->Id] = self::__parseCloudFrontDistributionConfig($summary); + + return $list; + } + return array(); + } + + + /** + * Invalidate objects in a CloudFront distribution + * + * Thanks to Martin Lindkvist for S3::invalidateDistribution() + * + * @param string $distributionId Distribution ID from listDistributions() + * @param array $paths Array of object paths to invalidate + * @return boolean + */ + public static function invalidateDistribution($distributionId, $paths) { + self::$useSSL = true; // CloudFront requires SSL + $rest = new S3Request('POST', '', '2010-08-01/distribution/'.$distributionId.'/invalidation', 'cloudfront.amazonaws.com'); + $rest->data = self::__getCloudFrontInvalidationBatchXML($paths, (string)microtime(true)); + $rest->size = strlen($rest->data); + $rest = self::__getCloudFrontResponse($rest); + + if ($rest->error === false && $rest->code !== 201) + $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status'); + if ($rest->error !== false) + { + trigger_error(sprintf("S3::invalidate('{$distributionId}',{$paths}): [%s] %s", + $rest->error['code'], $rest->error['message']), E_USER_WARNING); + return false; + } + return true; + } + + + /** + * Get a InvalidationBatch DOMDocument + * + * @internal Used to create XML in invalidateDistribution() + * @param array $paths Paths to objects to invalidateDistribution + * @return string + */ + private static function __getCloudFrontInvalidationBatchXML($paths, $callerReference = '0') { + $dom = new DOMDocument('1.0', 'UTF-8'); + $dom->formatOutput = true; + $invalidationBatch = $dom->createElement('InvalidationBatch'); + foreach ($paths as $path) + $invalidationBatch->appendChild($dom->createElement('Path', $path)); + + $invalidationBatch->appendChild($dom->createElement('CallerReference', $callerReference)); + $dom->appendChild($invalidationBatch); + return $dom->saveXML(); + } + + + /** + * Get a DistributionConfig DOMDocument + * + * @internal Used to create XML in createDistribution() and updateDistribution() + * @param string $bucket Origin bucket + * @param boolean $enabled Enabled (true/false) + * @param string $comment Comment to append + * @param string $callerReference Caller reference + * @param array $cnames Array of CNAME aliases + * @return string + */ + private static function __getCloudFrontDistributionConfigXML($bucket, $enabled, $comment, $callerReference = '0', $cnames = array()) + { + $dom = new DOMDocument('1.0', 'UTF-8'); + $dom->formatOutput = true; + $distributionConfig = $dom->createElement('DistributionConfig'); + $distributionConfig->setAttribute('xmlns', 'http://cloudfront.amazonaws.com/doc/2008-06-30/'); + $distributionConfig->appendChild($dom->createElement('Origin', $bucket)); + $distributionConfig->appendChild($dom->createElement('CallerReference', $callerReference)); + foreach ($cnames as $cname) + $distributionConfig->appendChild($dom->createElement('CNAME', $cname)); + if ($comment !== '') $distributionConfig->appendChild($dom->createElement('Comment', $comment)); + $distributionConfig->appendChild($dom->createElement('Enabled', $enabled ? 'true' : 'false')); + $dom->appendChild($distributionConfig); + return $dom->saveXML(); + } + + + /** + * Parse a CloudFront distribution config + * + * @internal Used to parse the CloudFront DistributionConfig node to an array + * @param object &$node DOMNode + * @return array + */ + private static function __parseCloudFrontDistributionConfig(&$node) + { + $dist = array(); + if (isset($node->Id, $node->Status, $node->LastModifiedTime, $node->DomainName)) + { + $dist['id'] = (string)$node->Id; + $dist['status'] = (string)$node->Status; + $dist['time'] = strtotime((string)$node->LastModifiedTime); + $dist['domain'] = (string)$node->DomainName; + } + if (isset($node->CallerReference)) + $dist['callerReference'] = (string)$node->CallerReference; + if (isset($node->Comment)) + $dist['comment'] = (string)$node->Comment; + if (isset($node->Enabled, $node->Origin)) + { + $dist['origin'] = (string)$node->Origin; + $dist['enabled'] = (string)$node->Enabled == 'true' ? true : false; + } + elseif (isset($node->DistributionConfig)) + { + $dist = array_merge($dist, self::__parseCloudFrontDistributionConfig($node->DistributionConfig)); + } + if (isset($node->CNAME)) + { + $dist['cnames'] = array(); + foreach ($node->CNAME as $cname) $dist['cnames'][(string)$cname] = (string)$cname; + } + return $dist; + } + + + /** + * Grab CloudFront response + * + * @internal Used to parse the CloudFront S3Request::getResponse() output + * @param object &$rest S3Request instance + * @return object + */ + private static function __getCloudFrontResponse(&$rest) + { + $rest->getResponse(); + if ($rest->response->error === false && isset($rest->response->body) && + is_string($rest->response->body) && substr($rest->response->body, 0, 5) == 'response->body = simplexml_load_string($rest->response->body); + // Grab CloudFront errors + if (isset($rest->response->body->Error, $rest->response->body->Error->Code, + $rest->response->body->Error->Message)) + { + $rest->response->error = array( + 'code' => (string)$rest->response->body->Error->Code, + 'message' => (string)$rest->response->body->Error->Message + ); + unset($rest->response->body); + } + } + return $rest->response; + } + + + /** + * Get MIME type for file + * + * @internal Used to get mime types + * @param string &$file File path + * @return string + */ + public static function __getMimeType(&$file) + { + $type = false; + // Fileinfo documentation says fileinfo_open() will use the + // MAGIC env var for the magic file + if (extension_loaded('fileinfo') && isset($_ENV['MAGIC']) && + ($finfo = finfo_open(FILEINFO_MIME, $_ENV['MAGIC'])) !== false) + { + if (($type = finfo_file($finfo, $file)) !== false) + { + // Remove the charset and grab the last content-type + $type = explode(' ', str_replace('; charset=', ';charset=', $type)); + $type = array_pop($type); + $type = explode(';', $type); + $type = trim(array_shift($type)); + } + finfo_close($finfo); + + // If anyone is still using mime_content_type() + } elseif (function_exists('mime_content_type')) + $type = trim(mime_content_type($file)); + + if ($type !== false && strlen($type) > 0) return $type; + + // Otherwise do it the old fashioned way + static $exts = array( + 'jpg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', + 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'ico' => 'image/x-icon', + 'swf' => 'application/x-shockwave-flash', 'pdf' => 'application/pdf', + 'zip' => 'application/zip', 'gz' => 'application/x-gzip', + 'tar' => 'application/x-tar', 'bz' => 'application/x-bzip', + 'bz2' => 'application/x-bzip2', 'txt' => 'text/plain', + 'asc' => 'text/plain', 'htm' => 'text/html', 'html' => 'text/html', + 'css' => 'text/css', 'js' => 'text/javascript', + 'xml' => 'text/xml', 'xsl' => 'application/xsl+xml', + 'ogg' => 'application/ogg', 'mp3' => 'audio/mpeg', 'wav' => 'audio/x-wav', + 'avi' => 'video/x-msvideo', 'mpg' => 'video/mpeg', 'mpeg' => 'video/mpeg', + 'mov' => 'video/quicktime', 'flv' => 'video/x-flv', 'php' => 'text/x-php' + ); + $ext = strtolower(pathInfo($file, PATHINFO_EXTENSION)); + return isset($exts[$ext]) ? $exts[$ext] : 'application/octet-stream'; + } + + + /** + * Generate the auth string: "AWS AccessKey:Signature" + * + * @internal Used by S3Request::getResponse() + * @param string $string String to sign + * @return string + */ + public static function __getSignature($string) + { + return 'AWS '.self::$__accessKey.':'.self::__getHash($string); + } + + + /** + * Creates a HMAC-SHA1 hash + * + * This uses the hash extension if loaded + * + * @internal Used by __getSignature() + * @param string $string String to sign + * @return string + */ + private static function __getHash($string) + { + return base64_encode(extension_loaded('hash') ? + hash_hmac('sha1', $string, self::$__secretKey, true) : pack('H*', sha1( + (str_pad(self::$__secretKey, 64, chr(0x00)) ^ (str_repeat(chr(0x5c), 64))) . + pack('H*', sha1((str_pad(self::$__secretKey, 64, chr(0x00)) ^ + (str_repeat(chr(0x36), 64))) . $string))))); + } + +} + +final class S3Request +{ + private $endpoint, $verb, $bucket, $uri, $resource = '', $parameters = array(), + $amzHeaders = array(), $headers = array( + 'Host' => '', 'Date' => '', 'Content-MD5' => '', 'Content-Type' => '' + ); + public $fp = false, $size = 0, $data = false, $response; + + + /** + * Constructor + * + * @param string $verb Verb + * @param string $bucket Bucket name + * @param string $uri Object URI + * @return mixed + */ + function __construct($verb, $bucket = '', $uri = '', $endpoint = 's3.amazonaws.com') + { + $this->endpoint = $endpoint; + $this->verb = $verb; + $this->bucket = $bucket; + $this->uri = $uri !== '' ? '/'.str_replace('%2F', '/', rawurlencode($uri)) : '/'; + + if ($this->bucket !== '') + { + $this->headers['Host'] = $this->bucket.'.'.$this->endpoint; + $this->resource = '/'.$this->bucket.$this->uri; + } + else + { + $this->headers['Host'] = $this->endpoint; + $this->resource = $this->uri; + } + $this->headers['Date'] = gmdate('D, d M Y H:i:s T'); + + $this->response = new STDClass; + $this->response->error = false; + } + + + /** + * Set request parameter + * + * @param string $key Key + * @param string $value Value + * @return void + */ + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + } + + + /** + * Set request header + * + * @param string $key Key + * @param string $value Value + * @return void + */ + public function setHeader($key, $value) + { + $this->headers[$key] = $value; + } + + + /** + * Set x-amz-meta-* header + * + * @param string $key Key + * @param string $value Value + * @return void + */ + public function setAmzHeader($key, $value) + { + $this->amzHeaders[$key] = $value; + } + + + /** + * Get the S3 response + * + * @return object | false + */ + public function getResponse() + { + $query = ''; + if (sizeof($this->parameters) > 0) + { + $query = substr($this->uri, -1) !== '?' ? '?' : '&'; + foreach ($this->parameters as $var => $value) + if ($value == null || $value == '') $query .= $var.'&'; + // Parameters should be encoded (thanks Sean O'Dea) + else $query .= $var.'='.rawurlencode($value).'&'; + $query = substr($query, 0, -1); + $this->uri .= $query; + + if (array_key_exists('acl', $this->parameters) || + array_key_exists('location', $this->parameters) || + array_key_exists('torrent', $this->parameters) || + array_key_exists('logging', $this->parameters)) + $this->resource .= $query; + } + $url = (S3::$useSSL ? 'https://' : 'http://') . $this->headers['Host'].$this->uri; + + // Basic setup + $curl = curl_init(); + curl_setopt($curl, CURLOPT_USERAGENT, 'S3/php'); + + if (S3::$useSSL) + { + // SSL Validation can now be optional for those with broken OpenSSL installations + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, S3::$useSSLValidation ? 1 : 0); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, S3::$useSSLValidation ? 1 : 0); + + if (S3::$sslKey !== null) curl_setopt($curl, CURLOPT_SSLKEY, S3::$sslKey); + if (S3::$sslCert !== null) curl_setopt($curl, CURLOPT_SSLCERT, S3::$sslCert); + if (S3::$sslCACert !== null) curl_setopt($curl, CURLOPT_CAINFO, S3::$sslCACert); + } + + curl_setopt($curl, CURLOPT_URL, $url); + + if (S3::$proxy != null && isset(S3::$proxy['host'])) + { + curl_setopt($curl, CURLOPT_PROXY, S3::$proxy['host']); + curl_setopt($curl, CURLOPT_PROXYTYPE, S3::$proxy['type']); + if (isset(S3::$proxy['user'], S3::$proxy['pass']) && $proxy['user'] != null && $proxy['pass'] != null) + curl_setopt($curl, CURLOPT_PROXYUSERPWD, sprintf('%s:%s', S3::$proxy['user'], S3::$proxy['pass'])); + } + + // Headers + $headers = array(); $amz = array(); + foreach ($this->amzHeaders as $header => $value) + if (strlen($value) > 0) $headers[] = $header.': '.$value; + foreach ($this->headers as $header => $value) + if (strlen($value) > 0) $headers[] = $header.': '.$value; + + // Collect AMZ headers for signature + foreach ($this->amzHeaders as $header => $value) + if (strlen($value) > 0) $amz[] = strtolower($header).':'.$value; + + // AMZ headers must be sorted + if (sizeof($amz) > 0) + { + sort($amz); + $amz = "\n".implode("\n", $amz); + } else $amz = ''; + + if (S3::hasAuth()) + { + // Authorization string (CloudFront stringToSign should only contain a date) + $headers[] = 'Authorization: ' . S3::__getSignature( + $this->headers['Host'] == 'cloudfront.amazonaws.com' ? $this->headers['Date'] : + $this->verb."\n".$this->headers['Content-MD5']."\n". + $this->headers['Content-Type']."\n".$this->headers['Date'].$amz."\n".$this->resource + ); + } + + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + curl_setopt($curl, CURLOPT_HEADER, false); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, false); + curl_setopt($curl, CURLOPT_WRITEFUNCTION, array(&$this, '__responseWriteCallback')); + curl_setopt($curl, CURLOPT_HEADERFUNCTION, array(&$this, '__responseHeaderCallback')); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + + // Request types + switch ($this->verb) + { + case 'GET': break; + case 'PUT': case 'POST': // POST only used for CloudFront + if ($this->fp !== false) + { + curl_setopt($curl, CURLOPT_PUT, true); + curl_setopt($curl, CURLOPT_INFILE, $this->fp); + if ($this->size >= 0) + curl_setopt($curl, CURLOPT_INFILESIZE, $this->size); + } + elseif ($this->data !== false) + { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb); + curl_setopt($curl, CURLOPT_POSTFIELDS, $this->data); + } + else + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->verb); + break; + case 'HEAD': + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD'); + curl_setopt($curl, CURLOPT_NOBODY, true); + break; + case 'DELETE': + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE'); + break; + default: break; + } + + // Execute, grab errors + if (curl_exec($curl)) + $this->response->code = curl_getinfo($curl, CURLINFO_HTTP_CODE); + else + $this->response->error = array( + 'code' => curl_errno($curl), + 'message' => curl_error($curl), + 'resource' => $this->resource + ); + + @curl_close($curl); + + // Parse body into XML + if ($this->response->error === false && isset($this->response->headers['type']) && + $this->response->headers['type'] == 'application/xml' && isset($this->response->body)) + { + $this->response->body = simplexml_load_string($this->response->body); + + // Grab S3 errors + if (!in_array($this->response->code, array(200, 204, 206)) && + isset($this->response->body->Code, $this->response->body->Message)) + { + $this->response->error = array( + 'code' => (string)$this->response->body->Code, + 'message' => (string)$this->response->body->Message + ); + if (isset($this->response->body->Resource)) + $this->response->error['resource'] = (string)$this->response->body->Resource; + unset($this->response->body); + } + } + + // Clean up file resources + if ($this->fp !== false && is_resource($this->fp)) fclose($this->fp); + + return $this->response; + } + + + /** + * CURL write callback + * + * @param resource &$curl CURL resource + * @param string &$data Data + * @return integer + */ + private function __responseWriteCallback(&$curl, &$data) + { + if (in_array($this->response->code, array(200, 206)) && $this->fp !== false) + return fwrite($this->fp, $data); + else + $this->response->body .= $data; + return strlen($data); + } + + + /** + * CURL header callback + * + * @param resource &$curl CURL resource + * @param string &$data Data + * @return integer + */ + private function __responseHeaderCallback(&$curl, &$data) + { + if (($strlen = strlen($data)) <= 2) return $strlen; + if (substr($data, 0, 4) == 'HTTP') + $this->response->code = (int)substr($data, 9, 3); + else + { + $data = trim($data); + if (strpos($data, ': ') === false) return $strlen; + list($header, $value) = explode(': ', $data, 2); + if ($header == 'Last-Modified') + $this->response->headers['time'] = strtotime($value); + elseif ($header == 'Content-Length') + $this->response->headers['size'] = (int)$value; + elseif ($header == 'Content-Type') + $this->response->headers['type'] = $value; + elseif ($header == 'ETag') + $this->response->headers['hash'] = $value{0} == '"' ? substr($value, 1, -1) : $value; + elseif (preg_match('/^x-amz-meta-.*$/', $header)) + $this->response->headers[$header] = is_numeric($value) ? (int)$value : $value; + } + return $strlen; + } + +} + +class S3Exception extends Exception { + function __construct($message, $file, $line, $code = 0) + { + parent::__construct($message, $code); + $this->file = $file; + $this->line = $line; + } +} diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/images/fs_to_s3.png b/src/skins/admin/en/modules/CDev/AmazonS3Images/images/fs_to_s3.png new file mode 100644 index 0000000000000000000000000000000000000000..eee837a8030a011393917133eb4107f67edb7ddb GIT binary patch literal 6173 zcmYjVXCPeP(-uSxOVlVqR`lL$L}#^V(Fvkk-L5W#=ps5i#g3yVZuO-T<6>wz2Q{tW>h<}ACEse!pX z@YYjRz^a5Z>|h=UJ=9FRv9O3K{v8jnvSG9sA-<2gmNGs97Y~nys}RyohlNE`rLH7z z;5UcLF^gxI_0R0^-W{9F$XfCEz>wTx&Ku?P3>8_!m)@=R&i38W!{{%O40w1Pmn;I? z8KOyhDOMafs~Q9|ly5j*rmMYSeqh~AJY(9ekfbKYY$o;`zvgWKucP?jER{0vpA9fy z@b`I1c7S1UPVPz)B8w&J9{<$sM@#d!(&p>3j=PgQ?^JI%3qd&ZqqR=XPDx6lZ!Z(9 zz>_D6riRYjzDDH&msO8Ra6*4K@7E}PU+MUwga~IQxJVa-hv@;Ed5iannxwXfoVcT~ zDZ%C;#PeuECnTPHFq7q)B1b5mDoGUHqq*l2P@4H`&e;K~)&Y^bZW%6EPqP#UAaa+` zyqlLGTtEepdi<2K$aL-OE`Zd57i1z3hiE#^C^G7hFZL${rwiV(I<0MeXF$u00rA`lip6ngCRh;)1)`aCH6auaaKg~u4txapfLopIzm z9x)#E!&2>M5KZVN&G-E)o`s^gduD07&vI-XcT!TB+u-eO-pFCw)*YP{)Ex}=Fq~P& zeiLF_c;E{>eLz!+X4`2AjUOjftZdBkNNZY`7QL*FUTv^0h7{vA$b z2(IBQJ3FQlA2V9g=(rD$?jblI_-p3#e=41`ox@3_JSp6dv37LsXwFWx>cUw|!u2k5 zpBuzgALC>XimTbnX&#Te>sz2nsQ@yld{yjqk~ry>Yp~SP4H1Wa^EEv%aG4x_uTcQ( zFmP=l{hQz*aB$Cre&50A5Qdr4Vq!rnrSa2-o6o|CC%3uN{ysMmiJ#-hic{1x_R%l( zU6NY5$^{-E9HI)5_SYQX!@8bvqHm&bE(QR{K71)hd76tO6m13*EXueKe=|bf`W**r zyPA{_*m2F3>GvCd(4PD9CWKM;2nLf0XLgkZ{uKkAoy2pH4S{Zj*I(!*-?FDpxz#F3<(onyU>51sIba(D|t48Zdp8O7K*IYTo|z<&8Yw5 z9%O-8bX{W2fvw4L+u8Cxs~&dNZ}Ls!RCA@v2S-h54m{p@EkBx4a292G&~(-x4}A62 zkI^EPI(a4jS$&Fu@7aSM6pwN3U7~X&(%kkc^!_Pr?T?ZASGSjh;kP3fa(%?|fnJ*g z;nlKZ`zk|rRiA5K7X|eo?eIBpyz#elx6J&~h<>f`CokTTyIq03*2qmYoP)}tWbWq= z3uN!lz#L%_5u!9`HE$HmAROqtWdbxCFLLB`#szMsB6 z)8zv%|3t8Z=Iz`8DgGsNu~Y7}#S4!xyn5p_K)hK@ED+FgY&&L_fu$^QqkGydr;2~$ zF%e4{y_3|i*u{5`b2ZFlll<8L!W7Xf535|ON%A-rI2vnF8pl6k4uz%z;{R=mwL_pxXg24>cL@XMr4{Mp^SFj9x8! zVu?`Q{hctN!}=aMuJz|3IRd6*XXM1)8F?I9mk43Av7HUv>P>+ zfI;Y@f0U6`a9U(!+YRK#vS=Pnvd=M?s?bX&CN|Q zwtX}_w5Ob>;B@u&phJ%y6xb;9Fhjjmi7Y~uWxe-A2776BV|r!N_ju>y7lBLh`&bZG zQ&qpO$@>bHQOVpk?WrJ&X@7F}4OIhUr7NOB>{oR7b#vhMATsf& zbPZ-KH({XBFRQU{3`EcizNVzjCi9jJ^9QVJ8#6@Mjb^OF{A7{xo_Rv zNbwn@&!4p4olT49a{cg+HOgX`>(u3yJ3ZqChil<0dPqWXB%LcGrXq_}C_d#M4hHNijKb-J^nZQF!e#2z^lZk2g4yE}!9#LMQFmqZ4>=cK+)nd68 zc7S{Aj6KKHSOT(V{KJ?2JD1b#vc6wJmX@sMSO3q~i~Q%~!Wsvwau<0UXw3FRz6WQd zRGB|(y35F%U+O~yr#Rlly#t19`F73bDeA~YiF@LP)6JE?$u^2{M`IN_WXYUXHQw|x zk!w9=o;e|oXpu{-ycK?>TSY-(<) zv$YQ59Qy~MHgVmzk?oBcRm*bsR_l)*<66^qqXszpgkVj|KQF1%$u=JB@JbEmb*?@) z4kFIr%cs*>`zjYJexvT30OW8d`pmy3PWmOYD?cvx<0D8hQ?Axl3k|>5K0?yce}n3U z_ufoDD~U26x;usflPxdTkC~Iw);#d+;b2;`^~ONJA55!IZIP91gCKVahArwyoWv;! z=k*dp*HV=u$t@*JD8VIIDAjFdg>e>lE5$2Obnl5oLs|JehpLcnw)a;1z##uUT+Ig0 zQYN5|Ak~a_(ZqNeGnsj--wzt!2GfegYkC)0o#Zu(GTm^V)k(eI3gy%$&>u|Rz)Ubt z<(0Aa(J}J(>L>>W91d!adztjILg+#_AD%{aL=Z#sO^y1g`BUyM=j)D>vOAh7ljbxC9#GAIk(P){aHoqVJF5Erh9aqDP zNK6hk4S(v9BBayuGpa zKbRx2cNoaG$w3)aN<^iUKE~jpq@f;9>D?$oJO7oRX_ydgdM6KgDO>wi?5{7a1QoyY zN4OX&Kd=VZX(p75e%xqpYO-`-P?hNP;(=58Z%38RKm-~b8pBR@ zaBc=dWbhm`Io+ZLDLi~NYp_9usraTBUP^6@pYp99%Fhfn&Y#^7pR<-5bo``G=qePS z;C@#Vtd&8<@+Bbbrqrcd&0h`LmOI))FZkwC0U?I(0#e_S_-w89VUR*|>Q@$_c{X+J zQVD(vbZdCY{G`88CTb$N%KW!voF~P)zSYZxTc=Nl7r;6iO50pVreaZ$(?tLBDyEtH z{7GczEWVD~#S3QSQ_e|}$R&+5cB%flZMff@%hc}#oahJ&){iP%3%-dALyNzUq{6vl8?Kc*`(>A52b;E5EHgyYR$= zXu%ZuYTyfk@i?s^X6at~SR`NQ1{;-k%Uj>ZPX-U7th#;#pWM-w7o%(b7}wsXeCZZH zH2I}5YN;mR$9*b2JQAwUh%=}dlOHylWMuWnK+a@|>Sp`IwlV~HP{T~ng`dgnX~(7b zmx%}DyOpl_3sRkKW2tV@mv3b98obP(P$^DV0e}n1sr(~4UAyn<%`C>IUBwUfVDtoH z3-2PS3Qy_)ya028eX3w#KEr2L2^h7xu|4M+`m@UCYobeX_Bpy|%{46gf-jDKlrp>` z!!6IhPyv?Jw#%uR^+QghHGsu6~0oMXsE}?b!f?pI$JCg ztCl%+7oTb8Sf$35H|9l&#&W3u9qP4x%w-UlG*5T{K5Lei!4GI>*#4mipaj$~5+qF6!qw?rAY9rq67IDpkjCE32nM64QCb@Oy& zoB`3`FkVDrCNp?5EFEVHl`4(UoN)QvT!^V9^6zeUw>l_$lhs58R&;Uu#MC8MvO0s~ zk(jSpg8{-bxn^uP$$qwUnt=@O1;rWNB#6V|6ElI?z_7Fi!qPm%Ba5piigfS!9Cj%9 zdt*zHiFWPeS78rjdPH>Rh2uo&L_xGxKk^^%>@w|>HmXY5xWZAtS#CFRo^;gs>1)=# z@O*@X8%3HU(VI9M>jtzhqyvKn%P}Qk9)?7fO}j5N)a7M=&ett-n}xWQHMY>YIQ^8W zlM;jsZ8{d0Oh03DHmox!z%Yv#^R|#U`weeuFC zQ|a@8*Ku5$6J?jV><*dC1WXbr?V&Umaq+tSp-T1hz1+EDa8ObALXV_lUu5UWr|W*c z$r6P&I&c88f|)=kvD%%#V$`{h-ZZqpa^ri`EO>TGRS)srXEh=X;xIg?zI0Mz1azK^ z_1PxJUAfyouCQ||?pX!Ju?~x&+e;oF=i>x6RG?6wXrLLa!^TeaG1HQblOVM=YVt@u zZ4S(S=~f?D^-3wW58N|;2IAbEbabtpzmUz96^J@;w`xBBK@QE}8FBh)JLg%mxy+k8 zHQ_>j=FF@Lo(kCNOZwUL=%yt>Gnv2n>YP4%JR(?E#$pk?01y}3w;VC zwImOpcvA?HZ(N^ZXm~Gx_1s-GI`Hsy2_t)5v+gBbAhn^w?qu|T(eF`~*O%8x^N7#a zN&m^DKU5$HI}nr={5A15`1kjT&(QSDoZO(dQrP<(o`B>H$qI;OOG-RyVmzVCWs>O3 zl+|}7{4jIOxsONGOl1D3IfWXN7kvs}wx88eh0!-G1&7+OvE6QD`VDTF4sYqJIId(6 zd4wv=Z84x}vX{1HGeGzG+Zs!|8r>z`4kRQ0zWgy_bhlf1I-up;&8X|0vq3&}LcMe5NjJyM}B?QRm5lL^(d4qDEDncnEtw1v}ERCoLRAtCyfqN)^-n&{`OXv@cVv zwLmadsTRJ*1XQRSSffG~yxJoh(B<5ZI_I6fZ=> z1u@=yXYe7xv<_u4q>PYWPOoHS_eoyQt(C=5vVOJR%gqv|MASt=dnz)Yvv^2(an}|h zvP+(jtu*y)U#p8&Ls~t0EmflJB7QV?N-3?{FCt9DgGidcTJY<%djTW+hTk=k`|In3 z5+iO5NR5$ecehP8ge6L7?Q|1*W+&wQa!BpGi0(=PJxO!nb)s7Fls@3iX_PoH%gKDZ zXR%#v6Ewmdz++T4QAS1hMhWq8iq{54`RTG5rw+hy%X~=u$q1Xvn)%9e@VJXHRD`^AY)h8nYeJC-pPfx zADk)i{#J`_gpPh>dHzQznbo4<=9W2kD#H5Z^Hak23fqrUiJ2(jlF1^4DMdXCHp!Kh zXyY}5Gns|BQkTi-&J6SV=)k_XR<*K!Q2o{=(OzQzLSJe9h4nJUWqVyWF+H2Q@Tv$h zFOc5x%|Wi8sY_{Eb&_wrf-)P5+EZ=^1GC9rS)H`A?QB)$%nme=u|cmkK?*1AFOvD- zW#wd$9j=IhZ0vx8L3qlz{ z2fCqpobTE~eyeT6HKFx1V6`$ro@Ey#_~K*gPE2DYU|UT5kI?NL<-E9#vdE#zW7&bJK3VxP~Oa26VXAmf${+U)Coq+O+EC zmC@ZvZ%u6yq_#zk9^b~^$kT!a7}J_x6Wu>m+~O)Gct5!VQz(ZFx1?0M_Nn|~V=8SJ z!Dp2X**Z9IEU*8mLXP`FetFGh!Roy35ev^MbwuDem{NEu`K#m<^|8>DO}w4AHfw|P zUvRIL$Hm2;{ahV4bZx9piYhHNm0a%D8A#F&O^0b&T-}Ji#t(VxuRFyBRRBl4%e~uR zH!08dEB%6(kX!eIDobv3>IL=~O_>+T{DnSWTm|aeN)`2%@6UTO(`dqnA2)mx zy;I9T75ti{k4_eC9s=GJC*Az5UC(%kX?kSH7WzA&HQcPx#32;bRa{vGf6951U69E94oEQKA00(qQO+^RX1O^KvHcP}5HUIz}FiAu~RCwC$ zoms3T=XKwI=c}q-@4n648P0Nt!(FCCN}@mFq|IYS5|F1?=Rrx8sbz=za;NJ{T58n9S-T!F43S`hASBua}QE= zg~GKq9IV6A#Lt1rZWkMHp#l49E{}`^WCS>)oaK5sCVj5M043q=S{r67aD4LTz;I?8 zmOHSRR7%636hqmtr`$|l&>@gU0c175U+cI+!delO;=NVZ zH;n~K&>2vz}{>m9pZGxR{Wsy6ket%+L=yw*#TVbl{AjLlu_F=>9|#kaREOUoVUmz}Ld( zSk3>Sn!i8`V9nLsZ~dzP<|mqC&L^eqc*&836@N5vod_BUXb0-fL)sC1cLk12f`1d$ z*Qnkl^~&qz5Qa)@BZDDQ)qTe(IjqeSe^#X>#eh{4iipKX1n~}pJK)z*Z<0_;^kPF88zO6xZ=hHaL=83pCyZT4 zd;h_oEOqmmf!XT84_9Hf24kfWD?3Rr>EE>YTopxFZaa^;eR8lYcK-@$V~lZcU?jq5 z3y(ES|5aq?EOz@m{l-;Ls7xKCGc8I=Npr=#BT1CWQRd7oq_nx$@KUjZ*025hwdCM8Q?z{MF z3W?c>Gq0p5sUjkS$u@c1id+dQ=|75Mk^rw7qoVktXuLyn`G@qDpTjgyQjafEvFrHK zM-W0vbj%DLa|nO(e#Q&A{})w1B$z)!d3p)IHi_*tXs@0n+*!sOo2EXugjbtFqb|+03v|}bu(8o( z{QiGRY4ROdEoVhS>NVSaN7MYIn$92FV_t2+R4L__TsAO9GUF=f6*QX_9tjj`Hkrg4uhSy6bO(c=Xp^pmF9|!tL|e&I(@K zz|#P4|9wD*pnsWo^JR4X&*=s;coPRGPu)Rf{(i=eJxbhMCS3gyopaC9-@b(HuOqfc z-A)o{C#&^T28qy$=bGc!HI!L}l{Oq2AMBdbZp|3U^9n9kD1+XBDn=ZD!wsK^xLlKj z3yk0y@QlSXUFxO*c89oig?{TS8&@x||7}zBtRFTQIR&Di4alxj05g*AR)eK z5}1fMS|?mP$M))rM4LTsd+2Yo_R4qBt6!rgo7AL>k%-tBkP5!Bs0g+Y#?oFZ@LYM_ zjU7m@3ox5K*Q3Z#KLCP=BB~gZcN$W#x)fMP$x33$@{NnEnpI^gl8Gu}bxT!}qQWP_ zlLoP_BD#vPC2A~FGYxzL)+U9v4tuIeyj7`qeLTBGQ#ZhF;zui#%?5$=aDmEImL6_# z*rfZ9i;P49QrUy;9#m?t6EKa?CA@*g4@HdNB|xO*u$aX7c~(P|eB~vmrA2^bS=A)o zqxdAih&W)9_%4Oqr3fMhg9Fl9Ezp4`qXkupo(Y1L5QQ>B`fA^GxC;fpM!hE#hJ{v5)2qWb(OL$WqCcNA9W?B?Th&QiCQ|)`IaR zD`N7p-i1URAbN)BBH!#582+_}vUFt>SBuG5J{P`3^8oB+VM>x}ZD=S}V0hD9VMM)9>fq4JY0q5?nx>!amEpMo~jTlSe5KNO`1?6xUd3vMu_oI>tl_F z5sN{cp-jqBrXkBFUgHtt(Y0l&R1q!Hw-rRo_{11vQELlf!$ZV(=MyJ}8y zQgMW4Q72H0f(F_#{Kbk>^2}CYJosw>rWrc2a=GmoGi|;00H8k57@S;sh(nHla8W}J_g;0I4C8D@Q>`f8XZ^NH?J6f7`i;%%N zLFzqa14qYQ$-LEvD{WUgAE-Np=T97%UJRF;4wR`f9GMtJ#cPt}6<;hB-x3&$Cw+*U zARfp#O5iFeO}#@f;!06aLWc$-Zf%M*knS=Xu27lTPj%)W61BEyZ=9pMc^>UtrW@6n zv;o!zv~-5JG=UjEMs@BUN>g`2{V>*FpsxXAcYGK*^nSwamuYYOC7rF8iJB{faTN#% zsnM53{Q4Z;#2wUT?}LfsMCAiSb_!K553gxeRs<<&HcK8%DRd(@XIkwzfNpknb3;nz zS{q*4gvqkgbfv;$!Z-W^ zr~xcSl6edfYU89AazD(fkBv>Tp8Dkns8OzEr+r* z+b);PR}*oy+tyA^vy_*IlBYbT27Mc4S7k?Q;ay&1D5Gr`co?2GGnugc;yo$BlzR3`U>U!m99q_w_Db?#1rv1zXT;46&DDwTap1T#x`r5d)~pt*68&gNB0 z)d?mRj^fqlK-^prqpiN5RL8FQm z#}#>@owDJ3>7PgG(d^LUM(9Qz$0t)d>joZkrR9$K%AiVRAdHcB?!Ez^KH=6$qHBLb zT${w7I!I~yFtynuj4i%}umipalp<_nh4z*2(A_vs+_*|Ns!^`jFyke>{srR34{5G{ z7b(xQeFxo`?1+eeQlq`+}b!-2tPo3bq z&wZPV=gwxo@$UP6fww>O2=DtFj~Dvve7T?a!!PmGr%q(Af8Pfl<5xfY>(uJ?f$5&; zkfV(7oK#hl)Hd1U@xZklXLm-+ZU=zr#&CMed5Rg*ZS4|c6~R(V+3Qj^s|3AQiB?Y2 zS{-A{JAgO)0P}D8`}B4$v;Kpp@Ox(nq7}+?@HN8o4g!5Z2|P>1Yv45vQ^$?-3BLOD3BLE-xB0XG`*q&;fyY4MnWz4k7f(IU;iJcR@;5)q z;iF5etz6>|KK=V#Jb#w2J#~U#{k11|%g+jQo3M+%bBj0$VP=qsV5$UXw_UYXECx(* zB6+RlWJjqdWPI3&eJBj5A0_GJZ8jD*fM;Sn34s_RF~+lQ8ktFj68=I>_5)?0S+oU$ zc!-b7g1H$QEx1_zmp^i={>k6`C=b5t;pFA6j(z+?zrwF127d9>^O>DqICT<$CqDcn zhmIZtgt>)9o=9GM@!Z(~9n^qGa7aTvAdf19ei=G^aW=o)+{0t8v~rbX5!B%iFMgxq z>ukZp)TAPcA@P?=W?%~3nnR>OVk)54*}M=lLac<-Z+A>z0)gYeHk{%;&Zk(@uA+-vo^lP_IIJU9^AhQ)#-2DzG0To)Q{@R)Aq zH7Sk1(t)bC8_|3^xm(D+`^zPjOOl1tK^Q7Sb$>obF0#?ijU3~v318!I%V#c`w@S_# zYjR%t7S<~F-1iFr{Eshuj_*D9?Lujre4ggqp5&9eyy{AB-+S)c{P7=s34r%};ITdB zw#5Z3dq{hSHP%uH236m+Cj%a{oPcs&G4_Z(j;5d;Q&ntA-DfLKvrtzIQjQUkv2fVb!4O)3Y_g@;=7O zb9liF)qM{TNrSk33E%Dz;246zxrj$>eIf$7I!0XHj~RaeTRB1)L8KP7;zrjB?|t+! zl*jnUKl&)0R*PqzKEZ|aXL#wPm_|4FjX*VU>9#Y!p_8w>I_Fp2LxedGd z0?nN>c%4f~w2fLX$vhB70cs|(<#`xCN_Fly z`Oo|w&pdU4_dfdAE~^$7OfX2QOMC-h7$v+G$$NHnC38H~X+N@1`<8 zM`dOKsn&?wO~S1+Y@hxHz0Nw7+8pJXC91OrnYi;|ChWs>R+s7aYbevm#9JA=>i}bO zOW67neVrn-RYL2dHi^NaeCye-^FP1%Io|W=V|?T{K01)t)3W)2haRE!#X4)N%QTx! z>SJTs^mJ5Us@9yBwA)Q?MIou9!dK#)MfTYyIXl%1_@NzY7WYbOLtE)Ik?>&MSlKfH zsE<%3_80K>-A#R=NiA$({Bf$aMe2)hCG0f0_UiZPul_0J&MTDcI)S#S7>n&0x|{!x z?XwH?tH&uVyq(#D?__#x5!DJ~i|;2khHezlk3GWJxG8AH3L8`{hnJ24@Y1Q1v|CMT z^|7HX7(%Pn%1Yq+nEUtt@UK3`+Uhd@{y%@3*|~+hf)inFbvY>n_P;jiD}(!@hIJ18 zv~{yOy0W-g;a_ASR72kieJgY#p&j`&!#Z7Ez^g2QKZR%NXlyZFM0H}4+RT1}v3bN) zT@hei?yz13Q=6eay^pc!aeS{s++9U&hgfR#<1zYCiC*jxtAKcj@f_X)n1@Lp+u^37+T;WMB5B<)s<_dNP|)-*ow(8B=EwvuFgiyX>4-+05?{5kHh5t9Sb0@HdQY)VC*`;4D>7`fXP}A8Jzu>JfY@U%3cWD z-{9(Be40}40+FfV)fTBvAEPw0L}}(2ROX<&PJjJnx*O-{Zd^jTS21>nu(HI=JN_m9 z#KUys3Z2M#s_qI3yT>8VJbi+fPMzeX0x@~$=rJC6=n)?O&=UpHKR^E~fAl4uc{*p8 z)7Rd1^w=#&l~KT?LUfz#Sc?;o`mqzOyloC-wWIp-CX9JGFrK&<6g{T6p=dWSn#oqv zMlID@)dHdH_c1%)VB>qgPo?(~Mj})_A{)?^eUuM=kjcCM7Arsc3cCC?%DO>`5MyGj z8rr3Mn0Uv>2`1h}C$7?oAdGcDg*gzvRWtrB-)xWy{&tJ$bf7s*&Q%@S2A8kCTiUKZ zVmo^AhzlOmjbW?|_e_Id_mjPbySm(`09t z>0#qly!Z;}4qmv7ud9?ym?%4w&+!Aq_=TMVE+NOZ=%z(^qzrIQV}TsrpWHYjuRUfZdn%81>E4s%SX&swk1oHDju& z*w4D3Z(_t)Os0sj7>NXRUywbp^S2W)MMRBUAnkD(Y8suR!Mq*Bv-5>RO;OOY*!#{k`Fp{`wf#*@lHoK}F2110}nyrJ1U(Gg?QT+MB@Me9@K}^X`%Yb0; zdg6!OMPvRwrSN^P7o4Q9)b$oXVXsS|Fl684acJGJOp5ICRN^slQM@)H1`KRHkRlh9 zl7IBT;g`h+U<6G4Mb z60|0vPKT0gmKW0ZO|{Z#wN?mOmch}irlaoSAQ0Wn3KyP?3{fL&nfx^FT;zqt-i_ht#2%w%BW}m-nQf>g-@_|>(Nr3zqXuZnr{`?0n?j}<0ILRq+o;|3 z5h}fhiMLJ@ZoEu)=M25h4&$~0YUtS#9i783@5i5A!ka!$W$LbkJzk&}d07a`a$EA5 zwpjkAVQOgqrxdEKLi8%IM2-tROy4@e`F!;Tg1^&S zP5@mtqp2CQ$EY;h8eZ6AB51PZP7o}frLycS%KpN+1^BkMJeL5Fz*&wWu-lZHdVG z?gxkmYKT>_Dp|a~QT0{aaJ#!0NIYr8##|Y}4rJy3i1!@6kWdjAyGIyHL25;C#~xRx z9VwCB?!)(2-5lEA!()aoutuTEDr_d(MYl_#4E99b-WM;GJc;uRHHol0QQC+DM$@pQ zqj@oIqI%x*(piO^Q@pgw^+K6mr=c9_F$GZCvAeeBk?~tp`>%K5eEoF133r z;OwO=y^#^#h@gyYCWpl2k#))b_DQ&H>@{v&O1ETOZaO86KddZdkE^-L&4co0yN&AZ zM^gL+aQfC&UI*%f{mN?sCY8{>+Hw_JAR{g$%IM3u-^>v2O##AW?vj{&6phWi|hgbgs1C zczNLUxRpJ(V{EeI82i#|xY&>UH2+svZ|2+o2jYevc7s7#;Q#;t07*qoM6N<$g6=EV AQ~&?~ literal 0 HcmV?d00001 diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.css b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.css new file mode 100644 index 0000000000..da9ec4b3d5 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.css @@ -0,0 +1,117 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.19 + */ + +.s3-migrate { + border-top: 1px dotted #cacfd3; + margin-top: 23px; + padding-top: 17px; +} + +.s3-migrate .migrate-progress h3 { + margin-top: 6px; + margin-bottom: 8px; +} + +.s3-migrate .migrate-progress .bar, +.s3-migrate .migrate-progress p.refresh +{ + width: 507px; +} + +.s3-migrate .migrate-progress .bar { + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + height: 28px; +} + +.s3-migrate .migrate-progress p.refresh { + text-align: center; + padding-top: 11px; +} + +.no-s3-box { + position: relative; +} + +.no-s3-box form { + background: transparent url(images/fs_to_s3.png) no-repeat 22px 3px; + position: relative; + width: 430px; + height: 96px; + text-align: center; + padding-top: 14px; +} + +.no-s3-box form span.fs, +.no-s3-box form span.s3 +{ + display: block; + position: absolute; + top: 36px; + color: #8f8f8f; +} + +.no-s3-box form span.fs { + left: 4px; +} + +.no-s3-box form span.s3 { + right: 31px; +} + +.no-s3-box form button { + padding: 8px 18px 4px; +} + +.no-s3-box form button span { + font-size: 16px; +} + +.s3-migrate p.note { + color: #456583; + line-height: 22px; + font-size: 14px; +} + +.s3-migrate p.note strong { + display: block; + color: #333; + font-size: 18px; + font-weight: normal; + margin-bottom: 3px; +} + +.no-s3-box p.note { + position: absolute; + top: 8px; + left: 453px; + width: 510px; +} + +.s3-box { + background: transparent url(images/s3_to_fs.png) no-repeat 6px top; +} + +.s3-box form { + margin-left: 130px; +} + +.s3-box form p.note { + padding-left: 2px; +} + +.s3-box form button { + margin-top: 9px; + padding-top: 5px; + padding-bottom: 2px; +} diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js new file mode 100644 index 0000000000..ebf451f897 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js @@ -0,0 +1,21 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Migrate controller + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.19 + */ + +jQuery().ready( + function () { + jQuery('.s3-migrate .bar').each( + function () { + jQuery(this).progressbar({value: jQuery(this).data('percent')}); + } + ); + } +); diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl new file mode 100644 index 0000000000..dfbc82fc54 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl @@ -0,0 +1,47 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Migrate images + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.19 + *} + +
+ +
+ +

+ {t(#All content images are now stored on the Amazon S3 server.#)} + {t(#Click the button below to thansfer them back to your localfile system.#)} +

+ + +
+ +
+ + {t(#Local file system#)} + {t(#Amazon S3#)} + + +

+ {if:hasS3Images()} + {t(#Some of content images are currently stored of file system.#)} + {else:} + {t(#Content images are currently stored on file system.#)} + {end:} + {t(#Clicking the button will start the image transferring process. It will take some time, depending on server and application settings#):h} +

+
+ +
+

{t(#Migration is in progress#)}

+
+

{t(#Refresh the page to update the migration status#)}

+
+ +
From 6cfdeb57dace2a539afa129e7d13228e00c6b2fc Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 16 Apr 2012 12:18:11 +0400 Subject: [PATCH 009/562] [*] Add User permissions module --- .../UserPermissions/Controller/Admin/Role.php | 128 +++++++++ .../Controller/Admin/Roles.php | 51 ++++ .../Module/CDev/UserPermissions/Main.php | 86 ++++++ .../CDev/UserPermissions/Model/Repo/Role.php | 204 +++++++++++++ .../CDev/UserPermissions/Model/Role.php | 77 +++++ .../CDev/UserPermissions/View/Form/Role.php | 105 +++++++ .../CDev/UserPermissions/View/Form/Roles.php | 62 ++++ .../View/FormField/Permissions.php | 64 +++++ .../View/ItemsList/Model/Roles.php | 269 ++++++++++++++++++ .../CDev/UserPermissions/View/Model/Role.php | 207 ++++++++++++++ .../Module/CDev/UserPermissions/View/Role.php | 67 +++++ .../CDev/UserPermissions/View/Roles.php | 65 +++++ .../View/StickyPanel/Role/Admin/Roles.php | 39 +++ .../View/TopMenu/Node/Users/Roles.php | 55 ++++ .../Module/CDev/UserPermissions/icon.png | Bin 0 -> 5458 bytes .../CDev/UserPermissions/role/body.tpl | 13 + .../CDev/UserPermissions/role/style.css | 61 ++++ .../CDev/UserPermissions/roles/body.tpl | 17 ++ .../CDev/UserPermissions/roles/remove.tpl | 13 + .../CDev/UserPermissions/roles/style.css | 16 ++ .../CDev/UserPermissions/roles/switcher.tpl | 13 + 21 files changed, 1612 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Roles.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/Main.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/Form/Role.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/Form/Roles.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/Role.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/Roles.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/StickyPanel/Role/Admin/Roles.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/icon.png create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/role/body.tpl create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/role/style.css create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/roles/body.tpl create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/roles/remove.tpl create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php new file mode 100644 index 0000000000..0f818d2615 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php @@ -0,0 +1,128 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\Controller\Admin; + +/** + * Role + * + * @see ____class_see____ + * @since 1.0.17 + */ +class Role extends \XLite\COntroller\Admin\AAdmin +{ + /** + * Controller parameters + * + * @var array + * @see ____var_see____ + * @since 1.0.15 + */ + protected $param = array('target', 'id'); + + /** + * Role id + * + * @var integer + * @see ____var_see____ + * @since 1.0.15 + */ + protected $id; + + /** + * Return the current page title (for the content area) + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getTitle() + { + $model = $this->getModelForm()->getModelObject(); + + return ($model && $model->getId()) + ? $model->getPublicName() + : \XLite\Core\Translation::getInstance()->lbl('Role'); + } + + /** + * Common method to determine current location + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getLocation() + { + return $this->getTitle(); + } + + /** + * Add part to the location nodes list + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function addBaseLocation() + { + $this->addLocationNode( + 'Roles', + \XLite\Core\Converter::buildUrl('roles') + ); + } + + /** + * Update coupon + * + * @return void + * @see ____func_see____ + * @since 1.0.15 + */ + public function doActionUpdate() + { + $this->getModelForm()->performAction('modify'); + + if ($this->getModelForm()->getModelObject()->getId()) { + $this->setReturnUrl(\XLite\Core\Converter::buildURL('roles')); + } + } + + /** + * Get model form class + * + * @return void + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getModelFormClass() + { + return 'XLite\Module\CDev\UserPermissions\View\Model\Role'; + } + +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Roles.php new file mode 100644 index 0000000000..d8a5972c61 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Roles.php @@ -0,0 +1,51 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\Controller\Admin; + +/** + * Roles + * + * @see ____class_see____ + * @since 1.0.17 + */ +class Roles extends \XLite\Controller\Admin\AAdmin +{ + /** + * Update list + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function doActionUpdate() + { + $list = new \XLite\Module\CDev\UserPermissions\View\ItemsList\Model\Roles(); + $list->processQuick(); + } +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Main.php b/src/classes/XLite/Module/CDev/UserPermissions/Main.php new file mode 100644 index 0000000000..e75b7f6f22 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/Main.php @@ -0,0 +1,86 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\UserPermissions; + +/** + * User permissions module main class + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class Main extends \XLite\Module\AModule +{ + /** + * Author name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAuthorName() + { + return 'Creative Development LLC'; + } + + /** + * Module version + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getMinorVersion() + { + return '0'; + } + + /** + * Module name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getModuleName() + { + return 'User permissions'; + } + + /** + * Module description + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getDescription() + { + return ''; + } + +} diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php new file mode 100644 index 0000000000..9e88f2a346 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php @@ -0,0 +1,204 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\Model\Repo; + +/** + * Role repository + * + * @see ____class_see____ + * @since 1.0.17 + */ +class Role extends \XLite\Model\Repo\Role implements \XLite\Base\IDecorator +{ + /** + * Allowable search params + */ + const SEARCH_LIMIT = 'limit'; + + /** + * currentSearchCnd + * + * @var \XLite\Core\CommonCell + * @see ____var_see____ + * @since 1.0.0 + */ + protected $currentSearchCnd = null; + + /** + * Get permanent role + * + * @return \XLite\Model\Role + * @see ____func_see____ + * @since 1.0.19 + */ + public function getPermanentRole() + { + return $this->defineGetPermanentRoleQuery()->getSingleResult(); + } + + /** + * Define query for getPermanentRole() method + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.19 + */ + protected function defineGetPermanentRoleQuery() + { + return $this->createQueryBuilder('r') + ->innerJoin('r.permissions', 'p') + ->andWhere('r.enabled = :enabled AND p.code = :root') + ->setParameter('enabled', true) + ->setParameter('root', \XLite\Model\Role\Permission::ROOT_ACCESS) + ->setMaxResults(1); + } + + // {{{ Search + + /** + * Common search + * + * @param \XLite\Core\CommonCell $cnd Search condition + * @param boolean $countOnly Return items list or only its size OPTIONAL + * + * @return \Doctrine\ORM\PersistentCollection|integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function search(\XLite\Core\CommonCell $cnd, $countOnly = false) + { + $queryBuilder = $this->createQueryBuilder('r'); + $this->currentSearchCnd = $cnd; + + foreach ($this->currentSearchCnd as $key => $value) { + $this->callSearchConditionHandler($value, $key, $queryBuilder, $countOnly); + } + + return $countOnly + ? $this->searchCount($queryBuilder) + : $this->searchResult($queryBuilder); + } + + /** + * Search count only routine. + * + * @param \Doctrine\ORM\QueryBuilder $qb Query builder routine + * + * @return \Doctrine\ORM\PersistentCollection|integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function searchCount(\Doctrine\ORM\QueryBuilder $qb) + { + $qb->select('COUNT(DISTINCT r.id)'); + + return intval($qb->getSingleScalarResult()); + } + + /** + * Search result routine. + * + * @param \Doctrine\ORM\QueryBuilder $qb Query builder routine + * + * @return \Doctrine\ORM\PersistentCollection|integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function searchResult(\Doctrine\ORM\QueryBuilder $qb) + { + return $qb->getResult(); + } + + /** + * Call corresponded method to handle a search condition + * + * @param mixed $value Condition data + * @param string $key Condition name + * @param \Doctrine\ORM\QueryBuilder $queryBuilder Query builder to prepare + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function callSearchConditionHandler($value, $key, \Doctrine\ORM\QueryBuilder $queryBuilder, $countOnly) + { + if ($this->isSearchParamHasHandler($key)) { + $this->{'prepareCnd' . ucfirst($key)}($queryBuilder, $value, $countOnly); + + } else { + // TODO - add logging here + } + } + + /** + * Check if param can be used for search + * + * @param string $param Name of param to check + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isSearchParamHasHandler($param) + { + return in_array($param, $this->getHandlingSearchParams()); + } + + /** + * Return list of handling search params + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getHandlingSearchParams() + { + return array( + self::SEARCH_LIMIT, + ); + } + + /** + * Prepare certain search condition + * + * @param \Doctrine\ORM\QueryBuilder $queryBuilder Query builder to prepare + * @param array $value Condition data + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function prepareCndLimit(\Doctrine\ORM\QueryBuilder $queryBuilder, array $value) + { + call_user_func_array(array($this, 'assignFrame'), array_merge(array($queryBuilder), $value)); + } + + // }}} + +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php new file mode 100644 index 0000000000..ff045f0ebd --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\Model; + +/** + * Role + * + * @see ____class_see____ + * @since 1.0.17 + * + * @MappedSuperclass + */ +abstract class Role extends \XLite\Model\Role implements \XLite\Base\IDecorator +{ + /** + * Enabled + * + * @var boolean + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="boolean") + */ + protected $enabled = true; + + /** + * Check - specified permission is allowed or not + * + * @param string $code Permission code + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function isPermissionAllowed($code) + { + return $this->getEnabled() && parent::isPermissionAllowed($code); + } + + /** + * Check - role is permanent (unremovable and foreave enable) or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function isPermanentRole() + { + return $this->getId() == $this->getRepository()->getPermanentRole()->getId(); + } +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Form/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Form/Role.php new file mode 100644 index 0000000000..d4abe7d55e --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Form/Role.php @@ -0,0 +1,105 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.15 + */ + +namespace XLite\Module\CDev\UserPermissions\View\Form; + +/** + * Role form + * + * @see ____class_see____ + * @since 1.0.15 + */ +class Role extends \XLite\View\Form\AForm +{ + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/UserPermissions/role/style.css'; + + return $list; + } + + /** + * Return default value for the "target" parameter + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTarget() + { + return 'role'; + } + + /** + * Return default value for the "action" parameter + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultAction() + { + return 'update'; + } + + /** + * Get default class name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultClassName() + { + return trim(parent::getDefaultClassName() . ' validationEngine role'); + } + + /** + * Return list of the form default parameters + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultParams() + { + return array( + 'id' => \XLite\Core\Request::getInstance()->id, + ); + } + +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Form/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Form/Roles.php new file mode 100644 index 0000000000..92fb996250 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Form/Roles.php @@ -0,0 +1,62 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\View\Form; + +/** + * Roles list form + * + * @see ____class_see____ + * @since 1.0.17 + */ +class Roles extends \XLite\View\Form\ItemsList\AItemsList +{ + /** + * Return default value for the "target" parameter + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTarget() + { + return 'roles'; + } + + /** + * Return default value for the "action" parameter + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultAction() + { + return 'update'; + } +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php b/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php new file mode 100644 index 0000000000..a584cefd78 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php @@ -0,0 +1,64 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\View\FormField; + +/** + * Permissions selector + * + * @see ____class_see____ + * @since 1.0.19 + */ +class Permissions extends \XLite\View\FormField\Select\CheckboxList\ACheckboxList +{ + /** + * Return default options list + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultOptions() + { + $list = array(); + + foreach (\XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->findAll() as $perm) { + $section = $perm->getSection(); + if (!isset($list[$section])) { + $list[$section] = array( + 'label' => $section, + 'options' => array(), + ); + } + + $list[$section]['options'][$perm->getId()] = $perm->getPublicName(); + } + + return $list; + } + +} diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php new file mode 100644 index 0000000000..136f9cb5cd --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php @@ -0,0 +1,269 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\View\ItemsList\Model; + +/** + * Roles items list + * + * @see ____class_see____ + * @since 1.0.17 + */ +class Roles extends \XLite\View\ItemsList\Model\Table +{ + /** + * Get a list of CSS files required to display the widget properly + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/UserPermissions/roles/style.css'; + + return $list; + } + + /** + * Define columns structure + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function defineColumns() + { + return array( + 'name' => array( + static::COLUMN_LINK => 'role', + ), + ); + } + + /** + * Define repository name + * + * @return string + * @see ____func_see____ + * @since 1.0.15 + */ + protected function defineRepositoryName() + { + return 'XLite\Model\Role'; + } + + /** + * Get create entity URL + * + * @return string + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getCreateURL() + { + return \XLite\Core\Converter::buildUrl('role'); + } + + /** + * Get create button label + * + * @return string + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getCreateButtonLabel() + { + return 'New role'; + } + + /** + * Creation button position + * + * @return integer + * @see ____func_see____ + * @since 1.0.15 + */ + protected function isCreation() + { + return static::CREATE_INLINE_TOP; + } + + /** + * Mark list as switchyabvle (enable / disable) + * + * @return boolean + * @see ____func_see____ + * @since 1.0.15 + */ + protected function isSwitchable() + { + return true; + } + + /** + * Mark list as removable + * + * @return boolean + * @see ____func_see____ + * @since 1.0.15 + */ + protected function isRemoved() + { + return true; + } + + /** + * Get container class + * + * @return string + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getContainerClass() + { + return parent::getContainerClass() . ' roles'; + } + + /** + * Get panel class + * + * @return \XLite\View\Base\FormStickyPanel + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getPanelClass() + { + return 'XLite\Module\CDev\UserPermissions\View\StickyPanel\Role\Admin\Roles'; + } + + /** + * Define line class as list of names + * + * @param integer $index Line index + * @param \XLite\Model\AEntity $entity Line model + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function defineLineClass($index, \XLite\Model\AEntity $entity) + { + $classes = parent::defineLineClass($index, $entity); + + if ($this->isUnremovableRole($entity)) { + $classes[] = 'unremovable'; + } + + return $classes; + } + + /** + * Check - role is unremovable or not + * + * @param \XLite\Model\Role $role Role + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + protected function isUnremovableRole(\XLite\Model\Role $role) + { + return $role->isPermanentRole(); + } + + /** + * Preprocess value for Discount column + * + * @param mixed $value Value + * @param array $column Column data + * @param \XLite\Model\Role $role Entity + * + * @return string + * @see ____func_see____ + * @since 1.0.15 + */ + protected function preprocessName($value, array $column, \XLite\Model\Role $role) + { + return $value ?: $role->getPublicName(); + } + + /** + * Get left actions tempaltes + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getLeftActions() + { + $list = parent::getLeftActions(); + + $key = array_search('items_list/model/table/parts/switcher.tpl', $list); + if (false !== $key) { + $list[$key] = 'modules/CDev/UserPermissions/roles/switcher.tpl'; + } + + return $list; + } + + /** + * Get right actions tempaltes + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getRightActions() + { + $list = parent::getRightActions(); + + $key = array_search('items_list/model/table/parts/remove.tpl', $list); + if (false !== $key) { + $list[$key] = 'modules/CDev/UserPermissions/roles/remove.tpl'; + } + + return $list; + } + + /** + * Remove entity + * + * @param \XLite\Model\AEntity $entity Entity + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + protected function removeEntity(\XLite\Model\AEntity $entity) + { + return $entity->isPermanentRole() ? false : parent::removeEntity($entity); + } +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php new file mode 100644 index 0000000000..e293837a88 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php @@ -0,0 +1,207 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.15 + */ + +namespace XLite\Module\CDev\UserPermissions\View\Model; + +/** + * Role + * + * @see ____class_see____ + * @since 1.0.15 + */ +class Role extends \XLite\View\Model\AModel +{ + /** + * Shema default + * + * @var array + * @see ____var_see____ + * @since 1.0.0 + */ + protected $schemaDefault = array( + 'code' => array( + self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Code', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\Input\Text::PARAM_MAX_LENGTH => 32, + ), + 'name' => array( + self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Name', + self::SCHEMA_REQUIRED => true, + ), + 'enabled' => array( + self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Checkbox\Enabled', + self::SCHEMA_LABEL => 'Enabled', + ), + 'permissions' => array( + self::SCHEMA_CLASS => 'XLite\Module\CDev\UserPermissions\View\FormField\Permissions', + self::SCHEMA_LABEL => 'Permissions', + ), + 'description' => array( + self::SCHEMA_CLASS => 'XLite\View\FormField\Textarea\Simple', + self::SCHEMA_LABEL => 'Description', + ), + ); + + /** + * Return current model ID + * + * @return integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function getModelId() + { + return \XLite\Core\Request::getInstance()->id; + } + + /** + * Return fields list by the corresponding schema + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormFieldsForSectionDefault() + { + if ($this->getModelObject()->isPermanentRole()) { + unset($this->schemaDefault['enabled']); + } + + return $this->getFieldsBySchema($this->schemaDefault); + } + + /** + * This object will be used if another one is not pased + * + * @return \XLite\Module\CDev\UserPermissions\Model\Role + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultModelObject() + { + $model = $this->getModelId() + ? \XLite\Core\Database::getRepo('XLite\Model\Role')->find($this->getModelId()) + : null; + + return $model ?: new \XLite\Model\Role; + } + + /** + * Return name of web form widget class + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormClass() + { + return '\XLite\Module\CDev\UserPermissions\View\Form\Role'; + } + + /** + * Return list of the "Button" widgets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormButtons() + { + $result = parent::getFormButtons(); + + $label = $this->getModelObject()->getId() ? 'Update' : 'Create'; + + $result['submit'] = new \XLite\View\Button\Submit( + array( + \XLite\View\Button\AButton::PARAM_LABEL => $label, + \XLite\View\Button\AButton::PARAM_STYLE => 'action', + ) + ); + + return $result; + } + + /** + * Populate model object properties by the passed data + * + * @param array $data Data to set + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function setModelProperties(array $data) + { + $permissions = $data['permissions']; + unset($data['permissions']); + + if (isset($data['enabled']) && $this->getModelObject()->isPermanentRole()) { + unset($data['enabled']); + } + + parent::setModelProperties($data); + + $model = $this->getModelObject(); + + // Remove old links + foreach ($model->getPermissions() as $perm) { + $perm->getRoles()->removeElement($model); + } + $model->getPermissions()->clear(); + + // Add new links + foreach ($permissions as $pid => $tmp) { + if ($tmp) { + $permission = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->find($pid); + if ($permission) { + $model->addPermissions($permission); + $permission->addRoles($model); + } + } + } + } + + /** + * Add top message + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function addDataSavedTopMessage() + { + if ($this->getModelObject()->getId()) { + \XLite\Core\TopMessage::addInfo('The role has been updated'); + + } else { + \XLite\Core\TopMessage::addInfo('The role has been added'); + } + } + +} diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Role.php new file mode 100644 index 0000000000..2118fa6b13 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Role.php @@ -0,0 +1,67 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.15 + */ + +namespace XLite\Module\CDev\UserPermissions\View; + +/** + * Role + * + * @see ____class_see____ + * @since 1.0.15 + * + * @ListChild (list="admin.center", zone="admin") + */ +class Role extends \XLite\View\Dialog +{ + /** + * Return list of allowed targets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAllowedTargets() + { + $list = parent::getAllowedTargets(); + + $list[] = 'role'; + + return $list; + } + + /** + * Return templates directory name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDir() + { + return 'modules/CDev/UserPermissions/role'; + } +} diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Roles.php new file mode 100644 index 0000000000..89b780680c --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Roles.php @@ -0,0 +1,65 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\View; + +/** + * Roles list widget + * + * @see ____class_see____ + * @since 1.0.17 + * + * @ListChild (list="admin.center", zone="admin") + */ +class Roles extends \XLite\View\Dialog +{ + /** + * Return list of allowed targets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAllowedTargets() + { + return array_merge(parent::getAllowedTargets(), array('roles')); + } + + /** + * Return templates directory name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDir() + { + return 'modules/CDev/UserPermissions/roles'; + } + +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/StickyPanel/Role/Admin/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/StickyPanel/Role/Admin/Roles.php new file mode 100644 index 0000000000..cd02caded2 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/StickyPanel/Role/Admin/Roles.php @@ -0,0 +1,39 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.17 + */ + +namespace XLite\Module\CDev\UserPermissions\View\StickyPanel\Role\Admin; + +/** + * Sticky panel for roles list + * + * @see ____class_see____ + * @since 1.0.17 + */ +class Roles extends \XLite\View\StickyPanel\ItemsListForm +{ +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php new file mode 100644 index 0000000000..fc7b3a5833 --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php @@ -0,0 +1,55 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.19 + */ + +namespace XLite\Module\CDev\UserPermissions\View\TopMenu\Node\Users; + +/** + * Roles + * + * @see ____class_see____ + * @since 1.0.18 + * + * @ListChild (list="menu.users", weight="300", zone="admin") + */ +class Roles extends \XLite\View\TopMenu\Node\Users\AUsers +{ + /** + * Define widget parameters + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineWidgetParams() + { + parent::defineWidgetParams(); + + $this->widgetParams[self::PARAM_TITLE]->setValue(static::t('Roles')); + $this->widgetParams[self::PARAM_TARGET]->setValue('roles'); + } +} + diff --git a/src/classes/XLite/Module/CDev/UserPermissions/icon.png b/src/classes/XLite/Module/CDev/UserPermissions/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cdd2af16d623c1da8807a6b046ae626f00fdb773 GIT binary patch literal 5458 zcmV-Y6|L%tP)O*pT);~&z4SANnTFk{0F?2-0}revC+wSsE3q~-G~`>iZrxgj-AL8LXj@)WQ&Tk! zQ*v$JzI{~;I}O8#@63GYp@;6BHucGw{yq2Hb1%b?VJU{q{r>y!Uw^4<%P*oa%t)iJ z51YNHIn>OGii%~^@Jy~PSg>HJ2B@9^s$*$oPEJn#G&GZIg@uJI(x)*j!zORETCJ98 zXeQS(Gczq(P!hv{>UGqnp_yFMu+xVDov27M-4cvX_!B6>ed%o)&?#<_98|eTZ=nC& zG57|1`LfBD3sE;Jt%fNhj}*7co#4;_q<}Bx^8jDxMZn#U85JvGD=bePP=@Hm2C9GH z0{WV&p-2*>pl>QvI=X5;L}=kxkX}#*y(ukm=Q#?{i?DfmTacbx%&P0G#Lij4mK9lo zECtnd>^&dQkikbU7*iD`T$b0ED}rxD@7aF#(+6Qn%Sjl}F-`trW2m4va8?OX_n?Ma z9dv>&0&wItW?9{Xl5xU11SKRPM6Zw)e$2_@aZxjr!KaoV6#h?OY!v8KdmlDOMa77K zlR10oKU$Xfvcj3GZYyd}L`gwK>SG6{E;=~*$YYq9BVXBqBn2RcLXg=YrW|$wDnk`T z;Ps)%0}$1{1&zRRf_UhJOT^?k?KG2*2dcV>$hQ#{@{^(pC{Uq$ z59R;Mhc-7hpsTGF#}9pqqS?i```Ztv45-RbL1UR5%TV@8GD={ktpUlwlB3~xhBeCSl-d2sK?*!ZiTqP6Kv?8)@8G4MA( zeg-Cs6*u3$c2eh2nJGl*s1Z;LEW-hbiG3L%^|SCgWmqZ+nqL)UK?QXxOnxewcgTZZ zKKld?e)182Z!}DN_!oclx3FbqV&(NWO^%})lhjEZ0yn^s{*;@&qD6CN?n108;Cr%V zQDdhDQA)B&NioVZ8S?zo-^J(EpAnFTr1t&iXZ{Ai-uw<`msTVllOhWoR0Z~a2R{CI z7aR@;Zo1(HR8*9!evz~(Gkd0un6Is_K8nw4Phs|~nOJ@8N?0rw)pdje6=SfRAVYOy z$)*(8x%<6sX!!gHOs4U{ESX(|;>!w=ot1%OC+gAO*+Xk3Y=8X~{PlA`PwJdOuZL?% zLDWag{`arGhBIeWSJT|ogr}c=3b}bK$2ZXZg*aeMXV2mF$~U<#J$bSgF1H)syz3iW zlL|s=E^x|B{CtbR@!)a7y^FJCQ=NW?mU zKx6DpvkYI`;DCe6B~gs>t0`BTl+;YVr?ZvVX~e=s3-K2ZY)EJyQ#!EfniV+o*`b&e zJKQ>IKSkq#?dYnnj#*zY?@C;?_A!d-Ixd@hE&??@8)mZ^Wn~p;I9<=T%gD$;etv-} zssvtH=MrbmoHFcoFkuQD-}sIZT|Zv9w#D(Uc`gy@Eh_}cAvz-*h5 z@P2a_F2;%D$B|o57&$*<&D@CUWL(YMakt?qIB_9@O#LViK#2ExmIJ15=kW^HcY0#47;qN z0%hgpS^x?cO*Gl1BpFoXFCZx87S1Fes)NaDqukk_@P3)O1;lI<3TKzX-dc~{|NeK7 zd|nvzMh>LH1-Ue8KZDK)KP3u2dWa2&51_xZ4a?Wufq-WKrnD>~oK7urgvF^M466dh zb{@i`85x~DsZSt9*`%ZdXf^?pX|oam=wfw=$2yBO9VW8{X=Vd<{p(YZ{65Y~nL99P zf}(^DK}q6Q-*dhhb)W9R71ysJOBsa8mc=tCgi}dPn1=N#*PI%|!w=B&jKFOI;0SRxH4bqGIlc zO=%esW-3wXq$=!nqnH`42ZWObWfG~9IMRhC-N|$U&UR#GXA#rP{DKrE@gDRKA>D81 zrYg|QOQBFwT_*6^e!Q+pz4pLvG7vpyT98}^B8(JUV9`^c*pDG4Uir!1Eb z5tzRA8k84W;RzX4-=rkYup{qnVPTz>F(Ap(rv7paDi-@BVm;dIriUPFH<*Ukg%tHT)Y}_Q@q!4;pyZ%`xMUy2%m`Z}Oci6;I$X1wBts_~@nzgaD%u>mhRIN@IHr%$4|1J&YJ+A9LZQTbF3ZPDiJ7HWtca|;`j)#!tjW*2awYD5 z{27?7X~axFmfv)nc7pghtXEY{3h)16^Z**ifPVeU$dUv&-+L2pSX z#bQda+Jw|6I*2*t2(}&|P$w>qqX(M7LEXOnJ#2YnD}NY`&F3S> zEG{j_t#_@*ZPase^S)dk8ezA|hLB+3H!)E!nKxf6fI#!5YG1SdTWYa4!Q_B-F9jsF zFB_(2$Mgh=aYh?p$$=waKyC8{JoSTL@LpBZh&~_rQ*#zwZzlF0JdV?i%{bfA7D+`} zZ)-V+jW51{yKcA||M28r!Qtpj$cKs}2kBDnvMGy#gNK4dVBBuCS&>~($W5M|n*k#8 znRCIUY5}bGkYZr_GY!g)=Y@ewGS>V0`taCek754&`6wzX!V^zC0jJXmiTiIEcDp?W z$aww0?w#25(r?DTXXOiGC_k>j!X=8&?Ibf&MfJ!YAT{7~4WRt;#r&q2!eM|g-}e5N z|Drb`HYq8guF$sCdv|GNIyJ!c2lf289*+lU2bZxwKR=(3E3s`lJ3A8_ zgxv8SuQepaPIn>DSMyu=$5L0GL; z4(#E>hlgji96ZR)Jv}`gH8nK}ff?=%Cr^w|&s1fTU-IHu_kL7&?LlqtVLo3dXab&n zr5jJ)aV3@%+v1n}$Sk++IgLMlb{54q=fL_|CjwXGKst1Rr=jQSYjOJ6AKA{>NtNx zTq%{Zux}kagZ*vq<4E@&ctf7ZtQe7^f{7GH`Wgwpe5)EuX3xN#D`ufMOFd19*mvZN z9d93QLyyOc+&gHec^33aIneniEm)ERZ^IxgW<5T5<26()T*$}U<5#OB?5NyAW-P%a z7}4p|#mpwzvSkZaty;yG&z~QbLmeF*+}yohFZS%&lN6vWXV1iy!eb62PlRWuyBV+6 zzJPXD)3DDFM}IRXeGw^=LSnWZvq zew9src=z3RNt^nT0<`0N^Mn{BHMeO~?epmNoQF=F`0Gu&TwvzCB7*(oM>`cbyZo>% z5MU|M!BRZ>CLA{x!E(+G*H;T*`ePgSrOXHWUHv2+Y`nn1gB?jOHpI+;2$7$(2guYF z9pYWmrcIl$V#SIWKv`>RYs0o}+v1X8ycVDb;2Ib}dPZh~nbLUvW1tSbz78b&l~5hI z05eN8mL_n)b2A~Z>eK&r;OeVaMA+yXuu~pyRCE83U!6^-H(<`(dDy?deoSCkWZ$@P zBWGfCtE{Z#OidP0)_N~=A#DVplL|_w97iT~0m-&PV>Z@)=V2_pd>N&%!-^o}AL4+D zQ4jR%>+gjl{Q%zHeGndR{QAKspL~LO^X5e+kd>5_;K-39NtyacKuhK>NIfVu51dq| z!+ZhFDCn`=IuEO@i!fJL2sua1!6zJUAaEa9y9VFB^K005tPUUUuSQM%*-_guanHm& zV`@P`0o-o)q{%Vpbd1I+*=iG$L%rU1?YlpzH?uc@;&unJ<}Szb!j)KTDuJF4mWFud zlWen?jJWmsmALK3>(J+PWB<{UICG>5-RBx`%x#6=@8<$PEcR2eG>>Z#N+PmpyfG!a zx0CdjG$jmWleX^MS&QtB3&2OmV4k%H7fLRNxnK?~MP($rijyxJ27K^#Hp184Os`Ft zcdiDdgLZ%dV`=_EywxnJmHR1hScuCLxA81HDt`KbJI}hru*aK%i*uRDtpjw2oWYo#-ttnL2i1caQ*!+- zJ~=l{h4`!K|mOOG^FRY(DCE z@{*y%oXhfdx4gUGmt4Kc8^UyBM6n1c%M{rct&UE*d^Zi|_$E(EgpDU87RraF!Hh9+ zN=T$Iu3fY;-L&XzV&#c3MM*v5+6KKFnR+Wd7r)M1gpK%c$ORA5UBD$`&l3usSg zhn-1ghGiH~cf+aLQ&$z076-nKu+>Z-REqKg$-Tse2h`mRr!a_J8XLP zmCI6ZW@4Bwb7uidO91 zv%70nQ9<5y*Q}^;6GKDFv}s3omN^$^2zc|=mp}Z`_n+NJtD30~Fm@v9w+O=9Ghq}Y zpU|iTe7NPt)r<6cz37*w*~(a%YXOxe>|4w;QpatRd|^ z_-R%1flqcf&M&>JXz7CTT(e%SH?hbTQZBw9%}P20qWiQEI%y;vgIpRUA}I^eP3Cz>Y7CvnVHtI ziupOxrOrr(*x82u!GVFH>O%)ly;=GCzN3c^)w0-4{Q`A1fh(LLDPsW|UdMmv8tNaV z%Fw{g(O%g)leW#J`cuQ<$%uX}*f8+=wbwyyT>zse-%a=js@Q`vXpA*!-Jqqc!X*x9 zB&KM<`ZY!dHCD=F6-yE+sD!}{_e&Yfk)TRZeH0@{w*M1g0Er#+StF+gT>t<807*qo IM6N<$g1)t4ZU6uP literal 0 HcmV?d00001 diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/role/body.tpl b/src/skins/admin/en/modules/CDev/UserPermissions/role/body.tpl new file mode 100644 index 0000000000..60c5f26531 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/UserPermissions/role/body.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Role modify + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.15 + *} + + diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/role/style.css b/src/skins/admin/en/modules/CDev/UserPermissions/role/style.css new file mode 100644 index 0000000000..da6ae5632e --- /dev/null +++ b/src/skins/admin/en/modules/CDev/UserPermissions/role/style.css @@ -0,0 +1,61 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Role form styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.17 + */ + +form.role ul.table .table-label +{ + padding: 7px 0 7px 10px; + color: #456583; + white-space: normal; +} + +form.role ul.table .table-value { + padding: 7px 0px; + width: 50%; +} + +form.role ul.table li .input-field-wrapper { + vertical-align: middle; + display: inline-block; + float: left; +} + +form.role ul.default-table div.table-label label { + width: 180px; +} + +form.role div.star { + padding-top: 13px; +} + +form.role div.table-value input.float { + width: 100px; +} + +form.role div.table-value input.integer { + width: 80px; +} + +form.role .wheel-mark { + margin-right: 0px; +} + +form.role ul li { + float: none; +} + +form.role div.default-section { + float: none; +} + +form.role select { + float: left; +} diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/body.tpl b/src/skins/admin/en/modules/CDev/UserPermissions/roles/body.tpl new file mode 100644 index 0000000000..54d2a360e4 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/body.tpl @@ -0,0 +1,17 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Roles list + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.17 + *} + + + + + + diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/remove.tpl b/src/skins/admin/en/modules/CDev/UserPermissions/roles/remove.tpl new file mode 100644 index 0000000000..3262a24abe --- /dev/null +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/remove.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Entity remove + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.15 + *} + + diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css b/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css new file mode 100644 index 0000000000..2d6972b5e5 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css @@ -0,0 +1,16 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Roles list styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.17 + */ + +.items-list-table.roles table.list tbody td.name { + width: 400px; +} + diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl b/src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl new file mode 100644 index 0000000000..ecb25b3d55 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Entity switcher + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.15 + *} + + From dc237b5a2c8b36151f0a3fee807ddb2f8b9415e5 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 16 Apr 2012 14:37:03 +0400 Subject: [PATCH 010/562] [*] Move 'Code' field from Role edit page --- .../CDev/UserPermissions/View/Model/Role.php | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php index e293837a88..6307f2e6c0 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php @@ -43,12 +43,6 @@ class Role extends \XLite\View\Model\AModel * @since 1.0.0 */ protected $schemaDefault = array( - 'code' => array( - self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Code', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\Input\Text::PARAM_MAX_LENGTH => 32, - ), 'name' => array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Name', @@ -175,14 +169,22 @@ protected function setModelProperties(array $data) } $model->getPermissions()->clear(); + $permanent = \XLite\Core\Database::getRepo('XLite\Model\Role')->getPermanentRole(); + if ($permanent->getId() == $model->getId()) { + $root = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->findOneBy( + array('code' => \XLite\Model\Role\Permission::ROOT_ACCESS) + ); + if ($root && !in_array($root->getId(), $permissions)) { + $permissions[] = $root->getId(); + } + } + // Add new links - foreach ($permissions as $pid => $tmp) { - if ($tmp) { - $permission = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->find($pid); - if ($permission) { - $model->addPermissions($permission); - $permission->addRoles($model); - } + foreach ($permissions as $pid) { + $permission = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->find($pid); + if ($permission) { + $model->addPermissions($permission); + $permission->addRoles($model); } } } From b761a0dd0b4b308ae14458a07a9ebae6f598506a Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 19 Apr 2012 04:21:36 +0400 Subject: [PATCH 011/562] [*] Symfony library is updated up to latest version --- src/classes/XLite/Core/Database.php | 5 +- src/classes/XLite/Core/Operator.php | 2 +- .../Symfony/Component/Console/Application.php | 342 +++--- .../Component/Console/Command/Command.php | 189 ++-- .../Component/Console/Command/HelpCommand.php | 36 +- .../Component/Console/Command/ListCommand.php | 28 +- .../Console/Formatter/OutputFormatter.php | 185 ++++ .../Formatter/OutputFormatterInterface.php | 83 ++ .../Formatter/OutputFormatterStyle.php | 209 ++++ .../OutputFormatterStyleInterface.php | 72 ++ .../Component/Console/Helper/DialogHelper.php | 37 +- .../Console/Helper/FormatterHelper.php | 31 +- .../Component/Console/Helper/Helper.php | 14 +- .../Console/Helper/HelperInterface.php | 22 +- .../Component/Console/Helper/HelperSet.php | 26 +- .../Component/Console/Input/ArgvInput.php | 98 +- .../Component/Console/Input/ArrayInput.php | 60 +- .../Symfony/Component/Console/Input/Input.php | 26 +- .../Component/Console/Input/InputArgument.php | 26 +- .../Console/Input/InputDefinition.php | 65 +- .../Console/Input/InputInterface.php | 65 +- .../Component/Console/Input/InputOption.php | 28 +- .../Component/Console/Input/StringInput.php | 25 +- src/lib/Symfony/Component/Console/LICENSE | 19 + .../Console/Output/ConsoleOutput.php | 30 +- .../Component/Console/Output/NullOutput.php | 16 +- .../Component/Console/Output/Output.php | 175 ++-- .../Console/Output/OutputInterface.php | 76 +- .../Component/Console/Output/StreamOutput.php | 40 +- src/lib/Symfony/Component/Console/Shell.php | 30 +- .../Console/Tester/ApplicationTester.php | 41 +- .../Console/Tester/CommandTester.php | 39 +- src/lib/Symfony/Component/Yaml/Dumper.php | 75 +- src/lib/Symfony/Component/Yaml/Escaper.php | 88 ++ src/lib/Symfony/Component/Yaml/Exception.php | 23 - .../Yaml/Exception/DumpException.php | 23 + .../Yaml/Exception/ExceptionInterface.php | 23 + .../Yaml/Exception/ParseException.php | 143 +++ src/lib/Symfony/Component/Yaml/Inline.php | 708 +++++++------ src/lib/Symfony/Component/Yaml/LICENSE | 19 + src/lib/Symfony/Component/Yaml/Parser.php | 975 +++++++++--------- .../Component/Yaml/ParserException.php | 23 - src/lib/Symfony/Component/Yaml/Unescaper.php | 145 +++ src/lib/Symfony/Component/Yaml/Yaml.php | 165 ++- src/upgrade/1.0/22/post_rebuild.php | 3 +- 45 files changed, 2911 insertions(+), 1642 deletions(-) create mode 100644 src/lib/Symfony/Component/Console/Formatter/OutputFormatter.php create mode 100644 src/lib/Symfony/Component/Console/Formatter/OutputFormatterInterface.php create mode 100644 src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyle.php create mode 100644 src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php create mode 100644 src/lib/Symfony/Component/Console/LICENSE create mode 100644 src/lib/Symfony/Component/Yaml/Escaper.php delete mode 100644 src/lib/Symfony/Component/Yaml/Exception.php create mode 100644 src/lib/Symfony/Component/Yaml/Exception/DumpException.php create mode 100644 src/lib/Symfony/Component/Yaml/Exception/ExceptionInterface.php create mode 100644 src/lib/Symfony/Component/Yaml/Exception/ParseException.php create mode 100644 src/lib/Symfony/Component/Yaml/LICENSE delete mode 100644 src/lib/Symfony/Component/Yaml/ParserException.php create mode 100644 src/lib/Symfony/Component/Yaml/Unescaper.php diff --git a/src/classes/XLite/Core/Database.php b/src/classes/XLite/Core/Database.php index 94047f8765..680ea23d9b 100644 --- a/src/classes/XLite/Core/Database.php +++ b/src/classes/XLite/Core/Database.php @@ -42,7 +42,6 @@ class Database extends \XLite\Base\Singleton const SCHEMA_UPDATE = 'update'; const SCHEMA_DELETE = 'delete'; - /** * DB schema file ident */ @@ -856,7 +855,7 @@ public function setFixturesLoadingOption($name, $value = null) */ public function loadFixturesFromYaml($path) { - $data = \Symfony\Component\Yaml\Yaml::load($path); + $data = \Symfony\Component\Yaml\Yaml::parse($path); $result = false; @@ -892,7 +891,7 @@ public function loadFixturesFromYaml($path) */ public function unloadFixturesFromYaml($path) { - $data = \Symfony\Component\Yaml\Yaml::load($path); + $data = \Symfony\Component\Yaml\Yaml::parse($path); $result = false; diff --git a/src/classes/XLite/Core/Operator.php b/src/classes/XLite/Core/Operator.php index eeef10ae52..f8f8e27d48 100644 --- a/src/classes/XLite/Core/Operator.php +++ b/src/classes/XLite/Core/Operator.php @@ -323,7 +323,7 @@ public function loadServiceYAML($path) $data = null; if (\Includes\Utils\FileManager::isFile($path)) { - $data = \Symfony\Component\Yaml\Yaml::load($path); + $data = \Symfony\Component\Yaml\Yaml::parse($path); } return $data; diff --git a/src/lib/Symfony/Component/Console/Application.php b/src/lib/Symfony/Component/Console/Application.php index 7db8f1a860..ec6c2448f5 100644 --- a/src/lib/Symfony/Component/Console/Application.php +++ b/src/lib/Symfony/Component/Console/Application.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console; use Symfony\Component\Console\Input\InputInterface; @@ -18,15 +27,6 @@ use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Helper\DialogHelper; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** * An Application is the container for a collection of commands. * @@ -40,26 +40,29 @@ * $app->add(new SimpleCommand()); * $app->run(); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class Application { - protected $commands; - protected $aliases; - protected $wantHelps = false; - protected $runningCommand; - protected $name; - protected $version; - protected $catchExceptions; - protected $autoExit; - protected $definition; - protected $helperSet; + private $commands; + private $wantHelps = false; + private $runningCommand; + private $name; + private $version; + private $catchExceptions; + private $autoExit; + private $definition; + private $helperSet; /** * Constructor. * * @param string $name The name of the application * @param string $version The version of the application + * + * @api */ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') { @@ -68,7 +71,6 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') $this->catchExceptions = true; $this->autoExit = true; $this->commands = array(); - $this->aliases = array(); $this->helperSet = new HelperSet(array( new FormatterHelper(), new DialogHelper(), @@ -84,7 +86,8 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'), new InputOption('--verbose', '-v', InputOption::VALUE_NONE, 'Increase verbosity of messages.'), new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this program version.'), - new InputOption('--ansi', '-a', InputOption::VALUE_NONE, 'Force ANSI output.'), + new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'), + new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.'), new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question.'), )); } @@ -98,6 +101,8 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') * @return integer 0 if everything went fine, or an error code * * @throws \Exception When doRun returns Exception + * + * @api */ public function run(InputInterface $input = null, OutputInterface $output = null) { @@ -129,9 +134,9 @@ public function run(InputInterface $input = null, OutputInterface $output = null // @codeCoverageIgnoreStart exit($statusCode); // @codeCoverageIgnoreEnd - } else { - return $statusCode; } + + return $statusCode; } /** @@ -146,8 +151,10 @@ public function doRun(InputInterface $input, OutputInterface $output) { $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(array('--ansi', '-a'))) { + if (true === $input->hasParameterOption(array('--ansi'))) { $output->setDecorated(true); + } elseif (true === $input->hasParameterOption(array('--no-ansi'))) { + $output->setDecorated(false); } if (true === $input->hasParameterOption(array('--help', '-h'))) { @@ -164,9 +171,9 @@ public function doRun(InputInterface $input, OutputInterface $output) } if (true === $input->hasParameterOption(array('--quiet', '-q'))) { - $output->setVerbosity(Output::VERBOSITY_QUIET); + $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); } elseif (true === $input->hasParameterOption(array('--verbose', '-v'))) { - $output->setVerbosity(Output::VERBOSITY_VERBOSE); + $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); } if (true === $input->hasParameterOption(array('--version', '-V'))) { @@ -194,6 +201,8 @@ public function doRun(InputInterface $input, OutputInterface $output) * Set a helper set to be used with the command. * * @param HelperSet $helperSet The helper set + * + * @api */ public function setHelperSet(HelperSet $helperSet) { @@ -201,9 +210,11 @@ public function setHelperSet(HelperSet $helperSet) } /** - * Get the helper set associated with the command + * Get the helper set associated with the command. * * @return HelperSet The HelperSet instance associated with this command + * + * @api */ public function getHelperSet() { @@ -235,7 +246,7 @@ public function getHelp() 'Options:', ); - foreach ($this->definition->getOptions() as $option) { + foreach ($this->getDefinition()->getOptions() as $option) { $messages[] = sprintf(' %-29s %s %s', '--'.$option->getName().'', $option->getShortcut() ? '-'.$option->getShortcut().'' : ' ', @@ -250,6 +261,8 @@ public function getHelp() * Sets whether to catch exceptions or not during commands execution. * * @param Boolean $boolean Whether to catch exceptions or not during commands execution + * + * @api */ public function setCatchExceptions($boolean) { @@ -260,6 +273,8 @@ public function setCatchExceptions($boolean) * Sets whether to automatically exit after a command execution or not. * * @param Boolean $boolean Whether to automatically exit after a command execution or not + * + * @api */ public function setAutoExit($boolean) { @@ -270,6 +285,8 @@ public function setAutoExit($boolean) * Gets the name of the application. * * @return string The application name + * + * @api */ public function getName() { @@ -280,6 +297,8 @@ public function getName() * Sets the application name. * * @param string $name The application name + * + * @api */ public function setName($name) { @@ -290,6 +309,8 @@ public function setName($name) * Gets the application version. * * @return string The application version + * + * @api */ public function getVersion() { @@ -300,6 +321,8 @@ public function getVersion() * Sets the application version. * * @param string $version The application version + * + * @api */ public function setVersion($version) { @@ -310,14 +333,16 @@ public function setVersion($version) * Returns the long version of the application. * * @return string The long application version + * + * @api */ public function getLongVersion() { if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) { return sprintf('%s version %s', $this->getName(), $this->getVersion()); - } else { - return 'Console Tool'; } + + return 'Console Tool'; } /** @@ -326,6 +351,8 @@ public function getLongVersion() * @param string $name The command name * * @return Command The newly created command + * + * @api */ public function register($name) { @@ -336,6 +363,8 @@ public function register($name) * Adds an array of command objects. * * @param Command[] $commands An array of commands + * + * @api */ public function addCommands(array $commands) { @@ -352,15 +381,17 @@ public function addCommands(array $commands) * @param Command $command A Command object * * @return Command The registered command + * + * @api */ public function add(Command $command) { $command->setApplication($this); - $this->commands[$command->getFullName()] = $command; + $this->commands[$command->getName()] = $command; foreach ($command->getAliases() as $alias) { - $this->aliases[$alias] = $command; + $this->commands[$alias] = $command; } return $command; @@ -374,14 +405,16 @@ public function add(Command $command) * @return Command A Command object * * @throws \InvalidArgumentException When command name given does not exist + * + * @api */ public function get($name) { - if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { + if (!isset($this->commands[$name])) { throw new \InvalidArgumentException(sprintf('The command "%s" does not exist.', $name)); } - $command = isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name]; + $command = $this->commands[$name]; if ($this->wantHelps) { $this->wantHelps = false; @@ -396,15 +429,17 @@ public function get($name) } /** - * Returns true if the command exists, false otherwise + * Returns true if the command exists, false otherwise. * * @param string $name The command name or alias * * @return Boolean true if the command exists, false otherwise + * + * @api */ public function has($name) { - return isset($this->commands[$name]) || isset($this->aliases[$name]); + return isset($this->commands[$name]); } /** @@ -418,34 +453,48 @@ public function getNamespaces() { $namespaces = array(); foreach ($this->commands as $command) { - if ($command->getNamespace()) { - $namespaces[$command->getNamespace()] = true; + $namespaces[] = $this->extractNamespace($command->getName()); + + foreach ($command->getAliases() as $alias) { + $namespaces[] = $this->extractNamespace($alias); } } - return array_keys($namespaces); + return array_values(array_unique(array_filter($namespaces))); } /** * Finds a registered namespace by a name or an abbreviation. * + * @param string $namespace A namespace or abbreviation to search for + * * @return string A registered namespace * * @throws \InvalidArgumentException When namespace is incorrect or ambiguous */ public function findNamespace($namespace) { - $abbrevs = static::getAbbreviations($this->getNamespaces()); - - if (!isset($abbrevs[$namespace])) { - throw new \InvalidArgumentException(sprintf('There are no commands defined in the "%s" namespace.', $namespace)); + $allNamespaces = array(); + foreach ($this->getNamespaces() as $n) { + $allNamespaces[$n] = explode(':', $n); } - if (count($abbrevs[$namespace]) > 1) { - throw new \InvalidArgumentException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions($abbrevs[$namespace]))); + $found = array(); + foreach (explode(':', $namespace) as $i => $part) { + $abbrevs = static::getAbbreviations(array_unique(array_values(array_filter(array_map(function ($p) use ($i) { return isset($p[$i]) ? $p[$i] : ''; }, $allNamespaces))))); + + if (!isset($abbrevs[$part])) { + throw new \InvalidArgumentException(sprintf('There are no commands defined in the "%s" namespace.', $namespace)); + } + + if (count($abbrevs[$part]) > 1) { + throw new \InvalidArgumentException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions($abbrevs[$namespace]))); + } + + $found[] = $abbrevs[$part][0]; } - return $abbrevs[$namespace][0]; + return implode(':', $found); } /** @@ -459,48 +508,58 @@ public function findNamespace($namespace) * @return Command A Command instance * * @throws \InvalidArgumentException When command name is incorrect or ambiguous + * + * @api */ public function find($name) { // namespace $namespace = ''; + $searchName = $name; if (false !== $pos = strrpos($name, ':')) { $namespace = $this->findNamespace(substr($name, 0, $pos)); - $name = substr($name, $pos + 1); + $searchName = $namespace.substr($name, $pos); } - $fullName = $namespace ? $namespace.':'.$name : $name; - // name $commands = array(); foreach ($this->commands as $command) { - if ($command->getNamespace() == $namespace) { + if ($this->extractNamespace($command->getName()) == $namespace) { $commands[] = $command->getName(); } } - $abbrevs = static::getAbbreviations($commands); - if (isset($abbrevs[$name]) && 1 == count($abbrevs[$name])) { - return $this->get($namespace ? $namespace.':'.$abbrevs[$name][0] : $abbrevs[$name][0]); + $abbrevs = static::getAbbreviations(array_unique($commands)); + if (isset($abbrevs[$searchName]) && 1 == count($abbrevs[$searchName])) { + return $this->get($abbrevs[$searchName][0]); } - if (isset($abbrevs[$name]) && count($abbrevs[$name]) > 1) { - $suggestions = $this->getAbbreviationSuggestions(array_map(function ($command) use ($namespace) { return $namespace.':'.$command; }, $abbrevs[$name])); + if (isset($abbrevs[$searchName]) && count($abbrevs[$searchName]) > 1) { + $suggestions = $this->getAbbreviationSuggestions($abbrevs[$searchName]); - throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $fullName, $suggestions)); + throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $name, $suggestions)); } // aliases - $abbrevs = static::getAbbreviations(array_keys($this->aliases)); - if (!isset($abbrevs[$fullName])) { - throw new \InvalidArgumentException(sprintf('Command "%s" is not defined.', $fullName)); + $aliases = array(); + foreach ($this->commands as $command) { + foreach ($command->getAliases() as $alias) { + if ($this->extractNamespace($alias) == $namespace) { + $aliases[] = $alias; + } + } + } + + $abbrevs = static::getAbbreviations(array_unique($aliases)); + if (!isset($abbrevs[$searchName])) { + throw new \InvalidArgumentException(sprintf('Command "%s" is not defined.', $name)); } - if (count($abbrevs[$fullName]) > 1) { - throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $fullName, $this->getAbbreviationSuggestions($abbrevs[$fullName]))); + if (count($abbrevs[$searchName]) > 1) { + throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $name, $this->getAbbreviationSuggestions($abbrevs[$searchName]))); } - return $this->get($abbrevs[$fullName][0]); + return $this->get($abbrevs[$searchName][0]); } /** @@ -511,6 +570,8 @@ public function find($name) * @param string $namespace A namespace name * * @return array An array of Command instances + * + * @api */ public function all($namespace = null) { @@ -520,7 +581,7 @@ public function all($namespace = null) $commands = array(); foreach ($this->commands as $name => $command) { - if ($namespace === $command->getNamespace()) { + if ($namespace === $this->extractNamespace($name)) { $commands[$name] = $command; } } @@ -587,10 +648,8 @@ public function asText($namespace = null) $messages[] = ''.$space.''; } - foreach ($commands as $command) { - $aliases = $command->getAliases() ? ' ('.implode(', ', $command->getAliases()).')' : ''; - - $messages[] = sprintf(" %-${width}s %s%s", ($command->getNamespace() ? ':' : '').$command->getName(), $command->getDescription(), $aliases); + foreach ($commands as $name => $command) { + $messages[] = sprintf(" %-${width}s %s", $name, $command->getDescription()); } } @@ -600,8 +659,8 @@ public function asText($namespace = null) /** * Returns an XML representation of the Application. * - * @param string $namespace An optional namespace name - * @param Boolean $asDom Whether to return a DOM or an XML string + * @param string $namespace An optional namespace name + * @param Boolean $asDom Whether to return a DOM or an XML string * * @return string|DOMDocument An XML string representing the Application */ @@ -618,20 +677,27 @@ public function asXml($namespace = null, $asDom = false) if ($namespace) { $commandsXML->setAttribute('namespace', $namespace); } else { - $xml->appendChild($namespacesXML = $dom->createElement('namespaces')); + $namespacesXML = $dom->createElement('namespaces'); + $xml->appendChild($namespacesXML); } // add commands by namespace foreach ($this->sortCommands($commands) as $space => $commands) { if (!$namespace) { - $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace')); + $namespaceArrayXML = $dom->createElement('namespace'); + $namespacesXML->appendChild($namespaceArrayXML); $namespaceArrayXML->setAttribute('id', $space); } - foreach ($commands as $command) { + foreach ($commands as $name => $command) { + if ($name !== $command->getName()) { + continue; + } + if (!$namespace) { - $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command')); - $commandXML->appendChild($dom->createTextNode($command->getName())); + $commandXML = $dom->createElement('command'); + $namespaceArrayXML->appendChild($commandXML); + $commandXML->appendChild($dom->createTextNode($name)); } $node = $command->asXml(true)->getElementsByTagName('command')->item(0); @@ -654,90 +720,120 @@ public function renderException($e, $output) { $strlen = function ($string) { - return function_exists('mb_strlen') ? mb_strlen($string) : strlen($string); + return function_exists('mb_strlen') ? mb_strlen($string, mb_detect_encoding($string)) : strlen($string); }; - $title = sprintf(' [%s] ', get_class($e)); - $len = $strlen($title); - $lines = array(); - foreach (explode("\n", $e->getMessage()) as $line) { - $lines[] = sprintf(' %s ', $line); - $len = max($strlen($line) + 4, $len); - } - - $messages = array(str_repeat(' ', $len), $title.str_repeat(' ', $len - $strlen($title))); + do { + $title = sprintf(' [%s] ', get_class($e)); + $len = $strlen($title); + $lines = array(); + foreach (explode("\n", $e->getMessage()) as $line) { + $lines[] = sprintf(' %s ', $line); + $len = max($strlen($line) + 4, $len); + } - foreach ($lines as $line) { - $messages[] = $line.str_repeat(' ', $len - $strlen($line)); - } + $messages = array(str_repeat(' ', $len), $title.str_repeat(' ', $len - $strlen($title))); - $messages[] = str_repeat(' ', $len); + foreach ($lines as $line) { + $messages[] = $line.str_repeat(' ', $len - $strlen($line)); + } - $output->writeln("\n"); - foreach ($messages as $message) { - $output->writeln(''.$message.''); - } - $output->writeln("\n"); + $messages[] = str_repeat(' ', $len); - if (null !== $this->runningCommand) { - $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName()))); $output->writeln("\n"); - } - - if (Output::VERBOSITY_VERBOSE === $output->getVerbosity()) { - $output->writeln('Exception trace:'); - - // exception related properties - $trace = $e->getTrace(); - array_unshift($trace, array( - 'function' => '', - 'file' => $e->getFile() != null ? $e->getFile() : 'n/a', - 'line' => $e->getLine() != null ? $e->getLine() : 'n/a', - 'args' => array(), - )); + foreach ($messages as $message) { + $output->writeln(''.$message.''); + } + $output->writeln("\n"); - for ($i = 0, $count = count($trace); $i < $count; $i++) { - $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; - $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; - $function = $trace[$i]['function']; - $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; - $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; + if (OutputInterface::VERBOSITY_VERBOSE === $output->getVerbosity()) { + $output->writeln('Exception trace:'); + + // exception related properties + $trace = $e->getTrace(); + array_unshift($trace, array( + 'function' => '', + 'file' => $e->getFile() != null ? $e->getFile() : 'n/a', + 'line' => $e->getLine() != null ? $e->getLine() : 'n/a', + 'args' => array(), + )); + + for ($i = 0, $count = count($trace); $i < $count; $i++) { + $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; + $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; + $function = $trace[$i]['function']; + $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; + $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; + + $output->writeln(sprintf(' %s%s%s() at %s:%s', $class, $type, $function, $file, $line)); + } - $output->writeln(sprintf(' %s%s%s() at %s:%s', $class, $type, $function, $file, $line)); + $output->writeln("\n"); } + } while ($e = $e->getPrevious()); + if (null !== $this->runningCommand) { + $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName()))); $output->writeln("\n"); } } + /** + * Gets the name of the command based on input. + * + * @param InputInterface $input The input interface + * + * @return string The command name + */ protected function getCommandName(InputInterface $input) { return $input->getFirstArgument('command'); } - protected function sortCommands($commands) + /** + * Sorts commands in alphabetical order. + * + * @param array $commands An associative array of commands to sort + * + * @return array A sorted array of commands + */ + private function sortCommands($commands) { $namespacedCommands = array(); foreach ($commands as $name => $command) { - $key = $command->getNamespace() ? $command->getNamespace() : '_global'; - - if (!isset($namespacedCommands[$key])) { - $namespacedCommands[$key] = array(); + $key = $this->extractNamespace($name, 1); + if (!$key) { + $key = '_global'; } $namespacedCommands[$key][$name] = $command; } ksort($namespacedCommands); - foreach ($namespacedCommands as $name => &$commands) { + foreach ($namespacedCommands as &$commands) { ksort($commands); } return $namespacedCommands; } - protected function getAbbreviationSuggestions($abbrevs) + /** + * Returns abbreviated suggestions in string format. + * + * @param array $abbrevs Abbreviated suggestions to convert + * + * @return string A formatted string of abbreviated suggestions + */ + private function getAbbreviationSuggestions($abbrevs) { return sprintf('%s, %s%s', $abbrevs[0], $abbrevs[1], count($abbrevs) > 2 ? sprintf(' and %d more', count($abbrevs) - 2) : ''); } + + private function extractNamespace($name, $limit = null) + { + $parts = explode(':', $name); + array_pop($parts); + + return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit)); + } } diff --git a/src/lib/Symfony/Component/Console/Command/Command.php b/src/lib/Symfony/Component/Console/Command/Command.php index 3777d9617c..6c4487f325 100644 --- a/src/lib/Symfony/Component/Console/Command/Command.php +++ b/src/lib/Symfony/Component/Console/Command/Command.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Input\InputDefinition; @@ -9,32 +18,25 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Application; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** * Base class for all commands. * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class Command { - protected $name; - protected $namespace; - protected $aliases; - protected $definition; - protected $help; - protected $application; - protected $description; - protected $ignoreValidationErrors; - protected $applicationDefinitionMerged; - protected $code; + private $application; + private $name; + private $aliases; + private $definition; + private $help; + private $description; + private $ignoreValidationErrors; + private $applicationDefinitionMerged; + private $code; + private $synopsis; /** * Constructor. @@ -42,6 +44,8 @@ class Command * @param string $name The name of the command * * @throws \LogicException When the command name is empty + * + * @api */ public function __construct($name = null) { @@ -65,12 +69,26 @@ public function __construct($name = null) * Sets the application instance for this command. * * @param Application $application An Application instance + * + * @api */ public function setApplication(Application $application = null) { $this->application = $application; } + /** + * Gets the application instance for this command. + * + * @return Application An Application instance + * + * @api + */ + public function getApplication() + { + return $this->application; + } + /** * Configures the current command. */ @@ -81,12 +99,18 @@ protected function configure() /** * Executes the current command. * + * This method is not abstract because you can use this class + * as a concrete class. In this case, instead of defining the + * execute() method, you set the code to execute by passing + * a Closure to the setCode() method. + * * @param InputInterface $input An InputInterface instance * @param OutputInterface $output An OutputInterface instance * * @return integer 0 if everything went fine, or an error code * - * @throws \LogicException When this abstract class is not implemented + * @throws \LogicException When this abstract method is not implemented + * @see setCode() */ protected function execute(InputInterface $input, OutputInterface $output) { @@ -119,11 +143,23 @@ protected function initialize(InputInterface $input, OutputInterface $output) /** * Runs the command. * + * The code to execute is either defined directly with the + * setCode() method or by overriding the execute() method + * in a sub-class. + * * @param InputInterface $input An InputInterface instance * @param OutputInterface $output An OutputInterface instance + * + * @see setCode() + * @see execute() + * + * @api */ public function run(InputInterface $input, OutputInterface $output) { + // force the creation of the synopsis before the merge with the app definition + $this->getSynopsis(); + // add the application arguments and options $this->mergeApplicationDefinition(); @@ -146,17 +182,24 @@ public function run(InputInterface $input, OutputInterface $output) if ($this->code) { return call_user_func($this->code, $input, $output); - } else { - return $this->execute($input, $output); } + + return $this->execute($input, $output); } /** * Sets the code to execute when running this command. * + * If this method is used, it overrides the code defined + * in the execute() method. + * * @param \Closure $code A \Closure * * @return Command The current instance + * + * @see execute() + * + * @api */ public function setCode(\Closure $code) { @@ -168,7 +211,7 @@ public function setCode(\Closure $code) /** * Merges the application definition with the command definition. */ - protected function mergeApplicationDefinition() + private function mergeApplicationDefinition() { if (null === $this->application || true === $this->applicationDefinitionMerged) { return; @@ -190,6 +233,8 @@ protected function mergeApplicationDefinition() * @param array|Definition $definition An array of argument and option instances or a definition instance * * @return Command The current instance + * + * @api */ public function setDefinition($definition) { @@ -208,6 +253,8 @@ public function setDefinition($definition) * Gets the InputDefinition attached to this Command. * * @return InputDefinition An InputDefinition instance + * + * @api */ public function getDefinition() { @@ -223,6 +270,8 @@ public function getDefinition() * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) * * @return Command The current instance + * + * @api */ public function addArgument($name, $mode = null, $description = '', $default = null) { @@ -241,6 +290,8 @@ public function addArgument($name, $mode = null, $description = '', $default = n * @param mixed $default The default value (must be null for InputOption::VALUE_REQUIRED or self::VALUE_NONE) * * @return Command The current instance + * + * @api */ public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) { @@ -262,62 +313,38 @@ public function addOption($name, $shortcut = null, $mode = null, $description = * @return Command The current instance * * @throws \InvalidArgumentException When command name given is empty + * + * @api */ public function setName($name) { - if (false !== $pos = strrpos($name, ':')) { - $namespace = substr($name, 0, $pos); - $name = substr($name, $pos + 1); - } else { - $namespace = $this->namespace; - } - - if (!$name) { - throw new \InvalidArgumentException('A command name cannot be empty.'); - } + $this->validateName($name); - $this->namespace = $namespace; $this->name = $name; return $this; } /** - * Returns the command namespace. - * - * @return string The command namespace - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Returns the command name + * Returns the command name. * * @return string The command name + * + * @api */ public function getName() { return $this->name; } - /** - * Returns the fully qualified command name. - * - * @return string The fully qualified command name - */ - public function getFullName() - { - return $this->getNamespace() ? $this->getNamespace().':'.$this->getName() : $this->getName(); - } - /** * Sets the description for the command. * * @param string $description The description for the command * * @return Command The current instance + * + * @api */ public function setDescription($description) { @@ -330,6 +357,8 @@ public function setDescription($description) * Returns the description for the command. * * @return string The description for the command + * + * @api */ public function getDescription() { @@ -342,6 +371,8 @@ public function getDescription() * @param string $help The help for the command * * @return Command The current instance + * + * @api */ public function setHelp($help) { @@ -354,6 +385,8 @@ public function setHelp($help) * Returns the help for the command. * * @return string The help for the command + * + * @api */ public function getHelp() { @@ -368,7 +401,7 @@ public function getHelp() */ public function getProcessedHelp() { - $name = $this->namespace.':'.$this->name; + $name = $this->name; $placeholders = array( '%command.name%', @@ -388,9 +421,15 @@ public function getProcessedHelp() * @param array $aliases An array of aliases for the command * * @return Command The current instance + * + * @api */ public function setAliases($aliases) { + foreach ($aliases as $alias) { + $this->validateName($alias); + } + $this->aliases = $aliases; return $this; @@ -400,6 +439,8 @@ public function setAliases($aliases) * Returns the aliases for the command. * * @return array An array of aliases for the command + * + * @api */ public function getAliases() { @@ -413,21 +454,11 @@ public function getAliases() */ public function getSynopsis() { - return sprintf('%s %s', $this->getFullName(), $this->definition->getSynopsis()); - } + if (null === $this->synopsis) { + $this->synopsis = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis())); + } - /** - * Gets a helper instance by name. - * - * @param string $name The helper name - * - * @return mixed The helper value - * - * @throws \InvalidArgumentException if the helper is not defined - */ - protected function getHelper($name) - { - return $this->application->getHelperSet()->get($name); + return $this->synopsis; } /** @@ -438,8 +469,10 @@ protected function getHelper($name) * @return mixed The helper value * * @throws \InvalidArgumentException if the helper is not defined + * + * @api */ - public function __get($name) + public function getHelper($name) { return $this->application->getHelperSet()->get($name); } @@ -483,9 +516,8 @@ public function asXml($asDom = false) $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->formatOutput = true; $dom->appendChild($commandXML = $dom->createElement('command')); - $commandXML->setAttribute('id', $this->getFullName()); - $commandXML->setAttribute('namespace', $this->getNamespace() ? $this->getNamespace() : '_global'); - $commandXML->setAttribute('name', $this->getName()); + $commandXML->setAttribute('id', $this->name); + $commandXML->setAttribute('name', $this->name); $commandXML->appendChild($usageXML = $dom->createElement('usage')); $usageXML->appendChild($dom->createTextNode(sprintf($this->getSynopsis(), ''))); @@ -509,4 +541,11 @@ public function asXml($asDom = false) return $asDom ? $dom : $dom->saveXml(); } + + private function validateName($name) + { + if (!preg_match('/^[^\:]+(\:[^\:]+)*$/', $name)) { + throw new \InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); + } + } } diff --git a/src/lib/Symfony/Component/Console/Command/HelpCommand.php b/src/lib/Symfony/Component/Console/Command/HelpCommand.php index 5504832d8b..24304bf83b 100644 --- a/src/lib/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/lib/Symfony/Component/Console/Command/HelpCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Input\InputArgument; @@ -9,26 +18,17 @@ use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Command\Command; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** * HelpCommand displays the help for a given command. * - * @author Fabien Potencier + * @author Fabien Potencier */ class HelpCommand extends Command { - protected $command; + private $command; /** - * @see Command + * {@inheritdoc} */ protected function configure() { @@ -40,7 +40,6 @@ protected function configure() new InputOption('xml', null, InputOption::VALUE_NONE, 'To output help as XML'), )) ->setName('help') - ->setAliases(array('?')) ->setDescription('Displays help for a command') ->setHelp(<<help command displays help for a given command: @@ -54,22 +53,27 @@ protected function configure() ); } + /** + * Sets the command + * + * @param Command $command The command to set + */ public function setCommand(Command $command) { $this->command = $command; } /** - * @see Command + * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if (null === $this->command) { - $this->command = $this->application->get($input->getArgument('command_name')); + $this->command = $this->getApplication()->get($input->getArgument('command_name')); } if ($input->getOption('xml')) { - $output->writeln($this->command->asXml(), Output::OUTPUT_RAW); + $output->writeln($this->command->asXml(), OutputInterface::OUTPUT_RAW); } else { $output->writeln($this->command->asText()); } diff --git a/src/lib/Symfony/Component/Console/Command/ListCommand.php b/src/lib/Symfony/Component/Console/Command/ListCommand.php index a1f77e97c1..f5300e13d2 100644 --- a/src/lib/Symfony/Component/Console/Command/ListCommand.php +++ b/src/lib/Symfony/Component/Console/Command/ListCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Input\InputArgument; @@ -9,24 +18,15 @@ use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Command\Command; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** * ListCommand displays the list of all available commands for the application. * - * @author Fabien Potencier + * @author Fabien Potencier */ class ListCommand extends Command { /** - * @see Command + * {@inheritdoc} */ protected function configure() { @@ -54,14 +54,14 @@ protected function configure() } /** - * @see Command + * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if ($input->getOption('xml')) { - $output->writeln($this->application->asXml($input->getArgument('namespace')), Output::OUTPUT_RAW); + $output->writeln($this->getApplication()->asXml($input->getArgument('namespace')), OutputInterface::OUTPUT_RAW); } else { - $output->writeln($this->application->asText($input->getArgument('namespace'))); + $output->writeln($this->getApplication()->asText($input->getArgument('namespace'))); } } } diff --git a/src/lib/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/lib/Symfony/Component/Console/Formatter/OutputFormatter.php new file mode 100644 index 0000000000..9f030e5572 --- /dev/null +++ b/src/lib/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -0,0 +1,185 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +/** + * Formatter class for console output. + * + * @author Konstantin Kudryashov + * + * @api + */ +class OutputFormatter implements OutputFormatterInterface +{ + private $decorated; + private $styles = array(); + + /** + * Initializes console output formatter. + * + * @param Boolean $decorated Whether this formatter should actually decorate strings + * @param array $styles Array of "name => FormatterStyle" instance + * + * @api + */ + public function __construct($decorated = null, array $styles = array()) + { + $this->decorated = (Boolean) $decorated; + + $this->setStyle('error', new OutputFormatterStyle('white', 'red')); + $this->setStyle('info', new OutputFormatterStyle('green')); + $this->setStyle('comment', new OutputFormatterStyle('yellow')); + $this->setStyle('question', new OutputFormatterStyle('black', 'cyan')); + + foreach ($styles as $name => $style) { + $this->setStyle($name, $style); + } + } + + /** + * Sets the decorated flag. + * + * @param Boolean $decorated Whether to decorated the messages or not + * + * @api + */ + public function setDecorated($decorated) + { + $this->decorated = (Boolean) $decorated; + } + + /** + * Gets the decorated flag. + * + * @return Boolean true if the output will decorate messages, false otherwise + * + * @api + */ + public function isDecorated() + { + return $this->decorated; + } + + /** + * Sets a new style. + * + * @param string $name The style name + * @param OutputFormatterStyleInterface $style The style instance + * + * @api + */ + public function setStyle($name, OutputFormatterStyleInterface $style) + { + $this->styles[strtolower($name)] = $style; + } + + /** + * Checks if output formatter has style with specified name. + * + * @param string $name + * + * @return Boolean + * + * @api + */ + public function hasStyle($name) + { + return isset($this->styles[strtolower($name)]); + } + + /** + * Gets style options from style with specified name. + * + * @param string $name + * + * @return OutputFormatterStyleInterface + * + * @api + */ + public function getStyle($name) + { + if (!$this->hasStyle($name)) { + throw new \InvalidArgumentException('Undefined style: ' . $name); + } + + return $this->styles[strtolower($name)]; + } + + /** + * Formats a message according to the given styles. + * + * @param string $message The message to style + * + * @return string The styled message + * + * @api + */ + public function format($message) + { + return preg_replace_callback('#<([a-z][a-z0-9_=;-]+)>(.*?)#i', array($this, 'replaceStyle'), $message); + } + + /** + * Replaces style of the output. + * + * @param array $match + * + * @return string The replaced style + */ + private function replaceStyle($match) + { + if (!$this->isDecorated()) { + return $match[2]; + } + + if (isset($this->styles[strtolower($match[1])])) { + $style = $this->styles[strtolower($match[1])]; + } else { + $style = $this->createStyleFromString($match[1]); + + if (false === $style) { + return $match[0]; + } + } + + return $style->apply($this->format($match[2])); + } + + /** + * Tries to create new style instance from string. + * + * @param string $string + * + * @return Symfony\Component\Console\Format\FormatterStyle|Boolean false if string is not format string + */ + private function createStyleFromString($string) + { + if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) { + return false; + } + + $style = new OutputFormatterStyle(); + foreach ($matches as $match) { + array_shift($match); + + if ('fg' == $match[0]) { + $style->setForeground($match[1]); + } elseif ('bg' == $match[0]) { + $style->setBackground($match[1]); + } else { + $style->setOption($match[1]); + } + } + + return $style; + } +} diff --git a/src/lib/Symfony/Component/Console/Formatter/OutputFormatterInterface.php b/src/lib/Symfony/Component/Console/Formatter/OutputFormatterInterface.php new file mode 100644 index 0000000000..fd205a4eba --- /dev/null +++ b/src/lib/Symfony/Component/Console/Formatter/OutputFormatterInterface.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +/** + * Formatter interface for console output. + * + * @author Konstantin Kudryashov + * + * @api + */ +interface OutputFormatterInterface +{ + /** + * Sets the decorated flag. + * + * @param Boolean $decorated Whether to decorated the messages or not + * + * @api + */ + function setDecorated($decorated); + + /** + * Gets the decorated flag. + * + * @return Boolean true if the output will decorate messages, false otherwise + * + * @api + */ + function isDecorated(); + + /** + * Sets a new style. + * + * @param string $name The style name + * @param OutputFormatterStyleInterface $style The style instance + * + * @api + */ + function setStyle($name, OutputFormatterStyleInterface $style); + + /** + * Checks if output formatter has style with specified name. + * + * @param string $name + * + * @return Boolean + * + * @api + */ + function hasStyle($name); + + /** + * Gets style options from style with specified name. + * + * @param string $name + * + * @return OutputFormatterStyleInterface + * + * @api + */ + function getStyle($name); + + /** + * Formats a message according to the given styles. + * + * @param string $message The message to style + * + * @return string The styled message + * + * @api + */ + function format($message); +} diff --git a/src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyle.php new file mode 100644 index 0000000000..d3070cf7c3 --- /dev/null +++ b/src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -0,0 +1,209 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +/** + * Formatter style class for defining styles. + * + * @author Konstantin Kudryashov + * + * @api + */ +class OutputFormatterStyle implements OutputFormatterStyleInterface +{ + static private $availableForegroundColors = array( + 'black' => 30, + 'red' => 31, + 'green' => 32, + 'yellow' => 33, + 'blue' => 34, + 'magenta' => 35, + 'cyan' => 36, + 'white' => 37 + ); + static private $availableBackgroundColors = array( + 'black' => 40, + 'red' => 41, + 'green' => 42, + 'yellow' => 43, + 'blue' => 44, + 'magenta' => 45, + 'cyan' => 46, + 'white' => 47 + ); + static private $availableOptions = array( + 'bold' => 1, + 'underscore' => 4, + 'blink' => 5, + 'reverse' => 7, + 'conceal' => 8 + ); + + private $foreground; + private $background; + private $options = array(); + + /** + * Initializes output formatter style. + * + * @param string $foreground style foreground color name + * @param string $background style background color name + * @param array $options style options + * + * @api + */ + public function __construct($foreground = null, $background = null, array $options = array()) + { + if (null !== $foreground) { + $this->setForeground($foreground); + } + if (null !== $background) { + $this->setBackground($background); + } + if (count($options)) { + $this->setOptions($options); + } + } + + /** + * Sets style foreground color. + * + * @param string $color color name + * + * @api + */ + public function setForeground($color = null) + { + if (null === $color) { + $this->foreground = null; + + return; + } + + if (!isset(static::$availableForegroundColors[$color])) { + throw new \InvalidArgumentException(sprintf( + 'Invalid foreground color specified: "%s". Expected one of (%s)', + $color, + implode(', ', array_keys(static::$availableForegroundColors)) + )); + } + + $this->foreground = static::$availableForegroundColors[$color]; + } + + /** + * Sets style background color. + * + * @param string $color color name + * + * @api + */ + public function setBackground($color = null) + { + if (null === $color) { + $this->background = null; + + return; + } + + if (!isset(static::$availableBackgroundColors[$color])) { + throw new \InvalidArgumentException(sprintf( + 'Invalid background color specified: "%s". Expected one of (%s)', + $color, + implode(', ', array_keys(static::$availableBackgroundColors)) + )); + } + + $this->background = static::$availableBackgroundColors[$color]; + } + + /** + * Sets some specific style option. + * + * @param string $option option name + * + * @api + */ + public function setOption($option) + { + if (!isset(static::$availableOptions[$option])) { + throw new \InvalidArgumentException(sprintf( + 'Invalid option specified: "%s". Expected one of (%s)', + $option, + implode(', ', array_keys(static::$availableOptions)) + )); + } + + if (false === array_search(static::$availableOptions[$option], $this->options)) { + $this->options[] = static::$availableOptions[$option]; + } + } + + /** + * Unsets some specific style option. + * + * @param string $option option name + */ + public function unsetOption($option) + { + if (!isset(static::$availableOptions[$option])) { + throw new \InvalidArgumentException(sprintf( + 'Invalid option specified: "%s". Expected one of (%s)', + $option, + implode(', ', array_keys(static::$availableOptions)) + )); + } + + $pos = array_search(static::$availableOptions[$option], $this->options); + if (false !== $pos) { + unset($this->options[$pos]); + } + } + + /** + * Set multiple style options at once. + * + * @param array $options + */ + public function setOptions(array $options) + { + $this->options = array(); + + foreach ($options as $option) { + $this->setOption($option); + } + } + + /** + * Applies the style to a given text. + * + * @param string $text The text to style + * + * @return string + */ + public function apply($text) + { + $codes = array(); + + if (null !== $this->foreground) { + $codes[] = $this->foreground; + } + if (null !== $this->background) { + $codes[] = $this->background; + } + if (count($this->options)) { + $codes = array_merge($codes, $this->options); + } + + return sprintf("\033[%sm%s\033[0m", implode(';', $codes), $text); + } +} diff --git a/src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php new file mode 100644 index 0000000000..0bf4e0a47e --- /dev/null +++ b/src/lib/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Formatter; + +/** + * Formatter style interface for defining styles. + * + * @author Konstantin Kudryashov + * + * @api + */ +interface OutputFormatterStyleInterface +{ + /** + * Sets style foreground color. + * + * @param string $color color name + * + * @api + */ + function setForeground($color = null); + + /** + * Sets style background color. + * + * @param string $color color name + * + * @api + */ + function setBackground($color = null); + + /** + * Sets some specific style option. + * + * @param string $option option name + * + * @api + */ + function setOption($option); + + /** + * Unsets some specific style option. + * + * @param string $option option name + */ + function unsetOption($option); + + /** + * Set multiple style options at once. + * + * @param array $options + */ + function setOptions(array $options); + + /** + * Applies the style to a given text. + * + * @param string $text The text to style + * + * @return string + */ + function apply($text); +} diff --git a/src/lib/Symfony/Component/Console/Helper/DialogHelper.php b/src/lib/Symfony/Component/Console/Helper/DialogHelper.php index 25c2b04a74..f891cdde58 100644 --- a/src/lib/Symfony/Component/Console/Helper/DialogHelper.php +++ b/src/lib/Symfony/Component/Console/Helper/DialogHelper.php @@ -1,22 +1,22 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\OutputInterface; + /** * The Dialog class provides helpers to interact with the user. * - * @author Fabien Potencier + * @author Fabien Potencier */ class DialogHelper extends Helper { @@ -32,7 +32,7 @@ class DialogHelper extends Helper public function ask(OutputInterface $output, $question, $default = null) { // @codeCoverageIgnoreStart - $output->writeln($question); + $output->write($question); $ret = trim(fgets(STDIN)); @@ -61,25 +61,30 @@ public function askConfirmation(OutputInterface $output, $question, $default = t if (false === $default) { return $answer && 'y' == strtolower($answer[0]); - } else { - return !$answer || 'y' == strtolower($answer[0]); } + + return !$answer || 'y' == strtolower($answer[0]); // @codeCoverageIgnoreEnd } /** * Asks for a value and validates the response. * + * The validator receives the data to validate. It must return the + * validated data when the data is valid and throw an exception + * otherwise. + * * @param OutputInterface $output * @param string|array $question - * @param Closure $validator + * @param callback $validator A PHP callback * @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite) + * @param string $default The default answer if none is given by the user * * @return mixed * * @throws \Exception When any of the validator returns an error */ - public function askAndValidate(OutputInterface $output, $question, \Closure $validator, $attempts = false) + public function askAndValidate(OutputInterface $output, $question, $validator, $attempts = false, $default = null) { // @codeCoverageIgnoreStart $error = null; @@ -88,10 +93,10 @@ public function askAndValidate(OutputInterface $output, $question, \Closure $val $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error')); } - $value = $this->ask($output, $question, null); + $value = $this->ask($output, $question, $default); try { - return $validator($value); + return call_user_func($validator, $value); } catch (\Exception $error) { } } diff --git a/src/lib/Symfony/Component/Console/Helper/FormatterHelper.php b/src/lib/Symfony/Component/Console/Helper/FormatterHelper.php index baa2bc1a90..a32d445d44 100644 --- a/src/lib/Symfony/Component/Console/Helper/FormatterHelper.php +++ b/src/lib/Symfony/Component/Console/Helper/FormatterHelper.php @@ -1,20 +1,20 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Helper; + /** * The Formatter class provides helpers to format messages. * - * @author Fabien Potencier + * @author Fabien Potencier */ class FormatterHelper extends Helper { @@ -41,9 +41,7 @@ public function formatSection($section, $message, $style = 'info') */ public function formatBlock($messages, $style, $large = false) { - if (!is_array($messages)) { - $messages = array($messages); - } + $messages = (array) $messages; $len = 0; $lines = array(); @@ -67,13 +65,22 @@ public function formatBlock($messages, $style, $large = false) return implode("\n", $messages); } - protected function strlen($string) + /** + * Returns the length of a string, uses mb_strlen if it is available. + * + * @param string $string The string to check its length + * + * @return integer The length of the string + */ + private function strlen($string) { - return function_exists('mb_strlen') ? mb_strlen($string) : strlen($string); + return function_exists('mb_strlen') ? mb_strlen($string, mb_detect_encoding($string)) : strlen($string); } /** * Returns the helper's canonical name + * + * @return string The canonical name of the helper */ public function getName() { diff --git a/src/lib/Symfony/Component/Console/Helper/Helper.php b/src/lib/Symfony/Component/Console/Helper/Helper.php index 28a8d991fd..28488cafd8 100644 --- a/src/lib/Symfony/Component/Console/Helper/Helper.php +++ b/src/lib/Symfony/Component/Console/Helper/Helper.php @@ -1,20 +1,20 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Helper; + /** * Helper is the base class for all helper classes. * - * @author Fabien Potencier + * @author Fabien Potencier */ abstract class Helper implements HelperInterface { diff --git a/src/lib/Symfony/Component/Console/Helper/HelperInterface.php b/src/lib/Symfony/Component/Console/Helper/HelperInterface.php index 7430e0713a..25ee51393f 100644 --- a/src/lib/Symfony/Component/Console/Helper/HelperInterface.php +++ b/src/lib/Symfony/Component/Console/Helper/HelperInterface.php @@ -1,20 +1,22 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Helper; + /** * HelperInterface is the interface all helpers must implement. * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ interface HelperInterface { @@ -22,6 +24,8 @@ interface HelperInterface * Sets the helper set associated with this helper. * * @param HelperSet $helperSet A HelperSet instance + * + * @api */ function setHelperSet(HelperSet $helperSet = null); @@ -29,6 +33,8 @@ function setHelperSet(HelperSet $helperSet = null); * Gets the helper set associated with this helper. * * @return HelperSet A HelperSet instance + * + * @api */ function getHelperSet(); @@ -36,6 +42,8 @@ function getHelperSet(); * Returns the canonical name of this helper. * * @return string The canonical name + * + * @api */ function getName(); } diff --git a/src/lib/Symfony/Component/Console/Helper/HelperSet.php b/src/lib/Symfony/Component/Console/Helper/HelperSet.php index b8b412f79d..025702e448 100644 --- a/src/lib/Symfony/Component/Console/Helper/HelperSet.php +++ b/src/lib/Symfony/Component/Console/Helper/HelperSet.php @@ -1,27 +1,27 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Command\Command; + /** * HelperSet represents a set of helpers to be used with a command. * - * @author Fabien Potencier + * @author Fabien Potencier */ class HelperSet { - protected $helpers; - protected $command; + private $helpers; + private $command; /** * @param Helper[] $helpers An array of helper. @@ -37,8 +37,8 @@ public function __construct(array $helpers = array()) /** * Sets a helper. * - * @param HelperInterface $value The helper instance - * @param string $alias An alias + * @param HelperInterface $helper The helper instance + * @param string $alias An alias */ public function set(HelperInterface $helper, $alias = null) { diff --git a/src/lib/Symfony/Component/Console/Input/ArgvInput.php b/src/lib/Symfony/Component/Console/Input/ArgvInput.php index a1ca7a26a8..36e28e0c40 100644 --- a/src/lib/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/lib/Symfony/Component/Console/Input/ArgvInput.php @@ -1,16 +1,16 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * ArgvInput represents an input coming from the CLI arguments. * @@ -31,21 +31,25 @@ * the same rules as the argv one. It's almost always better to use the * `StringInput` when you want to provide your own input. * - * @author Fabien Potencier + * @author Fabien Potencier * * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 + * + * @api */ class ArgvInput extends Input { - protected $tokens; - protected $parsed; + private $tokens; + private $parsed; /** * Constructor. * * @param array $argv An array of parameters from the CLI (in the argv format) * @param InputDefinition $definition A InputDefinition instance + * + * @api */ public function __construct(array $argv = null, InputDefinition $definition = null) { @@ -61,6 +65,11 @@ public function __construct(array $argv = null, InputDefinition $definition = nu parent::__construct($definition); } + protected function setTokens(array $tokens) + { + $this->tokens = $tokens; + } + /** * Processes command line arguments. */ @@ -83,7 +92,7 @@ protected function parse() * * @param string $token The current token. */ - protected function parseShortOption($token) + private function parseShortOption($token) { $name = substr($token, 1); @@ -102,11 +111,11 @@ protected function parseShortOption($token) /** * Parses a short option set. * - * @param string $token The current token + * @param string $name The current token * * @throws \RuntimeException When option given doesn't exist */ - protected function parseShortOptionSet($name) + private function parseShortOptionSet($name) { $len = strlen($name); for ($i = 0; $i < $len; $i++) { @@ -130,7 +139,7 @@ protected function parseShortOptionSet($name) * * @param string $token The current token */ - protected function parseLongOption($token) + private function parseLongOption($token) { $name = substr($token, 2); @@ -148,13 +157,24 @@ protected function parseLongOption($token) * * @throws \RuntimeException When too many arguments are given */ - protected function parseArgument($token) + private function parseArgument($token) { - if (!$this->definition->hasArgument(count($this->arguments))) { + $c = count($this->arguments); + + // if input is expecting another argument, add it + if ($this->definition->hasArgument($c)) { + $arg = $this->definition->getArgument($c); + $this->arguments[$arg->getName()] = $arg->isArray()? array($token) : $token; + + // if last argument isArray(), append token to last argument + } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { + $arg = $this->definition->getArgument($c - 1); + $this->arguments[$arg->getName()][] = $token; + + // unexpected argument + } else { throw new \RuntimeException('Too many arguments.'); } - - $this->arguments[$this->definition->getArgument(count($this->arguments))->getName()] = $token; } /** @@ -165,7 +185,7 @@ protected function parseArgument($token) * * @throws \RuntimeException When option given doesn't exist */ - protected function addShortOption($shortcut, $value) + private function addShortOption($shortcut, $value) { if (!$this->definition->hasShortcut($shortcut)) { throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -182,7 +202,7 @@ protected function addShortOption($shortcut, $value) * * @throws \RuntimeException When option given doesn't exist */ - protected function addLongOption($name, $value) + private function addLongOption($name, $value) { if (!$this->definition->hasOption($name)) { throw new \RuntimeException(sprintf('The "--%s" option does not exist.', $name)); @@ -209,7 +229,11 @@ protected function addLongOption($name, $value) $value = $option->isValueOptional() ? $option->getDefault() : true; } - $this->options[$name] = $value; + if ($option->isArray()) { + $this->options[$name][] = $value; + } else { + $this->options[$name] = $value; + } } /** @@ -240,9 +264,7 @@ public function getFirstArgument() */ public function hasParameterOption($values) { - if (!is_array($values)) { - $values = array($values); - } + $values = (array) $values; foreach ($this->tokens as $v) { if (in_array($v, $values)) { @@ -252,4 +274,34 @@ public function hasParameterOption($values) return false; } + + /** + * Returns the value of a raw option (not parsed). + * + * This method is to be used to introspect the input parameters + * before it has been validated. It must be used carefully. + * + * @param string|array $values The value(s) to look for in the raw parameters (can be an array) + * @param mixed $default The default value to return if no result is found + * @return mixed The option value + */ + public function getParameterOption($values, $default = false) + { + $values = (array) $values; + + $tokens = $this->tokens; + while ($token = array_shift($tokens)) { + foreach ($values as $value) { + if (0 === strpos($token, $value)) { + if (false !== $pos = strpos($token, '=')) { + return substr($token, $pos + 1); + } + + return array_shift($tokens); + } + } + } + + return $default; + } } diff --git a/src/lib/Symfony/Component/Console/Input/ArrayInput.php b/src/lib/Symfony/Component/Console/Input/ArrayInput.php index 865e482054..e0f5478cc9 100644 --- a/src/lib/Symfony/Component/Console/Input/ArrayInput.php +++ b/src/lib/Symfony/Component/Console/Input/ArrayInput.php @@ -1,16 +1,16 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * ArrayInput represents an input provided as an array. * @@ -18,17 +18,21 @@ * * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class ArrayInput extends Input { - protected $parameters; + private $parameters; /** * Constructor. * - * @param array $param An array of parameters + * @param array $parameters An array of parameters * @param InputDefinition $definition A InputDefinition instance + * + * @api */ public function __construct(array $parameters, InputDefinition $definition = null) { @@ -59,15 +63,13 @@ public function getFirstArgument() * This method is to be used to introspect the input parameters * before it has been validated. It must be used carefully. * - * @param string|array $value The values to look for in the raw parameters (can be an array) + * @param string|array $values The values to look for in the raw parameters (can be an array) * * @return Boolean true if the value is contained in the raw parameters */ public function hasParameterOption($values) { - if (!is_array($values)) { - $values = array($values); - } + $values = (array) $values; foreach ($this->parameters as $k => $v) { if (!is_int($k)) { @@ -82,6 +84,32 @@ public function hasParameterOption($values) return false; } + /** + * Returns the value of a raw option (not parsed). + * + * This method is to be used to introspect the input parameters + * before it has been validated. It must be used carefully. + * + * @param string|array $values The value(s) to look for in the raw parameters (can be an array) + * @param mixed $default The default value to return if no result is found + * + * @return mixed The option value + */ + public function getParameterOption($values, $default = false) + { + $values = (array) $values; + + foreach ($this->parameters as $k => $v) { + if (is_int($k) && in_array($v, $values)) { + return true; + } elseif (in_array($k, $values)) { + return $v; + } + } + + return $default; + } + /** * Processes command line arguments. */ @@ -106,7 +134,7 @@ protected function parse() * * @throws \RuntimeException When option given doesn't exist */ - protected function addShortOption($shortcut, $value) + private function addShortOption($shortcut, $value) { if (!$this->definition->hasShortcut($shortcut)) { throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -124,7 +152,7 @@ protected function addShortOption($shortcut, $value) * @throws \InvalidArgumentException When option given doesn't exist * @throws \InvalidArgumentException When a required value is missing */ - protected function addLongOption($name, $value) + private function addLongOption($name, $value) { if (!$this->definition->hasOption($name)) { throw new \InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); @@ -151,7 +179,7 @@ protected function addLongOption($name, $value) * * @throws \InvalidArgumentException When argument given doesn't exist */ - protected function addArgument($name, $value) + private function addArgument($name, $value) { if (!$this->definition->hasArgument($name)) { throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); diff --git a/src/lib/Symfony/Component/Console/Input/Input.php b/src/lib/Symfony/Component/Console/Input/Input.php index 9819b188e1..70291be7e9 100644 --- a/src/lib/Symfony/Component/Console/Input/Input.php +++ b/src/lib/Symfony/Component/Console/Input/Input.php @@ -1,16 +1,16 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * Input is the base class for all concrete Input classes. * @@ -20,7 +20,7 @@ * * `StringInput`: The input is provided as a string * * `ArrayInput`: The input is provided as an array * - * @author Fabien Potencier + * @author Fabien Potencier */ abstract class Input implements InputInterface { @@ -64,6 +64,8 @@ public function bind(InputDefinition $definition) abstract protected function parse(); /** + * Validates the input. + * * @throws \RuntimeException When not enough arguments are given */ public function validate() @@ -73,11 +75,21 @@ public function validate() } } + /** + * Checks if the input is interactive. + * + * @return Boolean Returns true if the input is interactive + */ public function isInteractive() { return $this->interactive; } + /** + * Sets the input interactivity. + * + * @param Boolean $interactive If the input should be interactive + */ public function setInteractive($interactive) { $this->interactive = (Boolean) $interactive; diff --git a/src/lib/Symfony/Component/Console/Input/InputArgument.php b/src/lib/Symfony/Component/Console/Input/InputArgument.php index f96eecb6bf..6f50c5bbed 100644 --- a/src/lib/Symfony/Component/Console/Input/InputArgument.php +++ b/src/lib/Symfony/Component/Console/Input/InputArgument.php @@ -1,20 +1,22 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * Represents a command line argument. * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class InputArgument { @@ -22,10 +24,10 @@ class InputArgument const OPTIONAL = 2; const IS_ARRAY = 4; - protected $name; - protected $mode; - protected $default; - protected $description; + private $name; + private $mode; + private $default; + private $description; /** * Constructor. @@ -36,6 +38,8 @@ class InputArgument * @param mixed $default The default value (for self::OPTIONAL mode only) * * @throws \InvalidArgumentException When argument mode is not valid + * + * @api */ public function __construct($name, $mode = null, $description = '', $default = null) { diff --git a/src/lib/Symfony/Component/Console/Input/InputDefinition.php b/src/lib/Symfony/Component/Console/Input/InputDefinition.php index bc2e8bcc76..d5d0d08308 100644 --- a/src/lib/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/lib/Symfony/Component/Console/Input/InputDefinition.php @@ -1,16 +1,16 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * A InputDefinition represents a set of valid command line arguments and options. * @@ -21,27 +21,38 @@ * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), * )); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class InputDefinition { - protected $arguments; - protected $requiredCount; - protected $hasAnArrayArgument = false; - protected $hasOptional; - protected $options; - protected $shortcuts; + private $arguments; + private $requiredCount; + private $hasAnArrayArgument = false; + private $hasOptional; + private $options; + private $shortcuts; /** * Constructor. * * @param array $definition An array of InputArgument and InputOption instance + * + * @api */ public function __construct(array $definition = array()) { $this->setDefinition($definition); } + /** + * Sets the definition of the input. + * + * @param array $definition The definition array + * + * @api + */ public function setDefinition(array $definition) { $arguments = array(); @@ -62,6 +73,8 @@ public function setDefinition(array $definition) * Sets the InputArgument objects. * * @param array $arguments An array of InputArgument objects + * + * @api */ public function setArguments($arguments = array()) { @@ -76,6 +89,8 @@ public function setArguments($arguments = array()) * Add an array of InputArgument objects. * * @param InputArgument[] $arguments An array of InputArgument objects + * + * @api */ public function addArguments($arguments = array()) { @@ -92,6 +107,8 @@ public function addArguments($arguments = array()) * @param InputArgument $argument An InputArgument object * * @throws \LogicException When incorrect argument is given + * + * @api */ public function addArgument(InputArgument $argument) { @@ -128,6 +145,8 @@ public function addArgument(InputArgument $argument) * @return InputArgument An InputArgument object * * @throws \InvalidArgumentException When argument given doesn't exist + * + * @api */ public function getArgument($name) { @@ -146,6 +165,8 @@ public function getArgument($name) * @param string|integer $name The InputArgument name or position * * @return Boolean true if the InputArgument object exists, false otherwise + * + * @api */ public function hasArgument($name) { @@ -158,6 +179,8 @@ public function hasArgument($name) * Gets the array of InputArgument objects. * * @return array An array of InputArgument objects + * + * @api */ public function getArguments() { @@ -203,6 +226,8 @@ public function getArgumentDefaults() * Sets the InputOption objects. * * @param array $options An array of InputOption objects + * + * @api */ public function setOptions($options = array()) { @@ -215,6 +240,8 @@ public function setOptions($options = array()) * Add an array of InputOption objects. * * @param InputOption[] $options An array of InputOption objects + * + * @api */ public function addOptions($options = array()) { @@ -229,6 +256,8 @@ public function addOptions($options = array()) * @param InputOption $option An InputOption object * * @throws \LogicException When option given already exist + * + * @api */ public function addOption(InputOption $option) { @@ -250,6 +279,8 @@ public function addOption(InputOption $option) * @param string $name The InputOption name * * @return InputOption A InputOption object + * + * @api */ public function getOption($name) { @@ -266,6 +297,8 @@ public function getOption($name) * @param string $name The InputOption name * * @return Boolean true if the InputOption object exists, false otherwise + * + * @api */ public function hasOption($name) { @@ -276,6 +309,8 @@ public function hasOption($name) * Gets the array of InputOption objects. * * @return array An array of InputOption objects + * + * @api */ public function getOptions() { @@ -297,6 +332,8 @@ public function hasShortcut($name) /** * Gets an InputOption by shortcut. * + * @param string $shortcut the Shortcut name + * * @return InputOption An InputOption object */ public function getOptionForShortcut($shortcut) @@ -328,7 +365,7 @@ public function getOptionDefaults() * * @throws \InvalidArgumentException When option given does not exist */ - protected function shortcutToName($shortcut) + private function shortcutToName($shortcut) { if (!isset($this->shortcuts[$shortcut])) { throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); diff --git a/src/lib/Symfony/Component/Console/Input/InputInterface.php b/src/lib/Symfony/Component/Console/Input/InputInterface.php index a0f1aa0dc9..99deecbb1f 100644 --- a/src/lib/Symfony/Component/Console/Input/InputInterface.php +++ b/src/lib/Symfony/Component/Console/Input/InputInterface.php @@ -1,20 +1,20 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * InputInterface is the interface implemented by all input classes. * - * @author Fabien Potencier + * @author Fabien Potencier */ interface InputInterface { @@ -31,11 +31,24 @@ function getFirstArgument(); * This method is to be used to introspect the input parameters * before it has been validated. It must be used carefully. * - * @param string $value The value to look for in the raw parameters + * @param string|array $values The values to look for in the raw parameters (can be an array) * * @return Boolean true if the value is contained in the raw parameters */ - function hasParameterOption($value); + function hasParameterOption($values); + + /** + * Returns the value of a raw option (not parsed). + * + * This method is to be used to introspect the input parameters + * before it has been validated. It must be used carefully. + * + * @param string|array $values The value(s) to look for in the raw parameters (can be an array) + * @param mixed $default The default value to return if no result is found + * + * @return mixed The option value + */ + function getParameterOption($values, $default = false); /** * Binds the current Input instance with the given arguments and options. @@ -44,13 +57,47 @@ function hasParameterOption($value); */ function bind(InputDefinition $definition); + /** + * Validate if arguments given are correct. + * + * Throws an exception when not enough arguments are given. + * + * @throws \RuntimeException + */ function validate(); + /** + * Returns all the given arguments merged with the default values. + * + * @return array + */ function getArguments(); + /** + * Get argument by name. + * + * @param string $name The name of the argument + * @return mixed + */ function getArgument($name); + /** + * @return array + */ function getOptions(); + /** + * Get an option by name. + * + * @param string $name The name of the option + * @return mixed + */ function getOption($name); + + /** + * Is this input means interactive? + * + * @return Boolean + */ + function isInteractive(); } diff --git a/src/lib/Symfony/Component/Console/Input/InputOption.php b/src/lib/Symfony/Component/Console/Input/InputOption.php index 3b22bbe1e5..cb875b04f5 100644 --- a/src/lib/Symfony/Component/Console/Input/InputOption.php +++ b/src/lib/Symfony/Component/Console/Input/InputOption.php @@ -1,20 +1,22 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * Represents a command line option. * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class InputOption { @@ -23,11 +25,11 @@ class InputOption const VALUE_OPTIONAL = 4; const VALUE_IS_ARRAY = 8; - protected $name; - protected $shortcut; - protected $mode; - protected $default; - protected $description; + private $name; + private $shortcut; + private $mode; + private $default; + private $description; /** * Constructor. @@ -39,6 +41,8 @@ class InputOption * @param mixed $default The default value (must be null for self::VALUE_REQUIRED or self::VALUE_NONE) * * @throws \InvalidArgumentException If option mode is invalid or incompatible + * + * @api */ public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null) { diff --git a/src/lib/Symfony/Component/Console/Input/StringInput.php b/src/lib/Symfony/Component/Console/Input/StringInput.php index bc8cc2cb52..28d27018ce 100644 --- a/src/lib/Symfony/Component/Console/Input/StringInput.php +++ b/src/lib/Symfony/Component/Console/Input/StringInput.php @@ -1,16 +1,16 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Input; + /** * StringInput represents an input provided as a string. * @@ -18,7 +18,9 @@ * * $input = new StringInput('foo --bar="foobar"'); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class StringInput extends ArgvInput { @@ -30,18 +32,23 @@ class StringInput extends ArgvInput * * @param string $input An array of parameters from the CLI (in the argv format) * @param InputDefinition $definition A InputDefinition instance + * + * @api */ public function __construct($input, InputDefinition $definition = null) { parent::__construct(array(), $definition); - $this->tokens = $this->tokenize($input); + $this->setTokens($this->tokenize($input)); } /** + * Tokenizes a string. + * + * @param string $input The input to tokenize * @throws \InvalidArgumentException When unable to parse input (should never happen) */ - protected function tokenize($input) + private function tokenize($input) { $input = preg_replace('/(\r\n|\r|\n|\t)/', ' ', $input); diff --git a/src/lib/Symfony/Component/Console/LICENSE b/src/lib/Symfony/Component/Console/LICENSE new file mode 100644 index 0000000000..89df4481b9 --- /dev/null +++ b/src/lib/Symfony/Component/Console/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2011 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/lib/Symfony/Component/Console/Output/ConsoleOutput.php b/src/lib/Symfony/Component/Console/Output/ConsoleOutput.php index 9aa4791268..ccf7901d6e 100644 --- a/src/lib/Symfony/Component/Console/Output/ConsoleOutput.php +++ b/src/lib/Symfony/Component/Console/Output/ConsoleOutput.php @@ -1,16 +1,18 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatter; + /** * ConsoleOutput is the default class for all CLI output. It uses STDOUT. * @@ -22,18 +24,24 @@ * * $output = new StreamOutput(fopen('php://stdout', 'w')); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class ConsoleOutput extends StreamOutput { /** * Constructor. * - * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) - * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, + * self::VERBOSITY_VERBOSE) + * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + * @param OutputFormatter $formatter Output formatter instance + * + * @api */ - public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null) + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null) { - parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated); + parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated, $formatter); } } diff --git a/src/lib/Symfony/Component/Console/Output/NullOutput.php b/src/lib/Symfony/Component/Console/Output/NullOutput.php index 695ca0eabd..f6c99ab031 100644 --- a/src/lib/Symfony/Component/Console/Output/NullOutput.php +++ b/src/lib/Symfony/Component/Console/Output/NullOutput.php @@ -1,22 +1,24 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Output; + /** * NullOutput suppresses all output. * * $output = new NullOutput(); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class NullOutput extends Output { diff --git a/src/lib/Symfony/Component/Console/Output/Output.php b/src/lib/Symfony/Component/Console/Output/Output.php index f4542f456b..f35850399a 100644 --- a/src/lib/Symfony/Component/Console/Output/Output.php +++ b/src/lib/Symfony/Component/Console/Output/Output.php @@ -1,16 +1,19 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; +use Symfony\Component\Console\Formatter\OutputFormatter; + /** * Base class for output classes. * @@ -20,78 +23,89 @@ * * verbose: -v (more output - debug) * * quiet: -q (no output) * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ abstract class Output implements OutputInterface { - const VERBOSITY_QUIET = 0; - const VERBOSITY_NORMAL = 1; - const VERBOSITY_VERBOSE = 2; - - const OUTPUT_NORMAL = 0; - const OUTPUT_RAW = 1; - const OUTPUT_PLAIN = 2; - - protected $verbosity; - protected $decorated; - - static protected $styles = array( - 'error' => array('bg' => 'red', 'fg' => 'white'), - 'info' => array('fg' => 'green'), - 'comment' => array('fg' => 'yellow'), - 'question' => array('bg' => 'cyan', 'fg' => 'black'), - ); - static protected $options = array('bold' => 1, 'underscore' => 4, 'blink' => 5, 'reverse' => 7, 'conceal' => 8); - static protected $foreground = array('black' => 30, 'red' => 31, 'green' => 32, 'yellow' => 33, 'blue' => 34, 'magenta' => 35, 'cyan' => 36, 'white' => 37); - static protected $background = array('black' => 40, 'red' => 41, 'green' => 42, 'yellow' => 43, 'blue' => 44, 'magenta' => 45, 'cyan' => 46, 'white' => 47); + private $verbosity; + private $formatter; /** * Constructor. * - * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) - * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) + * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + * @param OutputFormatterInterface $formatter Output formatter instance + * + * @api */ - public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null) + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) { - $this->decorated = (Boolean) $decorated; + if (null === $formatter) { + $formatter = new OutputFormatter(); + } + $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity; + $this->formatter = $formatter; + $this->formatter->setDecorated((Boolean) $decorated); } /** - * Sets a new style. + * Sets output formatter. + * + * @param OutputFormatterInterface $formatter * - * @param string $name The style name - * @param array $options An array of options + * @api */ - static public function setStyle($name, $options = array()) + public function setFormatter(OutputFormatterInterface $formatter) { - static::$styles[strtolower($name)] = $options; + $this->formatter = $formatter; + } + + /** + * Returns current output formatter instance. + * + * @return OutputFormatterInterface + * + * @api + */ + public function getFormatter() + { + return $this->formatter; } /** * Sets the decorated flag. * * @param Boolean $decorated Whether to decorated the messages or not + * + * @api */ public function setDecorated($decorated) { - $this->decorated = (Boolean) $decorated; + $this->formatter->setDecorated((Boolean) $decorated); } /** * Gets the decorated flag. * * @return Boolean true if the output will decorate messages, false otherwise + * + * @api */ public function isDecorated() { - return $this->decorated; + return $this->formatter->isDecorated(); } /** * Sets the verbosity of the output. * * @param integer $level The level of verbosity + * + * @api */ public function setVerbosity($level) { @@ -102,6 +116,8 @@ public function setVerbosity($level) * Gets the current verbosity of the output. * * @return integer The current level of verbosity + * + * @api */ public function getVerbosity() { @@ -113,6 +129,8 @@ public function getVerbosity() * * @param string|array $messages The message as an array of lines of a single string * @param integer $type The type of output + * + * @api */ public function writeln($messages, $type = 0) { @@ -127,6 +145,8 @@ public function writeln($messages, $type = 0) * @param integer $type The type of output * * @throws \InvalidArgumentException When unknown output type is given + * + * @api */ public function write($messages, $newline = false, $type = 0) { @@ -134,19 +154,17 @@ public function write($messages, $newline = false, $type = 0) return; } - if (!is_array($messages)) { - $messages = array($messages); - } + $messages = (array) $messages; foreach ($messages as $message) { switch ($type) { - case Output::OUTPUT_NORMAL: - $message = $this->format($message); + case OutputInterface::OUTPUT_NORMAL: + $message = $this->formatter->format($message); break; - case Output::OUTPUT_RAW: + case OutputInterface::OUTPUT_RAW: break; - case Output::OUTPUT_PLAIN: - $message = strip_tags($this->format($message)); + case OutputInterface::OUTPUT_PLAIN: + $message = strip_tags($this->formatter->format($message)); break; default: throw new \InvalidArgumentException(sprintf('Unknown output type given (%s)', $type)); @@ -163,69 +181,4 @@ public function write($messages, $newline = false, $type = 0) * @param Boolean $newline Whether to add a newline or not */ abstract public function doWrite($message, $newline); - - /** - * Formats a message according to the given styles. - * - * @param string $message The message to style - * - * @return string The styled message - */ - protected function format($message) - { - $message = preg_replace_callback('#<([a-z][a-z0-9\-_=;]+)>#i', array($this, 'replaceStartStyle'), $message); - - return preg_replace_callback('##i', array($this, 'replaceEndStyle'), $message); - } - - /** - * @throws \InvalidArgumentException When style is unknown - */ - protected function replaceStartStyle($match) - { - if (!$this->decorated) { - return ''; - } - - if (isset(static::$styles[strtolower($match[1])])) { - $parameters = static::$styles[strtolower($match[1])]; - } else { - // bg=blue;fg=red - if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($match[1]), $matches, PREG_SET_ORDER)) { - throw new \InvalidArgumentException(sprintf('Unknown style "%s".', $match[1])); - } - - $parameters = array(); - foreach ($matches as $match) { - $parameters[$match[1]] = $match[2]; - } - } - - $codes = array(); - - if (isset($parameters['fg'])) { - $codes[] = static::$foreground[$parameters['fg']]; - } - - if (isset($parameters['bg'])) { - $codes[] = static::$background[$parameters['bg']]; - } - - foreach (static::$options as $option => $value) { - if (isset($parameters[$option]) && $parameters[$option]) { - $codes[] = $value; - } - } - - return "\033[".implode(';', $codes).'m'; - } - - protected function replaceEndStyle($match) - { - if (!$this->decorated) { - return ''; - } - - return "\033[0m"; - } } diff --git a/src/lib/Symfony/Component/Console/Output/OutputInterface.php b/src/lib/Symfony/Component/Console/Output/OutputInterface.php index 289f4b428e..88851179aa 100644 --- a/src/lib/Symfony/Component/Console/Output/OutputInterface.php +++ b/src/lib/Symfony/Component/Console/Output/OutputInterface.php @@ -1,23 +1,35 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + /** * OutputInterface is the interface implemented by all Output classes. * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ interface OutputInterface { + const VERBOSITY_QUIET = 0; + const VERBOSITY_NORMAL = 1; + const VERBOSITY_VERBOSE = 2; + + const OUTPUT_NORMAL = 0; + const OUTPUT_RAW = 1; + const OUTPUT_PLAIN = 2; + /** * Writes a message to the output. * @@ -26,20 +38,70 @@ interface OutputInterface * @param integer $type The type of output * * @throws \InvalidArgumentException When unknown output type is given + * + * @api */ function write($messages, $newline = false, $type = 0); + /** + * Writes a message to the output and adds a newline at the end. + * + * @param string|array $messages The message as an array of lines of a single string + * @param integer $type The type of output + * + * @api + */ + function writeln($messages, $type = 0); + /** * Sets the verbosity of the output. * * @param integer $level The level of verbosity + * + * @api */ function setVerbosity($level); + /** + * Gets the current verbosity of the output. + * + * @return integer The current level of verbosity + */ + function getVerbosity(); + /** * Sets the decorated flag. * * @param Boolean $decorated Whether to decorated the messages or not + * + * @api */ function setDecorated($decorated); + + /** + * Gets the decorated flag. + * + * @return Boolean true if the output will decorate messages, false otherwise + * + * @api + */ + function isDecorated(); + + /** + * Sets output formatter. + * + * @param OutputFormatterInterface $formatter + * + * @api + */ + function setFormatter(OutputFormatterInterface $formatter); + + /** + * Returns current output formatter instance. + * + * @return OutputFormatterInterface + * + * @api + */ + function getFormatter(); } diff --git a/src/lib/Symfony/Component/Console/Output/StreamOutput.php b/src/lib/Symfony/Component/Console/Output/StreamOutput.php index 55805c7296..fa3214cd72 100644 --- a/src/lib/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/lib/Symfony/Component/Console/Output/StreamOutput.php @@ -1,16 +1,18 @@ + * (c) Fabien Potencier * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ +namespace Symfony\Component\Console\Output; + +use Symfony\Component\Console\Formatter\OutputFormatter; + /** * StreamOutput writes the output to a given stream. * @@ -22,22 +24,28 @@ * * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); * - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class StreamOutput extends Output { - protected $stream; + private $stream; /** * Constructor. * - * @param mixed $stream A stream resource - * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) - * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + * @param mixed $stream A stream resource + * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, + * self::VERBOSITY_VERBOSE) + * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + * @param OutputFormatter $formatter Output formatter instance * * @throws \InvalidArgumentException When first argument is not a real stream + * + * @api */ - public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null) + public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatter $formatter = null) { if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); @@ -49,7 +57,7 @@ public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decor $decorated = $this->hasColorSupport($decorated); } - parent::__construct($verbosity, $decorated); + parent::__construct($verbosity, $decorated, $formatter); } /** @@ -79,7 +87,7 @@ public function doWrite($message, $newline) // @codeCoverageIgnoreEnd } - flush(); + fflush($this->stream); } /** @@ -97,9 +105,9 @@ protected function hasColorSupport() // @codeCoverageIgnoreStart if (DIRECTORY_SEPARATOR == '\\') { return false !== getenv('ANSICON'); - } else { - return function_exists('posix_isatty') && @posix_isatty($this->stream); } + + return function_exists('posix_isatty') && @posix_isatty($this->stream); // @codeCoverageIgnoreEnd } } diff --git a/src/lib/Symfony/Component/Console/Shell.php b/src/lib/Symfony/Component/Console/Shell.php index 38b2fbbfe2..dd6bfa0d54 100644 --- a/src/lib/Symfony/Component/Console/Shell.php +++ b/src/lib/Symfony/Component/Console/Shell.php @@ -1,33 +1,33 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console; use Symfony\Component\Console\Application; use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\ConsoleOutput; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** * A Shell wraps an Application to add shell capabilities to it. * * This class only works with a PHP compiled with readline support * (either --with-readline or --with-libedit) * - * @author Fabien Potencier + * @author Fabien Potencier */ class Shell { - protected $application; - protected $history; - protected $output; + private $application; + private $history; + private $output; /** * Constructor. @@ -86,7 +86,7 @@ public function run() * @param string $text The last segment of the entered text * @param integer $position The current position */ - protected function autocompleter($text, $position) + private function autocompleter($text, $position) { $info = readline_info(); $text = substr($info['line_buffer'], 0, $info['end']); @@ -102,7 +102,7 @@ protected function autocompleter($text, $position) // options and arguments? try { - $command = $this->application->findCommand(substr($text, 0, strpos($text, ' '))); + $command = $this->application->find(substr($text, 0, strpos($text, ' '))); } catch (\Exception $e) { return true; } diff --git a/src/lib/Symfony/Component/Console/Tester/ApplicationTester.php b/src/lib/Symfony/Component/Console/Tester/ApplicationTester.php index b7092470b2..e3093cade2 100644 --- a/src/lib/Symfony/Component/Console/Tester/ApplicationTester.php +++ b/src/lib/Symfony/Component/Console/Tester/ApplicationTester.php @@ -1,34 +1,33 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console\Tester; use Symfony\Component\Console\Application; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\StreamOutput; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** - * @author Fabien Potencier + * @author Fabien Potencier */ class ApplicationTester { - protected $application; - protected $display; - protected $input; - protected $output; + private $application; + private $input; + private $output; /** * Constructor. * - * @param Application $application A Application instance to test. + * @param Application $application An Application instance to test. */ public function __construct(Application $application) { @@ -46,6 +45,8 @@ public function __construct(Application $application) * * @param array $input An array of arguments and options * @param array $options An array of options + * + * @return integer The command exit code */ public function run(array $input, $options = array()) { @@ -62,11 +63,7 @@ public function run(array $input, $options = array()) $this->output->setVerbosity($options['verbosity']); } - $ret = $this->application->run($this->input, $this->output); - - rewind($this->output->getStream()); - - return $this->display = stream_get_contents($this->output->getStream()); + return $this->application->run($this->input, $this->output); } /** @@ -76,7 +73,9 @@ public function run(array $input, $options = array()) */ public function getDisplay() { - return $this->display; + rewind($this->output->getStream()); + + return stream_get_contents($this->output->getStream()); } /** diff --git a/src/lib/Symfony/Component/Console/Tester/CommandTester.php b/src/lib/Symfony/Component/Console/Tester/CommandTester.php index 8c971c0c08..52be2781f6 100644 --- a/src/lib/Symfony/Component/Console/Tester/CommandTester.php +++ b/src/lib/Symfony/Component/Console/Tester/CommandTester.php @@ -1,29 +1,28 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Console\Tester; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\StreamOutput; -/* - * This file is part of the Symfony framework. - * - * (c) Fabien Potencier - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - /** - * @author Fabien Potencier + * @author Fabien Potencier */ class CommandTester { - protected $command; - protected $display; - protected $input; - protected $output; + private $command; + private $input; + private $output; /** * Constructor. @@ -46,6 +45,8 @@ public function __construct(Command $command) * * @param array $input An array of arguments and options * @param array $options An array of options + * + * @return integer The command exit code */ public function execute(array $input, array $options = array()) { @@ -62,11 +63,7 @@ public function execute(array $input, array $options = array()) $this->output->setVerbosity($options['verbosity']); } - $ret = $this->command->run($this->input, $this->output); - - rewind($this->output->getStream()); - - return $this->display = stream_get_contents($this->output->getStream()); + return $this->command->run($this->input, $this->output); } /** @@ -76,7 +73,9 @@ public function execute(array $input, array $options = array()) */ public function getDisplay() { - return $this->display; + rewind($this->output->getStream()); + + return stream_get_contents($this->output->getStream()); } /** diff --git a/src/lib/Symfony/Component/Yaml/Dumper.php b/src/lib/Symfony/Component/Yaml/Dumper.php index 4a29d8b6cf..9f2fb58f00 100644 --- a/src/lib/Symfony/Component/Yaml/Dumper.php +++ b/src/lib/Symfony/Component/Yaml/Dumper.php @@ -1,59 +1,54 @@ + * This file is part of the Symfony package. + * + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Symfony\Component\Yaml; + /** * Dumper dumps PHP variables to YAML strings. * - * @package symfony - * @subpackage yaml - * @author Fabien Potencier + * @author Fabien Potencier */ class Dumper { - /** - * Dumps a PHP value to YAML. - * - * @param mixed $input The PHP value - * @param integer $inline The level where you switch to inline YAML - * @param integer $indent The level o indentation indentation (used internally) - * - * @return string The YAML representation of the PHP value - */ - public function dump($input, $inline = 0, $indent = 0) - { - $output = ''; - $prefix = $indent ? str_repeat(' ', $indent) : ''; - - if ($inline <= 0 || !is_array($input) || empty($input)) + /** + * Dumps a PHP value to YAML. + * + * @param mixed $input The PHP value + * @param integer $inline The level where you switch to inline YAML + * @param integer $indent The level of indentation (used internally) + * + * @return string The YAML representation of the PHP value + */ + public function dump($input, $inline = 0, $indent = 0) { - $output .= $prefix.Inline::dump($input); - } - else - { - $isAHash = array_keys($input) !== range(0, count($input) - 1); + $output = ''; + $prefix = $indent ? str_repeat(' ', $indent) : ''; - foreach ($input as $key => $value) - { - $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); + if ($inline <= 0 || !is_array($input) || empty($input)) { + $output .= $prefix.Inline::dump($input); + } else { + $isAHash = array_keys($input) !== range(0, count($input) - 1); - $output .= sprintf('%s%s%s%s', - $prefix, - $isAHash ? Inline::dump($key).':' : '-', - $willBeInlined ? ' ' : "\n", - $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + 2) - ).($willBeInlined ? "\n" : ''); - } - } + foreach ($input as $key => $value) { + $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); - return $output; - } + $output .= sprintf('%s%s%s%s', + $prefix, + $isAHash ? Inline::dump($key).':' : '-', + $willBeInlined ? ' ' : "\n", + $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + 2) + ).($willBeInlined ? "\n" : ''); + } + } + + return $output; + } } diff --git a/src/lib/Symfony/Component/Yaml/Escaper.php b/src/lib/Symfony/Component/Yaml/Escaper.php new file mode 100644 index 0000000000..81a7d5fe1b --- /dev/null +++ b/src/lib/Symfony/Component/Yaml/Escaper.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml; + +/** + * Escaper encapsulates escaping rules for single and double-quoted + * YAML strings. + * + * @author Matthew Lewinski + */ +class Escaper +{ + // Characters that would cause a dumped string to require double quoting. + const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; + + // Mapping arrays for escaping a double quoted string. The backslash is + // first to ensure proper escaping because str_replace operates iteratively + // on the input arrays. This ordering of the characters avoids the use of strtr, + // which performs more slowly. + static private $escapees = 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", + "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"); + static private $escaped = array('\\"', '\\\\', + "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", + "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", + "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", + "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", + "\\N", "\\_", "\\L", "\\P"); + + /** + * Determines if a PHP value would require double quoting in YAML. + * + * @param string $value A PHP value + * + * @return Boolean True if the value would require double quotes. + */ + static public function requiresDoubleQuoting($value) + { + return preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); + } + + /** + * Escapes and surrounds a PHP value with double quotes. + * + * @param string $value A PHP value + * + * @return string The quoted, escaped string + */ + static public function escapeWithDoubleQuotes($value) + { + return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value)); + } + + /** + * Determines if a PHP value would require single quoting in YAML. + * + * @param string $value A PHP value + * + * @return Boolean True if the value would require single quotes. + */ + static public function requiresSingleQuoting($value) + { + return preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ - ? | < > = ! % @ ` ]/x', $value); + } + + /** + * Escapes and surrounds a PHP value with single quotes. + * + * @param string $value A PHP value + * + * @return string The quoted, escaped string + */ + static public function escapeWithSingleQuotes($value) + { + return sprintf("'%s'", str_replace('\'', '\'\'', $value)); + } +} diff --git a/src/lib/Symfony/Component/Yaml/Exception.php b/src/lib/Symfony/Component/Yaml/Exception.php deleted file mode 100644 index c116c91a8e..0000000000 --- a/src/lib/Symfony/Component/Yaml/Exception.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exception class used by all exceptions thrown by the component. - * - * @package symfony - * @subpackage yaml - * @author Fabien Potencier - */ -class Exception extends \Exception -{ -} diff --git a/src/lib/Symfony/Component/Yaml/Exception/DumpException.php b/src/lib/Symfony/Component/Yaml/Exception/DumpException.php new file mode 100644 index 0000000000..53952ce1ad --- /dev/null +++ b/src/lib/Symfony/Component/Yaml/Exception/DumpException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during dumping. + * + * @author Fabien Potencier + * + * @api + */ +class DumpException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/src/lib/Symfony/Component/Yaml/Exception/ExceptionInterface.php b/src/lib/Symfony/Component/Yaml/Exception/ExceptionInterface.php new file mode 100644 index 0000000000..92e5c2ea4e --- /dev/null +++ b/src/lib/Symfony/Component/Yaml/Exception/ExceptionInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception interface for all exceptions thrown by the component. + * + * @author Fabien Potencier + * + * @api + */ +interface ExceptionInterface +{ +} diff --git a/src/lib/Symfony/Component/Yaml/Exception/ParseException.php b/src/lib/Symfony/Component/Yaml/Exception/ParseException.php new file mode 100644 index 0000000000..8e935bc8a9 --- /dev/null +++ b/src/lib/Symfony/Component/Yaml/Exception/ParseException.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during parsing. + * + * @author Fabien Potencier + * + * @api + */ +class ParseException extends \RuntimeException implements ExceptionInterface +{ + private $parsedFile; + private $parsedLine; + private $snippet; + private $rawMessage; + + /** + * Constructor. + * + * @param string $message The error message + * @param integer $lineno The line where the error occurred + * @param integer $snippet The snippet of code near the problem + * @param string $filename The file name where the error occurred + * @param Exception $previous The previous exception + */ + public function __construct($message, $parsedLine = -1, $snippet = null, $parsedFile = null, Exception $previous = null) + { + $this->parsedFile = $parsedFile; + $this->parsedLine = $parsedLine; + $this->snippet = $snippet; + $this->rawMessage = $message; + + $this->updateRepr(); + + parent::__construct($this->message, 0, $previous); + } + + /** + * Gets the snippet of code near the error. + * + * @return string The snippet of code + */ + public function getSnippet() + { + return $this->snippet; + } + + /** + * Sets the snippet of code near the error. + * + * @param string $parsedFile The filename + */ + public function setSnippet($snippet) + { + $this->snippet = $snippet; + + $this->updateRepr(); + } + + /** + * Gets the filename where the error occurred. + * + * This method returns null if a string is parsed. + * + * @return string The filename + */ + public function getParsedFile() + { + return $this->parsedFile; + } + + /** + * Sets the filename where the error occurred. + * + * @param string $parsedFile The filename + */ + public function setParsedFile($parsedFile) + { + $this->parsedFile = $parsedFile; + + $this->updateRepr(); + } + + /** + * Gets the line where the error occurred. + * + * @return integer The file line + */ + public function getParsedLine() + { + return $this->parsedLine; + } + + /** + * Sets the line where the error occurred. + * + * @param integer $parsedLine The file line + */ + public function setParsedLine($parsedLine) + { + $this->parsedLine = $parsedLine; + + $this->updateRepr(); + } + + private function updateRepr() + { + $this->message = $this->rawMessage; + + $dot = false; + if ('.' === substr($this->message, -1)) { + $this->message = substr($this->message, 0, -1); + $dot = true; + } + + if (null !== $this->parsedFile) { + $this->message .= sprintf(' in %s', json_encode($this->parsedFile)); + } + + if ($this->parsedLine >= 0) { + $this->message .= sprintf(' at line %d', $this->parsedLine); + } + + if ($this->snippet) { + $this->message .= sprintf(' (near "%s")', $this->snippet); + } + + if ($dot) { + $this->message .= '.'; + } + } +} diff --git a/src/lib/Symfony/Component/Yaml/Inline.php b/src/lib/Symfony/Component/Yaml/Inline.php index 9159d00c5f..045a5eb747 100644 --- a/src/lib/Symfony/Component/Yaml/Inline.php +++ b/src/lib/Symfony/Component/Yaml/Inline.php @@ -1,410 +1,396 @@ + * This file is part of the Symfony package. + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Exception\DumpException; + /** * Inline implements a YAML parser/dumper for the YAML inline syntax. * - * @package symfony - * @subpackage yaml - * @author Fabien Potencier + * @author Fabien Potencier */ class Inline { - const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; - - /** - * Convert a YAML string to a PHP array. - * - * @param string $value A YAML string - * - * @return array A PHP array representing the YAML string - */ - static public function load($value) - { - $value = trim($value); - - if (0 == strlen($value)) + const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; + + /** + * Converts a YAML string to a PHP array. + * + * @param string $value A YAML string + * + * @return array A PHP array representing the YAML string + */ + static public function parse($value) { - return ''; - } + $value = trim($value); - switch ($value[0]) - { - case '[': - return self::parseSequence($value); - case '{': - return self::parseMapping($value); - default: - return self::parseScalar($value); - } - } - - /** - * Dumps a given PHP variable to a YAML string. - * - * @param mixed $value The PHP variable to convert - * - * @return string The YAML string representing the PHP array - */ - static public function dump($value) - { - $trueValues = '1.1' == Yaml::getSpecVersion() ? array('true', 'on', '+', 'yes', 'y') : array('true'); - $falseValues = '1.1' == Yaml::getSpecVersion() ? array('false', 'off', '-', 'no', 'n') : array('false'); - - switch (true) - { - case is_resource($value): - throw new Exception('Unable to dump PHP resources in a YAML file.'); - case is_object($value): - return '!!php/object:'.serialize($value); - case is_array($value): - return self::dumpArray($value); - case null === $value: - return 'null'; - case true === $value: - return 'true'; - case false === $value: - return 'false'; - case ctype_digit($value): - return is_string($value) ? "'$value'" : (int) $value; - case is_numeric($value): - return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value); - case false !== strpos($value, "\n") || false !== strpos($value, "\r"): - return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value)); - case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ - ? | < > = ! % @ ` ]/x', $value): - return sprintf("'%s'", str_replace('\'', '\'\'', $value)); - case '' == $value: - return "''"; - case preg_match(self::getTimestampRegex(), $value): - return "'$value'"; - case in_array(strtolower($value), $trueValues): - return "'$value'"; - case in_array(strtolower($value), $falseValues): - return "'$value'"; - case in_array(strtolower($value), array('null', '~')): - return "'$value'"; - default: - return $value; - } - } - - /** - * Dumps a PHP array to a YAML string. - * - * @param array $value The PHP array to dump - * - * @return string The YAML string representing the PHP array - */ - static protected function dumpArray($value) - { - // array - $keys = array_keys($value); - if ( - (1 == count($keys) && '0' == $keys[0]) - || - (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2)) - { - $output = array(); - foreach ($value as $val) - { - $output[] = self::dump($val); - } + if (0 == strlen($value)) { + return ''; + } - return sprintf('[%s]', implode(', ', $output)); - } + if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { + $mbEncoding = mb_internal_encoding(); + mb_internal_encoding('ASCII'); + } - // mapping - $output = array(); - foreach ($value as $key => $val) - { - $output[] = sprintf('%s: %s', self::dump($key), self::dump($val)); - } + switch ($value[0]) { + case '[': + $result = self::parseSequence($value); + break; + case '{': + $result = self::parseMapping($value); + break; + default: + $result = self::parseScalar($value); + } - return sprintf('{ %s }', implode(', ', $output)); - } - - /** - * Parses a scalar to a YAML string. - * - * @param scalar $scalar - * @param string $delimiters - * @param array $stringDelimiter - * @param integer $i - * @param boolean $evaluate - * - * @return string A YAML string - */ - static public function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) - { - if (in_array($scalar[$i], $stringDelimiters)) - { - // quoted scalar - $output = self::parseQuotedScalar($scalar, $i); + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); + } + + return $result; } - else + + /** + * Dumps a given PHP variable to a YAML string. + * + * @param mixed $value The PHP variable to convert + * + * @return string The YAML string representing the PHP array + * + * @throws DumpException When trying to dump PHP resource + */ + static public function dump($value) { - // "normal" string - if (!$delimiters) - { - $output = substr($scalar, $i); - $i += strlen($output); - - // remove comments - if (false !== $strpos = strpos($output, ' #')) - { - $output = rtrim(substr($output, 0, $strpos)); + switch (true) { + case is_resource($value): + throw new DumpException('Unable to dump PHP resources in a YAML file.'); + case is_object($value): + return '!!php/object:'.serialize($value); + case is_array($value): + return self::dumpArray($value); + case null === $value: + return 'null'; + case true === $value: + return 'true'; + case false === $value: + return 'false'; + case ctype_digit($value): + return is_string($value) ? "'$value'" : (int) $value; + case is_numeric($value): + return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value); + case Escaper::requiresDoubleQuoting($value): + return Escaper::escapeWithDoubleQuotes($value); + case Escaper::requiresSingleQuoting($value): + return Escaper::escapeWithSingleQuotes($value); + case '' == $value: + return "''"; + case preg_match(self::getTimestampRegex(), $value): + case in_array(strtolower($value), array('null', '~', 'true', 'false')): + return "'$value'"; + default: + return $value; } - } - else if (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) - { - $output = $match[1]; - $i += strlen($output); - } - else - { - throw new ParserException(sprintf('Malformed inline YAML string (%s).', $scalar)); - } - - $output = $evaluate ? self::evaluateScalar($output) : $output; } - return $output; - } - - /** - * Parses a quoted scalar to YAML. - * - * @param string $scalar - * @param integer $i - * - * @return string A YAML string - */ - static protected function parseQuotedScalar($scalar, &$i) - { - if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/A', substr($scalar, $i), $match)) + /** + * Dumps a PHP array to a YAML string. + * + * @param array $value The PHP array to dump + * + * @return string The YAML string representing the PHP array + */ + static private function dumpArray($value) { - throw new ParserException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i))); - } + // array + $keys = array_keys($value); + if ((1 == count($keys) && '0' == $keys[0]) + || (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2) + ) { + $output = array(); + foreach ($value as $val) { + $output[] = self::dump($val); + } - $output = substr($match[0], 1, strlen($match[0]) - 2); + return sprintf('[%s]', implode(', ', $output)); + } - if ('"' == $scalar[$i]) - { - // evaluate the string - $output = str_replace(array('\\"', '\\n', '\\r'), array('"', "\n", "\r"), $output); - } - else - { - // unescape ' - $output = str_replace('\'\'', '\'', $output); + // mapping + $output = array(); + foreach ($value as $key => $val) { + $output[] = sprintf('%s: %s', self::dump($key), self::dump($val)); + } + + return sprintf('{ %s }', implode(', ', $output)); } - $i += strlen($match[0]); - - return $output; - } - - /** - * Parses a sequence to a YAML string. - * - * @param string $sequence - * @param integer $i - * - * @return string A YAML string - */ - static protected function parseSequence($sequence, &$i = 0) - { - $output = array(); - $len = strlen($sequence); - $i += 1; - - // [foo, bar, ...] - while ($i < $len) + /** + * Parses a scalar to a YAML string. + * + * @param scalar $scalar + * @param string $delimiters + * @param array $stringDelimiters + * @param integer &$i + * @param Boolean $evaluate + * + * @return string A YAML string + * + * @throws ParseException When malformed inline YAML string is parsed + */ + static public function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) { - switch ($sequence[$i]) - { - case '[': - // nested sequence - $output[] = self::parseSequence($sequence, $i); - break; - case '{': - // nested mapping - $output[] = self::parseMapping($sequence, $i); - break; - case ']': - return $output; - case ',': - case ' ': - break; - default: - $isQuoted = in_array($sequence[$i], array('"', "'")); - $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i); - - if (!$isQuoted && false !== strpos($value, ': ')) - { - // embedded mapping? - try - { - $value = self::parseMapping('{'.$value.'}'); + if (in_array($scalar[$i], $stringDelimiters)) { + // quoted scalar + $output = self::parseQuotedScalar($scalar, $i); + } else { + // "normal" string + if (!$delimiters) { + $output = substr($scalar, $i); + $i += strlen($output); + + // remove comments + if (false !== $strpos = strpos($output, ' #')) { + $output = rtrim(substr($output, 0, $strpos)); + } + } else if (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) { + $output = $match[1]; + $i += strlen($output); + } else { + throw new ParseException(sprintf('Malformed inline YAML string (%s).', $scalar)); } - catch (\InvalidArgumentException $e) - { - // no, it's not - } - } - - $output[] = $value; - --$i; - } + $output = $evaluate ? self::evaluateScalar($output) : $output; + } - ++$i; + return $output; } - throw new ParserException(sprintf('Malformed inline YAML string %s', $sequence)); - } - - /** - * Parses a mapping to a YAML string. - * - * @param string $mapping - * @param integer $i - * - * @return string A YAML string - */ - static protected function parseMapping($mapping, &$i = 0) - { - $output = array(); - $len = strlen($mapping); - $i += 1; - - // {foo: bar, bar:foo, ...} - while ($i < $len) + /** + * Parses a quoted scalar to YAML. + * + * @param string $scalar + * @param integer $i + * + * @return string A YAML string + * + * @throws ParseException When malformed inline YAML string is parsed + */ + static private function parseQuotedScalar($scalar, &$i) { - switch ($mapping[$i]) - { - case ' ': - case ',': - ++$i; - continue 2; - case '}': - return $output; - } - - // key - $key = self::parseScalar($mapping, array(':', ' '), array('"', "'"), $i, false); - - // value - $done = false; - while ($i < $len) - { - switch ($mapping[$i]) - { - case '[': - // nested sequence - $output[$key] = self::parseSequence($mapping, $i); - $done = true; - break; - case '{': - // nested mapping - $output[$key] = self::parseMapping($mapping, $i); - $done = true; - break; - case ':': - case ' ': - break; - default: - $output[$key] = self::parseScalar($mapping, array(',', '}'), array('"', "'"), $i); - $done = true; - --$i; + if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { + throw new ParseException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i))); } - ++$i; + $output = substr($match[0], 1, strlen($match[0]) - 2); - if ($done) - { - continue 2; + $unescaper = new Unescaper(); + if ('"' == $scalar[$i]) { + $output = $unescaper->unescapeDoubleQuotedString($output); + } else { + $output = $unescaper->unescapeSingleQuotedString($output); } - } + + $i += strlen($match[0]); + + return $output; } - throw new ParserException(sprintf('Malformed inline YAML string %s', $mapping)); - } + /** + * Parses a sequence to a YAML string. + * + * @param string $sequence + * @param integer $i + * + * @return string A YAML string + * + * @throws ParseException When malformed inline YAML string is parsed + */ + static private function parseSequence($sequence, &$i = 0) + { + $output = array(); + $len = strlen($sequence); + $i += 1; + + // [foo, bar, ...] + while ($i < $len) { + switch ($sequence[$i]) { + case '[': + // nested sequence + $output[] = self::parseSequence($sequence, $i); + break; + case '{': + // nested mapping + $output[] = self::parseMapping($sequence, $i); + break; + case ']': + return $output; + case ',': + case ' ': + break; + default: + $isQuoted = in_array($sequence[$i], array('"', "'")); + $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i); + + if (!$isQuoted && false !== strpos($value, ': ')) { + // embedded mapping? + try { + $value = self::parseMapping('{'.$value.'}'); + } catch (\InvalidArgumentException $e) { + // no, it's not + } + } + + $output[] = $value; + + --$i; + } - /** - * Evaluates scalars and replaces magic values. - * - * @param string $scalar - * - * @return string A YAML string - */ - static protected function evaluateScalar($scalar) - { - $scalar = trim($scalar); + ++$i; + } - $trueValues = '1.1' == Yaml::getSpecVersion() ? array('true', 'on', '+', 'yes', 'y') : array('true'); - $falseValues = '1.1' == Yaml::getSpecVersion() ? array('false', 'off', '-', 'no', 'n') : array('false'); + throw new ParseException(sprintf('Malformed inline YAML string %s', $sequence)); + } - switch (true) + /** + * Parses a mapping to a YAML string. + * + * @param string $mapping + * @param integer $i + * + * @return string A YAML string + * + * @throws ParseException When malformed inline YAML string is parsed + */ + static private function parseMapping($mapping, &$i = 0) { - case 'null' == strtolower($scalar): - case '' == $scalar: - case '~' == $scalar: - return null; - case 0 === strpos($scalar, '!str'): - return (string) substr($scalar, 5); - case 0 === strpos($scalar, '! '): - return intval(self::parseScalar(substr($scalar, 2))); - case 0 === strpos($scalar, '!!php/object:'): - return unserialize(substr($scalar, 13)); - case ctype_digit($scalar): - $raw = $scalar; - $cast = intval($scalar); - return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); - case in_array(strtolower($scalar), $trueValues): - return true; - case in_array(strtolower($scalar), $falseValues): - return false; - case is_numeric($scalar): - return '0x' == $scalar[0].$scalar[1] ? hexdec($scalar) : floatval($scalar); - case 0 == strcasecmp($scalar, '.inf'): - case 0 == strcasecmp($scalar, '.NaN'): - return -log(0); - case 0 == strcasecmp($scalar, '-.inf'): - return log(0); - case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar): - return floatval(str_replace(',', '', $scalar)); - case preg_match(self::getTimestampRegex(), $scalar): - return strtotime($scalar); - default: - return (string) $scalar; + $output = array(); + $len = strlen($mapping); + $i += 1; + + // {foo: bar, bar:foo, ...} + while ($i < $len) { + switch ($mapping[$i]) { + case ' ': + case ',': + ++$i; + continue 2; + case '}': + return $output; + } + + // key + $key = self::parseScalar($mapping, array(':', ' '), array('"', "'"), $i, false); + + // value + $done = false; + while ($i < $len) { + switch ($mapping[$i]) { + case '[': + // nested sequence + $output[$key] = self::parseSequence($mapping, $i); + $done = true; + break; + case '{': + // nested mapping + $output[$key] = self::parseMapping($mapping, $i); + $done = true; + break; + case ':': + case ' ': + break; + default: + $output[$key] = self::parseScalar($mapping, array(',', '}'), array('"', "'"), $i); + $done = true; + --$i; + } + + ++$i; + + if ($done) { + continue 2; + } + } + } + + throw new ParseException(sprintf('Malformed inline YAML string %s', $mapping)); + } + + /** + * Evaluates scalars and replaces magic values. + * + * @param string $scalar + * + * @return string A YAML string + */ + static private function evaluateScalar($scalar) + { + $scalar = trim($scalar); + + switch (true) { + case 'null' == strtolower($scalar): + case '' == $scalar: + case '~' == $scalar: + return null; + case 0 === strpos($scalar, '!str'): + return (string) substr($scalar, 5); + case 0 === strpos($scalar, '! '): + return intval(self::parseScalar(substr($scalar, 2))); + case 0 === strpos($scalar, '!!php/object:'): + return unserialize(substr($scalar, 13)); + case ctype_digit($scalar): + $raw = $scalar; + $cast = intval($scalar); + + return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); + case 'true' === strtolower($scalar): + return true; + case 'false' === strtolower($scalar): + return false; + case is_numeric($scalar): + return '0x' == $scalar[0].$scalar[1] ? hexdec($scalar) : floatval($scalar); + case 0 == strcasecmp($scalar, '.inf'): + case 0 == strcasecmp($scalar, '.NaN'): + return -log(0); + case 0 == strcasecmp($scalar, '-.inf'): + return log(0); + case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar): + return floatval(str_replace(',', '', $scalar)); + case preg_match(self::getTimestampRegex(), $scalar): + return strtotime($scalar); + default: + return (string) $scalar; + } } - } - - static protected function getTimestampRegex() - { - return <<[0-9][0-9][0-9][0-9]) - -(?P[0-9][0-9]?) - -(?P[0-9][0-9]?) - (?:(?:[Tt]|[ \t]+) - (?P[0-9][0-9]?) - :(?P[0-9][0-9]) - :(?P[0-9][0-9]) - (?:\.(?P[0-9]*))? - (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) - (?::(?P[0-9][0-9]))?))?)? - $~x + + /** + * Gets a regex that matches an unix timestamp + * + * @return string The regular expression + */ + static private function getTimestampRegex() + { + return <<[0-9][0-9][0-9][0-9]) + -(?P[0-9][0-9]?) + -(?P[0-9][0-9]?) + (?:(?:[Tt]|[ \t]+) + (?P[0-9][0-9]?) + :(?P[0-9][0-9]) + :(?P[0-9][0-9]) + (?:\.(?P[0-9]*))? + (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) + (?::(?P[0-9][0-9]))?))?)? + $~x EOF; - } + } } diff --git a/src/lib/Symfony/Component/Yaml/LICENSE b/src/lib/Symfony/Component/Yaml/LICENSE new file mode 100644 index 0000000000..89df4481b9 --- /dev/null +++ b/src/lib/Symfony/Component/Yaml/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2011 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/lib/Symfony/Component/Yaml/Parser.php b/src/lib/Symfony/Component/Yaml/Parser.php index c8c39edb4b..c89d4b5064 100644 --- a/src/lib/Symfony/Component/Yaml/Parser.php +++ b/src/lib/Symfony/Component/Yaml/Parser.php @@ -1,587 +1,556 @@ + * This file is part of the Symfony package. + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; + /** * Parser parses YAML strings to convert them to PHP arrays. * - * @package symfony - * @subpackage yaml - * @author Fabien Potencier + * @author Fabien Potencier */ class Parser { - protected $offset = 0; - protected $lines = array(); - protected $currentLineNb = -1; - protected $currentLine = ''; - protected $refs = array(); - - /** - * Constructor - * - * @param integer $offset The offset of YAML document (used for line numbers in error messages) - */ - public function __construct($offset = 0) - { - $this->offset = $offset; - } - - /** - * Parses a YAML string to a PHP value. - * - * @param string $value A YAML string - * - * @return mixed A PHP value - * - * @throws \InvalidArgumentException If the YAML is not valid - */ - public function parse($value) - { - $this->currentLineNb = -1; - $this->currentLine = ''; - $this->lines = explode("\n", $this->cleanup($value)); - - $data = array(); - while ($this->moveToNextLine()) + private $offset = 0; + private $lines = array(); + private $currentLineNb = -1; + private $currentLine = ''; + private $refs = array(); + + /** + * Constructor + * + * @param integer $offset The offset of YAML document (used for line numbers in error messages) + */ + public function __construct($offset = 0) { - if ($this->isCurrentLineEmpty()) - { - continue; - } - - // tab? - if (preg_match('#^\t+#', $this->currentLine)) - { - throw new ParserException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); - } - - $isRef = $isInPlace = $isProcessed = false; - if (preg_match('#^\-((?P\s+)(?P.+?))?\s*$#', $this->currentLine, $values)) - { - if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#', $values['value'], $matches)) - { - $isRef = $matches['ref']; - $values['value'] = $matches['value']; - } + $this->offset = $offset; + } - // array - if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) - { - $c = $this->getRealCurrentLineNb() + 1; - $parser = new Parser($c); - $parser->refs =& $this->refs; - $data[] = $parser->parse($this->getNextEmbedBlock()); + /** + * Parses a YAML string to a PHP value. + * + * @param string $value A YAML string + * + * @return mixed A PHP value + * + * @throws ParseException If the YAML is not valid + */ + public function parse($value) + { + $this->currentLineNb = -1; + $this->currentLine = ''; + $this->lines = explode("\n", $this->cleanup($value)); + + if (function_exists('mb_detect_encoding') && false === mb_detect_encoding($value, 'UTF-8', true)) { + throw new ParseException('The YAML value does not appear to be valid UTF-8.'); } - else - { - if (isset($values['leadspaces']) - && ' ' == $values['leadspaces'] - && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P.+?))?\s*$#', $values['value'], $matches)) - { - // this is a compact notation element, add to next block and parse - $c = $this->getRealCurrentLineNb(); - $parser = new Parser($c); - $parser->refs =& $this->refs; - - $block = $values['value']; - if (!$this->isNextLineIndented()) - { - $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + 2); - } - $data[] = $parser->parse($block); - } - else - { - $data[] = $this->parseValue($values['value']); - } + if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { + $mbEncoding = mb_internal_encoding(); + mb_internal_encoding('UTF-8'); } - } - else if (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"].*?) *\:(\s+(?P.+?))?\s*$#', $this->currentLine, $values)) - { - $key = Inline::parseScalar($values['key']); - - if ('<<' === $key) - { - if (isset($values['value']) && '*' === substr($values['value'], 0, 1)) - { - $isInPlace = substr($values['value'], 1); - if (!array_key_exists($isInPlace, $this->refs)) - { - throw new ParserException(sprintf('Reference "%s" does not exist at line %s (%s).', $isInPlace, $this->getRealCurrentLineNb() + 1, $this->currentLine)); - } - } - else - { - if (isset($values['value']) && $values['value'] !== '') - { - $value = $values['value']; - } - else - { - $value = $this->getNextEmbedBlock(); + + $data = array(); + while ($this->moveToNextLine()) { + if ($this->isCurrentLineEmpty()) { + continue; } - $c = $this->getRealCurrentLineNb() + 1; - $parser = new Parser($c); - $parser->refs =& $this->refs; - $parsed = $parser->parse($value); - - $merged = array(); - if (!is_array($parsed)) - { - throw new ParserException(sprintf("YAML merge keys used with a scalar value instead of an array at line %s (%s)", $this->getRealCurrentLineNb() + 1, $this->currentLine)); + + // tab? + if (preg_match('#^\t+#', $this->currentLine)) { + throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine); } - else if (isset($parsed[0])) - { - // Numeric array, merge individual elements - foreach (array_reverse($parsed) as $parsedItem) - { - if (!is_array($parsedItem)) - { - throw new ParserException(sprintf("Merge items must be arrays at line %s (%s).", $this->getRealCurrentLineNb() + 1, $parsedItem)); + + $isRef = $isInPlace = $isProcessed = false; + if (preg_match('#^\-((?P\s+)(?P.+?))?\s*$#u', $this->currentLine, $values)) { + if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { + $isRef = $matches['ref']; + $values['value'] = $matches['value']; } - $merged = array_merge($parsedItem, $merged); - } - } - else - { - // Associative array, merge - $merged = array_merge($merge, $parsed); - } - $isProcessed = $merged; - } - } - else if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#', $values['value'], $matches)) - { - $isRef = $matches['ref']; - $values['value'] = $matches['value']; - } + // array + if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { + $c = $this->getRealCurrentLineNb() + 1; + $parser = new Parser($c); + $parser->refs =& $this->refs; + $data[] = $parser->parse($this->getNextEmbedBlock()); + } else { + if (isset($values['leadspaces']) + && ' ' == $values['leadspaces'] + && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $values['value'], $matches) + ) { + // this is a compact notation element, add to next block and parse + $c = $this->getRealCurrentLineNb(); + $parser = new Parser($c); + $parser->refs =& $this->refs; + + $block = $values['value']; + if (!$this->isNextLineIndented()) { + $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + 2); + } + + $data[] = $parser->parse($block); + } else { + $data[] = $this->parseValue($values['value']); + } + } + } else if (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values)) { + try { + $key = Inline::parseScalar($values['key']); + } catch (ParseException $e) { + $e->setParsedLine($this->getRealCurrentLineNb() + 1); + $e->setSnippet($this->currentLine); + + throw $e; + } - if ($isProcessed) - { - // Merge keys - $data = $isProcessed; - } - // hash - else if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) - { - // if next line is less indented or equal, then it means that the current value is null - if ($this->isNextLineIndented()) - { - $data[$key] = null; - } - else - { - $c = $this->getRealCurrentLineNb() + 1; - $parser = new Parser($c); - $parser->refs =& $this->refs; - $data[$key] = $parser->parse($this->getNextEmbedBlock()); - } - } - else - { - if ($isInPlace) - { - $data = $this->refs[$isInPlace]; - } - else - { - $data[$key] = $this->parseValue($values['value']); - } - } - } - else - { - // 1-liner followed by newline - if (2 == count($this->lines) && empty($this->lines[1])) - { - $value = Inline::load($this->lines[0]); - if (is_array($value)) - { - $first = reset($value); - if ('*' === substr($first, 0, 1)) - { - $data = array(); - foreach ($value as $alias) - { - $data[] = $this->refs[substr($alias, 1)]; - } - $value = $data; + if ('<<' === $key) { + if (isset($values['value']) && '*' === substr($values['value'], 0, 1)) { + $isInPlace = substr($values['value'], 1); + if (!array_key_exists($isInPlace, $this->refs)) { + throw new ParseException(sprintf('Reference "%s" does not exist.', $isInPlace), $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + } else { + if (isset($values['value']) && $values['value'] !== '') { + $value = $values['value']; + } else { + $value = $this->getNextEmbedBlock(); + } + $c = $this->getRealCurrentLineNb() + 1; + $parser = new Parser($c); + $parser->refs =& $this->refs; + $parsed = $parser->parse($value); + + $merged = array(); + if (!is_array($parsed)) { + throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } else if (isset($parsed[0])) { + // Numeric array, merge individual elements + foreach (array_reverse($parsed) as $parsedItem) { + if (!is_array($parsedItem)) { + throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem); + } + $merged = array_merge($parsedItem, $merged); + } + } else { + // Associative array, merge + $merged = array_merge($merged, $parsed); + } + + $isProcessed = $merged; + } + } else if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { + $isRef = $matches['ref']; + $values['value'] = $matches['value']; + } + + if ($isProcessed) { + // Merge keys + $data = $isProcessed; + // hash + } else if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { + // if next line is less indented or equal, then it means that the current value is null + if ($this->isNextLineIndented()) { + $data[$key] = null; + } else { + $c = $this->getRealCurrentLineNb() + 1; + $parser = new Parser($c); + $parser->refs =& $this->refs; + $data[$key] = $parser->parse($this->getNextEmbedBlock()); + } + } else { + if ($isInPlace) { + $data = $this->refs[$isInPlace]; + } else { + $data[$key] = $this->parseValue($values['value']); + } + } + } else { + // 1-liner followed by newline + if (2 == count($this->lines) && empty($this->lines[1])) { + try { + $value = Inline::parse($this->lines[0]); + } catch (ParseException $e) { + $e->setParsedLine($this->getRealCurrentLineNb() + 1); + $e->setSnippet($this->currentLine); + + throw $e; + } + + if (is_array($value)) { + $first = reset($value); + if (is_string($first) && '*' === substr($first, 0, 1)) { + $data = array(); + foreach ($value as $alias) { + $data[] = $this->refs[substr($alias, 1)]; + } + $value = $data; + } + } + + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); + } + + return $value; + } + + switch (preg_last_error()) { + case PREG_INTERNAL_ERROR: + $error = 'Internal PCRE error.'; + break; + case PREG_BACKTRACK_LIMIT_ERROR: + $error = 'pcre.backtrack_limit reached.'; + break; + case PREG_RECURSION_LIMIT_ERROR: + $error = 'pcre.recursion_limit reached.'; + break; + case PREG_BAD_UTF8_ERROR: + $error = 'Malformed UTF-8 data.'; + break; + case PREG_BAD_UTF8_OFFSET_ERROR: + $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; + break; + default: + $error = 'Unable to parse.'; + } + + throw new ParseException($error, $this->getRealCurrentLineNb() + 1, $this->currentLine); } - } - return $value; + if ($isRef) { + $this->refs[$isRef] = end($data); + } } - switch (preg_last_error()) - { - case PREG_INTERNAL_ERROR: - $error = 'Internal PCRE error on line'; - break; - case PREG_BACKTRACK_LIMIT_ERROR: - $error = 'pcre.backtrack_limit reached on line'; - break; - case PREG_RECURSION_LIMIT_ERROR: - $error = 'pcre.recursion_limit reached on line'; - break; - case PREG_BAD_UTF8_ERROR: - $error = 'Malformed UTF-8 data on line'; - break; - case PREG_BAD_UTF8_OFFSET_ERROR: - $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point on line'; - break; - default: - $error = 'Unable to parse line'; + if (isset($mbEncoding)) { + mb_internal_encoding($mbEncoding); } - throw new ParserException(sprintf('%s %d (%s).', $error, $this->getRealCurrentLineNb() + 1, $this->currentLine)); - } - - if ($isRef) - { - $this->refs[$isRef] = end($data); - } + return empty($data) ? null : $data; } - return empty($data) ? null : $data; - } - - /** - * Returns the current line number (takes the offset into account). - * - * @return integer The current line number - */ - protected function getRealCurrentLineNb() - { - return $this->currentLineNb + $this->offset; - } - - /** - * Returns the current line indentation. - * - * @return integer The current line indentation - */ - protected function getCurrentLineIndentation() - { - return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' ')); - } - - /** - * Returns the next embed block of YAML. - * - * @param integer $indentation The indent level at which the block is to be read, or null for default - * - * @return string A YAML string - */ - protected function getNextEmbedBlock($indentation = null) - { - $this->moveToNextLine(); - - if (null === $indentation) + /** + * Returns the current line number (takes the offset into account). + * + * @return integer The current line number + */ + private function getRealCurrentLineNb() { - $newIndent = $this->getCurrentLineIndentation(); - - if (!$this->isCurrentLineEmpty() && 0 == $newIndent) - { - throw new ParserException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); - } + return $this->currentLineNb + $this->offset; } - else + + /** + * Returns the current line indentation. + * + * @return integer The current line indentation + */ + private function getCurrentLineIndentation() { - $newIndent = $indentation; + return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' ')); } - $data = array(substr($this->currentLine, $newIndent)); - - while ($this->moveToNextLine()) + /** + * Returns the next embed block of YAML. + * + * @param integer $indentation The indent level at which the block is to be read, or null for default + * + * @return string A YAML string + * + * @throws ParseException When indentation problem are detected + */ + private function getNextEmbedBlock($indentation = null) { - if ($this->isCurrentLineEmpty()) - { - if ($this->isCurrentLineBlank()) - { - $data[] = substr($this->currentLine, $newIndent); + $this->moveToNextLine(); + + if (null === $indentation) { + $newIndent = $this->getCurrentLineIndentation(); + + if (!$this->isCurrentLineEmpty() && 0 == $newIndent) { + throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + } else { + $newIndent = $indentation; } - continue; - } - - $indent = $this->getCurrentLineIndentation(); - - if (preg_match('#^(?P *)$#', $this->currentLine, $match)) - { - // empty line - $data[] = $match['text']; - } - else if ($indent >= $newIndent) - { - $data[] = substr($this->currentLine, $newIndent); - } - else if (0 == $indent) - { - $this->moveToPreviousLine(); + $data = array(substr($this->currentLine, $newIndent)); - break; - } - else - { - throw new ParserException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); - } - } + while ($this->moveToNextLine()) { + if ($this->isCurrentLineEmpty()) { + if ($this->isCurrentLineBlank()) { + $data[] = substr($this->currentLine, $newIndent); + } - return implode("\n", $data); - } + continue; + } - /** - * Moves the parser to the next line. - */ - protected function moveToNextLine() - { - if ($this->currentLineNb >= count($this->lines) - 1) - { - return false; - } + $indent = $this->getCurrentLineIndentation(); - $this->currentLine = $this->lines[++$this->currentLineNb]; - - return true; - } - - /** - * Moves the parser to the previous line. - */ - protected function moveToPreviousLine() - { - $this->currentLine = $this->lines[--$this->currentLineNb]; - } - - /** - * Parses a YAML value. - * - * @param string $value A YAML value - * - * @return mixed A PHP value - */ - protected function parseValue($value) - { - if ('*' === substr($value, 0, 1)) - { - if (false !== $pos = strpos($value, '#')) - { - $value = substr($value, 1, $pos - 2); - } - else - { - $value = substr($value, 1); - } - - if (!array_key_exists($value, $this->refs)) - { - throw new ParserException(sprintf('Reference "%s" does not exist (%s).', $value, $this->currentLine)); - } - return $this->refs[$value]; - } + if (preg_match('#^(?P *)$#', $this->currentLine, $match)) { + // empty line + $data[] = $match['text']; + } else if ($indent >= $newIndent) { + $data[] = substr($this->currentLine, $newIndent); + } else if (0 == $indent) { + $this->moveToPreviousLine(); - if (preg_match('/^(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?$/', $value, $matches)) - { - $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; + break; + } else { + throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + } + } - return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs($modifiers))); - } - else - { - return Inline::load($value); + return implode("\n", $data); } - } - - /** - * Parses a folded scalar. - * - * @param string $separator The separator that was used to begin this folded scalar (| or >) - * @param string $indicator The indicator that was used to begin this folded scalar (+ or -) - * @param integer $indentation The indentation that was used to begin this folded scalar - * - * @return string The text value - */ - protected function parseFoldedScalar($separator, $indicator = '', $indentation = 0) - { - $separator = '|' == $separator ? "\n" : ' '; - $text = ''; - - $notEOF = $this->moveToNextLine(); - - while ($notEOF && $this->isCurrentLineBlank()) + + /** + * Moves the parser to the next line. + * + * @return Boolean + */ + private function moveToNextLine() { - $text .= "\n"; + if ($this->currentLineNb >= count($this->lines) - 1) { + return false; + } - $notEOF = $this->moveToNextLine(); + $this->currentLine = $this->lines[++$this->currentLineNb]; + + return true; } - if (!$notEOF) + /** + * Moves the parser to the previous line. + */ + private function moveToPreviousLine() { - return ''; + $this->currentLine = $this->lines[--$this->currentLineNb]; } - if (!preg_match('#^(?P'.($indentation ? str_repeat(' ', $indentation) : ' +').')(?P.*)$#', $this->currentLine, $matches)) + /** + * Parses a YAML value. + * + * @param string $value A YAML value + * + * @return mixed A PHP value + * + * @throws ParseException When reference does not exist + */ + private function parseValue($value) { - $this->moveToPreviousLine(); + if ('*' === substr($value, 0, 1)) { + if (false !== $pos = strpos($value, '#')) { + $value = substr($value, 1, $pos - 2); + } else { + $value = substr($value, 1); + } - return ''; - } + if (!array_key_exists($value, $this->refs)) { + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLine); + } - $textIndent = $matches['indent']; - $previousIndent = 0; + return $this->refs[$value]; + } - $text .= $matches['text'].$separator; - while ($this->currentLineNb + 1 < count($this->lines)) - { - $this->moveToNextLine(); + if (preg_match('/^(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?$/', $value, $matches)) { + $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; - if (preg_match('#^(?P {'.strlen($textIndent).',})(?P.+)$#', $this->currentLine, $matches)) - { - if (' ' == $separator && $previousIndent != $matches['indent']) - { - $text = substr($text, 0, -1)."\n"; + return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs($modifiers))); } - $previousIndent = $matches['indent']; - - $text .= str_repeat(' ', $diff = strlen($matches['indent']) - strlen($textIndent)).$matches['text'].($diff ? "\n" : $separator); - } - else if (preg_match('#^(?P *)$#', $this->currentLine, $matches)) - { - $text .= preg_replace('#^ {1,'.strlen($textIndent).'}#', '', $matches['text'])."\n"; - } - else - { - $this->moveToPreviousLine(); - break; - } + try { + return Inline::parse($value); + } catch (ParseException $e) { + $e->setParsedLine($this->getRealCurrentLineNb() + 1); + $e->setSnippet($this->currentLine); + + throw $e; + } } - if (' ' == $separator) + /** + * Parses a folded scalar. + * + * @param string $separator The separator that was used to begin this folded scalar (| or >) + * @param string $indicator The indicator that was used to begin this folded scalar (+ or -) + * @param integer $indentation The indentation that was used to begin this folded scalar + * + * @return string The text value + */ + private function parseFoldedScalar($separator, $indicator = '', $indentation = 0) { - // replace last separator by a newline - $text = preg_replace('/ (\n*)$/', "\n$1", $text); + $separator = '|' == $separator ? "\n" : ' '; + $text = ''; + + $notEOF = $this->moveToNextLine(); + + while ($notEOF && $this->isCurrentLineBlank()) { + $text .= "\n"; + + $notEOF = $this->moveToNextLine(); + } + + if (!$notEOF) { + return ''; + } + + if (!preg_match('#^(?P'.($indentation ? str_repeat(' ', $indentation) : ' +').')(?P.*)$#u', $this->currentLine, $matches)) { + $this->moveToPreviousLine(); + + return ''; + } + + $textIndent = $matches['indent']; + $previousIndent = 0; + + $text .= $matches['text'].$separator; + while ($this->currentLineNb + 1 < count($this->lines)) { + $this->moveToNextLine(); + + if (preg_match('#^(?P {'.strlen($textIndent).',})(?P.+)$#u', $this->currentLine, $matches)) { + if (' ' == $separator && $previousIndent != $matches['indent']) { + $text = substr($text, 0, -1)."\n"; + } + $previousIndent = $matches['indent']; + + $text .= str_repeat(' ', $diff = strlen($matches['indent']) - strlen($textIndent)).$matches['text'].($diff ? "\n" : $separator); + } else if (preg_match('#^(?P *)$#', $this->currentLine, $matches)) { + $text .= preg_replace('#^ {1,'.strlen($textIndent).'}#', '', $matches['text'])."\n"; + } else { + $this->moveToPreviousLine(); + + break; + } + } + + if (' ' == $separator) { + // replace last separator by a newline + $text = preg_replace('/ (\n*)$/', "\n$1", $text); + } + + switch ($indicator) { + case '': + $text = preg_replace('#\n+$#s', "\n", $text); + break; + case '+': + break; + case '-': + $text = preg_replace('#\n+$#s', '', $text); + break; + } + + return $text; } - switch ($indicator) + /** + * Returns true if the next line is indented. + * + * @return Boolean Returns true if the next line is indented, false otherwise + */ + private function isNextLineIndented() { - case '': - $text = preg_replace('#\n+$#s', "\n", $text); - break; - case '+': - break; - case '-': - $text = preg_replace('#\n+$#s', '', $text); - break; - } + $currentIndentation = $this->getCurrentLineIndentation(); + $notEOF = $this->moveToNextLine(); + + while ($notEOF && $this->isCurrentLineEmpty()) { + $notEOF = $this->moveToNextLine(); + } - return $text; - } + if (false === $notEOF) { + return false; + } - /** - * Returns true if the next line is indented. - * - * @return Boolean Returns true if the next line is indented, false otherwise - */ - protected function isNextLineIndented() - { - $currentIndentation = $this->getCurrentLineIndentation(); - $notEOF = $this->moveToNextLine(); + $ret = false; + if ($this->getCurrentLineIndentation() <= $currentIndentation) { + $ret = true; + } - while ($notEOF && $this->isCurrentLineEmpty()) - { - $notEOF = $this->moveToNextLine(); + $this->moveToPreviousLine(); + + return $ret; } - if (false === $notEOF) + /** + * Returns true if the current line is blank or if it is a comment line. + * + * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise + */ + private function isCurrentLineEmpty() { - return false; + return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); } - $ret = false; - if ($this->getCurrentLineIndentation() <= $currentIndentation) + /** + * Returns true if the current line is blank. + * + * @return Boolean Returns true if the current line is blank, false otherwise + */ + private function isCurrentLineBlank() { - $ret = true; + return '' == trim($this->currentLine, ' '); } - $this->moveToPreviousLine(); - - return $ret; - } - - /** - * Returns true if the current line is blank or if it is a comment line. - * - * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise - */ - protected function isCurrentLineEmpty() - { - return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); - } - - /** - * Returns true if the current line is blank. - * - * @return Boolean Returns true if the current line is blank, false otherwise - */ - protected function isCurrentLineBlank() - { - return '' == trim($this->currentLine, ' '); - } - - /** - * Returns true if the current line is a comment line. - * - * @return Boolean Returns true if the current line is a comment line, false otherwise - */ - protected function isCurrentLineComment() - { - //checking explicitly the first char of the trim is faster than loops or strpos - $ltrimmedLine = ltrim($this->currentLine, ' '); - return $ltrimmedLine[0] === '#'; - } - - /** - * Cleanups a YAML string to be parsed. - * - * @param string $value The input YAML string - * - * @return string A cleaned up YAML string - */ - protected function cleanup($value) - { - $value = str_replace(array("\r\n", "\r"), "\n", $value); - - if (!preg_match("#\n$#", $value)) + /** + * Returns true if the current line is a comment line. + * + * @return Boolean Returns true if the current line is a comment line, false otherwise + */ + private function isCurrentLineComment() { - $value .= "\n"; - } + //checking explicitly the first char of the trim is faster than loops or strpos + $ltrimmedLine = ltrim($this->currentLine, ' '); - // strip YAML header - $count = 0; - $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#s', '', $value, -1, $count); - $this->offset += $count; + return $ltrimmedLine[0] === '#'; + } - // remove leading comments and/or --- - $trimmedValue = preg_replace('#^((\#.*?\n)|(\-\-\-.*?\n))*#s', '', $value, -1, $count); - if ($count == 1) + /** + * Cleanups a YAML string to be parsed. + * + * @param string $value The input YAML string + * + * @return string A cleaned up YAML string + */ + private function cleanup($value) { - // items have been removed, update the offset - $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); - $value = $trimmedValue; - } + $value = str_replace(array("\r\n", "\r"), "\n", $value); + + if (!preg_match("#\n$#", $value)) { + $value .= "\n"; + } - return $value; - } + // strip YAML header + $count = 0; + $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#su', '', $value, -1, $count); + $this->offset += $count; + + // remove leading comments + $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); + if ($count == 1) { + // items have been removed, update the offset + $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); + $value = $trimmedValue; + } + + // remove start of the document marker (---) + $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); + if ($count == 1) { + // items have been removed, update the offset + $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); + $value = $trimmedValue; + + // remove end of the document marker (...) + $value = preg_replace('#\.\.\.\s*$#s', '', $value); + } + + return $value; + } } diff --git a/src/lib/Symfony/Component/Yaml/ParserException.php b/src/lib/Symfony/Component/Yaml/ParserException.php deleted file mode 100644 index 5683d8cc6d..0000000000 --- a/src/lib/Symfony/Component/Yaml/ParserException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exception class used by all exceptions thrown by the component. - * - * @package symfony - * @subpackage yaml - * @author Fabien Potencier - */ -class ParserException extends Exception -{ -} diff --git a/src/lib/Symfony/Component/Yaml/Unescaper.php b/src/lib/Symfony/Component/Yaml/Unescaper.php new file mode 100644 index 0000000000..807a35eeb3 --- /dev/null +++ b/src/lib/Symfony/Component/Yaml/Unescaper.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml; + +/** + * Unescaper encapsulates unescaping rules for single and double-quoted + * YAML strings. + * + * @author Matthew Lewinski + */ +class Unescaper +{ + // Parser and Inline assume UTF-8 encoding, so escaped Unicode characters + // must be converted to that encoding. + const ENCODING = 'UTF-8'; + + // Regex fragment that matches an escaped character in a double quoted + // string. + const REGEX_ESCAPED_CHARACTER = "\\\\([0abt\tnvfre \\\"\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"; + + /** + * Unescapes a single quoted string. + * + * @param string $value A single quoted string. + * + * @return string The unescaped string. + */ + public function unescapeSingleQuotedString($value) + { + return str_replace('\'\'', '\'', $value); + } + + /** + * Unescapes a double quoted string. + * + * @param string $value A double quoted string. + * + * @return string The unescaped string. + */ + public function unescapeDoubleQuotedString($value) + { + $self = $this; + $callback = function($match) use($self) { + return $self->unescapeCharacter($match[0]); + }; + + // evaluate the string + return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); + } + + /** + * Unescapes a character that was found in a double-quoted string + * + * @param string $value An escaped character + * + * @return string The unescaped character + */ + public function unescapeCharacter($value) + { + switch ($value{1}) { + case '0': + return "\x0"; + case 'a': + return "\x7"; + case 'b': + return "\x8"; + case 't': + return "\t"; + case "\t": + return "\t"; + case 'n': + return "\n"; + case 'v': + return "\xb"; + case 'f': + return "\xc"; + case 'r': + return "\xd"; + case 'e': + return "\x1b"; + case ' ': + return ' '; + case '"': + return '"'; + case '/': + return '/'; + case '\\': + return '\\'; + case 'N': + // U+0085 NEXT LINE + return $this->convertEncoding("\x00\x85", self::ENCODING, 'UCS-2BE'); + case '_': + // U+00A0 NO-BREAK SPACE + return $this->convertEncoding("\x00\xA0", self::ENCODING, 'UCS-2BE'); + case 'L': + // U+2028 LINE SEPARATOR + return $this->convertEncoding("\x20\x28", self::ENCODING, 'UCS-2BE'); + case 'P': + // U+2029 PARAGRAPH SEPARATOR + return $this->convertEncoding("\x20\x29", self::ENCODING, 'UCS-2BE'); + case 'x': + $char = pack('n', hexdec(substr($value, 2, 2))); + + return $this->convertEncoding($char, self::ENCODING, 'UCS-2BE'); + case 'u': + $char = pack('n', hexdec(substr($value, 2, 4))); + + return $this->convertEncoding($char, self::ENCODING, 'UCS-2BE'); + case 'U': + $char = pack('N', hexdec(substr($value, 2, 8))); + + return $this->convertEncoding($char, self::ENCODING, 'UCS-4BE'); + } + } + + /** + * Convert a string from one encoding to another. + * + * @param string $value The string to convert + * @param string $to The input encoding + * @param string $from The output encoding + * + * @return string The string with the new encoding + * + * @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring) + */ + private function convertEncoding($value, $to, $from) + { + if (function_exists('iconv')) { + return iconv($from, $to, $value); + } elseif (function_exists('mb_convert_encoding')) { + return mb_convert_encoding($value, $to, $from); + } + + throw new \RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); + } +} diff --git a/src/lib/Symfony/Component/Yaml/Yaml.php b/src/lib/Symfony/Component/Yaml/Yaml.php index 7bdc1801f1..aad88fdc19 100644 --- a/src/lib/Symfony/Component/Yaml/Yaml.php +++ b/src/lib/Symfony/Component/Yaml/Yaml.php @@ -1,121 +1,98 @@ + * This file is part of the Symfony package. + * + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ +namespace Symfony\Component\Yaml; + +use Symfony\Component\Yaml\Exception\ParseException; + /** * Yaml offers convenience methods to load and dump YAML. * - * @package symfony - * @subpackage yaml - * @author Fabien Potencier + * @author Fabien Potencier + * + * @api */ class Yaml { - static protected $spec = '1.2'; - - /** - * Sets the YAML specification version to use. - * - * @param string $version The YAML specification version - */ - static public function setSpecVersion($version) - { - if (!in_array($version, array('1.1', '1.2'))) + /** + * Parses YAML into a PHP array. + * + * The parse method, when supplied with a YAML stream (string or file), + * will do its best to convert YAML in a file into a PHP array. + * + * Usage: + * + * $array = Yaml::parse('config.yml'); + * print_r($array); + * + * + * @param string $input Path to a YAML file or a string containing YAML + * + * @return array The YAML converted to a PHP array + * + * @throws \InvalidArgumentException If the YAML is not valid + * + * @api + */ + static public function parse($input) { - throw new \InvalidArgumentException(sprintf('Version %s of the YAML specifications is not supported', $version)); - } + $file = ''; - self::$spec = $version; - } + // if input is a file, process it + if (strpos($input, "\n") === false && is_file($input) && is_readable($input)) { + $file = $input; - /** - * Gets the YAML specification version to use. - * - * @return string The YAML specification version - */ - static public function getSpecVersion() - { - return self::$spec; - } + ob_start(); + $retval = include($input); + $content = ob_get_clean(); - /** - * Loads YAML into a PHP array. - * - * The load method, when supplied with a YAML stream (string or file), - * will do its best to convert YAML in a file into a PHP array. - * - * Usage: - * - * $array = Yaml::load('config.yml'); - * print_r($array); - * - * - * @param string $input Path of YAML file or string containing YAML - * - * @return array The YAML converted to a PHP array - * - * @throws \InvalidArgumentException If the YAML is not valid - */ - public static function load($input) - { - $file = ''; + // if an array is returned by the config file assume it's in plain php form else in YAML + $input = is_array($retval) ? $retval : $content; + } - // if input is a file, process it - if (strpos($input, "\n") === false && is_file($input)) - { - $file = $input; + // if an array is returned by the config file assume it's in plain php form else in YAML + if (is_array($input)) { + return $input; + } - ob_start(); - $retval = include($input); - $content = ob_get_clean(); + $yaml = new Parser(); - // if an array is returned by the config file assume it's in plain php form else in YAML - $input = is_array($retval) ? $retval : $content; - } + try { + return $yaml->parse($input); + } catch (ParseException $e) { + if ($file) { + $e->setParsedFile($file); + } - // if an array is returned by the config file assume it's in plain php form else in YAML - if (is_array($input)) - { - return $input; + throw $e; + } } - $yaml = new Parser(); - - try - { - $ret = $yaml->parse($input); - } - catch (\Exception $e) + /** + * Dumps a PHP array to a YAML string. + * + * The dump method, when supplied with an array, will do its best + * to convert the array into friendly YAML. + * + * @param array $array PHP array + * @param integer $inline The level where you switch to inline YAML + * + * @return string A YAML string representing the original PHP array + * + * @api + */ + static public function dump($array, $inline = 2) { - throw new \InvalidArgumentException(sprintf('Unable to parse %s: %s', $file ? sprintf('file "%s"', $file) : 'string', $e->getMessage())); - } - - return $ret; - } + $yaml = new Dumper(); - /** - * Dumps a PHP array to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param array $array PHP array - * @param integer $inline The level where you switch to inline YAML - * - * @return string A YAML string representing the original PHP array - */ - public static function dump($array, $inline = 2) - { - $yaml = new Dumper(); - - return $yaml->dump($array, $inline); - } + return $yaml->dump($array, $inline); + } } diff --git a/src/upgrade/1.0/22/post_rebuild.php b/src/upgrade/1.0/22/post_rebuild.php index f9b4bef3ad..fa881e1dd2 100644 --- a/src/upgrade/1.0/22/post_rebuild.php +++ b/src/upgrade/1.0/22/post_rebuild.php @@ -27,7 +27,6 @@ return function() { - // Loading data to the database from yaml file $yamlFile = __DIR__ . LC_DS . 'post_rebuild.yaml'; @@ -39,7 +38,7 @@ $yamlFile = __DIR__ . LC_DS . 'countries.yaml'; if (\Includes\Utils\FileManager::isFileReadable($yamlFile)) { - $data = \Symfony\Component\Yaml\Yaml::load($path); + $data = \Symfony\Component\Yaml\Yaml::parse($path); // Import new and update old currencies $repo = \XLite\Core\Database::getRepo('XLite\Model\Currency'); From 064e1f9224c4d70ab199dfc6a3a39242330274d2 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 19 Apr 2012 05:09:26 +0400 Subject: [PATCH 012/562] E:0040373 [*] [*] The Doctrine library is updated up to latest version (2.2) --- .../Doctrine/Utils/.EntityManager.php.swp | Bin 0 -> 16384 bytes .../Plugin/Doctrine/Utils/EntityManager.php | 3 +- src/classes/XLite/Core/Connection.php | 21 +- src/classes/XLite/Core/FileCache.php | 50 +- src/classes/XLite/Model/Order.php | 6 +- src/classes/XLite/Model/OrderItem.php | 3 +- src/classes/XLite/Model/Payment/Method.php | 2 +- .../Annotations/Annotation/Attribute.php | 47 + .../Annotations/Annotation/Attributes.php | 37 + .../Annotation/IgnoreAnnotation.php | 1 + .../Annotations/Annotation/Required.php | 33 + .../Common/Annotations/Annotation/Target.php | 105 + .../Annotations/AnnotationException.php | 57 + .../Common/Annotations/AnnotationReader.php | 130 +- .../Common/Annotations/AnnotationRegistry.php | 46 +- .../Doctrine/Common/Annotations/DocLexer.php | 6 +- .../Doctrine/Common/Annotations/DocParser.php | 450 +++- .../Common/Annotations/FileCacheReader.php | 6 +- .../Common/Annotations/IndexedReader.php | 6 +- .../Doctrine/Common/Annotations/PhpParser.php | 221 +- .../Annotations/SimpleAnnotationReader.php | 152 ++ .../Common/Cache/.CacheProvider.php.swp | Bin 0 -> 16384 bytes src/lib/Doctrine/Common/Cache/ApcCache.php | 57 +- src/lib/Doctrine/Common/Cache/ArrayCache.php | 39 +- src/lib/Doctrine/Common/Cache/Cache.php | 39 +- .../{AbstractCache.php => CacheProvider.php} | 151 +- .../Doctrine/Common/Cache/MemcacheCache.php | 70 +- .../Doctrine/Common/Cache/MemcachedCache.php | 124 ++ .../Doctrine/Common/Cache/WinCacheCache.php | 92 + src/lib/Doctrine/Common/Cache/XcacheCache.php | 63 +- .../Doctrine/Common/Cache/ZendDataCache.php | 38 +- src/lib/Doctrine/Common/ClassLoader.php | 63 +- .../Common/Collections/ArrayCollection.php | 24 +- .../Common/Collections/Collection.php | 24 +- src/lib/Doctrine/Common/Comparable.php | 47 + src/lib/Doctrine/Common/EventManager.php | 18 +- src/lib/Doctrine/Common/EventSubscriber.php | 2 +- .../Persistence/AbstractManagerRegistry.php | 218 ++ .../Common/Persistence/ConnectionRegistry.php | 63 + .../Persistence/Event/LifecycleEventArgs.php | 77 + .../Event/LoadClassMetadataEventArgs.php | 76 + .../Persistence/Event/ManagerEventArgs.php | 59 + .../Persistence/Event/OnClearEventArgs.php | 84 + .../Persistence/Event/PreUpdateEventArgs.php | 129 ++ .../Common/Persistence/ManagerRegistry.php | 112 + .../Mapping/AbstractClassMetadataFactory.php | 359 ++++ .../Persistence/Mapping/ClassMetadata.php | 89 +- .../Mapping/ClassMetadataFactory.php | 22 +- .../Mapping/Driver/AnnotationDriver.php | 214 ++ .../Mapping/Driver/DefaultFileLocator.php | 169 ++ .../Persistence/Mapping/Driver/FileDriver.php | 178 ++ .../Mapping/Driver/FileLocator.php | 69 + .../Mapping/Driver/MappingDriver.php | 56 + .../Mapping/Driver/MappingDriverChain.php | 125 ++ .../Persistence/Mapping/Driver/PHPDriver.php | 70 + .../Mapping/Driver/StaticPHPDriver.php | 131 ++ .../Mapping/Driver/SymfonyFileLocator.php | 198 ++ .../Persistence/Mapping/MappingException.php | 57 + .../Persistence/Mapping/ReflectionService.php | 80 + .../Mapping/RuntimeReflectionService.php | 102 + .../Mapping/StaticReflectionService.php | 107 + .../Common/Persistence/ObjectManager.php | 42 +- .../Common/Persistence/ObjectManagerAware.php | 49 + .../Common/Persistence/ObjectRepository.php | 15 +- .../Common/Persistence/PersistentObject.php | 233 +++ src/lib/Doctrine/Common/Persistence/Proxy.php | 60 + src/lib/Doctrine/Common/Util/ClassUtils.php | 103 + src/lib/Doctrine/Common/Util/Debug.php | 69 +- src/lib/Doctrine/Common/Util/Inflector.php | 4 +- src/lib/Doctrine/Common/Version.php | 2 +- .../Doctrine/DBAL/Cache/ArrayStatement.php | 94 + .../Doctrine/DBAL/Cache/CacheException.php | 37 + .../Doctrine/DBAL/Cache/QueryCacheProfile.php | 131 ++ .../DBAL/Cache/ResultCacheStatement.php | 255 +++ src/lib/Doctrine/DBAL/Configuration.php | 55 +- src/lib/Doctrine/DBAL/Connection.php | 206 +- src/lib/Doctrine/DBAL/ConnectionException.php | 2 +- .../Connections/MasterSlaveConnection.php | 328 +++ src/lib/Doctrine/DBAL/Driver/Connection.php | 2 +- .../DBAL/Driver/IBMDB2/DB2Connection.php | 22 +- .../Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php | 9 +- .../DBAL/Driver/IBMDB2/DB2Exception.php | 2 +- .../DBAL/Driver/IBMDB2/DB2Statement.php | 178 +- .../Doctrine/DBAL/Driver/Mysqli/Driver.php | 69 + .../DBAL/Driver/Mysqli/MysqliConnection.php | 146 ++ .../DBAL/Driver/Mysqli/MysqliException.php | 26 + .../DBAL/Driver/Mysqli/MysqliStatement.php | 335 +++ src/lib/Doctrine/DBAL/Driver/OCI8/Driver.php | 14 +- .../DBAL/Driver/OCI8/OCI8Connection.php | 24 +- .../DBAL/Driver/OCI8/OCI8Statement.php | 82 +- .../Doctrine/DBAL/Driver/PDOMySql/Driver.php | 10 +- .../Doctrine/DBAL/Driver/PDOOracle/Driver.php | 16 +- .../Doctrine/DBAL/Driver/PDOPgSql/Driver.php | 6 +- .../Doctrine/DBAL/Driver/PDOSqlite/Driver.php | 2 +- .../DBAL/Driver/PDOSqlsrv/Connection.php | 4 +- .../Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php | 28 +- src/lib/Doctrine/DBAL/Driver/PDOStatement.php | 9 + .../Doctrine/DBAL/Driver/ResultStatement.php | 113 + src/lib/Doctrine/DBAL/Driver/Statement.php | 100 +- src/lib/Doctrine/DBAL/DriverManager.php | 42 +- .../Event/Listeners/OracleSessionInit.php | 7 +- .../DBAL/Event/Listeners/SQLSessionInit.php | 63 + .../SchemaAlterTableAddColumnEventArgs.php | 114 + .../SchemaAlterTableChangeColumnEventArgs.php | 114 + .../DBAL/Event/SchemaAlterTableEventArgs.php | 99 + .../SchemaAlterTableRemoveColumnEventArgs.php | 114 + .../SchemaAlterTableRenameColumnEventArgs.php | 129 ++ .../Event/SchemaColumnDefinitionEventArgs.php | 137 ++ .../SchemaCreateTableColumnEventArgs.php | 114 + .../DBAL/Event/SchemaCreateTableEventArgs.php | 128 ++ .../DBAL/Event/SchemaDropTableEventArgs.php | 98 + .../Doctrine/DBAL/Event/SchemaEventArgs.php | 56 + .../Event/SchemaIndexDefinitionEventArgs.php | 122 ++ src/lib/Doctrine/DBAL/Events.php | 12 +- .../Doctrine/DBAL/Logging/EchoSQLLogger.php | 2 +- src/lib/Doctrine/DBAL/Logging/LoggerChain.php | 64 + .../DBAL/Platforms/AbstractPlatform.php | 426 +++- .../Doctrine/DBAL/Platforms/DB2Platform.php | 47 +- .../DBAL/Platforms/Keywords/DB2Keywords.php | 5 +- .../DBAL/Platforms/Keywords/KeywordList.php | 16 +- .../DBAL/Platforms/Keywords/MsSQLKeywords.php | 2 +- .../DBAL/Platforms/Keywords/MySQLKeywords.php | 2 +- .../Platforms/Keywords/OracleKeywords.php | 2 +- .../Platforms/Keywords/PostgreSQLKeywords.php | 2 +- .../Keywords/ReservedKeywordsValidator.php | 22 +- .../Platforms/Keywords/SQLiteKeywords.php | 2 +- .../Doctrine/DBAL/Platforms/MySqlPlatform.php | 185 +- .../DBAL/Platforms/OraclePlatform.php | 148 +- .../DBAL/Platforms/PostgreSqlPlatform.php | 121 +- .../DBAL/Platforms/SQLServer2005Platform.php | 52 + .../DBAL/Platforms/SQLServer2008Platform.php | 90 + ...sSqlPlatform.php => SQLServerPlatform.php} | 161 +- .../DBAL/Platforms/SqlitePlatform.php | 163 +- .../Doctrine/DBAL/Portability/Connection.php | 29 +- .../Doctrine/DBAL/Portability/Statement.php | 44 +- .../Query/Expression/CompositeExpression.php | 44 +- .../Query/Expression/ExpressionBuilder.php | 20 +- src/lib/Doctrine/DBAL/Query/QueryBuilder.php | 77 +- .../Doctrine/DBAL/Query/QueryException.php | 40 + src/lib/Doctrine/DBAL/SQLParserUtils.php | 80 +- .../Doctrine/DBAL/Schema/AbstractAsset.php | 115 +- .../DBAL/Schema/AbstractSchemaManager.php | 122 +- src/lib/Doctrine/DBAL/Schema/Column.php | 56 +- src/lib/Doctrine/DBAL/Schema/Comparator.php | 50 +- .../Doctrine/DBAL/Schema/DB2SchemaManager.php | 34 +- src/lib/Doctrine/DBAL/Schema/Index.php | 4 +- .../DBAL/Schema/MySqlSchemaManager.php | 68 +- .../DBAL/Schema/OracleSchemaManager.php | 2 +- .../DBAL/Schema/PostgreSqlSchemaManager.php | 89 +- ...Manager.php => SQLServerSchemaManager.php} | 58 +- src/lib/Doctrine/DBAL/Schema/Schema.php | 78 +- src/lib/Doctrine/DBAL/Schema/SchemaConfig.php | 30 +- src/lib/Doctrine/DBAL/Schema/Sequence.php | 2 +- .../DBAL/Schema/SqliteSchemaManager.php | 37 +- src/lib/Doctrine/DBAL/Schema/Table.php | 48 +- src/lib/Doctrine/DBAL/Schema/TableDiff.php | 7 +- .../Visitor/CreateSchemaSqlCollector.php | 6 +- .../Schema/Visitor/DropSchemaSqlCollector.php | 55 +- .../Doctrine/DBAL/Schema/Visitor/Graphviz.php | 10 +- .../Schema/Visitor/RemoveNamespacedAssets.php | 113 + src/lib/Doctrine/DBAL/Statement.php | 110 +- .../Console/Command/ReservedWordsCommand.php | 24 +- .../Tools/Console/Command/RunSqlCommand.php | 8 +- src/lib/Doctrine/DBAL/Types/BigIntType.php | 2 +- src/lib/Doctrine/DBAL/Types/BlobType.php | 67 + src/lib/Doctrine/DBAL/Types/BooleanType.php | 2 +- .../DBAL/Types/ConversionException.php | 6 +- src/lib/Doctrine/DBAL/Types/DateTimeType.php | 2 +- .../Doctrine/DBAL/Types/DateTimeTzType.php | 2 +- src/lib/Doctrine/DBAL/Types/DateType.php | 4 +- src/lib/Doctrine/DBAL/Types/TimeType.php | 2 +- src/lib/Doctrine/DBAL/Types/Type.php | 14 +- src/lib/Doctrine/DBAL/Version.php | 6 +- src/lib/Doctrine/ORM/AbstractQuery.php | 416 ++-- src/lib/Doctrine/ORM/Configuration.php | 113 +- src/lib/Doctrine/ORM/EntityManager.php | 264 ++- src/lib/Doctrine/ORM/EntityRepository.php | 107 +- .../Doctrine/ORM/Event/LifecycleEventArgs.php | 43 +- .../ORM/Event/LoadClassMetadataEventArgs.php | 40 +- .../Doctrine/ORM/Event/OnClearEventArgs.php | 40 +- .../Doctrine/ORM/Event/OnFlushEventArgs.php | 46 +- .../Doctrine/ORM/Event/PostFlushEventArgs.php | 61 + .../Doctrine/ORM/Event/PreFlushEventArgs.php | 53 + .../Doctrine/ORM/Event/PreUpdateEventArgs.php | 79 +- src/lib/Doctrine/ORM/Events.php | 66 +- .../Doctrine/ORM/Id/AbstractIdGenerator.php | 4 +- src/lib/Doctrine/ORM/Id/AssignedGenerator.php | 56 +- src/lib/Doctrine/ORM/Id/IdentityGenerator.php | 2 +- src/lib/Doctrine/ORM/Id/SequenceGenerator.php | 15 +- src/lib/Doctrine/ORM/Id/TableGenerator.php | 8 +- .../ORM/Internal/CommitOrderCalculator.php | 30 +- .../Internal/Hydration/AbstractHydrator.php | 243 ++- .../ORM/Internal/Hydration/ArrayHydrator.php | 168 +- .../Internal/Hydration/HydrationException.php | 11 +- .../ORM/Internal/Hydration/IterableResult.php | 4 +- .../ORM/Internal/Hydration/ObjectHydrator.php | 253 ++- .../ORM/Internal/Hydration/ScalarHydrator.php | 23 +- .../Hydration/SimpleObjectHydrator.php | 196 +- .../Hydration/SingleScalarHydrator.php | 35 +- src/lib/Doctrine/ORM/Mapping/Annotation.php | 24 + .../Mapping/Builder/AssociationBuilder.php | 167 ++ .../Mapping/Builder/ClassMetadataBuilder.php | 470 +++++ .../ORM/Mapping/Builder/FieldBuilder.php | 223 ++ .../Builder/ManyToManyAssociationBuilder.php | 86 + .../Builder/OneToManyAssociationBuilder.php | 62 + .../ORM/Mapping/ChangeTrackingPolicy.php | 30 + .../Doctrine/ORM/Mapping/ClassMetadata.php | 304 +-- .../ORM/Mapping/ClassMetadataFactory.php | 205 +- .../ORM/Mapping/ClassMetadataInfo.php | 617 +++++- src/lib/Doctrine/ORM/Mapping/Column.php | 46 + .../ORM/Mapping/DiscriminatorColumn.php | 36 + .../Doctrine/ORM/Mapping/DiscriminatorMap.php | 30 + .../ORM/Mapping/Driver/AbstractFileDriver.php | 39 +- .../ORM/Mapping/Driver/AnnotationDriver.php | 101 +- .../ORM/Mapping/Driver/DatabaseDriver.php | 38 +- .../Mapping/Driver/DoctrineAnnotations.php | 222 +- .../Doctrine/ORM/Mapping/Driver/Driver.php | 8 +- .../ORM/Mapping/Driver/DriverChain.php | 13 +- .../Mapping/Driver/SimplifiedXmlDriver.php | 176 ++ .../Mapping/Driver/SimplifiedYamlDriver.php | 181 ++ .../ORM/Mapping/Driver/StaticPHPDriver.php | 10 +- .../Doctrine/ORM/Mapping/Driver/XmlDriver.php | 65 +- .../ORM/Mapping/Driver/YamlDriver.php | 69 +- .../ORM/Mapping/ElementCollection.php | 31 + src/lib/Doctrine/ORM/Mapping/Entity.php | 32 + .../Doctrine/ORM/Mapping/GeneratedValue.php | 30 + .../ORM/Mapping/HasLifecycleCallbacks.php | 28 + src/lib/Doctrine/ORM/Mapping/Id.php | 28 + src/lib/Doctrine/ORM/Mapping/Index.php | 32 + .../Doctrine/ORM/Mapping/InheritanceType.php | 30 + src/lib/Doctrine/ORM/Mapping/JoinColumn.php | 42 + src/lib/Doctrine/ORM/Mapping/JoinColumns.php | 30 + src/lib/Doctrine/ORM/Mapping/JoinTable.php | 36 + src/lib/Doctrine/ORM/Mapping/ManyToMany.php | 42 + src/lib/Doctrine/ORM/Mapping/ManyToOne.php | 36 + .../Doctrine/ORM/Mapping/MappedSuperclass.php | 30 + .../Doctrine/ORM/Mapping/MappingException.php | 46 +- src/lib/Doctrine/ORM/Mapping/NamedQueries.php | 30 + src/lib/Doctrine/ORM/Mapping/NamedQuery.php | 32 + src/lib/Doctrine/ORM/Mapping/OneToMany.php | 40 + src/lib/Doctrine/ORM/Mapping/OneToOne.php | 40 + src/lib/Doctrine/ORM/Mapping/OrderBy.php | 30 + src/lib/Doctrine/ORM/Mapping/PostLoad.php | 28 + src/lib/Doctrine/ORM/Mapping/PostPersist.php | 28 + src/lib/Doctrine/ORM/Mapping/PostRemove.php | 28 + src/lib/Doctrine/ORM/Mapping/PostUpdate.php | 28 + src/lib/Doctrine/ORM/Mapping/PreFlush.php | 28 + src/lib/Doctrine/ORM/Mapping/PrePersist.php | 28 + src/lib/Doctrine/ORM/Mapping/PreRemove.php | 28 + src/lib/Doctrine/ORM/Mapping/PreUpdate.php | 28 + .../ORM/Mapping/SequenceGenerator.php | 34 + src/lib/Doctrine/ORM/Mapping/Table.php | 36 + .../Doctrine/ORM/Mapping/UniqueConstraint.php | 32 + src/lib/Doctrine/ORM/Mapping/Version.php | 28 + src/lib/Doctrine/ORM/NativeQuery.php | 23 +- src/lib/Doctrine/ORM/NoResultException.php | 2 +- .../Doctrine/ORM/NonUniqueResultException.php | 2 +- src/lib/Doctrine/ORM/ORMException.php | 33 +- .../ORM/ORMInvalidArgumentException.php | 107 + .../Doctrine/ORM/OptimisticLockException.php | 1 + src/lib/Doctrine/ORM/PersistentCollection.php | 302 ++- .../AbstractCollectionPersister.php | 34 +- .../AbstractEntityInheritancePersister.php | 26 +- .../ORM/Persisters/BasicEntityPersister.php | 600 ++++-- .../Persisters/JoinedSubclassPersister.php | 160 +- .../ORM/Persisters/ManyToManyPersister.php | 325 ++- .../ORM/Persisters/OneToManyPersister.php | 175 +- .../ORM/Persisters/SingleTablePersister.php | 50 +- .../ORM/Persisters/UnionSubclassPersister.php | 2 +- src/lib/Doctrine/ORM/Proxy/Autoloader.php | 78 + src/lib/Doctrine/ORM/Proxy/Proxy.php | 8 +- src/lib/Doctrine/ORM/Proxy/ProxyException.php | 10 +- src/lib/Doctrine/ORM/Proxy/ProxyFactory.php | 147 +- src/lib/Doctrine/ORM/Query.php | 201 +- .../ORM/Query/AST/ArithmeticFactor.php | 2 +- .../ORM/Query/AST/CoalesceExpression.php | 6 +- .../Query/AST/CollectionMemberExpression.php | 2 +- .../ORM/Query/AST/DeleteStatement.php | 2 +- .../EmptyCollectionComparisonExpression.php | 2 +- src/lib/Doctrine/ORM/Query/AST/FromClause.php | 4 +- .../ORM/Query/AST/Functions/AbsFunction.php | 4 +- .../Query/AST/Functions/BitAndFunction.php | 63 + .../ORM/Query/AST/Functions/BitOrFunction.php | 63 + .../AST/Functions/CurrentDateFunction.php | 2 +- .../Query/AST/Functions/IdentityFunction.php | 68 + .../Query/AST/Functions/LengthFunction.php | 4 +- .../Query/AST/Functions/LocateFunction.php | 12 +- .../ORM/Query/AST/Functions/LowerFunction.php | 4 +- .../ORM/Query/AST/Functions/ModFunction.php | 8 +- .../ORM/Query/AST/Functions/SizeFunction.php | 18 +- .../ORM/Query/AST/Functions/SqrtFunction.php | 4 +- .../Query/AST/Functions/SubstringFunction.php | 6 +- .../ORM/Query/AST/Functions/UpperFunction.php | 4 +- .../ORM/Query/AST/GeneralCaseExpression.php | 48 + .../AST/IdentificationVariableDeclaration.php | 2 +- .../Doctrine/ORM/Query/AST/InExpression.php | 6 +- src/lib/Doctrine/ORM/Query/AST/IndexBy.php | 4 +- .../ORM/Query/AST/InstanceOfExpression.php | 5 +- src/lib/Doctrine/ORM/Query/AST/Join.php | 4 +- .../AST/JoinAssociationPathExpression.php | 2 +- .../ORM/Query/AST/JoinVariableDeclaration.php | 2 +- src/lib/Doctrine/ORM/Query/AST/Literal.php | 6 +- src/lib/Doctrine/ORM/Query/AST/Node.php | 26 +- .../Query/AST/NullComparisonExpression.php | 2 +- .../ORM/Query/AST/NullIfExpression.php | 6 +- .../Doctrine/ORM/Query/AST/OrderByItem.php | 2 +- .../ORM/Query/AST/PartialObjectExpression.php | 2 +- .../Doctrine/ORM/Query/AST/PathExpression.php | 10 +- .../Query/AST/RangeVariableDeclaration.php | 4 +- .../Doctrine/ORM/Query/AST/SelectClause.php | 2 +- .../ORM/Query/AST/SelectExpression.php | 10 +- .../ORM/Query/AST/SelectStatement.php | 4 +- .../ORM/Query/AST/SimpleCaseExpression.php | 50 + .../ORM/Query/AST/SimpleSelectClause.php | 2 +- .../ORM/Query/AST/SimpleSelectExpression.php | 4 +- .../ORM/Query/AST/SimpleWhenClause.php | 48 + src/lib/Doctrine/ORM/Query/AST/Subselect.php | 4 +- .../ORM/Query/AST/SubselectFromClause.php | 4 +- .../ORM/Query/AST/UpdateStatement.php | 2 +- src/lib/Doctrine/ORM/Query/AST/WhenClause.php | 48 + .../ORM/Query/Exec/AbstractSqlExecutor.php | 23 +- .../Query/Exec/MultiTableDeleteExecutor.php | 19 +- .../Query/Exec/MultiTableUpdateExecutor.php | 49 +- .../ORM/Query/Exec/SingleSelectExecutor.php | 8 +- .../Exec/SingleTableDeleteUpdateExecutor.php | 10 +- src/lib/Doctrine/ORM/Query/Expr.php | 14 +- src/lib/Doctrine/ORM/Query/Expr/Andx.php | 1 + src/lib/Doctrine/ORM/Query/Expr/Base.php | 12 +- .../Doctrine/ORM/Query/Expr/Comparison.php | 2 +- src/lib/Doctrine/ORM/Query/Expr/Composite.php | 18 +- src/lib/Doctrine/ORM/Query/Expr/From.php | 36 +- src/lib/Doctrine/ORM/Query/Expr/Join.php | 4 +- src/lib/Doctrine/ORM/Query/Expr/Math.php | 8 +- src/lib/Doctrine/ORM/Query/Expr/Orx.php | 3 +- .../Doctrine/ORM/Query/Filter/SQLFilter.php | 122 ++ .../Doctrine/ORM/Query/FilterCollection.php | 198 ++ src/lib/Doctrine/ORM/Query/Lexer.php | 180 +- .../ORM/Query/ParameterTypeInferer.php | 8 +- src/lib/Doctrine/ORM/Query/Parser.php | 1182 ++++++----- src/lib/Doctrine/ORM/Query/ParserResult.php | 20 +- src/lib/Doctrine/ORM/Query/QueryException.php | 14 +- .../Doctrine/ORM/Query/ResultSetMapping.php | 177 +- .../ORM/Query/ResultSetMappingBuilder.php | 41 +- src/lib/Doctrine/ORM/Query/SqlWalker.php | 1503 ++++++++------ src/lib/Doctrine/ORM/Query/TreeWalker.php | 10 +- .../Doctrine/ORM/Query/TreeWalkerAdapter.php | 26 +- .../Doctrine/ORM/Query/TreeWalkerChain.php | 33 +- src/lib/Doctrine/ORM/QueryBuilder.php | 184 +- .../Command/ClearCache/MetadataCommand.php | 49 +- .../Command/ClearCache/QueryCommand.php | 49 +- .../Command/ClearCache/ResultCommand.php | 132 +- .../Command/ConvertDoctrine1SchemaCommand.php | 4 +- .../Console/Command/ConvertMappingCommand.php | 2 +- .../Command/GenerateEntitiesCommand.php | 6 +- .../Command/GenerateProxiesCommand.php | 4 +- .../Command/GenerateRepositoriesCommand.php | 4 +- .../ORM/Tools/Console/Command/InfoCommand.php | 2 +- .../Command/SchemaTool/UpdateCommand.php | 2 +- .../Console/Command/ValidateSchemaCommand.php | 2 +- .../ORM/Tools/Console/ConsoleRunner.php | 2 +- .../ORM/Tools/Console/MetadataFilter.php | 2 +- .../ORM/Tools/ConvertDoctrine1Schema.php | 2 +- .../ORM/Tools/DebugUnitOfWorkListener.php | 151 ++ .../DisconnectedClassMetadataFactory.php | 25 +- .../Doctrine/ORM/Tools/EntityGenerator.php | 131 +- .../Tools/Export/Driver/AbstractExporter.php | 44 +- .../Export/Driver/AnnotationExporter.php | 2 +- .../ORM/Tools/Export/Driver/PhpExporter.php | 12 +- .../ORM/Tools/Export/Driver/XmlExporter.php | 23 +- .../ORM/Tools/Export/Driver/YamlExporter.php | 12 +- .../ORM/Tools/Pagination/CountWalker.php | 80 + .../Tools/Pagination/LimitSubqueryWalker.php | 115 + .../ORM/Tools/Pagination/Paginator.php | 180 ++ .../ORM/Tools/Pagination/WhereInWalker.php | 142 ++ .../ORM/Tools/ResolveTargetEntityListener.php | 94 + src/lib/Doctrine/ORM/Tools/SchemaTool.php | 48 +- .../Doctrine/ORM/Tools/SchemaValidator.php | 264 ++- src/lib/Doctrine/ORM/Tools/Setup.php | 73 +- src/lib/Doctrine/ORM/Tools/ToolsException.php | 27 + src/lib/Doctrine/ORM/UnitOfWork.php | 1849 +++++++++++------ src/lib/Doctrine/ORM/Version.php | 6 +- 381 files changed, 22618 insertions(+), 6684 deletions(-) create mode 100644 src/Includes/Decorator/Plugin/Doctrine/Utils/.EntityManager.php.swp create mode 100644 src/lib/Doctrine/Common/Annotations/Annotation/Attribute.php create mode 100644 src/lib/Doctrine/Common/Annotations/Annotation/Attributes.php create mode 100644 src/lib/Doctrine/Common/Annotations/Annotation/Required.php create mode 100644 src/lib/Doctrine/Common/Annotations/Annotation/Target.php create mode 100644 src/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php create mode 100644 src/lib/Doctrine/Common/Cache/.CacheProvider.php.swp rename src/lib/Doctrine/Common/Cache/{AbstractCache.php => CacheProvider.php} (54%) create mode 100644 src/lib/Doctrine/Common/Cache/MemcachedCache.php create mode 100644 src/lib/Doctrine/Common/Cache/WinCacheCache.php create mode 100644 src/lib/Doctrine/Common/Comparable.php create mode 100644 src/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php create mode 100644 src/lib/Doctrine/Common/Persistence/ConnectionRegistry.php create mode 100644 src/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php create mode 100644 src/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php create mode 100644 src/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php create mode 100644 src/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php create mode 100644 src/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php create mode 100644 src/lib/Doctrine/Common/Persistence/ManagerRegistry.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/MappingException.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php create mode 100644 src/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php create mode 100644 src/lib/Doctrine/Common/Persistence/ObjectManagerAware.php create mode 100644 src/lib/Doctrine/Common/Persistence/PersistentObject.php create mode 100644 src/lib/Doctrine/Common/Persistence/Proxy.php create mode 100644 src/lib/Doctrine/Common/Util/ClassUtils.php create mode 100644 src/lib/Doctrine/DBAL/Cache/ArrayStatement.php create mode 100644 src/lib/Doctrine/DBAL/Cache/CacheException.php create mode 100644 src/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php create mode 100644 src/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php create mode 100644 src/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php create mode 100644 src/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php create mode 100644 src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php create mode 100644 src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php create mode 100644 src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php create mode 100644 src/lib/Doctrine/DBAL/Driver/ResultStatement.php create mode 100644 src/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php create mode 100644 src/lib/Doctrine/DBAL/Logging/LoggerChain.php create mode 100644 src/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php create mode 100644 src/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php rename src/lib/Doctrine/DBAL/Platforms/{MsSqlPlatform.php => SQLServerPlatform.php} (84%) create mode 100644 src/lib/Doctrine/DBAL/Query/QueryException.php rename src/lib/Doctrine/DBAL/Schema/{MsSqlSchemaManager.php => SQLServerSchemaManager.php} (75%) create mode 100644 src/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php create mode 100644 src/lib/Doctrine/DBAL/Types/BlobType.php create mode 100644 src/lib/Doctrine/ORM/Event/PostFlushEventArgs.php create mode 100644 src/lib/Doctrine/ORM/Event/PreFlushEventArgs.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Annotation.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php create mode 100644 src/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Column.php create mode 100644 src/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php create mode 100644 src/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php create mode 100644 src/lib/Doctrine/ORM/Mapping/ElementCollection.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Entity.php create mode 100644 src/lib/Doctrine/ORM/Mapping/GeneratedValue.php create mode 100644 src/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Id.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Index.php create mode 100644 src/lib/Doctrine/ORM/Mapping/InheritanceType.php create mode 100644 src/lib/Doctrine/ORM/Mapping/JoinColumn.php create mode 100644 src/lib/Doctrine/ORM/Mapping/JoinColumns.php create mode 100644 src/lib/Doctrine/ORM/Mapping/JoinTable.php create mode 100644 src/lib/Doctrine/ORM/Mapping/ManyToMany.php create mode 100644 src/lib/Doctrine/ORM/Mapping/ManyToOne.php create mode 100644 src/lib/Doctrine/ORM/Mapping/MappedSuperclass.php create mode 100644 src/lib/Doctrine/ORM/Mapping/NamedQueries.php create mode 100644 src/lib/Doctrine/ORM/Mapping/NamedQuery.php create mode 100644 src/lib/Doctrine/ORM/Mapping/OneToMany.php create mode 100644 src/lib/Doctrine/ORM/Mapping/OneToOne.php create mode 100644 src/lib/Doctrine/ORM/Mapping/OrderBy.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PostLoad.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PostPersist.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PostRemove.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PostUpdate.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PreFlush.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PrePersist.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PreRemove.php create mode 100644 src/lib/Doctrine/ORM/Mapping/PreUpdate.php create mode 100644 src/lib/Doctrine/ORM/Mapping/SequenceGenerator.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Table.php create mode 100644 src/lib/Doctrine/ORM/Mapping/UniqueConstraint.php create mode 100644 src/lib/Doctrine/ORM/Mapping/Version.php create mode 100644 src/lib/Doctrine/ORM/ORMInvalidArgumentException.php create mode 100644 src/lib/Doctrine/ORM/Proxy/Autoloader.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php create mode 100644 src/lib/Doctrine/ORM/Query/AST/WhenClause.php create mode 100644 src/lib/Doctrine/ORM/Query/Filter/SQLFilter.php create mode 100644 src/lib/Doctrine/ORM/Query/FilterCollection.php create mode 100644 src/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php create mode 100644 src/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php create mode 100644 src/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php create mode 100644 src/lib/Doctrine/ORM/Tools/Pagination/Paginator.php create mode 100644 src/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php create mode 100644 src/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/.EntityManager.php.swp b/src/Includes/Decorator/Plugin/Doctrine/Utils/.EntityManager.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..2f2a53a15b166c3e7882824414e44f6c2c17a497 GIT binary patch literal 16384 zcmeI3ZEPGz8OJw$p@h;x6Ql}|%A~mUow4t1x1`8zOw654j@mxsvmt?N+`YXy-!^-@ z*WJ0ZkEjLFLTQ8uiV8>|gv1vLMMC965wrrO6{1q95HI~esSrg-h*m=46D=T>|1&eY zxA)@25h)UASNeJPc6Z*MdFGjUo*h>vKT=p?w`8Ub9B(y@FCRZ${No?S4RMuWwA%sQ zJ@2t?nZC$azNqqc#_=rE8J^@`WSDKXDvoV!)J4O|ZacQ%*}%851=n&~RUTyX-12-= zcz$-pX>HnWHt$)&w_ToH7q$~*=Urio&XVbxo7~Sd>&@XsC3h1EBoY{qz*WXg(^Hf0 zzWxB)zi)luX>ucxKq7%e0*M3?2_zCoB#=lTkw7AW|8EJ1<|W2!XyPT{ey~S#DbB~h zXY_BJk|U8oB7sB#i3Ab}Boas@kVqhrKq7%e0*M3?2_zEuAC-VvHH`hJ`z;gz!1sTO z0sP}FhVeZ3EqD(66r2U$1rLJ?7y*B}+Atmi0vrT?#h!tez;oc2;4$z?Z~#30X2bY8 zxEI_7YJh_&FbT%NJHWNzpH~{j%iz!8A#etq0s=HZ4%`5)0eitqZ!(O(fEU42;0f?B zI0f3k1;cbTW*EN#9zmeKi+;%YIskuT95RYrO|DrLl~o3=YKYgVf| zzrIK85JTat9BwHo7gv|cOJ=iayPIW|M4xh$Q%bk(q|B!2dxBenSDC6MtF>H<>dpc# zmbfshrZ9E6y(Q#i!&}(ZLT_t1q*dLQobp=_DzZuxq4Y|M}s_o&p2Av0O;a=7oOEO+;m^N?Z147gGO&vj8D2yKO$ z5~PIR;%W9CX8OL_NsX#fN7=xK4OYVTGaxy89sX})wJ5|Q@jzbTLg8Py%-vBQX(qp_m5%gIqyaI1Vf63a+9 zhR0!;$mBu-N^==w-QkKKeZS~VsHssVA0Htj2orBM_#Lpe@@MY^0UNxOY}ef_+d9Ea%i=-6Y!NW-@CJ7U z_BYCO`p-av&<15}v|`YEc8#SD*qEF|)P_g^>99h2&e&;8^)yEbo+hW39Cp@ z0@_u%se7GC^TDX!SaD^oP+Xo{G^9{^?U>6<$6-=Yco5lt`DSFv1}4f#I$9G3=DcB3 z9?f!X(;t}da1ZqwW@zPjyx_Xkm5IH0RqLJmd$z0gNmM;!4Yijw65>h2te|sX=T&1^ zPaceK3+`3})}1<|Ewg2{Wwu*`xo|c%7zuqWTx4j0({H)HAYsc+?TQ=yKGs*VA-kA# zBxssgszh`5&J~ceI$4yS;?aTOGAF76-J@#MY=_5c!45mNdx9P^Ru`fCJy zXNx+ERI#+k@Ct?_s%Ux5j&E<)1(r(TRmw`U>B*@nWpJ>3WqID_j@Kl+!WI{E>^9r2 zd51096z#WWGYlq-$y@>~e**5eIo52*-E4_ER!%si?K*!}OjQbIZWBuZhDr;b)6$?v z#LAHsh9z}COV0OZ(30>0tf7(vMn8nxD@PW1Y>P9?q*bk3WgV}@Of2P^9cDw?RU2hG zoebsWRRq?^Fs4k@eXq4y$Cn;cFGuxFh1~pdX+9&ig_PAAy{HsX zy+A)(a=A^j6Q$dQ8d5!$i)+Z66&J!X=qAyl19G5ZE^OP48FEjU2oBxMf-U+ZFS(d8 zZhJrNo+tl*3claB;UAL!Pv88Xfp7mHI1Wl+6^w%y;p4lY0StF_qfPLUHa4C2dzWOWRY49XC3w{W`2p$B-!7NCF1K{uQ(fpMM;j244V8FbQ6T zU;YaCF*pq@PyrtTd5{CQf~&z5;05^WPk?WMZvX*YumFAs-~0^t9C!fK0Qv75;G^Im z$bx^tFMk324EzLq9()!o0P@$L1z!RcFbS>%&qB682akeBfRuH=L!JCiB#=m;UjoVn zp}*ZLnkl0Q!iaWIJwN8SbZ<_~!u-j_?V2|)S5B$Xax6wwo>QxaO{|5mFvd#C#zv% z4~@00d7cxLRhtLWpEOAL1KvXvW`mc)9GvD@Y|Q7I&=&6JT7mEyYn>)^vp>t2Hc(FekI_B7%~hg}0tJ@zqN7~HXxVs_ z5$>q4VJaOfYM5`V+t}|K?-)*v2Luc$g#m{#^d9JG*MpGm!#RSa=V-7lN1wuewOxpf zg0gx&%H{ta4mfNw)j%KXIB(o4sgS5NNgr-;zmr2Cgcll3CpBWxWlWG!v>fIu42Ycb zbxJ=l=Ey1V+_FqqmXRQNNr7$ER0eAotCfr-E{6_Y3ZeF;Vt#&6MGH5U!|)hV4JM;V zy^okegOcTY1C1*9Sc+>33{D9PQws8RXo)J|j>Mudp}xkNuVd@FzC)TY(0m%kN=bF_ zeYX+)m~tyQy)GKqQ#D!d3h34$ zQNFHb)AR5cewUucv^ab@e(ruDYB{`IrcXK}Roj;l?hn9MB=u9De7X;(hdq_EQ13UU zcsX<(3F92!oTzY>|B5NW*RJnL^|}dQ~cF1G8n%XUf+0QZ1z=i>;nAA$Qs-7 zJJ>F3YJ|D=pSu(M1r?zql6|?6r5`9M3hs^|t|0%5ds>BRA!2I(K!VtN`rF(pw_1o= zv^nevKK>xSQP5eXA~orD)Ho}Xpn?vj!$$bx%uMO_!pcUzxE429RDY`UE~TKpxI`Ke v&0dtvU^By3_B66@Ae_6V24x%`q4gs>w43js7)hhC@1UXZLxXq@nHv8F;A0OO literal 0 HcmV?d00001 diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php b/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php index be27e512ca..a7ec86292e 100644 --- a/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php +++ b/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php @@ -207,7 +207,8 @@ protected static function getHandler() */ protected static function getEntityGenerator() { - $generator = new \Includes\Decorator\Plugin\Doctrine\Utils\ModelGenerator(); + $generator = new \Doctrine\ORM\Tools\EntityGenerator(); + // \Includes\Decorator\Plugin\Doctrine\Utils\ModelGenerator(); $generator->setGenerateAnnotations(true); $generator->setRegenerateEntityIfExists(false); $generator->setUpdateEntityIfExists(true); diff --git a/src/classes/XLite/Core/Connection.php b/src/classes/XLite/Core/Connection.php index 4e925f9f7c..2359f32cb1 100644 --- a/src/classes/XLite/Core/Connection.php +++ b/src/classes/XLite/Core/Connection.php @@ -57,22 +57,27 @@ public function prepare($statement) * If the query is parameterized, a prepared statement is used. * If an SQLLogger is configured, the execution is logged. * - * @param string $query The SQL query to execute - * @param array $params The parameters to bind to the query, if any OPTIONAL - * @param array $types The parameters types to bind to the query, if any OPTIONAL + * @param string $query The SQL query to execute + * @param array $params The parameters to bind to the query, if any OPTIONAL + * @param array $types The parameters types to bind to the query, if any OPTIONAL + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $qcp Cache profile OPTIONAL * * @return \Doctrine\DBAL\Driver\Statement * @throws \XLite\Core\PDOException * @see ____func_see____ * @since 1.0.0 */ - public function executeQuery($query, array $params = array(), $types = array()) - { + public function executeQuery( + $query, + array $params = array(), + $types = array(), + \Doctrine\DBAL\Cache\QueryCacheProfile $qcp = null + ) { try { - $result = parent::executeQuery($query, $params, $types); + $result = parent::executeQuery($query, $params, $types, $qcp); - } catch (\PDOException $e) { - throw new \XLite\Core\PDOException($e, $query, $params); + } catch (\PDOException $exception) { + throw new \XLite\Core\PDOException($exception, $query, $params); } return $result; diff --git a/src/classes/XLite/Core/FileCache.php b/src/classes/XLite/Core/FileCache.php index 5240fda5d9..7d20b76abe 100644 --- a/src/classes/XLite/Core/FileCache.php +++ b/src/classes/XLite/Core/FileCache.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -class FileCache extends \Doctrine\Common\Cache\AbstractCache +class FileCache extends \Doctrine\Common\Cache\CacheProvider { /** * Cache directory path @@ -233,22 +233,6 @@ public function deleteAll() return $keys; } - /** - * Get id + namespace - * - * @param string $id Cell id - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function _getNamespacedId($id) - { - return (!$this->_namespace || strpos($id, $this->_namespace) === 0) - ? $id - : $this->_namespace . $id; - } - /** * Get cache cell by id * @@ -258,7 +242,7 @@ protected function _getNamespacedId($id) * @see ____func_see____ * @since 1.0.0 */ - protected function _doFetch($id) + protected function doFetch($id) { $path = $this->getPathById($id); @@ -280,7 +264,7 @@ protected function _doFetch($id) * @see ____func_see____ * @since 1.0.0 */ - protected function _doContains($id) + protected function doContains($id) { $path = $this->getPathById($id); @@ -298,7 +282,7 @@ protected function _doContains($id) * @see ____func_see____ * @since 1.0.0 */ - protected function _doSave($id, $data, $lifeTime = 0) + protected function doSave($id, $data, $lifeTime = 0) { $lifeTime = strval(min(0, intval($lifeTime))); @@ -317,7 +301,7 @@ protected function _doSave($id, $data, $lifeTime = 0) * @see ____func_see____ * @since 1.0.0 */ - protected function _doDelete($id) + protected function doDelete($id) { $path = $this->getPathById($id); @@ -330,6 +314,30 @@ protected function _doDelete($id) return $result; } + /** + * doFlush + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + protected function doFlush() + { + return true; + } + + /** + * doGetStats + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function doGetStats() + { + return array(); + } + /** * Get cell path by cell id * diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index 397f69a31b..fdddf25fd8 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -44,17 +44,17 @@ * @Index (name="shipping_id", columns={"shipping_id"}) * } * ) + * * @HasLifecycleCallbacks * @InheritanceType ("SINGLE_TABLE") - * @DiscriminatorColumn (name="is_order", type="integer", length="1") - * @DiscriminatorMap ({"1" = "XLite\Model\Order", "0" = "XLite\Model\Cart"}) + * @DiscriminatorColumn (name="is_order", type="integer", length=1) + * @DiscriminatorMap ({1 = "XLite\Model\Order", 0 = "XLite\Model\Cart"}) */ class Order extends \XLite\Model\Base\SurchargeOwner { /** * Order statuses */ - const STATUS_TEMPORARY = 'T'; const STATUS_INPROGRESS = 'I'; const STATUS_QUEUED = 'Q'; diff --git a/src/classes/XLite/Model/OrderItem.php b/src/classes/XLite/Model/OrderItem.php index f4e29b2be3..4908bfeef7 100644 --- a/src/classes/XLite/Model/OrderItem.php +++ b/src/classes/XLite/Model/OrderItem.php @@ -42,8 +42,9 @@ * @Index (name="amount", columns={"amount"}) * } * ) + * * @InheritanceType ("SINGLE_TABLE") - * @DiscriminatorColumn (name="object_type", type="string", length="16") + * @DiscriminatorColumn (name="object_type", type="string", length=16) * @DiscriminatorMap ({"product" = "XLite\Model\OrderItem"}) */ class OrderItem extends \XLite\Model\Base\SurchargeOwner diff --git a/src/classes/XLite/Model/Payment/Method.php b/src/classes/XLite/Model/Payment/Method.php index 49708aed87..b7e6aee711 100644 --- a/src/classes/XLite/Model/Payment/Method.php +++ b/src/classes/XLite/Model/Payment/Method.php @@ -64,7 +64,7 @@ class Method extends \XLite\Model\Base\I18n * @see ____var_see____ * @since 1.0.0 * - * @Column (type="string", length="128") + * @Column (type="string", length=128) */ protected $service_name; diff --git a/src/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/src/lib/Doctrine/Common/Annotations/Annotation/Attribute.php new file mode 100644 index 0000000000..21597b14c9 --- /dev/null +++ b/src/lib/Doctrine/Common/Annotations/Annotation/Attribute.php @@ -0,0 +1,47 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the attribute type during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Attribute +{ + /** + * @var string + */ + public $name; + + /** + * @var string + */ + public $type; + + /** + * @var boolean + */ + public $required = false; +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/src/lib/Doctrine/Common/Annotations/Annotation/Attributes.php new file mode 100644 index 0000000000..6e314be463 --- /dev/null +++ b/src/lib/Doctrine/Common/Annotations/Annotation/Attributes.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the types of all declared attributes during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Attributes +{ + /** + * @var array + */ + public $value; +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/src/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php index 21bc1f8484..1b2b20ac19 100644 --- a/src/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ b/src/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php @@ -23,6 +23,7 @@ * Annotation that can be used to signal to the parser to ignore specific * annotations during the parsing process. * + * @Annotation * @author Johannes M. Schmitt */ final class IgnoreAnnotation diff --git a/src/lib/Doctrine/Common/Annotations/Annotation/Required.php b/src/lib/Doctrine/Common/Annotations/Annotation/Required.php new file mode 100644 index 0000000000..7b89a02288 --- /dev/null +++ b/src/lib/Doctrine/Common/Annotations/Annotation/Required.php @@ -0,0 +1,33 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check if that attribute is required during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Required +{ +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Annotations/Annotation/Target.php b/src/lib/Doctrine/Common/Annotations/Annotation/Target.php new file mode 100644 index 0000000000..c41896add0 --- /dev/null +++ b/src/lib/Doctrine/Common/Annotations/Annotation/Target.php @@ -0,0 +1,105 @@ +. + */ + +namespace Doctrine\Common\Annotations\Annotation; + +/** + * Annotation that can be used to signal to the parser + * to check the annotation target during the parsing process. + * + * @author Fabio B. Silva + * + * @Annotation + */ +final class Target +{ + const TARGET_CLASS = 1; + const TARGET_METHOD = 2; + const TARGET_PROPERTY = 4; + const TARGET_ANNOTATION = 8; + const TARGET_ALL = 15; + + /** + * @var array + */ + private static $map = array( + 'ALL' => self::TARGET_ALL, + 'CLASS' => self::TARGET_CLASS, + 'METHOD' => self::TARGET_METHOD, + 'PROPERTY' => self::TARGET_PROPERTY, + 'ANNOTATION' => self::TARGET_ANNOTATION, + ); + + /** + * @var array + */ + public $value; + + /** + * Targets as bitmask. + * + * @var integer + */ + public $targets; + + /** + * Literal target declaration. + * + * @var integer + */ + public $literal; + + /** + * Annotation construct + * + * @param array $values + */ + public function __construct(array $values) + { + if (!isset($values['value'])){ + $values['value'] = null; + } + if (is_string($values['value'])){ + $values['value'] = array($values['value']); + } + if (!is_array($values['value'])){ + throw new \InvalidArgumentException( + sprintf('@Target expects either a string value, or an array of strings, "%s" given.', + is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) + ) + ); + } + + $bitmask = 0; + foreach ($values['value'] as $literal) { + if(!isset(self::$map[$literal])){ + throw new \InvalidArgumentException( + sprintf('Invalid Target "%s". Available targets: [%s]', + $literal, implode(', ', array_keys(self::$map))) + ); + } + $bitmask += self::$map[$literal]; + } + + $this->targets = $bitmask; + $this->value = $values['value']; + $this->literal = implode(', ', $this->value); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Annotations/AnnotationException.php b/src/lib/Doctrine/Common/Annotations/AnnotationException.php index d2c6ccea75..fdc1913a12 100644 --- a/src/lib/Doctrine/Common/Annotations/AnnotationException.php +++ b/src/lib/Doctrine/Common/Annotations/AnnotationException.php @@ -51,4 +51,61 @@ public static function semanticalError($message) { return new self('[Semantical Error] ' . $message); } + + /** + * Creates a new AnnotationException describing an error which occurred during + * the creation of the annotation. + * + * @since 2.2 + * @param string $message + * @return AnnotationException + */ + public static function creationError($message) + { + return new self('[Creation Error] ' . $message); + } + + /** + * Creates a new AnnotationException describing an type error of an attribute. + * + * @since 2.2 + * @param string $attributeName + * @param string $annotationName + * @param string $context + * @param string $expected + * @param mixed $actual + * @return AnnotationException + */ + public static function typeError($attributeName, $annotationName, $context, $expected, $actual) + { + return new self(sprintf( + '[Type Error] Attribute "%s" of @%s declared on %s expects %s, but got %s.', + $attributeName, + $annotationName, + $context, + $expected, + is_object($actual) ? 'an instance of '.get_class($actual) : gettype($actual) + )); + } + + /** + * Creates a new AnnotationException describing an required error of an attribute. + * + * @since 2.2 + * @param string $attributeName + * @param string $annotationName + * @param string $context + * @param string $expected + * @return AnnotationException + */ + public static function requiredError($attributeName, $annotationName, $context, $expected) + { + return new self(sprintf( + '[Type Error] Attribute "%s" of @%s declared on %s expects %s. This value should not be null.', + $attributeName, + $annotationName, + $context, + $expected + )); + } } \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Annotations/AnnotationReader.php b/src/lib/Doctrine/Common/Annotations/AnnotationReader.php index 3b6e925b82..dda8b231f1 100644 --- a/src/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ b/src/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -20,13 +20,12 @@ namespace Doctrine\Common\Annotations; use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation; +use Doctrine\Common\Annotations\Annotation\Target; use Closure; use ReflectionClass; use ReflectionMethod; use ReflectionProperty; -require_once __DIR__ . '/Annotation/IgnoreAnnotation.php'; - /** * A reader for docblock annotations. * @@ -65,7 +64,10 @@ final class AnnotationReader implements Reader 'deprec'=> true, 'author'=> true, 'property' => true, 'method' => true, 'abstract'=> true, 'exception'=> true, 'magic' => true, 'api' => true, 'final'=> true, 'filesource'=> true, 'throw' => true, 'uses' => true, - 'usedby'=> true, 'private' => true, 'Annotation' => true, + 'usedby'=> true, 'private' => true, 'Annotation' => true, 'override' => true, + 'codeCoverageIgnore' => true, 'codeCoverageIgnoreStart' => true, 'codeCoverageIgnoreEnd' => true, + 'Required' => true, 'Attribute' => true, 'Attributes' => true, + 'Target' => true, 'SuppressWarnings' => true, ); /** @@ -114,24 +116,14 @@ static public function addGlobalIgnoredName($name) private $ignoredAnnotationNames = array(); /** - * @var string - */ - private $defaultAnnotationNamespace = false; - - /** - * @var bool - */ - private $enablePhpImports = true; - - /** - * Constructor. Initializes a new AnnotationReader that uses the given Cache provider. + * Constructor. * - * @param DocParser $parser The parser to use. If none is provided, the default parser is used. + * Initializes a new AnnotationReader. */ public function __construct() { AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php'); - + $this->parser = new DocParser; $this->preParser = new DocParser; @@ -141,86 +133,16 @@ public function __construct() $this->phpParser = new PhpParser; } - /** - * Ignore not imported annotations and not throw an exception. - * - * @param bool $bool - */ - public function setIgnoreNotImportedAnnotations($bool) - { - $this->parser->setIgnoreNotImportedAnnotations($bool); - } - - /** - * Detect imports by parsing the use statements of affected files. - * - * @deprecated Will be removed in 3.0, imports will always be enabled. - * @param bool $flag - */ - public function setEnableParsePhpImports($flag) - { - $this->enablePhpImports = $flag; - } - - /** - * @deprecated Will be removed in 3.0, imports will always be enabled. - * @return bool - */ - public function isParsePhpImportsEnabled() - { - return $this->enablePhpImports; - } - - /** - * Sets the default namespace that the AnnotationReader should assume for annotations - * with not fully qualified names. - * - * @deprecated This method will be removed in Doctrine Common 3.0 - * @param string $defaultNamespace - */ - public function setDefaultAnnotationNamespace($defaultNamespace) - { - $this->defaultAnnotationNamespace = $defaultNamespace; - } - - /** - * Sets the custom function to use for creating new annotations on the - * underlying parser. - * - * The function is supplied two arguments. The first argument is the name - * of the annotation and the second argument an array of values for this - * annotation. The function is assumed to return an object or NULL. - * Whenever the function returns NULL for an annotation, the implementation falls - * back to the default annotation creation process of the underlying parser. - * - * @deprecated This method will be removed in Doctrine Common 3.0 - * @param Closure $func - */ - public function setAnnotationCreationFunction(Closure $func) - { - $this->parser->setAnnotationCreationFunction($func); - } - - /** - * Sets an alias for an annotation namespace. - * - * @param string $namespace - * @param string $alias - */ - public function setAnnotationNamespaceAlias($namespace, $alias) - { - $this->parser->setAnnotationNamespaceAlias($namespace, $alias); - } - /** * Gets the annotations applied to a class. * - * @param string|ReflectionClass $class The name or ReflectionClass of the class from which - * the class annotations should be read. + * @param ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. * @return array An array of Annotations. */ public function getClassAnnotations(ReflectionClass $class) { + $this->parser->setTarget(Target::TARGET_CLASS); $this->parser->setImports($this->getImports($class)); $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); @@ -251,14 +173,15 @@ public function getClassAnnotation(ReflectionClass $class, $annotationName) /** * Gets the annotations applied to a property. * - * @param string|ReflectionProperty $property The name or ReflectionProperty of the property - * from which the annotations should be read. + * @param ReflectionProperty $property The ReflectionProperty of the property + * from which the annotations should be read. * @return array An array of Annotations. */ public function getPropertyAnnotations(ReflectionProperty $property) { $class = $property->getDeclaringClass(); $context = 'property ' . $class->getName() . "::\$" . $property->getName(); + $this->parser->setTarget(Target::TARGET_PROPERTY); $this->parser->setImports($this->getImports($class)); $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); @@ -288,14 +211,15 @@ public function getPropertyAnnotation(ReflectionProperty $property, $annotationN /** * Gets the annotations applied to a method. * - * @param ReflectionMethod $property The name or ReflectionMethod of the method from which - * the annotations should be read. + * @param ReflectionMethod $property The ReflectionMethod of the method from which + * the annotations should be read. * @return array An array of Annotations. */ public function getMethodAnnotations(ReflectionMethod $method) { $class = $method->getDeclaringClass(); $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; + $this->parser->setTarget(Target::TARGET_METHOD); $this->parser->setImports($this->getImports($class)); $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); @@ -355,16 +279,13 @@ private function getImports(ReflectionClass $class) */ private function collectParsingMetadata(ReflectionClass $class) { - $imports = self::$globalImports; $ignoredAnnotationNames = self::$globalIgnoredNames; - if ($this->enablePhpImports) { - $annotations = $this->preParser->parse($class->getDocComment()); - foreach ($annotations as $annotation) { - if ($annotation instanceof IgnoreAnnotation) { - foreach ($annotation->names AS $annot) { - $ignoredAnnotationNames[$annot] = true; - } + $annotations = $this->preParser->parse($class->getDocComment(), 'class '.$class->name); + foreach ($annotations as $annotation) { + if ($annotation instanceof IgnoreAnnotation) { + foreach ($annotation->names AS $annot) { + $ignoredAnnotationNames[$annot] = true; } } } @@ -372,12 +293,9 @@ private function collectParsingMetadata(ReflectionClass $class) $name = $class->getName(); $this->imports[$name] = array_merge( self::$globalImports, - ($this->enablePhpImports) ? $this->phpParser->parseClass($class) : array(), - ($this->enablePhpImports) ? array('__NAMESPACE__' => $class->getNamespaceName()) : array() + $this->phpParser->parseClass($class), + array('__NAMESPACE__' => $class->getNamespaceName()) ); - if ($this->defaultAnnotationNamespace) { - $this->imports[$name]['__DEFAULT__'] = $this->defaultAnnotationNamespace; - } $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames; } } diff --git a/src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php index db444762c4..60b00f5136 100644 --- a/src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ b/src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php @@ -23,66 +23,66 @@ final class AnnotationRegistry { /** * A map of namespaces to use for autoloading purposes based on a PSR-0 convention. - * - * Contains the namespace as key and an array of direectories as value. If the value is NULL + * + * Contains the namespace as key and an array of directories as value. If the value is NULL * the include path is used for checking for the corresponding file. - * + * * This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own. - * + * * @var array */ static private $autoloadNamespaces = array(); - + /** * A map of autoloader callables. - * + * * @var array */ static private $loaders = array(); - + static public function reset() { self::$autoloadNamespaces = array(); self::$loaders = array(); } - + static public function registerFile($file) { require_once $file; } - + /** * Add a namespace with one or many directories to look for files or null for the include path. - * + * * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * + * * @param string $namespace - * @param string|array|null $dirs + * @param string|array|null $dirs */ static public function registerAutoloadNamespace($namespace, $dirs = null) { self::$autoloadNamespaces[$namespace] = $dirs; } - + /** * Register multiple namespaces - * + * * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * + * * @param array $namespaces */ static public function registerAutoloadNamespaces(array $namespaces) { self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); } - + /** * Register an autoloading callabale for annotations, much like spl_autoload_register(). - * + * * NOTE: These class loaders HAVE to be silent when a class was not found! * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. - * - * @param callabale $callabale + * + * @param callabale $callabale */ static public function registerLoader($callabale) { @@ -91,10 +91,10 @@ static public function registerLoader($callabale) } self::$loaders[] = $callabale; } - + /** * Autoload an annotation class silently. - * + * * @param string $class * @return void */ @@ -118,7 +118,7 @@ static public function loadAnnotationClass($class) } } } - + foreach (self::$loaders AS $loader) { if (call_user_func($loader, $class) === true) { return true; @@ -126,4 +126,4 @@ static public function loadAnnotationClass($class) } return false; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/Common/Annotations/DocLexer.php b/src/lib/Doctrine/Common/Annotations/DocLexer.php index 4e89b603f6..c6223e3647 100644 --- a/src/lib/Doctrine/Common/Annotations/DocLexer.php +++ b/src/lib/Doctrine/Common/Annotations/DocLexer.php @@ -49,6 +49,7 @@ final class DocLexer extends Lexer const T_OPEN_PARENTHESIS = 109; const T_TRUE = 110; const T_NULL = 111; + const T_COLON = 112; /** * @inheritdoc @@ -57,7 +58,7 @@ protected function getCatchablePatterns() { return array( '[a-z_][a-z0-9_:]*', - '(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?', + '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', '"(?:[^"]|"")*"', ); } @@ -122,6 +123,9 @@ protected function getType(&$value) case 'null': return self::T_NULL; + case ':': + return self::T_COLON; + default: if (ctype_alpha($value[0]) || $value[0] === '_') { return self::T_IDENTIFIER; diff --git a/src/lib/Doctrine/Common/Annotations/DocParser.php b/src/lib/Doctrine/Common/Annotations/DocParser.php index c5db45e5cc..9d16b1762c 100644 --- a/src/lib/Doctrine/Common/Annotations/DocParser.php +++ b/src/lib/Doctrine/Common/Annotations/DocParser.php @@ -21,6 +21,9 @@ use Closure; use ReflectionClass; +use Doctrine\Common\Annotations\Annotation\Target; +use Doctrine\Common\Annotations\Annotation\Attribute; +use Doctrine\Common\Annotations\Annotation\Attributes; /** * A parser for docblock annotations. @@ -32,6 +35,7 @@ * @author Jonathan Wage * @author Roman Borschel * @author Johannes M. Schmitt + * @author Fabio B. Silva */ final class DocParser { @@ -49,6 +53,20 @@ final class DocParser */ private $lexer; + /** + * Current target context + * + * @var string + */ + private $target; + + /** + * Doc Parser used to collect annotation target + * + * @var Doctrine\Common\Annotations\DocParser + */ + private static $metadataParser; + /** * Flag to control if the current annotation is nested or not. * @@ -71,14 +89,6 @@ final class DocParser * @var array */ private $classExists = array(); - - /** - * - * @var This hashmap is used internally to cache if a class is an annotation or not. - * - * @var array - */ - private $isAnnotation = array(); /** * Whether annotations that have not been imported should be ignored. @@ -87,6 +97,13 @@ final class DocParser */ private $ignoreNotImportedAnnotations = false; + /** + * An array of default namespaces if operating in simple mode. + * + * @var array + */ + private $namespaces = array(); + /** * A list with annotations that are not causing exceptions when not resolved to an annotation class. * @@ -98,19 +115,92 @@ final class DocParser private $ignoredAnnotationNames = array(); /** - * @var array + * @var string */ - private $namespaceAliases = array(); + private $context = ''; /** - * @var string + * Hash-map for caching annotation metadata + * @var array */ - private $context = ''; - + private static $annotationMetadata = array( + 'Doctrine\Common\Annotations\Annotation\Target' => array( + 'is_annotation' => true, + 'has_constructor' => true, + 'properties' => array(), + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => 'value', + 'attribute_types' => array( + 'value' => array( + 'required' => false, + 'type' =>'array', + 'array_type'=>'string', + 'value' =>'array' + ) + ), + ), + 'Doctrine\Common\Annotations\Annotation\Attribute' => array( + 'is_annotation' => true, + 'has_constructor' => false, + 'targets_literal' => 'ANNOTATION_ANNOTATION', + 'targets' => Target::TARGET_ANNOTATION, + 'default_property' => 'name', + 'properties' => array( + 'name' => 'name', + 'type' => 'type', + 'required' => 'required' + ), + 'attribute_types' => array( + 'value' => array( + 'required' => true, + 'type' =>'string', + 'value' =>'string' + ), + 'type' => array( + 'required' =>true, + 'type' =>'string', + 'value' =>'string' + ), + 'required' => array( + 'required' =>false, + 'type' =>'boolean', + 'value' =>'boolean' + ) + ), + ), + 'Doctrine\Common\Annotations\Annotation\Attributes' => array( + 'is_annotation' => true, + 'has_constructor' => false, + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => 'value', + 'properties' => array( + 'value' => 'value' + ), + 'attribute_types' => array( + 'value' => array( + 'type' =>'array', + 'required' =>true, + 'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute', + 'value' =>'array' + ) + ), + ), + ); + /** - * @var Closure + * Hash-map for handle types declaration + * + * @var array */ - private $creationFn = null; + private static $typeMap = array( + 'float' => 'double', + 'bool' => 'boolean', + // allow uppercase Boolean in honor of George Boole + 'Boolean' => 'boolean', + 'int' => 'integer', + ); /** * Constructs a new DocParser. @@ -132,29 +222,40 @@ public function setIgnoredAnnotationNames(array $names) { $this->ignoredAnnotationNames = $names; } - + + public function setIgnoreNotImportedAnnotations($bool) + { + $this->ignoreNotImportedAnnotations = (Boolean) $bool; + } + /** - * @deprecated Will be removed in 3.0 - * @param \Closure $func + * Sets the default namespaces. + * @param array $namespaces */ - public function setAnnotationCreationFunction(\Closure $func) + public function addNamespace($namespace) { - $this->creationFn = $func; + if ($this->imports) { + throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + } + $this->namespaces[] = $namespace; } public function setImports(array $imports) { + if ($this->namespaces) { + throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + } $this->imports = $imports; } - public function setIgnoreNotImportedAnnotations($bool) - { - $this->ignoreNotImportedAnnotations = (Boolean) $bool; - } - - public function setAnnotationNamespaceAlias($namespace, $alias) + /** + * Sets current target context as bitmask. + * + * @param integer $target + */ + public function setTarget($target) { - $this->namespaceAliases[$alias] = $namespace; + $this->target = $target; } /** @@ -258,7 +359,7 @@ private function classExists($fqcn) if (isset($this->classExists[$fqcn])) { return $this->classExists[$fqcn]; } - + // first check if the class already exists, maybe loaded through another AnnotationReader if (class_exists($fqcn, false)) { return $this->classExists[$fqcn] = true; @@ -268,6 +369,121 @@ private function classExists($fqcn) return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); } + /** + * Collects parsing metadata for a given annotation class + * + * @param string $name The annotation name + */ + private function collectAnnotationMetadata($name) + { + if (self::$metadataParser == null){ + self::$metadataParser = new self(); + self::$metadataParser->setTarget(Target::TARGET_CLASS); + self::$metadataParser->setIgnoreNotImportedAnnotations(true); + self::$metadataParser->setImports(array( + 'target' => 'Doctrine\Common\Annotations\Annotation\Target', + 'attribute' => 'Doctrine\Common\Annotations\Annotation\Attribute', + 'attributes' => 'Doctrine\Common\Annotations\Annotation\Attributes' + )); + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php'); + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php'); + AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php'); + } + + $class = new \ReflectionClass($name); + $docComment = $class->getDocComment(); + + // Sets default values for annotation metadata + $metadata = array( + 'default_property' => null, + 'has_constructor' => (null !== $constructor = $class->getConstructor()) && $constructor->getNumberOfParameters() > 0, + 'properties' => array(), + 'property_types' => array(), + 'attribute_types' => array(), + 'targets_literal' => null, + 'targets' => Target::TARGET_ALL, + 'is_annotation' => false !== strpos($docComment, '@Annotation'), + ); + + // verify that the class is really meant to be an annotation + if ($metadata['is_annotation']) { + foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { + if ($annotation instanceof Target) { + $metadata['targets'] = $annotation->targets; + $metadata['targets_literal'] = $annotation->literal; + + } elseif ($annotation instanceof Attributes) { + foreach ($annotation->value as $attrib) { + // handle internal type declaration + $type = isset(self::$typeMap[$attrib->type]) ? self::$typeMap[$attrib->type] : $attrib->type; + + // handle the case if the property type is mixed + if ('mixed' !== $type) { + // Checks if the property has array + if (false !== $pos = strpos($type, '<')) { + $arrayType = substr($type, $pos+1, -1); + $type = 'array'; + + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + + $metadata['attribute_types'][$attrib->name]['array_type'] = $arrayType; + } + + $metadata['attribute_types'][$attrib->name]['type'] = $type; + $metadata['attribute_types'][$attrib->name]['value'] = $attrib->type; + $metadata['attribute_types'][$attrib->name]['required'] = $attrib->required; + } + } + } + } + + // if not has a constructor will inject values into public properties + if (false === $metadata['has_constructor']) { + // collect all public properties + foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + $metadata['properties'][$property->name] = $property->name; + + // checks if the property has @var annotation + if ((false !== $propertyComment = $property->getDocComment()) + && false !== strpos($propertyComment, '@var') + && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches)) { + // literal type declaration + $value = $matches[1]; + + // handle internal type declaration + $type = isset(self::$typeMap[$value]) ? self::$typeMap[$value] : $value; + + // handle the case if the property type is mixed + if ('mixed' !== $type) { + // Checks if the property has @var array annotation + if (false !== $pos = strpos($type, '<')) { + $arrayType = substr($type, $pos+1, -1); + $type = 'array'; + + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + + $metadata['attribute_types'][$property->name]['array_type'] = $arrayType; + } + + $metadata['attribute_types'][$property->name]['type'] = $type; + $metadata['attribute_types'][$property->name]['value'] = $value; + $metadata['attribute_types'][$property->name]['required'] = false !== strpos($propertyComment, '@Required'); + } + } + } + + // choose the first property as default property + $metadata['default_property'] = reset($metadata['properties']); + } + } + + self::$annotationMetadata[$name] = $metadata; + } + /** * Annotations ::= Annotation {[ "*" ]* [Annotation]}* * @@ -336,58 +552,81 @@ private function Annotation() $name .= '\\'.$this->lexer->token['value']; } - if (strpos($name, ":") !== false) { - list ($alias, $name) = explode(':', $name); - // If the namespace alias doesnt exist, skip until next annotation - if ( ! isset($this->namespaceAliases[$alias])) { - $this->lexer->skipUntil(DocLexer::T_AT); - return false; - } - $name = $this->namespaceAliases[$alias] . $name; - } - // only process names which are not fully qualified, yet - if ('\\' !== $name[0] && !$this->classExists($name)) { + // fully qualified names must start with a \ + $originalName = $name; + if ('\\' !== $name[0]) { $alias = (false === $pos = strpos($name, '\\'))? $name : substr($name, 0, $pos); - if (isset($this->imports[$loweredAlias = strtolower($alias)])) { + $found = false; + if ($this->namespaces) { + foreach ($this->namespaces as $namespace) { + if ($this->classExists($namespace.'\\'.$name)) { + $name = $namespace.'\\'.$name; + $found = true; + break; + } + } + } elseif (isset($this->imports[$loweredAlias = strtolower($alias)])) { if (false !== $pos) { $name = $this->imports[$loweredAlias].substr($name, $pos); } else { $name = $this->imports[$loweredAlias]; } - } elseif (isset($this->imports['__DEFAULT__']) && $this->classExists($this->imports['__DEFAULT__'].$name)) { - $name = $this->imports['__DEFAULT__'].$name; + $found = true; } elseif (isset($this->imports['__NAMESPACE__']) && $this->classExists($this->imports['__NAMESPACE__'].'\\'.$name)) { $name = $this->imports['__NAMESPACE__'].'\\'.$name; - } else { + $found = true; + } elseif ($this->classExists($name)) { + $found = true; + } + + if (!$found) { if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { return false; } - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported.', $name, $this->context)); + throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?', $name, $this->context)); } } if (!$this->classExists($name)) { throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context)); } - - if (!$this->isAnnotation($name)) { - return false; - } - - // Verifies that the annotation class extends any class that contains "Annotation". - // This is done to avoid coupling of Doctrine Annotations against other libraries. - // at this point, $name contains the fully qualified class name of the // annotation, and it is also guaranteed that this class exists, and // that it is loaded + + // collects the metadata annotation only if there is not yet + if (!isset(self::$annotationMetadata[$name])) { + $this->collectAnnotationMetadata($name); + } + + // verify that the class is really meant to be an annotation and not just any ordinary class + if (self::$annotationMetadata[$name]['is_annotation'] === false) { + if (isset($this->ignoredAnnotationNames[$originalName])) { + return false; + } + + throw AnnotationException::semanticalError(sprintf('The class "%s" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "%s". If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.', $name, $name, $originalName, $this->context)); + } + + //if target is nested annotation + $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; + // Next will be nested $this->isNestedAnnotation = true; + //if annotation does not support current target + if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) { + throw AnnotationException::semanticalError( + sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.', + $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal']) + ); + } + $values = array(); if ($this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { $this->match(DocLexer::T_OPEN_PARENTHESIS); @@ -398,41 +637,65 @@ private function Annotation() $this->match(DocLexer::T_CLOSE_PARENTHESIS); } - - return $this->newAnnotation($name, $values); - } - - /** - * Verify that the found class is actually an annotation. - * - * This can be detected through two mechanisms: - * 1. Class extends Doctrine\Common\Annotations\Annotation - * 2. The class level docblock contains the string "@Annotation" - * - * @param string $name - * @return bool - */ - private function isAnnotation($name) - { - if (!isset($this->isAnnotation[$name])) { - if (is_subclass_of($name, 'Doctrine\Common\Annotations\Annotation')) { - $this->isAnnotation[$name] = true; - } else { - $reflClass = new \ReflectionClass($name); - $this->isAnnotation[$name] = strpos($reflClass->getDocComment(), "@Annotation") !== false; + + // checks all declared attributes + foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { + if ($property === self::$annotationMetadata[$name]['default_property'] + && !isset($values[$property]) && isset($values['value'])) { + $property = 'value'; + } + + // handle a not given attribute or null value + if (!isset($values[$property])) { + if ($type['required']) { + throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) '.$type['value']); + } + + continue; + } + + if ($type['type'] === 'array') { + // handle the case of a single value + if (!is_array($values[$property])) { + $values[$property] = array($values[$property]); + } + + // checks if the attribute has array type declaration, such as "array" + if (isset($type['array_type'])) { + foreach ($values[$property] as $item) { + if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) { + throw AnnotationException::typeError($property, $originalName, $this->context, 'either a(n) '.$type['array_type'].', or an array of '.$type['array_type'].'s', $item); + } + } + } + } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) { + throw AnnotationException::typeError($property, $originalName, $this->context, 'a(n) '.$type['value'], $values[$property]); } } - return $this->isAnnotation[$name]; - } - - private function newAnnotation($name, $values) - { - if ($this->creationFn !== null) { - $fn = $this->creationFn; - return $fn($name, $values); + + // check if the annotation expects values via the constructor, + // or directly injected into public properties + if (self::$annotationMetadata[$name]['has_constructor'] === true) { + return new $name($values); + } + + $instance = new $name(); + foreach ($values as $property => $value) { + if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { + if ('value' !== $property) { + throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); + } + + // handle the case if the property has no annotations + if (!$property = self::$annotationMetadata[$name]['default_property']) { + throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); + } + } + + $instance->{$property} = $value; } - - return new $name($values); + + return $instance; } /** @@ -565,7 +828,7 @@ private function FieldAssignment() } /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* "}" + * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" * * @return array */ @@ -578,6 +841,12 @@ private function Arrayx() while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { $this->match(DocLexer::T_COMMA); + + // optional trailing comma + if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { + break; + } + $values[] = $this->ArrayEntry(); } @@ -598,7 +867,7 @@ private function Arrayx() /** * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key "=" PlainValue + * KeyValuePair ::= Key ("=" | ":") PlainValue * Key ::= string | integer * * @return array @@ -607,13 +876,12 @@ private function ArrayEntry() { $peek = $this->lexer->glimpse(); - if (DocLexer::T_EQUALS === $peek['type']) { - $this->match( - $this->lexer->isNextToken(DocLexer::T_INTEGER) ? DocLexer::T_INTEGER : DocLexer::T_STRING - ); + if (DocLexer::T_EQUALS === $peek['type'] + || DocLexer::T_COLON === $peek['type']) { + $this->matchAny(array(DocLexer::T_INTEGER, DocLexer::T_STRING)); $key = $this->lexer->token['value']; - $this->match(DocLexer::T_EQUALS); + $this->matchAny(array(DocLexer::T_EQUALS, DocLexer::T_COLON)); return array($key, $this->PlainValue()); } diff --git a/src/lib/Doctrine/Common/Annotations/FileCacheReader.php b/src/lib/Doctrine/Common/Annotations/FileCacheReader.php index 0b8b796201..4a42b5832b 100644 --- a/src/lib/Doctrine/Common/Annotations/FileCacheReader.php +++ b/src/lib/Doctrine/Common/Annotations/FileCacheReader.php @@ -39,11 +39,11 @@ class FileCacheReader implements Reader public function __construct(Reader $reader, $cacheDir, $debug = false) { $this->reader = $reader; - if (!is_dir($cacheDir)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $cacheDir)); + if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true)) { + throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir)); } if (!is_writable($cacheDir)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable.', $cacheDir)); + throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $cacheDir)); } $this->dir = rtrim($cacheDir, '\\/'); diff --git a/src/lib/Doctrine/Common/Annotations/IndexedReader.php b/src/lib/Doctrine/Common/Annotations/IndexedReader.php index c95f3efc96..1eea49210a 100644 --- a/src/lib/Doctrine/Common/Annotations/IndexedReader.php +++ b/src/lib/Doctrine/Common/Annotations/IndexedReader.php @@ -79,13 +79,13 @@ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation { return $this->delegate->getPropertyAnnotation($property, $annotation); } - + /** * Proxy all methods to the delegate. - * + * * @param type $method * @param type $args - * @return type + * @return type */ public function __call($method, $args) { diff --git a/src/lib/Doctrine/Common/Annotations/PhpParser.php b/src/lib/Doctrine/Common/Annotations/PhpParser.php index a9b56115d6..a14f8f5bef 100644 --- a/src/lib/Doctrine/Common/Annotations/PhpParser.php +++ b/src/lib/Doctrine/Common/Annotations/PhpParser.php @@ -19,134 +19,185 @@ namespace Doctrine\Common\Annotations; +use SplFileObject; + /** * Parses a file for namespaces/use/class declarations. * * @author Fabien Potencier + * @author Christian Kaps */ final class PhpParser { + /** + * The token list. + * + * @var array + */ private $tokens; + /** + * The number of tokens. + * + * @var int + */ + private $numTokens = 0; + + /** + * The current array pointer. + * + * @var int + */ + private $pointer = 0; + /** * Parses a class. * - * @param \ReflectionClass $class + * @param \ReflectionClass $class A ReflectionClass object. + * @return array A list with use statements in the form (Alias => FQN). */ public function parseClass(\ReflectionClass $class) { if (false === $filename = $class->getFilename()) { return array(); } - $src = file_get_contents($filename); - $name = $class->getName(); - - // This is a short-cut for code that follows some conventions: - // - namespaced - // - one class per file - if (preg_match_all('#\bnamespace\s+'.str_replace('\\', '\\\\', $class->getNamespaceName()).'\s*;.*?\b(?:class|interface)\s+'.$class->getShortName().'\b#s', $src, $matches)) { - foreach ($matches[0] as $match) { - $classes = $this->parse('parse($src, $name); + $content = $this->getFileContent($filename, $class->getStartLine()); + $namespace = str_replace('\\', '\\\\', $class->getNamespaceName()); + $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); + $this->tokens = token_get_all('numTokens = count($this->tokens); + $this->pointer = 0; + + $statements = $this->parseUseStatements($class->getNamespaceName()); - return $classes[$name]; + return $statements; } - private function parse($src, $interestedClass = null) + /** + * Get the content of the file right up to the given line number. + * + * @param string $filename The name of the file to load. + * @param int $lineNumber The number of lines to read from file. + * @return string The content of the file. + */ + private function getFileContent($filename, $lineNumber) { - $this->tokens = token_get_all($src); - $classes = $uses = array(); - $namespace = ''; - while ($token = $this->next()) { - if (T_NAMESPACE === $token[0]) { - $namespace = $this->parseNamespace(); - $uses = array(); - } elseif (T_CLASS === $token[0] || T_INTERFACE === $token[0]) { - if ('' !== $namespace) { - $class = $namespace.'\\'.$this->nextValue(); - } else { - $class = $this->nextValue(); - } - $classes[$class] = $uses; - - if (null !== $interestedClass && $interestedClass === $class) { - return $classes; - } - } elseif (T_USE === $token[0]) { - foreach ($this->parseUseStatement() as $useStatement) { - list($alias, $class) = $useStatement; - $uses[strtolower($alias)] = $class; - } + $content = ''; + $lineCnt = 0; + $file = new SplFileObject($filename); + while(!$file->eof()) { + if ($lineCnt++ == $lineNumber) { + break; } + + $content .= $file->fgets(); } - return $classes; + return $content; } - private function parseNamespace() + /** + * Gets the next non whitespace and non comment token. + * + * @return array The token if exists, null otherwise. + */ + private function next() { - $namespace = ''; - while ($token = $this->next()) { - if (T_NS_SEPARATOR === $token[0] || T_STRING === $token[0]) { - $namespace .= $token[1]; - } elseif (is_string($token) && in_array($token, array(';', '{'))) { - return $namespace; + for ($i = $this->pointer; $i < $this->numTokens; $i++) { + $this->pointer++; + if ($this->tokens[$i][0] === T_WHITESPACE || + $this->tokens[$i][0] === T_COMMENT || + $this->tokens[$i][0] === T_DOC_COMMENT) { + + continue; } + + return $this->tokens[$i]; } + + return null; } - private function parseUseStatement() + /** + * Get all use statements. + * + * @param string $namespaceName The namespace name of the reflected class. + * @return array A list with all found use statements. + */ + private function parseUseStatements($namespaceName) { - $statements = $class = array(); - $alias = ''; - while ($token = $this->next()) { - if (T_NS_SEPARATOR === $token[0] || T_STRING === $token[0]) { - $class[] = $token[1]; - } else if (T_AS === $token[0]) { - $alias = $this->nextValue(); - } else if (is_string($token)) { - if (',' === $token || ';' === $token) { - $statements[] = array( - $alias ? $alias : $class[count($class) - 1], - implode('', $class) - ); - } - - if (';' === $token) { - return $statements; - } - if (',' === $token) { - $class = array(); - $alias = ''; - - continue; - } + $statements = array(); + while (($token = $this->next())) { + if ($token[0] === T_USE) { + $statements = array_merge($statements, $this->parseUseStatement()); + continue; + } else if ($token[0] !== T_NAMESPACE || $this->parseNamespace() != $namespaceName) { + continue; } + + // Get fresh array for new namespace. This is to prevent the parser to collect the use statements + // for a previous namespace with the same name. This is the case if a namespace is defined twice + // or if a namespace with the same name is commented out. + $statements = array(); } + + return $statements; } - private function next() + /** + * Get the namespace name. + * + * @return string The found namespace name. + */ + private function parseNamespace() { - while ($token = array_shift($this->tokens)) { - if (in_array($token[0], array(T_WHITESPACE, T_COMMENT, T_DOC_COMMENT))) { - continue; + $namespace = ''; + while (($token = $this->next())){ + if ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR) { + $namespace .= $token[1]; + } else { + break; } - - return $token; } + + return $namespace; } - private function nextValue() + /** + * Parse a single use statement. + * + * @return array A list with all found class names for a use statement. + */ + private function parseUseStatement() { - $token = $this->next(); + $class = ''; + $alias = ''; + $statements = array(); + $explicitAlias = false; + while (($token = $this->next())) { + $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR; + if (!$explicitAlias && $isNameToken) { + $class .= $token[1]; + $alias = $token[1]; + } else if ($explicitAlias && $isNameToken) { + $alias .= $token[1]; + } else if ($token[0] === T_AS) { + $explicitAlias = true; + $alias = ''; + } else if ($token === ',') { + $statements[strtolower($alias)] = $class; + $class = ''; + $alias = ''; + $explicitAlias = false; + } else if ($token === ';') { + $statements[strtolower($alias)] = $class; + break; + } else { + break; + } + } - return is_array($token) ? $token[1] : $token; + return $statements; } -} +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/src/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php new file mode 100644 index 0000000000..a13c7fa072 --- /dev/null +++ b/src/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php @@ -0,0 +1,152 @@ +. + */ + +namespace Doctrine\Common\Annotations; + +use Doctrine\Common\Annotations\Annotation\Target; + +/** + * Simple Annotation Reader. + * + * This annotation reader is intended to be used in projects where you have + * full-control over all annotations that are available. + * + * @since 2.2 + * @author Johannes M. Schmitt + * @author Fabio B. Silva + */ +class SimpleAnnotationReader implements Reader +{ + /** + * @var DocParser + */ + private $parser; + + /** + * Constructor. + * + * Initializes a new SimpleAnnotationReader. + */ + public function __construct() + { + $this->parser = new DocParser(); + $this->parser->setIgnoreNotImportedAnnotations(true); + } + + /** + * Adds a namespace in which we will look for annotations. + * + * @param string $namespace + */ + public function addNamespace($namespace) + { + $this->parser->addNamespace($namespace); + } + + /** + * Gets the annotations applied to a class. + * + * @param ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. + * @return array An array of Annotations. + */ + public function getClassAnnotations(\ReflectionClass $class) + { + return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); + } + + /** + * Gets the annotations applied to a method. + * + * @param ReflectionMethod $property The ReflectionMethod of the method from which + * the annotations should be read. + * @return array An array of Annotations. + */ + public function getMethodAnnotations(\ReflectionMethod $method) + { + return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()'); + } + + /** + * Gets the annotations applied to a property. + * + * @param ReflectionProperty $property The ReflectionProperty of the property + * from which the annotations should be read. + * @return array An array of Annotations. + */ + public function getPropertyAnnotations(\ReflectionProperty $property) + { + return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName()); + } + + /** + * Gets a class annotation. + * + * @param ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. + * @param string $annotationName The name of the annotation. + * @return The Annotation or NULL, if the requested annotation does not exist. + */ + public function getClassAnnotation(\ReflectionClass $class, $annotationName) + { + foreach ($this->getClassAnnotations($class) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * Gets a method annotation. + * + * @param ReflectionMethod $method + * @param string $annotationName The name of the annotation. + * @return The Annotation or NULL, if the requested annotation does not exist. + */ + public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + { + foreach ($this->getMethodAnnotations($method) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * Gets a property annotation. + * + * @param ReflectionProperty $property + * @param string $annotationName The name of the annotation. + * @return The Annotation or NULL, if the requested annotation does not exist. + */ + public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + { + foreach ($this->getPropertyAnnotations($property) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Cache/.CacheProvider.php.swp b/src/lib/Doctrine/Common/Cache/.CacheProvider.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..57ac62c00edcdd071d9d889a50ce436c252d003e GIT binary patch literal 16384 zcmeI3U5wmT702DA(6ptrqAy5D)k#Q{-DNV91c{H$CS9+`yX$6lW@>wO6A_3!o;$nF zdhC(ynavQWNKgd`1VvCjBM^D3cqmekDnRNBq6mprD&i#)0+kl2C=xGx2_yvndu`9m z&hAb&Auk1w^vmqn*Y}?DKiAjyp6k?)E^ABl!TfOvpGPEV{bOIMJpGGDrSdx^soM?t z(OZ5l+Ex(d?I3EfZr=56%iaExr%+*`-Ko2deSR%!xrK|a6R|=V*ag?A7mB_e1&+rG zir;GaUO}ZJRs+B5G+2;tueGwkSTC01s;;#fBe|d_a4|!kG`vRtHRm& zOo2>+Oo2>+Oo2>+Oo2>+Oo2>+|1kxk_8#fq@M#aY4DLzTi|-TQO7a_D*(XyVQy^0y zQy^0yQy^0yQy^0yQy^0yQy^0yQ{XMCfYp#BzSe&aPXJ*5pXUJn`LHDY1N;p<4=#ZH z;0E3acm|ZfUhw0GBq;<_;P>y4q~C!r0~6%I6qp42z|2Giif;28Mx{gQMOyaHYZKLcL`p8>1D0H?uY;N9TOeXt3<25x}wfUkqg zpa+&g6%@cEm;eMG1be|7_es)k!8LFdd>ecPJO#SI1ZD6rxF75T61e$xNqQYT51s?( zz%rf_nq}2wVqez#kFoH^FzoH^Dc+GoT7IAo>ED;h!m*ZCioWqL9Cvu}TM> z29deO2;Y%Up4DPu+p<|wI{Bh%z?#lQicqj^g&}M3@*7UHCJx!Y*K}4p0S@;opswY1 z;%W+0Q*rB`jH`ng0gF0;M+c)dCp>bh;Tu+$O&siBEM5{h&3ZW+99w2V==dJJkB&_u zlZ8seXKMjENfZ5w72k_2#|yWqd~%W=A6PKYB71GSQZ!A+PDn{>L-wRLqPegQEu-c{ z$lT`ibg`nCx>i=tm*pkZsLG0ZUXhhW^|X2x{=^>lJ%ua0>PzC^_+1)mc04=ct~Qv< zA||`;#H2V+Q-$Q4W)lVLzV9;2BU7)b@?TkUMZ&;CqFV|@@(`m7>=7nM`a1g!G%W$h5-Et?~k%EI^VP~_)8i^q< z8CRh8T~RR^fbP(qW;}e|9b@{V)40KDIMO?hPw`_W5h(d0o$;Zm%fx8aZw$Yzh}z;w zgK=vx>^O~Z$028QJmrIb+~(xaSUt{m%7yn&C0563PIKM}fCkUrJ<1HEqyf3C->Zqt~sv_IsaSBDXe zd4Tbz)Au^d>7bK72|scu{3z_YBw2NYz_KHF3f+ zz<qdC{|Y@cRU z(<60pV0O)qwl{8$c^9mf34!8gaXWd1cA%%l=M1=0L^KD{Ps4RCehv4Whz6fP@yWy#&8$UHd%95A*x1P9 z86@7=J%Y+FFgp^0p*v2I9-sYnJiNUt`gCcbTFTQr>}vU#XgD5BYzb3x z6f#Tzr!c+5rJ>)9HY}9jeas0FeZNUv-|aw#pvRA*>3T=_KrO4msNTc3*F%*J2X6~^ zEH^}Lyu!*nnTwi1MrGbyk##jk>atoUZJy-fvSz5oxP(g8ieYGTT1hj{@VS)`)8 zBrmAKs|l^Flxjt-yg+4jp`~hOk|xLPqfvKTl(oiupXI6BRS5uTtImg?t>XmuT zG*0lp=W1wQH4M~as=8jQnp&kiNsE;gIIWW+!-gVkgVVx9UQtO~(o7sRD>+`5Qq$EX zwJfYQYIBCEnKe_Tg-WGp@FomZU)B^A?Uf)H_YHOCctu84RW!K-fzPN*)sn1Z3X2Qi zkD)$ULzOt0C~D9^&K#^Zsaz3WRaVNdGrkJm<4i?2XigO(lvJ9>DK2eM(^W2!Rv!GN zXhk#v1Gq6VRb}1Olp5@yYE4IURm4Zdm4;H1wI#Kf=W3TLqCc2qEXt)4x{3;et7mm> zVNn<~tPVe^!7~kNp)2V!TvCMuORBCc;%5?1p)i6XLIIPxK?h_+#W)~NaSzlpRh>r) z4sETIJC^jeP4aB&$*7J8Y#DABY3}T1+Y$3pQH6Fq*rH1%V&ayUq?yP0%k+HxzX$8q zJy`Sd^*`V9|25Y7zXaF7RUm_3VZHwq*6u=*_ z_WvyS6sUkQm(ze*>NcUj<(P9#{n`;CX=8!4JW8@O|((a0N^N z0)K@+e*rha3*ZOfDwqbx!M%X{d=JPznF5&tnF5&tnF9ZR3dC8Y{t^sR`3O^a%-IKN zMSr26kJ`G7OcIM^1%cHg*&{6BeA~g49t-yPph*0NEav)GZ zWg>?c&AUpY_GrU`pLd=^9nNMXdD)Rw{&@4#gdfs7I|gigCio6q*k-37UV8TPA8FWP z^WfxAp15~g4#p|O9ddq6to+iH;VxsxMc&3`(Q$aM5=&R%&5l{{)O}?32Z>9uRl>8F z5we(AY&2>ANfP$))h-sb=$vh4J59&NVmU5Ge9_L+dc*3_goj)_ojk?6xZ~mf&5H6O zIT|a6^~FefN%Vc5+KIy;d@S&TJ6(W1nn7`=krqqCR_(xGQ7L@%2a?=Yuk)yk3Su&3 zzxWvDC502ihWpEHiIe1X$KAHcK3qRejW{CcGQ#Z~x5tCc{SBDj_Hqrvdn;X_Q=-Ul zrO-v>kViEUF7R}0s)-next`+c5jnQ(@TFU0hYy83Jt$IyTX(^5MBMxRtW~nvhtV$X wtVBck&vYk{=X&3w8+}PmxBo~UPNt`OILU3gWy>$=F?{Ei_nN+Dd{0*T53tP`o&W#< literal 0 HcmV?d00001 diff --git a/src/lib/Doctrine/Common/Cache/ApcCache.php b/src/lib/Doctrine/Common/Cache/ApcCache.php index f3a9a95d95..a59296f5d6 100644 --- a/src/lib/Doctrine/Common/Cache/ApcCache.php +++ b/src/lib/Doctrine/Common/Cache/ApcCache.php @@ -1,7 +1,6 @@ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie - * @todo Rename: APCCache */ -class ApcCache extends AbstractCache +class ApcCache extends CacheProvider { /** * {@inheritdoc} */ - public function getIds() - { - $ci = apc_cache_info('user'); - $keys = array(); - - foreach ($ci['cache_list'] as $entry) { - $keys[] = $entry['info']; - } - - return $keys; - } - - /** - * {@inheritdoc} - */ - protected function _doFetch($id) + protected function doFetch($id) { return apc_fetch($id); } @@ -63,7 +45,7 @@ protected function _doFetch($id) /** * {@inheritdoc} */ - protected function _doContains($id) + protected function doContains($id) { $found = false; @@ -75,7 +57,7 @@ protected function _doContains($id) /** * {@inheritdoc} */ - protected function _doSave($id, $data, $lifeTime = 0) + protected function doSave($id, $data, $lifeTime = 0) { return (bool) apc_store($id, $data, (int) $lifeTime); } @@ -83,8 +65,33 @@ protected function _doSave($id, $data, $lifeTime = 0) /** * {@inheritdoc} */ - protected function _doDelete($id) + protected function doDelete($id) { return apc_delete($id); } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return apc_clear_cache() && apc_clear_cache('user'); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = apc_cache_info(); + $sma = apc_sma_info(); + + return array( + Cache::STATS_HITS => $info['num_hits'], + Cache::STATS_MISSES => $info['num_misses'], + Cache::STATS_UPTIME => $info['start_time'], + Cache::STATS_MEMORY_USAGE => $info['mem_size'], + Cache::STATS_MEMORY_AVAILIABLE => $sma['avail_mem'], + ); + } } \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Cache/ArrayCache.php b/src/lib/Doctrine/Common/Cache/ArrayCache.php index ada233bf5e..8a0b982b4a 100644 --- a/src/lib/Doctrine/Common/Cache/ArrayCache.php +++ b/src/lib/Doctrine/Common/Cache/ArrayCache.php @@ -27,14 +27,13 @@ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie */ -class ArrayCache extends AbstractCache +class ArrayCache extends CacheProvider { /** * @var array $data @@ -44,37 +43,35 @@ class ArrayCache extends AbstractCache /** * {@inheritdoc} */ - public function getIds() + protected function doFetch($id) { - return array_keys($this->data); + return (isset($this->data[$id])) ? $this->data[$id] : false; } /** * {@inheritdoc} */ - protected function _doFetch($id) + protected function doContains($id) { - if (isset($this->data[$id])) { - return $this->data[$id]; - } - - return false; + return isset($this->data[$id]); } /** * {@inheritdoc} */ - protected function _doContains($id) + protected function doSave($id, $data, $lifeTime = 0) { - return isset($this->data[$id]); + $this->data[$id] = $data; + + return true; } /** * {@inheritdoc} */ - protected function _doSave($id, $data, $lifeTime = 0) + protected function doDelete($id) { - $this->data[$id] = $data; + unset($this->data[$id]); return true; } @@ -82,10 +79,18 @@ protected function _doSave($id, $data, $lifeTime = 0) /** * {@inheritdoc} */ - protected function _doDelete($id) + protected function doFlush() { - unset($this->data[$id]); - + $this->data = array(); + return true; } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + return null; + } } \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Cache/Cache.php b/src/lib/Doctrine/Common/Cache/Cache.php index e4cb1c074c..d303bde4c6 100644 --- a/src/lib/Doctrine/Common/Cache/Cache.php +++ b/src/lib/Doctrine/Common/Cache/Cache.php @@ -27,17 +27,23 @@ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel + * @author Fabio B. Silva */ interface Cache { + const STATS_HITS = 'hits'; + const STATS_MISSES = 'misses'; + const STATS_UPTIME = 'uptime'; + const STATS_MEMORY_USAGE = 'memory_usage'; + const STATS_MEMORY_AVAILIABLE = 'memory_available'; + /** * Fetches an entry from the cache. - * + * * @param string $id cache id The id of the cache entry to fetch. * @return string The cached data or FALSE, if no cache entry exists for the given id. */ @@ -63,9 +69,34 @@ function save($id, $data, $lifeTime = 0); /** * Deletes a cache entry. - * + * * @param string $id cache id * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. */ function delete($id); -} \ No newline at end of file + + /** + * Retrieves cached information from data store + * + * The server's statistics array has the following values: + * + * - hits + * Number of keys that have been requested and found present. + * + * - misses + * Number of items that have been requested and not found. + * + * - uptime + * Time that the server is running. + * + * - memory_usage + * Memory used by this server to store items. + * + * - memory_available + * Memory allowed to use for storage. + * + * @since 2.2 + * @var array Associative array with server's statistics if available, NULL otherwise. + */ + function getStats(); +} diff --git a/src/lib/Doctrine/Common/Cache/AbstractCache.php b/src/lib/Doctrine/Common/Cache/CacheProvider.php similarity index 54% rename from src/lib/Doctrine/Common/Cache/AbstractCache.php rename to src/lib/Doctrine/Common/Cache/CacheProvider.php index 9cfe29567f..fa11fc22fa 100644 --- a/src/lib/Doctrine/Common/Cache/AbstractCache.php +++ b/src/lib/Doctrine/Common/Cache/CacheProvider.php @@ -1,4 +1,5 @@ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel + * @author Fabio B. Silva */ -abstract class AbstractCache implements Cache +abstract class CacheProvider implements Cache { - /** @var string The namespace to prefix all cache ids with */ - private $_namespace = ''; + const DOCTRINE_NAMESPACE_CACHEKEY = 'DoctrineNamespaceCacheKey[%s]'; + + /** + * @var string The namespace to prefix all cache ids with + */ + private $namespace = ''; /** * Set the namespace to prefix all cache ids with. @@ -41,7 +47,17 @@ abstract class AbstractCache implements Cache */ public function setNamespace($namespace) { - $this->_namespace = (string) $namespace; + $this->namespace = (string) $namespace; + } + + /** + * Retrieve the namespace that prefixes all cache ids. + * + * @return string + */ + public function getNamespace() + { + return $this->namespace; } /** @@ -49,7 +65,7 @@ public function setNamespace($namespace) */ public function fetch($id) { - return $this->_doFetch($this->_getNamespacedId($id)); + return $this->doFetch($this->getNamespacedId($id)); } /** @@ -57,7 +73,7 @@ public function fetch($id) */ public function contains($id) { - return $this->_doContains($this->_getNamespacedId($id)); + return $this->doContains($this->getNamespacedId($id)); } /** @@ -65,7 +81,7 @@ public function contains($id) */ public function save($id, $data, $lifeTime = 0) { - return $this->_doSave($this->_getNamespacedId($id), $data, $lifeTime); + return $this->doSave($this->getNamespacedId($id), $data, $lifeTime); } /** @@ -73,96 +89,38 @@ public function save($id, $data, $lifeTime = 0) */ public function delete($id) { - $id = $this->_getNamespacedId($id); - - if (strpos($id, '*') !== false) { - return $this->deleteByRegex('/' . str_replace('*', '.*', $id) . '/'); - } - - return $this->_doDelete($id); + return $this->doDelete($this->getNamespacedId($id)); } /** - * Delete all cache entries. - * - * @return array $deleted Array of the deleted cache ids - */ - public function deleteAll() - { - $ids = $this->getIds(); - - foreach ($ids as $id) { - $this->delete($id); - } - - return $ids; - } - - /** - * Delete cache entries where the id matches a PHP regular expressions - * - * @param string $regex - * @return array $deleted Array of the deleted cache ids + * {@inheritdoc} */ - public function deleteByRegex($regex) + public function getStats() { - $deleted = array(); - - $ids = $this->getIds(); - - foreach ($ids as $id) { - if (preg_match($regex, $id)) { - $this->delete($id); - $deleted[] = $id; - } - } - - return $deleted; + return $this->doGetStats(); } /** - * Delete cache entries where the id has the passed prefix + * Deletes all cache entries. * - * @param string $prefix - * @return array $deleted Array of the deleted cache ids + * @return boolean TRUE if the cache entries were successfully flushed, FALSE otherwise. */ - public function deleteByPrefix($prefix) + public function flushAll() { - $deleted = array(); - - $prefix = $this->_getNamespacedId($prefix); - $ids = $this->getIds(); - - foreach ($ids as $id) { - if (strpos($id, $prefix) === 0) { - $this->delete($id); - $deleted[] = $id; - } - } - - return $deleted; + return $this->doFlush(); } /** - * Delete cache entries where the id has the passed suffix + * Delete all cache entries. * - * @param string $suffix - * @return array $deleted Array of the deleted cache ids + * @return boolean TRUE if the cache entries were successfully deleted, FALSE otherwise. */ - public function deleteBySuffix($suffix) + public function deleteAll() { - $deleted = array(); - - $ids = $this->getIds(); + $namespaceCacheKey = sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); + $namespaceVersion = ($this->doContains($namespaceCacheKey)) ? $this->doFetch($namespaceCacheKey) : 1; - foreach ($ids as $id) { - if (substr($id, -1 * strlen($suffix)) === $suffix) { - $this->delete($id); - $deleted[] = $id; - } - } - - return $deleted; + return $this->doSave($namespaceCacheKey, $namespaceVersion + 1); } /** @@ -171,9 +129,12 @@ public function deleteBySuffix($suffix) * @param string $id The id to namespace * @return string $id The namespaced id */ - private function _getNamespacedId($id) + private function getNamespacedId($id) { - return $this->_namespace . $id; + $namespaceCacheKey = sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); + $namespaceVersion = ($this->doContains($namespaceCacheKey)) ? $this->doFetch($namespaceCacheKey) : 1; + + return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); } /** @@ -182,7 +143,7 @@ private function _getNamespacedId($id) * @param string $id cache id The id of the cache entry to fetch. * @return string The cached data or FALSE, if no cache entry exists for the given id. */ - abstract protected function _doFetch($id); + abstract protected function doFetch($id); /** * Test if an entry exists in the cache. @@ -190,7 +151,7 @@ abstract protected function _doFetch($id); * @param string $id cache id The cache id of the entry to check for. * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise. */ - abstract protected function _doContains($id); + abstract protected function doContains($id); /** * Puts data into the cache. @@ -200,7 +161,7 @@ abstract protected function _doContains($id); * @param int $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry (null => infinite lifeTime). * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise. */ - abstract protected function _doSave($id, $data, $lifeTime = false); + abstract protected function doSave($id, $data, $lifeTime = false); /** * Deletes a cache entry. @@ -208,12 +169,20 @@ abstract protected function _doSave($id, $data, $lifeTime = false); * @param string $id cache id * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. */ - abstract protected function _doDelete($id); + abstract protected function doDelete($id); /** - * Get an array of all the cache ids stored + * Deletes all cache entries. + * + * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. + */ + abstract protected function doFlush(); + + /** + * Retrieves cached information from data store * - * @return array $ids + * @since 2.2 + * @return array An associative array with server's statistics if available, NULL otherwise. */ - abstract public function getIds(); -} \ No newline at end of file + abstract protected function doGetStats(); +} diff --git a/src/lib/Doctrine/Common/Cache/MemcacheCache.php b/src/lib/Doctrine/Common/Cache/MemcacheCache.php index a76bd170e1..dd6d1e3147 100644 --- a/src/lib/Doctrine/Common/Cache/MemcacheCache.php +++ b/src/lib/Doctrine/Common/Cache/MemcacheCache.php @@ -1,7 +1,6 @@ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie */ -class MemcacheCache extends AbstractCache +class MemcacheCache extends CacheProvider { /** * @var Memcache */ - private $_memcache; + private $memcache; /** * Sets the memcache instance to use. @@ -50,7 +48,7 @@ class MemcacheCache extends AbstractCache */ public function setMemcache(Memcache $memcache) { - $this->_memcache = $memcache; + $this->memcache = $memcache; } /** @@ -60,64 +58,64 @@ public function setMemcache(Memcache $memcache) */ public function getMemcache() { - return $this->_memcache; + return $this->memcache; } /** * {@inheritdoc} */ - public function getIds() + protected function doFetch($id) { - $keys = array(); - $allSlabs = $this->_memcache->getExtendedStats('slabs'); - - foreach ($allSlabs as $server => $slabs) { - if (is_array($slabs)) { - foreach (array_keys($slabs) as $slabId) { - $dump = $this->_memcache->getExtendedStats('cachedump', (int) $slabId); + return $this->memcache->get($id); + } - if ($dump) { - foreach ($dump as $entries) { - if ($entries) { - $keys = array_merge($keys, array_keys($entries)); - } - } - } - } - } - } - return $keys; + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return (bool) $this->memcache->get($id); } /** * {@inheritdoc} */ - protected function _doFetch($id) + protected function doSave($id, $data, $lifeTime = 0) { - return $this->_memcache->get($id); + if ($lifeTime > 30 * 24 * 3600) { + $lifeTime = time() + $lifeTime; + } + return $this->memcache->set($id, $data, 0, (int) $lifeTime); } /** * {@inheritdoc} */ - protected function _doContains($id) + protected function doDelete($id) { - return (bool) $this->_memcache->get($id); + return $this->memcache->delete($id); } /** * {@inheritdoc} */ - protected function _doSave($id, $data, $lifeTime = 0) + protected function doFlush() { - return $this->_memcache->set($id, $data, 0, (int) $lifeTime); + return $this->memcache->flush(); } /** * {@inheritdoc} */ - protected function _doDelete($id) + protected function doGetStats() { - return $this->_memcache->delete($id); + $stats = $this->memcache->getStats(); + return array( + Cache::STATS_HITS => $stats['get_hits'], + Cache::STATS_MISSES => $stats['get_misses'], + Cache::STATS_UPTIME => $stats['uptime'], + Cache::STATS_MEMORY_USAGE => $stats['bytes'], + Cache::STATS_MEMORY_AVAILIABLE => $stats['limit_maxbytes'], + ); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/Common/Cache/MemcachedCache.php b/src/lib/Doctrine/Common/Cache/MemcachedCache.php new file mode 100644 index 0000000000..4675fae70b --- /dev/null +++ b/src/lib/Doctrine/Common/Cache/MemcachedCache.php @@ -0,0 +1,124 @@ +. + */ + +namespace Doctrine\Common\Cache; + +use \Memcached; + +/** + * Memcached cache provider. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class MemcachedCache extends CacheProvider +{ + /** + * @var Memcached + */ + private $memcached; + + /** + * Sets the memcache instance to use. + * + * @param Memcached $memcached + */ + public function setMemcached(Memcached $memcached) + { + $this->memcached = $memcached; + } + + /** + * Gets the memcached instance used by the cache. + * + * @return Memcached + */ + public function getMemcached() + { + return $this->memcached; + } + + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return $this->memcached->get($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return (false !== $this->memcached->get($id)); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + if ($lifeTime > 30 * 24 * 3600) { + $lifeTime = time() + $lifeTime; + } + return $this->memcached->set($id, $data, (int) $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return $this->memcached->delete($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return $this->memcached->flush(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $stats = $this->memcached->getStats(); + $servers = $this->memcached->getServerList(); + $key = $servers[0]['host'] . ':' . $servers[0]['port']; + $stats = $stats[$key]; + return array( + Cache::STATS_HITS => $stats['get_hits'], + Cache::STATS_MISSES => $stats['get_misses'], + Cache::STATS_UPTIME => $stats['uptime'], + Cache::STATS_MEMORY_USAGE => $stats['bytes'], + Cache::STATS_MEMORY_AVAILIABLE => $stats['limit_maxbytes'], + ); + } +} diff --git a/src/lib/Doctrine/Common/Cache/WinCacheCache.php b/src/lib/Doctrine/Common/Cache/WinCacheCache.php new file mode 100644 index 0000000000..ed8ca74ab4 --- /dev/null +++ b/src/lib/Doctrine/Common/Cache/WinCacheCache.php @@ -0,0 +1,92 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * WinCache cache provider. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie + */ +class WincacheCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return wincache_ucache_get($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return wincache_ucache_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return (bool) wincache_ucache_set($id, $data, (int) $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + return wincache_ucache_delete($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return wincache_ucache_clear(); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = wincache_ucache_info(); + $meminfo= wincache_ucache_meminfo(); + return array( + Cache::STATS_HITS => $info['total_hit_count'], + Cache::STATS_MISSES => $info['total_miss_count'], + Cache::STATS_UPTIME => $info['total_cache_uptime'], + Cache::STATS_MEMORY_USAGE => $meminfo['memory_total'], + Cache::STATS_MEMORY_AVAILIABLE => $meminfo['memory_free'], + ); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Cache/XcacheCache.php b/src/lib/Doctrine/Common/Cache/XcacheCache.php index d1807309a2..6e22d26541 100644 --- a/src/lib/Doctrine/Common/Cache/XcacheCache.php +++ b/src/lib/Doctrine/Common/Cache/XcacheCache.php @@ -1,7 +1,6 @@ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel * @author David Abdemoulaie */ -class XcacheCache extends AbstractCache +class XcacheCache extends CacheProvider { /** * {@inheritdoc} */ - public function getIds() + protected function doFetch($id) { - $this->_checkAuth(); - $keys = array(); - - for ($i = 0, $count = xcache_count(XC_TYPE_VAR); $i < $count; $i++) { - $entries = xcache_list(XC_TYPE_VAR, $i); - - if (is_array($entries['cache_list'])) { - foreach ($entries['cache_list'] as $entry) { - $keys[] = $entry['name']; - } - } - } - - return $keys; + return $this->doContains($id) ? unserialize(xcache_get($id)) : false; } /** * {@inheritdoc} */ - protected function _doFetch($id) + protected function doContains($id) { - return $this->_doContains($id) ? unserialize(xcache_get($id)) : false; + return xcache_isset($id); } /** * {@inheritdoc} */ - protected function _doContains($id) + protected function doSave($id, $data, $lifeTime = 0) { - return xcache_isset($id); + return xcache_set($id, serialize($data), (int) $lifeTime); } /** * {@inheritdoc} */ - protected function _doSave($id, $data, $lifeTime = 0) + protected function doDelete($id) { - return xcache_set($id, serialize($data), (int) $lifeTime); + return xcache_unset($id); } /** * {@inheritdoc} */ - protected function _doDelete($id) + protected function doFlush() { - return xcache_unset($id); - } + $this->checkAuthorization(); + + xcache_clear_cache(XC_TYPE_VAR, 0); + return true; + } /** * Checks that xcache.admin.enable_auth is Off @@ -96,10 +84,27 @@ protected function _doDelete($id) * @throws \BadMethodCallException When xcache.admin.enable_auth is On * @return void */ - protected function _checkAuth() + protected function checkAuthorization() { if (ini_get('xcache.admin.enable_auth')) { throw new \BadMethodCallException('To use all features of \Doctrine\Common\Cache\XcacheCache, you must set "xcache.admin.enable_auth" to "Off" in your php.ini.'); } } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $this->checkAuthorization(); + + $info = xcache_info(XC_TYPE_VAR, 0); + return array( + Cache::STATS_HITS => $info['hits'], + Cache::STATS_MISSES => $info['misses'], + Cache::STATS_UPTIME => null, + Cache::STATS_MEMORY_USAGE => $info['size'], + Cache::STATS_MEMORY_AVAILIABLE => $info['avail'], + ); + } } \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Cache/ZendDataCache.php b/src/lib/Doctrine/Common/Cache/ZendDataCache.php index 7688928b44..4e4dabe775 100644 --- a/src/lib/Doctrine/Common/Cache/ZendDataCache.php +++ b/src/lib/Doctrine/Common/Cache/ZendDataCache.php @@ -26,51 +26,59 @@ * @link www.doctrine-project.org * @since 2.0 * @author Ralph Schindler + * @author Guilherme Blanco */ -class ZendDataCache extends AbstractCache +class ZendDataCache extends CacheProvider { - public function __construct() + /** + * {@inheritdoc} + */ + protected function doFetch($id) { - $this->setNamespace('doctrine::'); // zend data cache format for namespaces ends in :: + return zend_shm_cache_fetch($id); } - + /** * {@inheritdoc} */ - public function getIds() + protected function doContains($id) { - throw new \BadMethodCallException("getIds() is not supported by ZendDataCache"); + return (false !== zend_shm_cache_fetch($id)); } /** * {@inheritdoc} */ - protected function _doFetch($id) + protected function doSave($id, $data, $lifeTime = 0) { - return zend_shm_cache_fetch($id); + return zend_shm_cache_store($id, $data, $lifeTime); } /** * {@inheritdoc} */ - protected function _doContains($id) + protected function doDelete($id) { - return (zend_shm_cache_fetch($id) !== FALSE); + return zend_shm_cache_delete($id); } /** * {@inheritdoc} */ - protected function _doSave($id, $data, $lifeTime = 0) + protected function doFlush() { - return zend_shm_cache_store($id, $data, $lifeTime); + $namespace = $this->getNamespace(); + if (empty($namespace)) { + return zend_shm_cache_clear(); + } + return zend_shm_cache_clear($namespace); } /** * {@inheritdoc} */ - protected function _doDelete($id) + protected function doGetStats() { - return zend_shm_cache_delete($id); + return null; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/Common/ClassLoader.php b/src/lib/Doctrine/Common/ClassLoader.php index e44a6392f3..375b0d6b49 100644 --- a/src/lib/Doctrine/Common/ClassLoader.php +++ b/src/lib/Doctrine/Common/ClassLoader.php @@ -24,19 +24,34 @@ * installed on the SPL autoload stack. It is a class loader that either loads only classes * of a specific namespace or all namespaces and it is suitable for working together * with other autoloaders in the SPL autoload stack. - * + * * If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader * relies on the PHP include_path. - * + * * @author Roman Borschel * @since 2.0 */ class ClassLoader { - private $fileExtension = '.php'; - private $namespace; - private $includePath; - private $namespaceSeparator = '\\'; + /** + * @var string PHP file extension + */ + protected $fileExtension = '.php'; + + /** + * @var string Current namespace + */ + protected $namespace; + + /** + * @var string Current include path + */ + protected $includePath; + + /** + * @var string PHP namespace separator + */ + protected $namespaceSeparator = '\\'; /** * Creates a new ClassLoader that loads classes of the @@ -45,7 +60,7 @@ class ClassLoader * If no include path is given, the ClassLoader relies on the PHP include_path. * If neither a namespace nor an include path is given, the ClassLoader will * be responsible for loading all classes, thereby relying on the PHP include_path. - * + * * @param string $ns The namespace of the classes to load. * @param string $includePath The base include path to use. */ @@ -57,7 +72,7 @@ public function __construct($ns = null, $includePath = null) /** * Sets the namespace separator used by classes in the namespace of this ClassLoader. - * + * * @param string $sep The separator to use. */ public function setNamespaceSeparator($sep) @@ -67,7 +82,7 @@ public function setNamespaceSeparator($sep) /** * Gets the namespace separator used by classes in the namespace of this ClassLoader. - * + * * @return string */ public function getNamespaceSeparator() @@ -77,7 +92,7 @@ public function getNamespaceSeparator() /** * Sets the base include path for all class files in the namespace of this ClassLoader. - * + * * @param string $includePath */ public function setIncludePath($includePath) @@ -87,7 +102,7 @@ public function setIncludePath($includePath) /** * Gets the base include path for all class files in the namespace of this ClassLoader. - * + * * @return string */ public function getIncludePath() @@ -97,7 +112,7 @@ public function getIncludePath() /** * Sets the file extension of class files in the namespace of this ClassLoader. - * + * * @param string $fileExtension */ public function setFileExtension($fileExtension) @@ -107,7 +122,7 @@ public function setFileExtension($fileExtension) /** * Gets the file extension of class files in the namespace of this ClassLoader. - * + * * @return string */ public function getFileExtension() @@ -146,7 +161,7 @@ public function loadClass($className) require ($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '') . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension; - + return true; } @@ -169,7 +184,7 @@ public function canLoadClass($className) return file_exists($this->includePath . DIRECTORY_SEPARATOR . $file); } - return self::fileExistsInIncludePath($file); + return (false !== stream_resolve_include_path($file)); } /** @@ -195,7 +210,7 @@ public function canLoadClass($className) */ public static function classExists($className) { - if (class_exists($className, false)) { + if (class_exists($className, false) || interface_exists($className, false)) { return true; } @@ -221,7 +236,7 @@ public static function classExists($className) } } - return false; + return class_exists($className, false) || interface_exists($className, false); } /** @@ -244,18 +259,4 @@ public static function getClassLoader($className) return null; } - - /** - * @param string $file The file relative path. - * @return boolean Whether file exists in include_path. - */ - public static function fileExistsInIncludePath($file) - { - foreach (explode(PATH_SEPARATOR, get_include_path()) as $dir) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) { - return true; - } - } - return false; - } } diff --git a/src/lib/Doctrine/Common/Collections/ArrayCollection.php b/src/lib/Doctrine/Common/Collections/ArrayCollection.php index 41c43b043e..2a7d4eaf86 100644 --- a/src/lib/Doctrine/Common/Collections/ArrayCollection.php +++ b/src/lib/Doctrine/Common/Collections/ArrayCollection.php @@ -89,7 +89,7 @@ public function key() { return key($this->_elements); } - + /** * Moves the internal iterator position to the next element. * @@ -99,7 +99,7 @@ public function next() { return next($this->_elements); } - + /** * Gets the element of the collection at the current internal iterator position. * @@ -121,7 +121,7 @@ public function remove($key) if (isset($this->_elements[$key])) { $removed = $this->_elements[$key]; unset($this->_elements[$key]); - + return $removed; } @@ -137,13 +137,13 @@ public function remove($key) public function removeElement($element) { $key = array_search($element, $this->_elements, true); - + if ($key !== false) { unset($this->_elements[$key]); - + return true; } - + return false; } @@ -214,7 +214,13 @@ public function containsKey($key) */ public function contains($element) { - return in_array($element, $this->_elements, true); + foreach ($this->_elements as $collectionElement) { + if ($element === $collectionElement) { + return true; + } + } + + return false; } /** @@ -321,7 +327,7 @@ public function add($value) /** * Checks whether the collection is empty. - * + * * Note: This is preferrable over count() == 0. * * @return boolean TRUE if the collection is empty, FALSE otherwise. @@ -379,7 +385,7 @@ public function forAll(Closure $p) return false; } } - + return true; } diff --git a/src/lib/Doctrine/Common/Collections/Collection.php b/src/lib/Doctrine/Common/Collections/Collection.php index 9a6300dc6b..9fca659c65 100644 --- a/src/lib/Doctrine/Common/Collections/Collection.php +++ b/src/lib/Doctrine/Common/Collections/Collection.php @@ -23,11 +23,11 @@ /** * The missing (SPL) Collection/Array/OrderedMap interface. - * + * * A Collection resembles the nature of a regular PHP array. That is, * it is essentially an ordered map that can also be used * like a list. - * + * * A Collection has an internal iterator just like a PHP array. In addition, * a Collection can be iterated with external iterators, which is preferrable. * To use an external iterator simply use the foreach language construct to @@ -37,7 +37,7 @@ * You can not rely on the internal iterator of the collection being at a certain * position unless you explicitly positioned it before. Prefer iteration with * external iterators. - * + * * @since 2.0 * @author Guilherme Blanco * @author Jonathan Wage @@ -52,7 +52,7 @@ interface Collection extends Countable, IteratorAggregate, ArrayAccess * @return boolean Always TRUE. */ function add($element); - + /** * Clears the collection, removing all elements. */ @@ -76,7 +76,7 @@ function isEmpty(); /** * Removes the element at the specified index from the collection. - * + * * @param string|integer $key The kex/index of the element to remove. * @return mixed The removed element or NULL, if the collection did not contain the element. */ @@ -92,7 +92,7 @@ function removeElement($element); /** * Checks whether the collection contains an element with the specified key/index. - * + * * @param string|integer $key The key/index to check for. * @return boolean TRUE if the collection contains an element with the specified key/index, * FALSE otherwise. @@ -101,7 +101,7 @@ function containsKey($key); /** * Gets the element at the specified key/index. - * + * * @param string|integer $key The key/index of the element to retrieve. * @return mixed */ @@ -116,8 +116,8 @@ function get($key); function getKeys(); /** - * Gets all values of the collection. - * + * Gets all values of the collection. + * * @return array The values of all elements in the collection, in the order they * appear in the collection. */ @@ -125,7 +125,7 @@ function getValues(); /** * Sets an element in the collection at the specified key/index. - * + * * @param string|integer $key The key/index of the element to set. * @param mixed $value The element to set. */ @@ -133,7 +133,7 @@ function set($key, $value); /** * Gets a native PHP array representation of the collection. - * + * * @return array */ function toArray(); @@ -239,5 +239,5 @@ function indexOf($element); * @param int $length * @return array */ - public function slice($offset, $length = null); + function slice($offset, $length = null); } \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Comparable.php b/src/lib/Doctrine/Common/Comparable.php new file mode 100644 index 0000000000..bc95d30303 --- /dev/null +++ b/src/lib/Doctrine/Common/Comparable.php @@ -0,0 +1,47 @@ +. + */ + + +namespace Doctrine\Common; + +/** + * Comparable interface that allows to compare two value objects to each other for similarity. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + */ +interface Comparable +{ + /** + * Compare the current object to the passed $other. + * + * Returns 0 if they are semantically equal, 1 if the other object + * is less than the current one, or -1 if its more than the current one. + * + * This method should not check for identity using ===, only for semantical equality for example + * when two different DateTime instances point to the exact same Date + TZ. + * + * @return int + */ + public function compareTo($other); +} + diff --git a/src/lib/Doctrine/Common/EventManager.php b/src/lib/Doctrine/Common/EventManager.php index fa98cf2d10..a1f11ed237 100644 --- a/src/lib/Doctrine/Common/EventManager.php +++ b/src/lib/Doctrine/Common/EventManager.php @@ -21,13 +21,11 @@ namespace Doctrine\Common; -use Doctrine\Common\Events\Event; - /** * The EventManager is the central point of Doctrine's event listener system. * Listeners are registered on the manager and events are dispatched through the * manager. - * + * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 @@ -40,7 +38,7 @@ class EventManager { /** * Map of registered listeners. - * => + * => * * @var array */ @@ -59,7 +57,7 @@ public function dispatchEvent($eventName, EventArgs $eventArgs = null) { if (isset($this->_listeners[$eventName])) { $eventArgs = $eventArgs === null ? EventArgs::getEmptyInstance() : $eventArgs; - + foreach ($this->_listeners[$eventName] as $listener) { $listener->$eventName($eventArgs); } @@ -98,14 +96,14 @@ public function addEventListener($events, $listener) { // Picks the hash code related to that listener $hash = spl_object_hash($listener); - + foreach ((array) $events as $event) { // Overrides listener if a previous one was associated already // Prevents duplicate listeners on same event (same instance only) $this->_listeners[$event][$hash] = $listener; } } - + /** * Removes an event listener from the specified events. * @@ -116,7 +114,7 @@ public function removeEventListener($events, $listener) { // Picks the hash code related to that listener $hash = spl_object_hash($listener); - + foreach ((array) $events as $event) { // Check if actually have this listener associated if (isset($this->_listeners[$event][$hash])) { @@ -124,11 +122,11 @@ public function removeEventListener($events, $listener) } } } - + /** * Adds an EventSubscriber. The subscriber is asked for all the events he is * interested in and added as a listener for these events. - * + * * @param Doctrine\Common\EventSubscriber $subscriber The subscriber. */ public function addEventSubscriber(EventSubscriber $subscriber) diff --git a/src/lib/Doctrine/Common/EventSubscriber.php b/src/lib/Doctrine/Common/EventSubscriber.php index 8e55973bd0..ed3383fafe 100644 --- a/src/lib/Doctrine/Common/EventSubscriber.php +++ b/src/lib/Doctrine/Common/EventSubscriber.php @@ -41,5 +41,5 @@ interface EventSubscriber * * @return array */ - public function getSubscribedEvents(); + function getSubscribedEvents(); } diff --git a/src/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php b/src/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php new file mode 100644 index 0000000000..f0452866bd --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php @@ -0,0 +1,218 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +use Doctrine\Common\Persistence\ManagerRegistry; + +/** + * Abstract implementation of the ManagerRegistry contract. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Lukas Kahwe Smith + */ +abstract class AbstractManagerRegistry implements ManagerRegistry +{ + private $name; + private $connections; + private $managers; + private $defaultConnection; + private $defaultManager; + private $proxyInterfaceName; + + public function __construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName) + { + $this->name = $name; + $this->connections = $connections; + $this->managers = $managers; + $this->defaultConnection = $defaultConnection; + $this->defaultManager = $defaultManager; + $this->proxyInterfaceName = $proxyInterfaceName; + } + + /** + * Fetches/creates the given services + * + * A service in this context is connection or a manager instance + * + * @param string $name name of the service + * @return object instance of the given service + */ + abstract protected function getService($name); + + /** + * Resets the given services + * + * A service in this context is connection or a manager instance + * + * @param string $name name of the service + * @return void + */ + abstract protected function resetService($name); + + /** + * Get the name of the registry + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @inheritdoc + */ + public function getConnection($name = null) + { + if (null === $name) { + $name = $this->defaultConnection; + } + + if (!isset($this->connections[$name])) { + throw new \InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name)); + } + + return $this->getService($this->connections[$name]); + } + + /** + * @inheritdoc + */ + public function getConnectionNames() + { + return $this->connections; + } + + /** + * @inheritdoc + */ + public function getConnections() + { + $connections = array(); + foreach ($this->connections as $name => $id) { + $connections[$name] = $this->getService($id); + } + + return $connections; + } + + /** + * @inheritdoc + */ + public function getDefaultConnectionName() + { + return $this->defaultConnection; + } + + /** + * @inheritdoc + */ + public function getDefaultManagerName() + { + return $this->defaultManager; + } + + /** + * @inheritdoc + */ + public function getManager($name = null) + { + if (null === $name) { + $name = $this->defaultManager; + } + + if (!isset($this->managers[$name])) { + throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); + } + + return $this->getService($this->managers[$name]); + } + + /** + * @inheritdoc + */ + public function getManagerForClass($class) + { + $proxyClass = new \ReflectionClass($class); + if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { + $class = $proxyClass->getParentClass()->getName(); + } + + foreach ($this->managers as $id) { + $manager = $this->getService($id); + + if (!$manager->getMetadataFactory()->isTransient($class)) { + return $manager; + } + } + } + + /** + * @inheritdoc + */ + public function getManagerNames() + { + return $this->managers; + } + + /** + * @inheritdoc + */ + public function getManagers() + { + $dms = array(); + foreach ($this->managers as $name => $id) { + $dms[$name] = $this->getService($id); + } + + return $dms; + } + + /** + * @inheritdoc + */ + public function getRepository($persistentObjectName, $persistentManagerName = null) + { + return $this->getManager($persistentManagerName)->getRepository($persistentObjectName); + } + + /** + * @inheritdoc + */ + public function resetManager($name = null) + { + if (null === $name) { + $name = $this->defaultManager; + } + + if (!isset($this->managers[$name])) { + throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); + } + + // force the creation of a new document manager + // if the current one is closed + $this->resetService($this->managers[$name]); + } +} diff --git a/src/lib/Doctrine/Common/Persistence/ConnectionRegistry.php b/src/lib/Doctrine/Common/Persistence/ConnectionRegistry.php new file mode 100644 index 0000000000..a47727fa07 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/ConnectionRegistry.php @@ -0,0 +1,63 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Contract covering connection for a Doctrine persistence layer ManagerRegistry class to implement. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Lukas Kahwe Smith + */ +interface ConnectionRegistry +{ + /** + * Gets the default connection name. + * + * @return string The default connection name + */ + function getDefaultConnectionName(); + + /** + * Gets the named connection. + * + * @param string $name The connection name (null for the default one) + * + * @return Connection + */ + function getConnection($name = null); + + /** + * Gets an array of all registered connections + * + * @return array An array of Connection instances + */ + function getConnections(); + + /** + * Gets all connection names. + * + * @return array An array of connection names + */ + function getConnectionNames(); +} diff --git a/src/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php b/src/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php new file mode 100644 index 0000000000..8055b66d6b --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php @@ -0,0 +1,77 @@ +. +*/ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions + * of entities. + * + * @link www.doctrine-project.org + * @since 2.2 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class LifecycleEventArgs extends EventArgs +{ + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var object + */ + private $entity; + + /** + * Constructor + * + * @param object $entity + * @param ObjectManager $objectManager + */ + public function __construct($entity, ObjectManager $objectManager) + { + $this->entity = $entity; + $this->objectManager = $objectManager; + } + + /** + * Retireve associated Entity. + * + * @return object + */ + public function getEntity() + { + return $this->entity; + } + + /** + * Retrieve associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php b/src/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php new file mode 100644 index 0000000000..4a18d16759 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs; +use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * Class that holds event arguments for a loadMetadata event. + * + * @author Jonathan H. Wage + * @since 2.2 + */ +class LoadClassMetadataEventArgs extends EventArgs +{ + /** + * @var ClassMetadata + */ + private $classMetadata; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * Constructor. + * + * @param ClasseMetadata $classMetadata + * @param ObjectManager $objectManager + */ + public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager) + { + $this->classMetadata = $classMetadata; + $this->objectManager = $objectManager; + } + + /** + * Retrieve associated ClassMetadata. + * + * @return ClassMetadata + */ + public function getClassMetadata() + { + return $this->classMetadata; + } + + /** + * Retrieve associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} + diff --git a/src/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php b/src/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php new file mode 100644 index 0000000000..33c4d7964e --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php @@ -0,0 +1,59 @@ +. +*/ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\Persistence\ObjectManager; + +/** + * Provides event arguments for the preFlush event. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class ManagerEventArgs extends \Doctrine\Common\EventArgs +{ + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * Constructor. + * + * @param ObjectManager $objectManager + */ + public function __construct(ObjectManager $objectManager) + { + $this->objectManager = $objectManager; + } + + /** + * Retrieve associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php b/src/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php new file mode 100644 index 0000000000..f67ab50e67 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php @@ -0,0 +1,84 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +/** + * Provides event arguments for the onClear event. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class OnClearEventArgs extends \Doctrine\Common\EventArgs +{ + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var string + */ + private $entityClass; + + /** + * Constructor. + * + * @param ObjectManager $objectManager + * @param string $entityClass Optional entity class + */ + public function __construct($objectManager, $entityClass = null) + { + $this->objectManager = $objectManager; + $this->entityClass = $entityClass; + } + + /** + * Retrieve associated ObjectManager. + * + * @return ObjectManager + */ + public function getObjectManager() + { + return $this->objectManager; + } + + /** + * Name of the entity class that is cleared, or empty if all are cleared. + * + * @return string + */ + public function getEntityClass() + { + return $this->entityClass; + } + + /** + * Check if event clears all entities. + * + * @return bool + */ + public function clearsAllEntities() + { + return ($this->entityClass === null); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php b/src/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php new file mode 100644 index 0000000000..191d053abb --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php @@ -0,0 +1,129 @@ +. + */ + +namespace Doctrine\Common\Persistence\Event; + +use Doctrine\Common\EventArgs, + Doctrine\Common\Persistence\ObjectManager; + +/** + * Class that holds event arguments for a preUpdate event. + * + * @author Guilherme Blanco + * @author Roman Borschel + * @author Benjamin Eberlei + * @since 2.2 + */ +class PreUpdateEventArgs extends LifecycleEventArgs +{ + /** + * @var array + */ + private $entityChangeSet; + + /** + * Constructor. + * + * @param object $entity + * @param ObjectManager $objectManager + * @param array $changeSet + */ + public function __construct($entity, ObjectManager $objectManager, array &$changeSet) + { + parent::__construct($entity, $objectManager); + + $this->entityChangeSet = &$changeSet; + } + + /** + * Retrieve entity changeset. + * + * @return array + */ + public function getEntityChangeSet() + { + return $this->entityChangeSet; + } + + /** + * Check if field has a changeset. + * + * @return boolean + */ + public function hasChangedField($field) + { + return isset($this->entityChangeSet[$field]); + } + + /** + * Get the old value of the changeset of the changed field. + * + * @param string $field + * @return mixed + */ + public function getOldValue($field) + { + $this->assertValidField($field); + + return $this->entityChangeSet[$field][0]; + } + + /** + * Get the new value of the changeset of the changed field. + * + * @param string $field + * @return mixed + */ + public function getNewValue($field) + { + $this->assertValidField($field); + + return $this->entityChangeSet[$field][1]; + } + + /** + * Set the new value of this field. + * + * @param string $field + * @param mixed $value + */ + public function setNewValue($field, $value) + { + $this->assertValidField($field); + + $this->entityChangeSet[$field][1] = $value; + } + + /** + * Assert the field exists in changeset. + * + * @param string $field + */ + private function assertValidField($field) + { + if ( ! isset($this->entityChangeSet[$field])) { + throw new \InvalidArgumentException(sprintf( + 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', + $field, + get_class($this->getEntity()) + )); + } + } +} + diff --git a/src/lib/Doctrine/Common/Persistence/ManagerRegistry.php b/src/lib/Doctrine/Common/Persistence/ManagerRegistry.php new file mode 100644 index 0000000000..4d92426b12 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/ManagerRegistry.php @@ -0,0 +1,112 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Contract covering object managers for a Doctrine persistence layer ManagerRegistry class to implement. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Fabien Potencier + * @author Benjamin Eberlei + * @author Lukas Kahwe Smith + */ +interface ManagerRegistry extends ConnectionRegistry +{ + /** + * Gets the default object manager name. + * + * @return string The default object manager name + */ + function getDefaultManagerName(); + + /** + * Gets a named object manager. + * + * @param string $name The object manager name (null for the default one) + * + * @return \Doctrine\Common\Persistence\ObjectManager + */ + function getManager($name = null); + + /** + * Gets an array of all registered object managers + * + * @return array An array of ObjectManager instances + */ + function getManagers(); + + /** + * Resets a named object manager. + * + * This method is useful when an object manager has been closed + * because of a rollbacked transaction AND when you think that + * it makes sense to get a new one to replace the closed one. + * + * Be warned that you will get a brand new object manager as + * the existing one is not useable anymore. This means that any + * other object with a dependency on this object manager will + * hold an obsolete reference. You can inject the registry instead + * to avoid this problem. + * + * @param string $name The object manager name (null for the default one) + * + * @return \Doctrine\Common\Persistence\ObjectManager + */ + function resetManager($name = null); + + /** + * Resolves a registered namespace alias to the full namespace. + * + * This method looks for the alias in all registered object managers. + * + * @param string $alias The alias + * + * @return string The full namespace + */ + function getAliasNamespace($alias); + + /** + * Gets all connection names. + * + * @return array An array of connection names + */ + function getManagerNames(); + + /** + * Gets the ObjectRepository for an persistent object. + * + * @param string $persistentObject The name of the persistent object. + * @param string $persistentManagerName The object manager name (null for the default one) + * + * @return \Doctrine\Common\Persistence\ObjectRepository + */ + function getRepository($persistentObject, $persistentManagerName = null); + + /** + * Gets the object manager associated with a given class. + * + * @param string $class A persistent object class name + * + * @return \Doctrine\Common\Persistence\ObjectManager|null + */ + function getManagerForClass($class); +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php b/src/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php new file mode 100644 index 0000000000..a2a618506e --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php @@ -0,0 +1,359 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +use Doctrine\Common\Cache\Cache; + +/** + * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the + * metadata mapping informations of a class which describes how a class should be mapped + * to a relational database. + * + * This class was abstracted from the ORM ClassMetadataFactory + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +abstract class AbstractClassMetadataFactory implements ClassMetadataFactory +{ + /** + * Salt used by specific Object Manager implementation. + * + * @var string + */ + protected $cacheSalt = "\$CLASSMETADATA"; + + /** + * @var \Doctrine\Common\Cache\Cache + */ + private $cacheDriver; + + /** + * @var array + */ + private $loadedMetadata = array(); + + /** + * @var bool + */ + protected $initialized = false; + + /** + * @var ReflectionService + */ + private $reflectionService; + + /** + * Sets the cache driver used by the factory to cache ClassMetadata instances. + * + * @param Doctrine\Common\Cache\Cache $cacheDriver + */ + public function setCacheDriver(Cache $cacheDriver = null) + { + $this->cacheDriver = $cacheDriver; + } + + /** + * Gets the cache driver used by the factory to cache ClassMetadata instances. + * + * @return Doctrine\Common\Cache\Cache + */ + public function getCacheDriver() + { + return $this->cacheDriver; + } + + /** + * Return an array of all the loaded metadata currently in memory. + * + * @return array + */ + public function getLoadedMetadata() + { + return $this->loadedMetadata; + } + + /** + * Forces the factory to load the metadata of all classes known to the underlying + * mapping driver. + * + * @return array The ClassMetadata instances of all mapped classes. + */ + public function getAllMetadata() + { + if ( ! $this->initialized) { + $this->initialize(); + } + + $driver = $this->getDriver(); + $metadata = array(); + foreach ($driver->getAllClassNames() as $className) { + $metadata[] = $this->getMetadataFor($className); + } + + return $metadata; + } + + /** + * Lazy initialization of this stuff, especially the metadata driver, + * since these are not needed at all when a metadata cache is active. + * + * @return void + */ + abstract protected function initialize(); + + /** + * Get the fully qualified class-name from the namespace alias. + * + * @param string $namespaceAlias + * @param string $simpleClassName + * @return string + */ + abstract protected function getFqcnFromAlias($namespaceAlias, $simpleClassName); + + /** + * Return the mapping driver implementation. + * + * @return MappingDriver + */ + abstract protected function getDriver(); + + /** + * Wakeup reflection after ClassMetadata gets unserialized from cache. + * + * @param ClassMetadata $class + * @param ReflectionService $reflService + * @return void + */ + abstract protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService); + + /** + * Initialize Reflection after ClassMetadata was constructed. + * + * @param ClassMetadata $class + * @param ReflectionSErvice $reflService + * @return void + */ + abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService); + + /** + * Gets the class metadata descriptor for a class. + * + * @param string $className The name of the class. + * @return Doctrine\Common\Persistence\Mapping\ClassMetadata + */ + public function getMetadataFor($className) + { + if ( ! isset($this->loadedMetadata[$className])) { + $realClassName = $className; + + // Check for namespace alias + if (strpos($className, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $className); + $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); + + if (isset($this->loadedMetadata[$realClassName])) { + // We do not have the alias name in the map, include it + $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; + + return $this->loadedMetadata[$realClassName]; + } + } + + if ($this->cacheDriver) { + if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) !== false) { + $this->loadedMetadata[$realClassName] = $cached; + $this->wakeupReflection($cached, $this->getReflectionService()); + } else { + foreach ($this->loadMetadata($realClassName) as $loadedClassName) { + $this->cacheDriver->save( + $loadedClassName . $this->cacheSalt, $this->loadedMetadata[$loadedClassName], null + ); + } + } + } else { + $this->loadMetadata($realClassName); + } + + if ($className != $realClassName) { + // We do not have the alias name in the map, include it + $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; + } + } + + return $this->loadedMetadata[$className]; + } + + /** + * Checks whether the factory has the metadata for a class loaded already. + * + * @param string $className + * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. + */ + public function hasMetadataFor($className) + { + return isset($this->loadedMetadata[$className]); + } + + /** + * Sets the metadata descriptor for a specific class. + * + * NOTE: This is only useful in very special cases, like when generating proxy classes. + * + * @param string $className + * @param ClassMetadata $class + */ + public function setMetadataFor($className, $class) + { + $this->loadedMetadata[$className] = $class; + } + + /** + * Get array of parent classes for the given entity class + * + * @param string $name + * @return array $parentClasses + */ + protected function getParentClasses($name) + { + // Collect parent classes, ignoring transient (not-mapped) classes. + $parentClasses = array(); + foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { + if ( ! $this->getDriver()->isTransient($parentClass)) { + $parentClasses[] = $parentClass; + } + } + return $parentClasses; + } + + /** + * Loads the metadata of the class in question and all it's ancestors whose metadata + * is still not loaded. + * + * @param string $name The name of the class for which the metadata should get loaded. + * @param array $tables The metadata collection to which the loaded metadata is added. + */ + protected function loadMetadata($name) + { + if ( ! $this->initialized) { + $this->initialize(); + } + + $loaded = array(); + + $parentClasses = $this->getParentClasses($name); + $parentClasses[] = $name; + + // Move down the hierarchy of parent classes, starting from the topmost class + $parent = null; + $rootEntityFound = false; + $visited = array(); + $reflService = $this->getReflectionService(); + foreach ($parentClasses as $className) { + if (isset($this->loadedMetadata[$className])) { + $parent = $this->loadedMetadata[$className]; + if (isset($parent->isMappedSuperclass) && $parent->isMappedSuperclass === false) { + $rootEntityFound = true; + array_unshift($visited, $className); + } + continue; + } + + $class = $this->newClassMetadataInstance($className); + $this->initializeReflection($class, $reflService); + + $this->doLoadMetadata($class, $parent, $rootEntityFound); + + $this->loadedMetadata[$className] = $class; + + $parent = $class; + + if (isset($parent->isMappedSuperclass) && $class->isMappedSuperclass === false) { + $rootEntityFound = true; + array_unshift($visited, $className); + } + + $this->wakeupReflection($class, $reflService); + + $loaded[] = $className; + } + + return $loaded; + } + + /** + * Actually load the metadata from the underlying metadata + * + * @param ClassMetadata $class + * @param ClassMetadata $parent + * @param bool $rootEntityFound + * @return void + */ + abstract protected function doLoadMetadata($class, $parent, $rootEntityFound); + + /** + * Creates a new ClassMetadata instance for the given class name. + * + * @param string $className + * @return ClassMetadata + */ + abstract protected function newClassMetadataInstance($className); + + /** + * Check if this class is mapped by this Object Manager + ClassMetadata configuration + * + * @param $class + * @return bool + */ + public function isTransient($class) + { + if ( ! $this->initialized) { + $this->initialize(); + } + + return $this->getDriver()->isTransient($class); + } + + /** + * Set reflectionService. + * + * @param ReflectionService $reflectionService + */ + public function setReflectionService(ReflectionService $reflectionService) + { + $this->reflectionService = $reflectionService; + } + + /** + * Get the reflection service associated with this metadata factory. + * + * @return ReflectionService + */ + public function getReflectionService() + { + if ($this->reflectionService === null) { + $this->reflectionService = new RuntimeReflectionService(); + } + return $this->reflectionService; + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php b/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php index 70f18b80ec..705d59acf1 100644 --- a/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php +++ b/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php @@ -32,26 +32,26 @@ interface ClassMetadata { /** * Get fully-qualified class name of this persistent class. - * + * * @return string */ - public function getName(); - + function getName(); + /** * Gets the mapped identifier field name. - * + * * The returned structure is an array of the identifier field names. * * @return array */ - public function getIdentifier(); + function getIdentifier(); /** * Gets the ReflectionClass instance for this mapped class. * * @return ReflectionClass */ - public function getReflectionClass(); + function getReflectionClass(); /** * Checks if the given field name is a mapped identifier for this class. @@ -59,15 +59,15 @@ public function getReflectionClass(); * @param string $fieldName * @return boolean */ - public function isIdentifier($fieldName); + function isIdentifier($fieldName); /** * Checks if the given field is a mapped property for this class. * - * @param string $fieldName + * @param string $fieldName * @return boolean */ - public function hasField($fieldName); + function hasField($fieldName); /** * Checks if the given field is a mapped association for this class. @@ -75,7 +75,7 @@ public function hasField($fieldName); * @param string $fieldName * @return boolean */ - public function hasAssociation($fieldName); + function hasAssociation($fieldName); /** * Checks if the given field is a mapped single valued association for this class. @@ -83,7 +83,7 @@ public function hasAssociation($fieldName); * @param string $fieldName * @return boolean */ - public function isSingleValuedAssociation($fieldName); + function isSingleValuedAssociation($fieldName); /** * Checks if the given field is a mapped collection valued association for this class. @@ -91,42 +91,75 @@ public function isSingleValuedAssociation($fieldName); * @param string $fieldName * @return boolean */ - public function isCollectionValuedAssociation($fieldName); - + function isCollectionValuedAssociation($fieldName); + /** * A numerically indexed list of field names of this persistent class. - * + * * This array includes identifier fields if present on this class. - * + * * @return array */ - public function getFieldNames(); - + function getFieldNames(); + + /** + * Returns an array of identifier field names numerically indexed. + * + * @return array + */ + function getIdentifierFieldNames(); + /** * A numerically indexed list of association names of this persistent class. - * + * * This array includes identifier associations if present on this class. - * + * * @return array */ - public function getAssociationNames(); - + function getAssociationNames(); + /** * Returns a type name of this field. - * + * * This type names can be implementation specific but should at least include the php types: * integer, string, boolean, float/double, datetime. - * + * * @param string $fieldName * @return string */ - public function getTypeOfField($fieldName); - + function getTypeOfField($fieldName); + /** * Returns the target class name of the given association. - * + * * @param string $assocName * @return string */ - public function getAssociationTargetClass($assocName); -} \ No newline at end of file + function getAssociationTargetClass($assocName); + + /** + * Checks if the association is the inverse side of a bidirectional association + * + * @param string $assocName + * @return boolean + */ + function isAssociationInverseSide($assocName); + + /** + * Returns the target field of the owning side of the association + * + * @param string $assocName + * @return string + */ + function getAssociationMappedByTargetField($assocName); + + /** + * Return the identifier of this object as an array with field name as key. + * + * Has to return an empty array if no identifier isset. + * + * @param object $object + * @return array + */ + function getIdentifierValues($object); +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php b/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php index 150e397c48..bf27ba9aba 100644 --- a/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php +++ b/src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php @@ -36,15 +36,15 @@ interface ClassMetadataFactory * * @return array The ClassMetadata instances of all mapped classes. */ - public function getAllMetadata(); + function getAllMetadata(); /** * Gets the class metadata descriptor for a class. * * @param string $className The name of the class. - * @return Doctrine\ODM\MongoDB\Mapping\ClassMetadata + * @return ClassMetadata */ - public function getMetadataFor($className); + function getMetadataFor($className); /** * Checks whether the factory has the metadata for a class loaded already. @@ -52,7 +52,7 @@ public function getMetadataFor($className); * @param string $className * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. */ - public function hasMetadataFor($className); + function hasMetadataFor($className); /** * Sets the metadata descriptor for a specific class. @@ -60,5 +60,15 @@ public function hasMetadataFor($className); * @param string $className * @param ClassMetadata $class */ - public function setMetadataFor($className, $class); -} \ No newline at end of file + function setMetadataFor($className, $class); + + /** + * Whether the class with the specified name should have its metadata loaded. + * This is only the case if it is either mapped directly or as a + * MappedSuperclass. + * + * @param string $className + * @return boolean + */ + function isTransient($className); +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php new file mode 100644 index 0000000000..f52d37eee7 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php @@ -0,0 +1,214 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Cache\ArrayCache, + Doctrine\Common\Annotations\AnnotationReader, + Doctrine\Common\Annotations\AnnotationRegistry, + Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The AnnotationDriver reads the mapping metadata from docblock annotations. + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +abstract class AnnotationDriver implements MappingDriver +{ + /** + * The AnnotationReader. + * + * @var AnnotationReader + */ + protected $reader; + + /** + * The paths where to look for mapping files. + * + * @var array + */ + protected $paths = array(); + + /** + * The file extension of mapping documents. + * + * @var string + */ + protected $fileExtension = '.php'; + + /** + * Cache for AnnotationDriver#getAllClassNames() + * + * @var array + */ + protected $classNames; + + /** + * Name of the entity annotations as keys + * + * @var array + */ + protected $entityAnnotationClasses = array(); + + /** + * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading + * docblock annotations. + * + * @param AnnotationReader $reader The AnnotationReader to use, duck-typed. + * @param string|array $paths One or multiple paths where mapping classes can be found. + */ + public function __construct($reader, $paths = null) + { + $this->reader = $reader; + if ($paths) { + $this->addPaths((array) $paths); + } + } + + /** + * Append lookup paths to metadata driver. + * + * @param array $paths + */ + public function addPaths(array $paths) + { + $this->paths = array_unique(array_merge($this->paths, $paths)); + } + + /** + * Retrieve the defined metadata lookup paths. + * + * @return array + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Retrieve the current annotation reader + * + * @return AnnotationReader + */ + public function getReader() + { + return $this->reader; + } + + /** + * Get the file extension used to look for mapping files under + * + * @return void + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Set the file extension used to look for mapping files under + * + * @param string $fileExtension The file extension to set + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * Whether the class with the specified name is transient. Only non-transient + * classes, that is entities and mapped superclasses, should have their metadata loaded. + * + * A class is non-transient if it is annotated with an annotation + * from the {@see AnnotationDriver::entityAnnotationClasses}. + * + * @param string $className + * @return boolean + */ + public function isTransient($className) + { + $classAnnotations = $this->reader->getClassAnnotations(new \ReflectionClass($className)); + + foreach ($classAnnotations as $annot) { + if (isset($this->entityAnnotationClasses[get_class($annot)])) { + return false; + } + } + return true; + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames() + { + if ($this->classNames !== null) { + return $this->classNames; + } + + if (!$this->paths) { + throw MappingException::pathRequired(); + } + + $classes = array(); + $includedFiles = array(); + + foreach ($this->paths as $path) { + if ( ! is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RegexIterator( + new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), + \RecursiveIteratorIterator::LEAVES_ONLY + ), + '/^.+' . str_replace('.', '\.', $this->fileExtension) . '$/i', + \RecursiveRegexIterator::GET_MATCH + ); + + foreach ($iterator as $file) { + $sourceFile = realpath($file[0]); + + require_once $sourceFile; + + $includedFiles[] = $sourceFile; + } + } + + $declared = get_declared_classes(); + + foreach ($declared as $className) { + $rc = new \ReflectionClass($className); + $sourceFile = $rc->getFileName(); + if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { + $classes[] = $className; + } + } + + $this->classNames = $classes; + + return $classes; + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php new file mode 100644 index 0000000000..efaf545ee4 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php @@ -0,0 +1,169 @@ +. +*/ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * Locate the file that contains the metadata information for a given class name. + * + * This behavior is inpependent of the actual content of the file. It just detects + * the file which is responsible for the given class name. + * + * @author Benjamin Eberlei + * @author Johannes M. Schmitt + */ +class DefaultFileLocator implements FileLocator +{ + /** + * The paths where to look for mapping files. + * + * @var array + */ + protected $paths = array(); + + /** + * The file extension of mapping documents. + * + * @var string + */ + protected $fileExtension; + + /** + * Initializes a new FileDriver that looks in the given path(s) for mapping + * documents and operates in the specified operating mode. + * + * @param string|array $paths One or multiple paths where mapping documents can be found. + */ + public function __construct($paths, $fileExtension = null) + { + $this->addPaths((array) $paths); + $this->fileExtension = $fileExtension; + } + + /** + * Append lookup paths to metadata driver. + * + * @param array $paths + */ + public function addPaths(array $paths) + { + $this->paths = array_unique(array_merge($this->paths, $paths)); + } + + /** + * Retrieve the defined metadata lookup paths. + * + * @return array + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Get the file extension used to look for mapping files under + * + * @return void + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Set the file extension used to look for mapping files under + * + * @param string $fileExtension The file extension to set + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * {@inheritDoc} + */ + public function findMappingFile($className) + { + $fileName = str_replace('\\', '.', $className) . $this->fileExtension; + + // Check whether file exists + foreach ($this->paths as $path) { + if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) { + return $path . DIRECTORY_SEPARATOR . $fileName; + } + } + + throw MappingException::mappingFileNotFound($className, $fileName); + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames($globalBasename) + { + $classes = array(); + + if ($this->paths) { + foreach ($this->paths as $path) { + if ( ! is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + $fileName = $file->getBasename($this->fileExtension); + + if ($fileName == $file->getBasename() || $fileName == $globalBasename) { + continue; + } + + // NOTE: All files found here means classes are not transient! + $classes[] = str_replace('.', '\\', $fileName); + } + } + } + + return $classes; + } + + /** + * {@inheritDoc} + */ + public function fileExists($className) + { + $fileName = str_replace('\\', '.', $className) . $this->fileExtension; + + // Check whether file exists + foreach ((array) $this->paths as $path) { + if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) { + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php new file mode 100644 index 0000000000..22cf117d5a --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php @@ -0,0 +1,178 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * Base driver for file-based metadata drivers. + * + * A file driver operates in a mode where it loads the mapping files of individual + * classes on demand. This requires the user to adhere to the convention of 1 mapping + * file per class and the file names of the mapping files must correspond to the full + * class name, including namespace, with the namespace delimiters '\', replaced by dots '.'. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +abstract class FileDriver implements MappingDriver +{ + /** + * @var FileLocator + */ + protected $locator; + + /** + * @var array + */ + protected $classCache; + + /** + * @var string + */ + protected $globalBasename; + + /** + * Initializes a new FileDriver that looks in the given path(s) for mapping + * documents and operates in the specified operating mode. + * + * @param string|array|FileLocator $paths A FileLocator or one/multiple paths where mapping documents can be found. + * @param string $fileExtension + */ + public function __construct($locator, $fileExtension = null) + { + if ($locator instanceof FileLocator) { + $this->locator = $locator; + } else { + $this->locator = new DefaultFileLocator((array)$locator, $fileExtension); + } + } + + public function setGlobalBasename($file) + { + $this->globalBasename = $file; + } + + public function getGlobalBasename() + { + return $this->globalBasename; + } + + /** + * Get the element of schema meta data for the class from the mapping file. + * This will lazily load the mapping file if it is not loaded yet + * + * @return array $element The element of schema meta data + */ + public function getElement($className) + { + if ($this->classCache === null) { + $this->initialize(); + } + + if (isset($this->classCache[$className])) { + return $this->classCache[$className]; + } + + $result = $this->loadMappingFile($this->locator->findMappingFile($className)); + + return $result[$className]; + } + + /** + * Whether the class with the specified name should have its metadata loaded. + * This is only the case if it is either mapped as an Entity or a + * MappedSuperclass. + * + * @param string $className + * @return boolean + */ + public function isTransient($className) + { + if ($this->classCache === null) { + $this->initialize(); + } + + if (isset($this->classCache[$className])) { + return false; + } + + return !$this->locator->fileExists($className); + } + + /** + * Gets the names of all mapped classes known to this driver. + * + * @return array The names of all mapped classes known to this driver. + */ + public function getAllClassNames() + { + if ($this->classCache === null) { + $this->initialize(); + } + + $classNames = (array)$this->locator->getAllClassNames($this->globalBasename); + if ($this->classCache) { + $classNames = array_merge(array_keys($this->classCache), $classNames); + } + return $classNames; + } + + /** + * Loads a mapping file with the given name and returns a map + * from class/entity names to their corresponding file driver elements. + * + * @param string $file The mapping file to load. + * @return array + */ + abstract protected function loadMappingFile($file); + + /** + * Initialize the class cache from all the global files. + * + * Using this feature adds a substantial performance hit to file drivers as + * more metadata has to be loaded into memory than might actually be + * necessary. This may not be relevant to scenarios where caching of + * metadata is in place, however hits very hard in scenarios where no + * caching is used. + * + * @return void + */ + protected function initialize() + { + $this->classCache = array(); + if (null !== $this->globalBasename) { + foreach ($this->locator->getPaths() as $path) { + $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension(); + if (is_file($file)) { + $this->classCache = array_merge( + $this->classCache, + $this->loadMappingFile($file) + ); + } + } + } + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php new file mode 100644 index 0000000000..a1019d71f1 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php @@ -0,0 +1,69 @@ +. +*/ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +/** + * Locate the file that contains the metadata information for a given class name. + * + * This behavior is inpependent of the actual content of the file. It just detects + * the file which is responsible for the given class name. + * + * @author Benjamin Eberlei + * @author Johannes M. Schmitt + */ +interface FileLocator +{ + /** + * Locate mapping file for the given class name. + * + * @param string $className + * @return string + */ + function findMappingFile($className); + + /** + * Get all class names that are found with this file locator. + * + * @param string $globalBasename Passed to allow excluding the basename + * @return array + */ + function getAllClassNames($globalBasename); + + /** + * Check if a file can be found for this class name. + * + * @return bool + */ + function fileExists($className); + + /** + * Get all the paths that this file locator looks for mapping files. + * + * @return array + */ + function getPaths(); + + /** + * Get the file extension that mapping files are suffixed with. + * + * @return string + */ + function getFileExtension(); +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php new file mode 100644 index 0000000000..c050d32337 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php @@ -0,0 +1,56 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * Contract for metadata drivers. + * + * @since 2.2 + * @author Jonathan H. Wage + */ +interface MappingDriver +{ + /** + * Loads the metadata for the specified class into the provided container. + * + * @param string $className + * @param ClassMetadata $metadata + */ + function loadMetadataForClass($className, ClassMetadata $metadata); + + /** + * Gets the names of all mapped classes known to this driver. + * + * @return array The names of all mapped classes known to this driver. + */ + function getAllClassNames(); + + /** + * Whether the class with the specified name should have its metadata loaded. + * This is only the case if it is either mapped as an Entity or a + * MappedSuperclass. + * + * @param string $className + * @return boolean + */ + function isTransient($className); +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php new file mode 100644 index 0000000000..c7c145270e --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php @@ -0,0 +1,125 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver, + Doctrine\Common\Persistence\Mapping\ClassMetadata, + Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The DriverChain allows you to add multiple other mapping drivers for + * certain namespaces + * + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class MappingDriverChain implements MappingDriver +{ + /** + * @var array + */ + private $drivers = array(); + + /** + * Add a nested driver. + * + * @param Driver $nestedDriver + * @param string $namespace + */ + public function addDriver(MappingDriver $nestedDriver, $namespace) + { + $this->drivers[$namespace] = $nestedDriver; + } + + /** + * Get the array of nested drivers. + * + * @return array $drivers + */ + public function getDrivers() + { + return $this->drivers; + } + + /** + * Loads the metadata for the specified class into the provided container. + * + * @param string $className + * @param ClassMetadataInfo $metadata + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + foreach ($this->drivers as $namespace => $driver) { + if (strpos($className, $namespace) === 0) { + $driver->loadMetadataForClass($className, $metadata); + return; + } + } + + throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers)); + } + + /** + * Gets the names of all mapped classes known to this driver. + * + * @return array The names of all mapped classes known to this driver. + */ + public function getAllClassNames() + { + $classNames = array(); + $driverClasses = array(); + foreach ($this->drivers AS $namespace => $driver) { + $oid = spl_object_hash($driver); + if (!isset($driverClasses[$oid])) { + $driverClasses[$oid] = $driver->getAllClassNames(); + } + + foreach ($driverClasses[$oid] AS $className) { + if (strpos($className, $namespace) === 0) { + $classNames[$className] = true; + } + } + } + return array_keys($classNames); + } + + /** + * Whether the class with the specified name should have its metadata loaded. + * + * This is only the case for non-transient classes either mapped as an Entity or MappedSuperclass. + * + * @param string $className + * @return boolean + */ + public function isTransient($className) + { + foreach ($this->drivers AS $namespace => $driver) { + if (strpos($className, $namespace) === 0) { + return $driver->isTransient($className); + } + } + + // class isTransient, i.e. not an entity or mapped superclass + return true; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php new file mode 100644 index 0000000000..7751dae3b5 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php @@ -0,0 +1,70 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * The PHPDriver includes php files which just populate ClassMetadataInfo + * instances with plain php code + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class PHPDriver extends FileDriver +{ + /** + * {@inheritdoc} + */ + protected $metadata; + + /** + * {@inheritDoc} + */ + public function __construct($locator, $fileExtension = null) + { + $fileExtension = ".php"; + parent::__construct($locator, $fileExtension); + } + + /** + * {@inheritdoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + $this->metadata = $metadata; + $this->loadMappingFile($this->locator->findMappingFile($className)); + } + + /** + * {@inheritdoc} + */ + protected function loadMappingFile($file) + { + $metadata = $this->metadata; + include $file; + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php new file mode 100644 index 0000000000..9103ed863b --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php @@ -0,0 +1,131 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The StaticPHPDriver calls a static loadMetadata() method on your entity + * classes where you can manually populate the ClassMetadata instance. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class StaticPHPDriver implements MappingDriver +{ + /** + * Paths of entity directories. + * + * @var array + */ + private $paths = array(); + + /** + * Map of all class names. + * + * @var array + */ + private $classNames; + + public function __construct($paths) + { + $this->addPaths((array) $paths); + } + + public function addPaths(array $paths) + { + $this->paths = array_unique(array_merge($this->paths, $paths)); + } + + /** + * {@inheritdoc} + */ + public function loadMetadataForClass($className, ClassMetadata $metadata) + { + $className::loadMetadata($metadata); + } + + /** + * {@inheritDoc} + * @todo Same code exists in AnnotationDriver, should we re-use it somehow or not worry about it? + */ + public function getAllClassNames() + { + if ($this->classNames !== null) { + return $this->classNames; + } + + if (!$this->paths) { + throw MappingException::pathRequired(); + } + + $classes = array(); + $includedFiles = array(); + + foreach ($this->paths as $path) { + if (!is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + if ($file->getBasename('.php') == $file->getBasename()) { + continue; + } + + $sourceFile = realpath($file->getPathName()); + require_once $sourceFile; + $includedFiles[] = $sourceFile; + } + } + + $declared = get_declared_classes(); + + foreach ($declared as $className) { + $rc = new \ReflectionClass($className); + $sourceFile = $rc->getFileName(); + if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) { + $classes[] = $className; + } + } + + $this->classNames = $classes; + + return $classes; + } + + /** + * {@inheritdoc} + */ + public function isTransient($className) + { + return ! method_exists($className, 'loadMetadata'); + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php new file mode 100644 index 0000000000..d338cf6079 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php @@ -0,0 +1,198 @@ +. +*/ + +namespace Doctrine\Common\Persistence\Mapping\Driver; + +use Doctrine\Common\Persistence\Mapping\MappingException; + +/** + * The Symfony File Locator makes a simplifying assumptions compared + * to the DefaultFileLocator. By assuming paths only contain entities of a certain + * namespace the mapping files consists of the short classname only. + * + * @author Fabien Potencier + * @author Benjamin Eberlei + * @license MIT + */ +class SymfonyFileLocator implements FileLocator +{ + /** + * The paths where to look for mapping files. + * + * @var array + */ + protected $paths = array(); + + /** + * A map of mapping directory path to namespace prefix used to expand class shortnames. + * + * @var array + */ + protected $prefixes = array(); + + /** + * File extension that is searched for. + * + * @var string + */ + protected $fileExtension; + + public function __construct(array $prefixes, $fileExtension = null) + { + $this->addNamespacePrefixes($prefixes); + $this->fileExtension = $fileExtension; + } + + public function addNamespacePrefixes(array $prefixes) + { + $this->prefixes = array_merge($this->prefixes, $prefixes); + $this->paths = array_merge($this->paths, array_keys($prefixes)); + } + + public function getNamespacePrefixes() + { + return $this->prefixes; + } + + /** + * {@inheritDoc} + */ + public function getPaths() + { + return $this->paths; + } + + /** + * {@inheritDoc} + */ + public function getFileExtension() + { + return $this->fileExtension; + } + + /** + * Set the file extension used to look for mapping files under + * + * @param string $fileExtension The file extension to set + * @return void + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension = $fileExtension; + } + + /** + * {@inheritDoc} + */ + public function fileExists($className) + { + $defaultFileName = str_replace('\\', '.', $className).$this->fileExtension; + foreach ($this->paths as $path) { + if (!isset($this->prefixes[$path])) { + // global namespace class + if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { + return true; + } + + continue; + } + + $prefix = $this->prefixes[$path]; + + if (0 !== strpos($className, $prefix.'\\')) { + continue; + } + + $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension; + return is_file($filename); + } + + return false; + } + + /** + * {@inheritDoc} + */ + public function getAllClassNames($globalBasename = null) + { + $classes = array(); + + if ($this->paths) { + foreach ((array) $this->paths as $path) { + if (!is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + $fileName = $file->getBasename($this->fileExtension); + + if ($fileName == $file->getBasename() || $fileName == $globalBasename) { + continue; + } + + // NOTE: All files found here means classes are not transient! + if (isset($this->prefixes[$path])) { + $classes[] = $this->prefixes[$path].'\\'.str_replace('.', '\\', $fileName); + } else { + $classes[] = str_replace('.', '\\', $fileName); + } + } + } + } + + return $classes; + } + + /** + * {@inheritDoc} + */ + public function findMappingFile($className) + { + $defaultFileName = str_replace('\\', '.', $className).$this->fileExtension; + foreach ($this->paths as $path) { + if (!isset($this->prefixes[$path])) { + if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { + return $path.DIRECTORY_SEPARATOR.$defaultFileName; + } + + continue; + } + + $prefix = $this->prefixes[$path]; + + if (0 !== strpos($className, $prefix.'\\')) { + continue; + } + + $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension; + if (is_file($filename)) { + return $filename; + } + + throw MappingException::mappingFileNotFound($className, $filename); + } + + throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension); + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/MappingException.php b/src/lib/Doctrine/Common/Persistence/Mapping/MappingException.php new file mode 100644 index 0000000000..4ecd2ad553 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/MappingException.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * A MappingException indicates that something is wrong with the mapping setup. + * + * @since 2.2 + */ +class MappingException extends \Exception +{ + public static function classNotFoundInNamespaces($className, $namespaces) + { + return new self("The class '" . $className . "' was not found in the ". + "chain configured namespaces " . implode(", ", $namespaces)); + } + + public static function pathRequired() + { + return new self("Specifying the paths to your entities is required ". + "in the AnnotationDriver to retrieve all class names."); + } + + public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) + { + if ( ! empty($path)) { + $path = '[' . $path . ']'; + } + + return new self( + 'File mapping drivers must have a valid directory path, ' . + 'however the given path ' . $path . ' seems to be incorrect!' + ); + } + + public static function mappingFileNotFound($entityName, $fileName) + { + return new self("No mapping file found named '$fileName' for class '$entityName'."); + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php b/src/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php new file mode 100644 index 0000000000..4e0e312fd4 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php @@ -0,0 +1,80 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +/** + * Very simple reflection service abstraction. + * + * This is required inside metadata layers that may require either + * static or runtime reflection. + * + * @author Benjamin Eberlei + */ +interface ReflectionService +{ + /** + * Return an array of the parent classes (not interfaces) for the given class. + * + * @param string $class + * @return array + */ + function getParentClasses($class); + + /** + * Return the shortname of a class. + * + * @param string $class + * @return string + */ + function getClassShortName($class); + + /** + * @param string $class + * @return string + */ + function getClassNamespace($class); + + /** + * Return a reflection class instance or null + * + * @param string $class + * @return ReflectionClass|null + */ + function getClass($class); + + /** + * Return an accessible property (setAccessible(true)) or null. + * + * @param string $class + * @param string $property + * @return ReflectionProperty|null + */ + function getAccessibleProperty($class, $property); + + /** + * Check if the class have a public method with the given name. + * + * @param mixed $class + * @param mixed $method + * @return bool + */ + function hasPublicMethod($class, $method); +} + diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php b/src/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php new file mode 100644 index 0000000000..abcff58139 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php @@ -0,0 +1,102 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +use ReflectionClass; +use ReflectionProperty; + +/** + * PHP Runtime Reflection Service + * + * @author Benjamin Eberlei + */ +class RuntimeReflectionService implements ReflectionService +{ + /** + * Return an array of the parent classes (not interfaces) for the given class. + * + * @param string $class + * @return array + */ + public function getParentClasses($class) + { + return class_parents($class); + } + + /** + * Return the shortname of a class. + * + * @param string $class + * @return string + */ + public function getClassShortName($class) + { + $r = new ReflectionClass($class); + return $r->getShortName(); + } + + /** + * @param string $class + * @return string + */ + public function getClassNamespace($class) + { + $r = new ReflectionClass($class); + return $r->getNamespaceName(); + } + + /** + * Return a reflection class instance or null + * + * @param string $class + * @return ReflectionClass|null + */ + public function getClass($class) + { + return new ReflectionClass($class); + } + + /** + * Return an accessible property (setAccessible(true)) or null. + * + * @param string $class + * @param string $property + * @return ReflectionProperty|null + */ + public function getAccessibleProperty($class, $property) + { + $property = new ReflectionProperty($class, $property); + $property->setAccessible(true); + return $property; + } + + /** + * Check if the class have a public method with the given name. + * + * @param mixed $class + * @param mixed $method + * @return bool + */ + public function hasPublicMethod($class, $method) + { + return method_exists($class, $method) && is_callable(array($class, $method)); + } +} + diff --git a/src/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php b/src/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php new file mode 100644 index 0000000000..2de6e76132 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php @@ -0,0 +1,107 @@ +. + */ + +namespace Doctrine\Common\Persistence\Mapping; + +use ReflectionClass; +use ReflectionProperty; + +/** + * PHP Runtime Reflection Service + * + * @author Benjamin Eberlei + */ +class StaticReflectionService implements ReflectionService +{ + /** + * Return an array of the parent classes (not interfaces) for the given class. + * + * @param string $class + * @return array + */ + public function getParentClasses($class) + { + return array(); + } + + /** + * Return the shortname of a class. + * + * @param string $className + * @return string + */ + public function getClassShortName($className) + { + if (strpos($className, '\\') !== false) { + $className = substr($className, strrpos($className, "\\")+1); + } + return $className; + } + + /** + * Return the namespace of a class. + * + * @param string $className + * @return string + */ + public function getClassNamespace($className) + { + $namespace = ''; + if (strpos($className, '\\') !== false) { + $namespace = strrev(substr( strrev($className), strpos(strrev($className), '\\')+1 )); + } + return $namespace; + } + + /** + * Return a reflection class instance or null + * + * @param string $class + * @return ReflectionClass|null + */ + public function getClass($class) + { + return null; + } + + /** + * Return an accessible property (setAccessible(true)) or null. + * + * @param string $class + * @param string $property + * @return ReflectionProperty|null + */ + public function getAccessibleProperty($class, $property) + { + return null; + } + + /** + * Check if the class have a public method with the given name. + * + * @param mixed $class + * @param mixed $method + * @return bool + */ + public function hasPublicMethod($class, $method) + { + return method_exists($class, $method) && is_callable(array($class, $method)); + } +} + diff --git a/src/lib/Doctrine/Common/Persistence/ObjectManager.php b/src/lib/Doctrine/Common/Persistence/ObjectManager.php index 2bec508500..6d70fc1227 100644 --- a/src/lib/Doctrine/Common/Persistence/ObjectManager.php +++ b/src/lib/Doctrine/Common/Persistence/ObjectManager.php @@ -39,19 +39,19 @@ interface ObjectManager * @param mixed * @return object */ - public function find($className, $id); + function find($className, $id); /** * Tells the ObjectManager to make an instance managed and persistent. * * The object will be entered into the database as a result of the flush operation. - * + * * NOTE: The persist operation always considers objects that are not yet known to * this ObjectManager as NEW. Do not pass detached objects to the persist operation. * * @param object $object The instance to make managed and persistent. */ - public function persist($object); + function persist($object); /** * Removes an object instance. @@ -60,7 +60,7 @@ public function persist($object); * * @param object $object The object instance to remove. */ - public function remove($object); + function remove($object); /** * Merges the state of a detached object into the persistence context @@ -69,7 +69,7 @@ public function remove($object); * * @param object $object */ - public function merge($object); + function merge($object); /** * Detaches an object from the ObjectManager, causing a managed object to @@ -80,7 +80,7 @@ public function merge($object); * * @param object $object The object to detach. */ - public function detach($object); + function detach($object); /** * Refreshes the persistent state of an object from the database, @@ -88,14 +88,14 @@ public function detach($object); * * @param object $object The object to refresh. */ - public function refresh($object); + function refresh($object); /** * Flushes all changes to objects that have been queued up to now to the database. * This effectively synchronizes the in-memory state of managed objects with the * database. */ - public function flush(); + function flush(); /** * Gets the repository for a class. @@ -103,7 +103,7 @@ public function flush(); * @param string $className * @return \Doctrine\Common\Persistence\ObjectRepository */ - public function getRepository($className); + function getRepository($className); /** * Returns the ClassMetadata descriptor for a class. @@ -114,12 +114,30 @@ public function getRepository($className); * @param string $className * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata */ - public function getClassMetadata($className); + function getClassMetadata($className); /** * Gets the metadata factory used to gather the metadata of classes. * * @return Doctrine\Common\Persistence\Mapping\ClassMetadataFactory */ - public function getMetadataFactory(); -} \ No newline at end of file + function getMetadataFactory(); + + /** + * Helper method to initialize a lazy loading proxy or persistent collection. + * + * This method is a no-op for other objects. + * + * @param object $obj + */ + function initializeObject($obj); + + /** + * Check if the object is part of the current UnitOfWork and therefore + * managed. + * + * @param object $object + * @return bool + */ + function contains($object); +} diff --git a/src/lib/Doctrine/Common/Persistence/ObjectManagerAware.php b/src/lib/Doctrine/Common/Persistence/ObjectManagerAware.php new file mode 100644 index 0000000000..015dd3dd9e --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/ObjectManagerAware.php @@ -0,0 +1,49 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; + +/** + * Makes a Persistent Objects aware of its own object-manager. + * + * Using this interface the managing object manager and class metadata instances + * are injected into the persistent object after construction. This allows + * you to implement ActiveRecord functionality on top of the persistance-ignorance + * that Doctrine propagates. + * + * Word of Warning: This is a very powerful hook to change how you can work with your domain models. + * Using this hook will break the Single Responsibility Principle inside your Domain Objects + * and increase the coupling of database and objects. + * + * Every ObjectManager has to implement this functionality itself. + * + * @author Benjamin Eberlei + */ +interface ObjectManagerAware +{ + /** + * Injects responsible ObjectManager and the ClassMetadata into this persistent object. + * + * @param ObjectManager $objectManager + * @param ClassMetadata $classMetadata + */ + public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata); +} diff --git a/src/lib/Doctrine/Common/Persistence/ObjectRepository.php b/src/lib/Doctrine/Common/Persistence/ObjectRepository.php index b54e2f417c..22633288ee 100644 --- a/src/lib/Doctrine/Common/Persistence/ObjectRepository.php +++ b/src/lib/Doctrine/Common/Persistence/ObjectRepository.php @@ -36,14 +36,14 @@ interface ObjectRepository * @param $id The identifier. * @return object The object. */ - public function find($id); + function find($id); /** * Finds all objects in the repository. * * @return mixed The objects. */ - public function findAll(); + function findAll(); /** * Finds objects by a set of criteria. @@ -59,7 +59,7 @@ public function findAll(); * @param int|null $offset * @return mixed The objects. */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null); + function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null); /** * Finds a single object by a set of criteria. @@ -67,5 +67,12 @@ public function findBy(array $criteria, array $orderBy = null, $limit = null, $o * @param array $criteria * @return object The object. */ - public function findOneBy(array $criteria); + function findOneBy(array $criteria); + + /** + * Returns the class name of the object managed by the repository + * + * @return string + */ + function getClassName(); } diff --git a/src/lib/Doctrine/Common/Persistence/PersistentObject.php b/src/lib/Doctrine/Common/Persistence/PersistentObject.php new file mode 100644 index 0000000000..4274af6246 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/PersistentObject.php @@ -0,0 +1,233 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; + +/** + * PersistentObject base class that implements getter/setter methods for all mapped fields and associations + * by overriding __call. + * + * This class is a forward compatible implementation of the PersistentObject trait. + * + * + * Limitations: + * + * 1. All persistent objects have to be associated with a single ObjectManager, multiple + * ObjectManagers are not supported. You can set the ObjectManager with `PersistentObject#setObjectManager()`. + * 2. Setters and getters only work if a ClassMetadata instance was injected into the PersistentObject. + * This is either done on `postLoad` of an object or by accessing the global object manager. + * 3. There are no hooks for setters/getters. Just implement the method yourself instead of relying on __call(). + * 4. Slower than handcoded implementations: An average of 7 method calls per access to a field and 11 for an association. + * 5. Only the inverse side associations get autoset on the owning side aswell. Setting objects on the owning side + * will not set the inverse side associations. + * + * @example + * + * PersistentObject::setObjectManager($em); + * + * class Foo extends PersistentObject + * { + * private $id; + * } + * + * $foo = new Foo(); + * $foo->getId(); // method exists through __call + * + * @author Benjamin Eberlei + */ +abstract class PersistentObject implements ObjectManagerAware +{ + /** + * @var ObjectManager + */ + private static $objectManager; + + /** + * @var ClassMetadata + */ + private $cm; + + /** + * Set the object manager responsible for all persistent object base classes. + * + * @param ObjectManager $objectManager + */ + static public function setObjectManager(ObjectManager $objectManager = null) + { + self::$objectManager = $objectManager; + } + + /** + * @return ObjectManager + */ + static public function getObjectManager() + { + return self::$objectManager; + } + + /** + * Inject Doctrine Object Manager + * + * @param ObjectManager $objectManager + * @param ClassMetadata $classMetadata + */ + public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata) + { + if ($objectManager !== self::$objectManager) { + throw new \RuntimeException("Trying to use PersistentObject with different ObjectManager instances. " . + "Was PersistentObject::setObjectManager() called?"); + } + + $this->cm = $classMetadata; + } + + /** + * Sets a persistent fields value. + * + * @throws InvalidArgumentException - When the wrong target object type is passed to an association + * @throws BadMethodCallException - When no persistent field exists by that name. + * @param string $field + * @param array $args + * @return void + */ + private function set($field, $args) + { + $this->initializeDoctrine(); + + if ($this->cm->hasField($field) && !$this->cm->isIdentifier($field)) { + $this->$field = $args[0]; + } else if ($this->cm->hasAssociation($field) && $this->cm->isSingleValuedAssociation($field)) { + $targetClass = $this->cm->getAssociationTargetClass($field); + if (!($args[0] instanceof $targetClass) && $args[0] !== null) { + throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); + } + $this->$field = $args[0]; + $this->completeOwningSide($field, $targetClass, $args[0]); + } else { + throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'"); + } + } + + /** + * Get persistent field value. + * + * @throws BadMethodCallException - When no persistent field exists by that name. + * @param string $field + * @return mixed + */ + private function get($field) + { + $this->initializeDoctrine(); + + if ( $this->cm->hasField($field) || $this->cm->hasAssociation($field) ) { + return $this->$field; + } else { + throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'"); + } + } + + /** + * If this is an inverse side association complete the owning side. + * + * @param string $field + * @param ClassMetadata $targetClass + * @param object $targetObject + */ + private function completeOwningSide($field, $targetClass, $targetObject) + { + // add this object on the owning side aswell, for obvious infinite recursion + // reasons this is only done when called on the inverse side. + if ($this->cm->isAssociationInverseSide($field)) { + $mappedByField = $this->cm->getAssociationMappedByTargetField($field); + $targetMetadata = self::$objectManager->getClassMetadata($targetClass); + + $setter = ($targetMetadata->isCollectionValuedAssociation($mappedByField) ? "add" : "set").$mappedByField; + $targetObject->$setter($this); + } + } + + /** + * Add an object to a collection + * + * @param type $field + * @param assoc $args + */ + private function add($field, $args) + { + $this->initializeDoctrine(); + + if ($this->cm->hasAssociation($field) && $this->cm->isCollectionValuedAssociation($field)) { + $targetClass = $this->cm->getAssociationTargetClass($field); + if (!($args[0] instanceof $targetClass)) { + throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); + } + if (!($this->$field instanceof Collection)) { + $this->$field = new ArrayCollection($this->$field ?: array()); + } + $this->$field->add($args[0]); + $this->completeOwningSide($field, $targetClass, $args[0]); + } else { + throw new \BadMethodCallException("There is no method add".$field."() on ".$this->cm->getName()); + } + } + + /** + * Initialize Doctrine Metadata for this class. + * + * @return void + */ + private function initializeDoctrine() + { + if ($this->cm !== null) { + return; + } + + if (!self::$objectManager) { + throw new \RuntimeException("No runtime object manager set. Call PersistentObject#setObjectManager()."); + } + + $this->cm = self::$objectManager->getClassMetadata(get_class($this)); + } + + /** + * Magic method that implements + * + * @param string $method + * @param array $args + * @return mixed + */ + public function __call($method, $args) + { + $command = substr($method, 0, 3); + $field = lcfirst(substr($method, 3)); + if ($command == "set") { + $this->set($field, $args); + } else if ($command == "get") { + return $this->get($field); + } else if ($command == "add") { + $this->add($field, $args); + } else { + throw new \BadMethodCallException("There is no method ".$method." on ".$this->cm->getName()); + } + } +} diff --git a/src/lib/Doctrine/Common/Persistence/Proxy.php b/src/lib/Doctrine/Common/Persistence/Proxy.php new file mode 100644 index 0000000000..726979fcf3 --- /dev/null +++ b/src/lib/Doctrine/Common/Persistence/Proxy.php @@ -0,0 +1,60 @@ +. + */ + +namespace Doctrine\Common\Persistence; + +/** + * Interface for proxy classes. + * + * @author Roman Borschel + * @since 2.2 + */ +interface Proxy +{ + /** + * Marker for Proxy class names. + * + * @var string + */ + const MARKER = '__CG__'; + + /** + * Length of the proxy marker + * + * @var int + */ + const MARKER_LENGTH = 6; + + /** + * Initialize this proxy if its not yet initialized. + * + * Acts as a no-op if already initialized. + * + * @return void + */ + public function __load(); + + /** + * Is this proxy initialized or not. + * + * @return bool + */ + public function __isInitialized(); +} diff --git a/src/lib/Doctrine/Common/Util/ClassUtils.php b/src/lib/Doctrine/Common/Util/ClassUtils.php new file mode 100644 index 0000000000..c346278280 --- /dev/null +++ b/src/lib/Doctrine/Common/Util/ClassUtils.php @@ -0,0 +1,103 @@ +. + */ + +namespace Doctrine\Common\Util; + +use Doctrine\Common\Persistence\Proxy; + +/** + * Class and reflection related functionality for objects that + * might or not be proxy objects at the moment. + * + * @author Benjamin Eberlei + * @author Johannes Schmitt + */ +class ClassUtils +{ + /** + * Get the real class name of a class name that could be a proxy. + * + * @param string + * @return string + */ + public static function getRealClass($class) + { + if (false === $pos = strrpos($class, '\\'.Proxy::MARKER.'\\')) { + return $class; + } + + return substr($class, $pos + Proxy::MARKER_LENGTH + 2); + } + + /** + * Get the real class name of an object (even if its a proxy) + * + * @param object + * @return string + */ + public static function getClass($object) + { + return self::getRealClass(get_class($object)); + } + + /** + * Get the real parent class name of a class or object + * + * @param string + * @return string + */ + public static function getParentClass($className) + { + return get_parent_class( self::getRealClass( $className ) ); + } + + /** + * Create a new reflection class + * + * @param string + * @return ReflectionClass + */ + public static function newReflectionClass($class) + { + return new \ReflectionClass( self::getRealClass( $class ) ); + } + + /** + * Create a new reflection object + * + * @param object + * @return ReflectionObject + */ + public static function newReflectionObject($object) + { + return self::newReflectionClass( self::getClass( $object ) ); + } + + /** + * Given a class name and a proxy namespace return the proxy name. + * + * @param string $className + * @param string $proxyNamespace + * @return string + */ + public static function generateProxyClassName($className, $proxyNamespace) + { + return rtrim($proxyNamespace, '\\') . '\\'.Proxy::MARKER.'\\' . ltrim($className, '\\'); + } +} diff --git a/src/lib/Doctrine/Common/Util/Debug.php b/src/lib/Doctrine/Common/Util/Debug.php index 735dbf38c4..57ae312028 100644 --- a/src/lib/Doctrine/Common/Util/Debug.php +++ b/src/lib/Doctrine/Common/Util/Debug.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel @@ -48,84 +45,74 @@ private function __construct() {} * @link http://xdebug.org/ * @param mixed $var * @param integer $maxDepth Maximum nesting level for object properties + * @param boolean $stripTags Flag that indicate if output should strip HTML tags */ - public static function dump($var, $maxDepth = 2) + public static function dump($var, $maxDepth = 2, $stripTags = true) { ini_set('html_errors', 'On'); - + if (extension_loaded('xdebug')) { ini_set('xdebug.var_display_max_depth', $maxDepth); } - + $var = self::export($var, $maxDepth++); - + ob_start(); var_dump($var); $dump = ob_get_contents(); ob_end_clean(); - - echo strip_tags(html_entity_decode($dump)); - + + echo ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump); + ini_set('html_errors', 'Off'); } - + public static function export($var, $maxDepth) { $return = null; $isObj = is_object($var); - + if ($isObj && in_array('Doctrine\Common\Collections\Collection', class_implements($var))) { $var = $var->toArray(); } - + if ($maxDepth) { if (is_array($var)) { $return = array(); - + foreach ($var as $k => $v) { $return[$k] = self::export($v, $maxDepth - 1); } } else if ($isObj) { + $return = new \stdclass(); if ($var instanceof \DateTime) { - $return = $var->format('c'); + $return->__CLASS__ = "DateTime"; + $return->date = $var->format('c'); + $return->timezone = $var->getTimeZone()->getName(); } else { - $reflClass = new \ReflectionClass(get_class($var)); - $return = new \stdclass(); - $return->{'__CLASS__'} = get_class($var); - - if ($var instanceof \Doctrine\ORM\Proxy\Proxy && ! $var->__isInitialized__) { - $reflProperty = $reflClass->getProperty('_identifier'); - $reflProperty->setAccessible(true); - - foreach ($reflProperty->getValue($var) as $name => $value) { - $return->$name = self::export($value, $maxDepth - 1); - } - } else { - $excludeProperties = array(); + $reflClass = ClassUtils::newReflectionObject($var); + $return->__CLASS__ = ClassUtils::getClass($var); - if ($var instanceof \Doctrine\ORM\Proxy\Proxy) { - $excludeProperties = array('_entityPersister', '__isInitialized__', '_identifier'); - } - - foreach ($reflClass->getProperties() as $reflProperty) { - $name = $reflProperty->getName(); + if ($var instanceof \Doctrine\Common\Persistence\Proxy) { + $return->__IS_PROXY__ = true; + $return->__PROXY_INITIALIZED__ = $var->__isInitialized(); + } - if ( ! in_array($name, $excludeProperties)) { - $reflProperty->setAccessible(true); + foreach ($reflClass->getProperties() as $reflProperty) { + $name = $reflProperty->getName(); - $return->$name = self::export($reflProperty->getValue($var), $maxDepth - 1); - } - } + $reflProperty->setAccessible(true); + $return->$name = self::export($reflProperty->getValue($var), $maxDepth - 1); } } } else { $return = $var; } } else { - $return = is_object($var) ? get_class($var) + $return = is_object($var) ? get_class($var) : (is_array($var) ? 'Array(' . count($var) . ')' : $var); } - + return $return; } diff --git a/src/lib/Doctrine/Common/Util/Inflector.php b/src/lib/Doctrine/Common/Util/Inflector.php index 78e5709686..ba1eb17b2d 100644 --- a/src/lib/Doctrine/Common/Util/Inflector.php +++ b/src/lib/Doctrine/Common/Util/Inflector.php @@ -23,9 +23,9 @@ /** * Doctrine inflector has static methods for inflecting text - * + * * The methods in these classes are from several different sources collected - * across several different php projects and several different authors. The + * across several different php projects and several different authors. The * original author names and emails are not known * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL diff --git a/src/lib/Doctrine/Common/Version.php b/src/lib/Doctrine/Common/Version.php index e86e101ff6..b7c9a8284e 100644 --- a/src/lib/Doctrine/Common/Version.php +++ b/src/lib/Doctrine/Common/Version.php @@ -36,7 +36,7 @@ class Version /** * Current Doctrine Version */ - const VERSION = '2.1.0'; + const VERSION = '2.2.2'; /** * Compares a Doctrine version with the current one. diff --git a/src/lib/Doctrine/DBAL/Cache/ArrayStatement.php b/src/lib/Doctrine/DBAL/Cache/ArrayStatement.php new file mode 100644 index 0000000000..c576e9fa68 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Cache/ArrayStatement.php @@ -0,0 +1,94 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +use Doctrine\DBAL\Driver\ResultStatement; +use PDO; + +class ArrayStatement implements \IteratorAggregate, ResultStatement +{ + private $data; + private $columnCount = 0; + private $num = 0; + private $defaultFetchStyle = PDO::FETCH_BOTH; + + public function __construct(array $data) + { + $this->data = $data; + if (count($data)) { + $this->columnCount = count($data[0]); + } + } + + public function closeCursor() + { + unset ($this->data); + } + + public function columnCount() + { + return $this->columnCount; + } + + public function setFetchMode($fetchStyle) + { + $this->defaultFetchStyle = $fetchStyle; + } + + public function getIterator() + { + $data = $this->fetchAll($this->defaultFetchStyle); + return new \ArrayIterator($data); + } + + public function fetch($fetchStyle = PDO::FETCH_BOTH) + { + if (isset($this->data[$this->num])) { + $row = $this->data[$this->num++]; + if ($fetchStyle === PDO::FETCH_ASSOC) { + return $row; + } else if ($fetchStyle === PDO::FETCH_NUM) { + return array_values($row); + } else if ($fetchStyle === PDO::FETCH_BOTH) { + return array_merge($row, array_values($row)); + } + } + return false; + } + + public function fetchAll($fetchStyle = PDO::FETCH_BOTH) + { + $rows = array(); + while ($row = $this->fetch($fetchStyle)) { + $rows[] = $row; + } + return $rows; + } + + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + if (!isset($row[$columnIndex])) { + // TODO: verify this is correct behavior + return false; + } + return $row[$columnIndex]; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Cache/CacheException.php b/src/lib/Doctrine/DBAL/Cache/CacheException.php new file mode 100644 index 0000000000..367ab811e7 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Cache/CacheException.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +/** + * @author Benjamin Eberlei + * @since 2.2 + */ +class CacheException extends \Doctrine\DBAL\DBALException +{ + static public function noCacheKey() + { + return new self("No cache key was set."); + } + + static public function noResultDriverConfigured() + { + return new self("Trying to cache a query but no result driver is configured."); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php b/src/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php new file mode 100644 index 0000000000..1ffbd9783d --- /dev/null +++ b/src/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php @@ -0,0 +1,131 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +use Doctrine\Common\Cache\Cache; + +/** + * Query Cache Profile handles the data relevant for query caching. + * + * It is a value object, setter methods return NEW instances. + * + * @author Benjamin Eberlei + */ +class QueryCacheProfile +{ + /** + * @var Cache + */ + private $resultCacheDriver; + /** + * @var int + */ + private $lifetime = 0; + /** + * @var string + */ + private $cacheKey; + + /** + * @param int $lifetime + * @param string $cacheKey + * @param Cache $resultCache + */ + public function __construct($lifetime = 0, $cacheKey = null, Cache $resultCache = null) + { + $this->lifetime = $lifetime; + $this->cacheKey = $cacheKey; + $this->resultCacheDriver = $resultCache; + } + + /** + * @return Cache + */ + public function getResultCacheDriver() + { + return $this->resultCacheDriver; + } + + /** + * @return int + */ + public function getLifetime() + { + return $this->lifetime; + } + + /** + * @return string + */ + public function getCacheKey() + { + if ($this->cacheKey === null) { + throw CacheException::noCacheKey(); + } + return $this->cacheKey; + } + + /** + * Generate the real cache key from query, params and types. + * + * @param string $query + * @param array $params + * @param array $types + * @return array + */ + public function generateCacheKeys($query, $params, $types) + { + $realCacheKey = $query . "-" . serialize($params) . "-" . serialize($types); + // should the key be automatically generated using the inputs or is the cache key set? + if ($this->cacheKey === null) { + $cacheKey = sha1($realCacheKey); + } else { + $cacheKey = $this->cacheKey; + } + return array($cacheKey, $realCacheKey); + } + + /** + * @param Cache $cache + * @return QueryCacheProfile + */ + public function setResultCacheDriver(Cache $cache) + { + return new QueryCacheProfile($this->lifetime, $this->cacheKey, $cache); + } + + /** + * @param string|null $cacheKey + * @return QueryCacheProfile + */ + public function setCacheKey($cacheKey) + { + return new QueryCacheProfile($this->lifetime, $cacheKey, $this->resultCacheDriver); + } + + /** + * @param int $lifetime + * @return QueryCacheProfile + */ + public function setLifetime($lifetime) + { + return new QueryCacheProfile($lifetime, $this->cacheKey, $this->resultCacheDriver); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/src/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php new file mode 100644 index 0000000000..8c884aec4a --- /dev/null +++ b/src/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php @@ -0,0 +1,255 @@ +. + */ + +namespace Doctrine\DBAL\Cache; + +use Doctrine\DBAL\Driver\Statement; +use Doctrine\DBAL\Driver\ResultStatement; +use Doctrine\DBAL\Connection; +use Doctrine\Common\Cache\Cache; +use PDO; + +/** + * Cache statement for SQL results. + * + * A result is saved in multiple cache keys, there is the originally specified + * cache key which is just pointing to result rows by key. The following things + * have to be ensured: + * + * 1. lifetime of the original key has to be longer than that of all the individual rows keys + * 2. if any one row key is missing the query has to be re-executed. + * + * Also you have to realize that the cache will load the whole result into memory at once to ensure 2. + * This means that the memory usage for cached results might increase by using this feature. + */ +class ResultCacheStatement implements \IteratorAggregate, ResultStatement +{ + /** + * @var \Doctrine\Common\Cache\Cache + */ + private $resultCache; + + /** + * + * @var string + */ + private $cacheKey; + + /** + * @var string + */ + private $realKey; + + /** + * @var int + */ + private $lifetime; + + /** + * @var Doctrine\DBAL\Driver\Statement + */ + private $statement; + + /** + * Did we reach the end of the statement? + * + * @var bool + */ + private $emptied = false; + + /** + * @var array + */ + private $data; + + /** + * @var int + */ + private $defaultFetchStyle = PDO::FETCH_BOTH; + + /** + * @param Statement $stmt + * @param Cache $resultCache + * @param string $cacheKey + * @param string $realKey + * @param int $lifetime + */ + public function __construct(Statement $stmt, Cache $resultCache, $cacheKey, $realKey, $lifetime) + { + $this->statement = $stmt; + $this->resultCache = $resultCache; + $this->cacheKey = $cacheKey; + $this->realKey = $realKey; + $this->lifetime = $lifetime; + } + + /** + * Closes the cursor, enabling the statement to be executed again. + * + * @return boolean Returns TRUE on success or FALSE on failure. + */ + public function closeCursor() + { + $this->statement->closeCursor(); + if ($this->emptied && $this->data !== null) { + $data = $this->resultCache->fetch($this->cacheKey); + if (!$data) { + $data = array(); + } + $data[$this->realKey] = $this->data; + + $this->resultCache->save($this->cacheKey, $data, $this->lifetime); + unset($this->data); + } + } + + /** + * columnCount + * Returns the number of columns in the result set + * + * @return integer Returns the number of columns in the result set represented + * by the PDOStatement object. If there is no result set, + * this method should return 0. + */ + public function columnCount() + { + return $this->statement->columnCount(); + } + + public function setFetchMode($fetchStyle) + { + $this->defaultFetchStyle = $fetchStyle; + } + + public function getIterator() + { + $data = $this->fetchAll($this->defaultFetchStyle); + return new \ArrayIterator($data); + } + + /** + * fetch + * + * @see Query::HYDRATE_* constants + * @param integer $fetchStyle Controls how the next row will be returned to the caller. + * This value must be one of the Query::HYDRATE_* constants, + * defaulting to Query::HYDRATE_BOTH + * + * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor, + * this value determines which row will be returned to the caller. + * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to + * Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your + * PDOStatement object, + * you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you + * prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). + * + * @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the + * $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies + * the absolute number of the row in the result set that shall be fetched. + * + * For a PDOStatement object representing a scrollable cursor for + * which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value + * specifies the row to fetch relative to the cursor position before + * PDOStatement->fetch() was called. + * + * @return mixed + */ + public function fetch($fetchStyle = PDO::FETCH_BOTH) + { + if ($this->data === null) { + $this->data = array(); + } + + $row = $this->statement->fetch(PDO::FETCH_ASSOC); + if ($row) { + $this->data[] = $row; + + if ($fetchStyle == PDO::FETCH_ASSOC) { + return $row; + } else if ($fetchStyle == PDO::FETCH_NUM) { + return array_values($row); + } else if ($fetchStyle == PDO::FETCH_BOTH) { + return array_merge($row, array_values($row)); + } else { + throw new \InvalidArgumentException("Invalid fetch-style given for caching result."); + } + } + $this->emptied = true; + return false; + } + + /** + * Returns an array containing all of the result set rows + * + * @param integer $fetchStyle Controls how the next row will be returned to the caller. + * This value must be one of the Query::HYDRATE_* constants, + * defaulting to Query::HYDRATE_BOTH + * + * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is + * Query::HYDRATE_COLUMN. Defaults to 0. + * + * @return array + */ + public function fetchAll($fetchStyle = PDO::FETCH_BOTH) + { + $rows = array(); + while ($row = $this->fetch($fetchStyle)) { + $rows[] = $row; + } + return $rows; + } + + /** + * fetchColumn + * Returns a single column from the next row of a + * result set or FALSE if there are no more rows. + * + * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no + * value is supplied, PDOStatement->fetchColumn() + * fetches the first column. + * + * @return string returns a single column in the next row of a result set. + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + if (!isset($row[$columnIndex])) { + // TODO: verify this is correct behavior + return false; + } + return $row[$columnIndex]; + } + + /** + * rowCount + * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement + * executed by the corresponding object. + * + * If the last SQL statement executed by the associated Statement object was a SELECT statement, + * some databases may return the number of rows returned by that statement. However, + * this behaviour is not guaranteed for all databases and should not be + * relied on for portable applications. + * + * @return integer Returns the number of rows. + */ + public function rowCount() + { + return $this->statement->rowCount(); + } +} diff --git a/src/lib/Doctrine/DBAL/Configuration.php b/src/lib/Doctrine/DBAL/Configuration.php index 8b5b1586e2..03327fb468 100644 --- a/src/lib/Doctrine/DBAL/Configuration.php +++ b/src/lib/Doctrine/DBAL/Configuration.php @@ -1,4 +1,4 @@ -_attributes['sqlLogger']) ? $this->_attributes['sqlLogger'] : null; } -} \ No newline at end of file + + /** + * Gets the cache driver implementation that is used for query result caching. + * + * @return \Doctrine\Common\Cache\Cache + */ + public function getResultCacheImpl() + { + return isset($this->_attributes['resultCacheImpl']) ? + $this->_attributes['resultCacheImpl'] : null; + } + + /** + * Sets the cache driver implementation that is used for query result caching. + * + * @param \Doctrine\Common\Cache\Cache $cacheImpl + */ + public function setResultCacheImpl(Cache $cacheImpl) + { + $this->_attributes['resultCacheImpl'] = $cacheImpl; + } + + /** + * Filter schema assets expression. + * + * Only include tables/sequences matching the filter expression regexp in + * schema instances generated for the active connection when calling + * {AbstractSchemaManager#createSchema()}. + * + * @param string $filterExpression + */ + public function setFilterSchemaAssetsExpression($filterExpression) + { + $this->_attributes['filterSchemaAssetsExpression'] = $filterExpression; + } + + /** + * Return filter schema assets expression. + * + * @return string|null + */ + public function getFilterSchemaAssetsExpression() + { + if (isset($this->_attributes['filterSchemaAssetsExpression'])) { + return $this->_attributes['filterSchemaAssetsExpression']; + } + return null; + } +} diff --git a/src/lib/Doctrine/DBAL/Connection.php b/src/lib/Doctrine/DBAL/Connection.php index 2c799dfd19..abe93763c6 100644 --- a/src/lib/Doctrine/DBAL/Connection.php +++ b/src/lib/Doctrine/DBAL/Connection.php @@ -23,7 +23,11 @@ Doctrine\DBAL\Types\Type, Doctrine\DBAL\Driver\Connection as DriverConnection, Doctrine\Common\EventManager, - Doctrine\DBAL\DBALException; + Doctrine\DBAL\DBALException, + Doctrine\DBAL\Cache\ResultCacheStatement, + Doctrine\DBAL\Cache\QueryCacheProfile, + Doctrine\DBAL\Cache\ArrayStatement, + Doctrine\DBAL\Cache\CacheException; /** * A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like @@ -46,39 +50,39 @@ class Connection implements DriverConnection * Constant for transaction isolation level READ UNCOMMITTED. */ const TRANSACTION_READ_UNCOMMITTED = 1; - + /** * Constant for transaction isolation level READ COMMITTED. */ const TRANSACTION_READ_COMMITTED = 2; - + /** * Constant for transaction isolation level REPEATABLE READ. */ const TRANSACTION_REPEATABLE_READ = 3; - + /** * Constant for transaction isolation level SERIALIZABLE. */ const TRANSACTION_SERIALIZABLE = 4; - + /** * Represents an array of ints to be expanded by Doctrine SQL parsing. - * + * * @var int */ const PARAM_INT_ARRAY = 101; - + /** * Represents an array of strings to be expanded by Doctrine SQL parsing. - * + * * @var int */ const PARAM_STR_ARRAY = 102; - + /** * Offset by which PARAM_* constants are detected as arrays of the param type. - * + * * @var int */ const ARRAY_PARAM_OFFSET = 100; @@ -99,7 +103,7 @@ class Connection implements DriverConnection * @var Doctrine\Common\EventManager */ protected $_eventManager; - + /** * @var Doctrine\DBAL\Query\ExpressionBuilder */ @@ -161,10 +165,10 @@ class Connection implements DriverConnection * @var Doctrine\DBAL\Driver */ protected $_driver; - + /** * Flag that indicates whether the current transaction is marked for rollback only. - * + * * @var boolean */ private $_isRollbackOnly = false; @@ -192,16 +196,16 @@ public function __construct(array $params, Driver $driver, Configuration $config if ( ! $config) { $config = new Configuration(); } - + if ( ! $eventManager) { $eventManager = new EventManager(); } $this->_config = $config; $this->_eventManager = $eventManager; - + $this->_expr = new Query\Expression\ExpressionBuilder($this); - + if ( ! isset($params['platform'])) { $this->_platform = $driver->getDatabasePlatform(); } else if ($params['platform'] instanceof Platforms\AbstractPlatform) { @@ -209,7 +213,9 @@ public function __construct(array $params, Driver $driver, Configuration $config } else { throw DBALException::invalidPlatformSpecified(); } - + + $this->_platform->setEventManager($eventManager); + $this->_transactionIsolationLevel = $this->_platform->getDefaultTransactionIsolationLevel(); } @@ -232,40 +238,40 @@ public function getDatabase() { return $this->_driver->getDatabase($this); } - + /** * Gets the hostname of the currently connected database. - * + * * @return string */ public function getHost() { return isset($this->_params['host']) ? $this->_params['host'] : null; } - + /** * Gets the port of the currently connected database. - * + * * @return mixed */ public function getPort() { return isset($this->_params['port']) ? $this->_params['port'] : null; } - + /** * Gets the username used by this connection. - * + * * @return string */ public function getUsername() { return isset($this->_params['user']) ? $this->_params['user'] : null; } - + /** * Gets the password used by this connection. - * + * * @return string */ public function getPassword() @@ -276,7 +282,7 @@ public function getPassword() /** * Gets the DBAL driver instance. * - * @return Doctrine\DBAL\Driver + * @return \Doctrine\DBAL\Driver */ public function getDriver() { @@ -286,7 +292,7 @@ public function getDriver() /** * Gets the Configuration used by the Connection. * - * @return Doctrine\DBAL\Configuration + * @return \Doctrine\DBAL\Configuration */ public function getConfiguration() { @@ -296,7 +302,7 @@ public function getConfiguration() /** * Gets the EventManager used by the Connection. * - * @return Doctrine\Common\EventManager + * @return \Doctrine\Common\EventManager */ public function getEventManager() { @@ -306,23 +312,23 @@ public function getEventManager() /** * Gets the DatabasePlatform for the connection. * - * @return Doctrine\DBAL\Platforms\AbstractPlatform + * @return \Doctrine\DBAL\Platforms\AbstractPlatform */ public function getDatabasePlatform() { return $this->_platform; } - + /** * Gets the ExpressionBuilder for the connection. * - * @return Doctrine\DBAL\Query\ExpressionBuilder + * @return \Doctrine\DBAL\Query\ExpressionBuilder */ public function getExpressionBuilder() { return $this->_expr; } - + /** * Establishes the connection with the database. * @@ -353,7 +359,7 @@ public function connect() /** * Prepares and executes an SQL query and returns the first row of the result * as an associative array. - * + * * @param string $statement The SQL query. * @param array $params The query parameters. * @return array @@ -379,7 +385,7 @@ public function fetchArray($statement, array $params = array()) /** * Prepares and executes an SQL query and returns the value of a single column * of the first row of the result. - * + * * @param string $statement sql query to be executed * @param array $params prepared statement params * @param int $colnum 0-indexed column number to retrieve @@ -402,7 +408,7 @@ public function isConnected() /** * Checks whether a transaction is currently active. - * + * * @return boolean TRUE if a transaction is currently active, FALSE otherwise. */ public function isTransactionActive() @@ -440,7 +446,7 @@ public function delete($tableName, array $identifier) public function close() { unset($this->_conn); - + $this->_isConnected = false; } @@ -452,7 +458,7 @@ public function close() public function setTransactionIsolation($level) { $this->_transactionIsolationLevel = $level; - + return $this->executeUpdate($this->_platform->getSetTransactionIsolationSQL($level)); } @@ -471,9 +477,10 @@ public function getTransactionIsolation() * * @param string $table The name of the table to update. * @param array $identifier The update criteria. An associative array containing column-value pairs. + * @param array $types Types of the merged $data and $identifier arrays in that order. * @return integer The number of affected rows. */ - public function update($tableName, array $data, array $identifier) + public function update($tableName, array $data, array $identifier, array $types = array()) { $this->connect(); $set = array(); @@ -487,7 +494,7 @@ public function update($tableName, array $data, array $identifier) . ' WHERE ' . implode(' = ? AND ', array_keys($identifier)) . ' = ?'; - return $this->executeUpdate($sql, $params); + return $this->executeUpdate($sql, $params, $types); } /** @@ -495,16 +502,17 @@ public function update($tableName, array $data, array $identifier) * * @param string $table The name of the table to insert data into. * @param array $data An associative array containing column-value pairs. + * @param array $types Types of the inserted data. * @return integer The number of affected rows. */ - public function insert($tableName, array $data) + public function insert($tableName, array $data, array $types = array()) { $this->connect(); // column names are specified as array keys $cols = array(); $placeholders = array(); - + foreach ($data as $columnName => $value) { $cols[] = $columnName; $placeholders[] = '?'; @@ -514,7 +522,7 @@ public function insert($tableName, array $data) . ' (' . implode(', ', $cols) . ')' . ' VALUES (' . implode(', ', $placeholders) . ')'; - return $this->executeUpdate($query, array_values($data)); + return $this->executeUpdate($query, array_values($data), $types); } /** @@ -555,8 +563,9 @@ public function quoteIdentifier($str) public function quote($input, $type = null) { $this->connect(); - - return $this->_conn->quote($input, $type); + + list($value, $bindingType) = $this->getBindingInfo($input, $type); + return $this->_conn->quote($value, $bindingType); } /** @@ -592,11 +601,17 @@ public function prepare($statement) * * @param string $query The SQL query to execute. * @param array $params The parameters to bind to the query, if any. + * @param array $types The types the previous parameters are in. + * @param QueryCacheProfile $qcp * @return Doctrine\DBAL\Driver\Statement The executed statement. * @internal PERF: Directly prepares a driver statement, not a wrapper. */ - public function executeQuery($query, array $params = array(), $types = array()) + public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null) { + if ($qcp !== null) { + return $this->executeCacheQuery($query, $params, $types, $qcp); + } + $this->connect(); $hasLogger = $this->_config->getSQLLogger() !== null; @@ -606,7 +621,7 @@ public function executeQuery($query, array $params = array(), $types = array()) if ($params) { list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types); - + $stmt = $this->_conn->prepare($query); if ($types) { $this->_bindTypedValues($stmt, $params, $types); @@ -625,6 +640,36 @@ public function executeQuery($query, array $params = array(), $types = array()) return $stmt; } + /** + * Execute a caching query and + * + * @param string $query + * @param array $params + * @param array $types + * @param QueryCacheProfile $qcp + * @return \Doctrine\DBAL\Driver\ResultStatement + */ + public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qcp) + { + $resultCache = $qcp->getResultCacheDriver() ?: $this->_config->getResultCacheImpl(); + if (!$resultCache) { + throw CacheException::noResultDriverConfigured(); + } + + list($cacheKey, $realKey) = $qcp->generateCacheKeys($query, $params, $types); + + // fetch the row pointers entry + if ($data = $resultCache->fetch($cacheKey)) { + // is the real key part of this row pointers map or is the cache only pointing to other cache keys? + if (isset($data[$realKey])) { + return new ArrayStatement($data[$realKey]); + } else if (array_key_exists($realKey, $data)) { + return new ArrayStatement(array()); + } + } + return new ResultCacheStatement($this->executeQuery($query, $params, $types), $resultCache, $cacheKey, $realKey, $qcp->getLifetime()); + } + /** * Executes an, optionally parameterized, SQL query and returns the result, * applying a given projection/transformation function on each row of the result. @@ -652,7 +697,7 @@ public function project($query, array $params, Closure $function) /** * Executes an SQL statement, returning a result set as a Statement object. - * + * * @param string $statement * @param integer $fetchType * @return Doctrine\DBAL\Driver\Statement @@ -680,7 +725,7 @@ public function query() /** * Executes an SQL INSERT/UPDATE/DELETE query with the given parameters * and returns the number of affected rows. - * + * * This method supports PDO binding types as well as DBAL mapping types. * * @param string $query The SQL query. @@ -700,7 +745,7 @@ public function executeUpdate($query, array $params = array(), array $types = ar if ($params) { list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types); - + $stmt = $this->_conn->prepare($query); if ($types) { $this->_bindTypedValues($stmt, $params, $types); @@ -722,7 +767,7 @@ public function executeUpdate($query, array $params = array(), array $types = ar /** * Execute an SQL statement and return the number of affected rows. - * + * * @param string $statement * @return integer The number of affected rows. */ @@ -983,7 +1028,7 @@ public function getWrappedConnection() * Gets the SchemaManager that can be used to inspect or change the * database schema through the connection. * - * @return Doctrine\DBAL\Schema\SchemaManager + * @return Doctrine\DBAL\Schema\AbstractSchemaManager */ public function getSchemaManager() { @@ -997,7 +1042,7 @@ public function getSchemaManager() /** * Marks the current transaction so that the only possible * outcome for the transaction to be rolled back. - * + * * @throws ConnectionException If no transaction is active. */ public function setRollbackOnly() @@ -1010,7 +1055,7 @@ public function setRollbackOnly() /** * Check whether the current transaction is marked for rollback only. - * + * * @return boolean * @throws ConnectionException If no transaction is active. */ @@ -1025,7 +1070,7 @@ public function isRollbackOnly() /** * Converts a given value to its database representation according to the conversion * rules of a specific DBAL mapping type. - * + * * @param mixed $value The value to convert. * @param string $type The name of the DBAL mapping type. * @return mixed The converted value. @@ -1038,7 +1083,7 @@ public function convertToDatabaseValue($value, $type) /** * Converts a given value to its PHP representation according to the conversion * rules of a specific DBAL mapping type. - * + * * @param mixed $value The value to convert. * @param string $type The name of the DBAL mapping type. * @return mixed The converted type. @@ -1051,7 +1096,7 @@ public function convertToPHPValue($value, $type) /** * Binds a set of parameters, some or all of which are typed with a PDO binding type * or DBAL mapping type, to a given statement. - * + * * @param $stmt The statement to bind the values to. * @param array $params The map/list of named/positional parameters. * @param array $types The parameter types (PDO binding types or DBAL mapping types). @@ -1069,15 +1114,7 @@ private function _bindTypedValues($stmt, array $params, array $types) $typeIndex = $bindIndex + $typeOffset; if (isset($types[$typeIndex])) { $type = $types[$typeIndex]; - if (is_string($type)) { - $type = Type::getType($type); - } - if ($type instanceof Type) { - $value = $type->convertToDatabaseValue($value, $this->_platform); - $bindingType = $type->getBindingType(); - } else { - $bindingType = $type; // PDO::PARAM_* constants - } + list($value, $bindingType) = $this->getBindingInfo($value, $type); $stmt->bindValue($bindIndex, $value, $bindingType); } else { $stmt->bindValue($bindIndex, $value); @@ -1089,15 +1126,7 @@ private function _bindTypedValues($stmt, array $params, array $types) foreach ($params as $name => $value) { if (isset($types[$name])) { $type = $types[$name]; - if (is_string($type)) { - $type = Type::getType($type); - } - if ($type instanceof Type) { - $value = $type->convertToDatabaseValue($value, $this->_platform); - $bindingType = $type->getBindingType(); - } else { - $bindingType = $type; // PDO::PARAM_* constants - } + list($value, $bindingType) = $this->getBindingInfo($value, $type); $stmt->bindValue($name, $value, $bindingType); } else { $stmt->bindValue($name, $value); @@ -1105,14 +1134,35 @@ private function _bindTypedValues($stmt, array $params, array $types) } } } - + + /** + * Gets the binding type of a given type. The given type can be a PDO or DBAL mapping type. + * + * @param mixed $value The value to bind + * @param mixed $type The type to bind (PDO or DBAL) + * @return array [0] => the (escaped) value, [1] => the binding type + */ + private function getBindingInfo($value, $type) + { + if (is_string($type)) { + $type = Type::getType($type); + } + if ($type instanceof Type) { + $value = $type->convertToDatabaseValue($value, $this->_platform); + $bindingType = $type->getBindingType(); + } else { + $bindingType = $type; // PDO::PARAM_* constants + } + return array($value, $bindingType); + } + /** * Create a new instance of a SQL query builder. - * - * @return Query\QueryBuilder + * + * @return Query\QueryBuilder */ public function createQueryBuilder() { return new Query\QueryBuilder($this); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/ConnectionException.php b/src/lib/Doctrine/DBAL/ConnectionException.php index 4aaeea67b4..8c8f703a77 100644 --- a/src/lib/Doctrine/DBAL/ConnectionException.php +++ b/src/lib/Doctrine/DBAL/ConnectionException.php @@ -36,7 +36,7 @@ public static function commitFailedRollbackOnly() { return new self("Transaction commit failed because the transaction has been marked for rollback only."); } - + public static function noActiveTransaction() { return new self("There is no active transaction."); diff --git a/src/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php b/src/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php new file mode 100644 index 0000000000..14e618228a --- /dev/null +++ b/src/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php @@ -0,0 +1,328 @@ +. + */ + +namespace Doctrine\DBAL\Connections; + + +use Doctrine\DBAL\Connection, + Doctrine\DBAL\Driver, + Doctrine\DBAL\Configuration, + Doctrine\Common\EventManager, + Doctrine\DBAL\Events; + +/** + * Master-Slave Connection + * + * Connection can be used with master-slave setups. + * + * Important for the understanding of this connection should be how and when + * it picks the slave or master. + * + * 1. Slave if master was never picked before and ONLY if 'getWrappedConnection' + * or 'executeQuery' is used. + * 2. Master picked when 'exec', 'executeUpdate', 'insert', 'delete', 'update', 'createSavepoint', + * 'releaseSavepoint', 'beginTransaction', 'rollback', 'commit', 'query' or + * 'prepare' is called. + * 3. If master was picked once during the lifetime of the connection it will always get picked afterwards. + * 4. One slave connection is randomly picked ONCE during a request. + * + * ATTENTION: You can write to the slave with this connection if you execute a write query without + * opening up a transaction. For example: + * + * $conn = DriverManager::getConnection(...); + * $conn->executeQuery("DELETE FROM table"); + * + * Be aware that Connection#executeQuery is a method specifically for READ + * operations only. + * + * This connection is limited to slave operations using the + * Connection#executeQuery operation only, because it wouldn't be compatible + * with the ORM or SchemaManager code otherwise. Both use all the other + * operations in a context where writes could happen to a slave, which makes + * this restricted approach necessary. + * + * You can manually connect to the master at any time by calling: + * + * $conn->connect('master'); + * + * Instantiation through the DriverManager looks like: + * + * @example + * + * $conn = DriverManager::getConnection(array( + * 'wrapperClass' => 'Doctrine\DBAL\Connections\MasterSlaveConnection', + * 'driver' => 'pdo_mysql', + * 'master' => array('user' => '', 'password' => '', 'host' => '', 'dbname' => ''), + * 'slaves' => array( + * array('user' => 'slave1', 'password', 'host' => '', 'dbname' => ''), + * array('user' => 'slave2', 'password', 'host' => '', 'dbname' => ''), + * ) + * )); + * + * You can also pass 'driverOptions' and any other documented option to each of this drivers to pass additional information. + * + * @author Lars Strojny + * @author Benjamin Eberlei + */ +class MasterSlaveConnection extends Connection +{ + /** + * Master and slave connection (one of the randomly picked slaves) + * + * @var Doctrine\DBAL\Driver\Connection[] + */ + protected $connections = array('master' => null, 'slave' => null); + + /** + * Create Master Slave Connection + * + * @param array $params + * @param Driver $driver + * @param Configuration $config + * @param EventManager $eventManager + */ + public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null) + { + if ( !isset($params['slaves']) || !isset($params['master']) ) { + throw new \InvalidArgumentException('master or slaves configuration missing'); + } + if ( count($params['slaves']) == 0 ) { + throw new \InvalidArgumentException('You have to configure at least one slaves.'); + } + + $params['master']['driver'] = $params['driver']; + foreach ($params['slaves'] as $slaveKey => $slave) { + $params['slaves'][$slaveKey]['driver'] = $params['driver']; + } + + parent::__construct($params, $driver, $config, $eventManager); + } + + /** + * Check if the connection is currently towards the master or not. + * + * @return bool + */ + public function isConnectedToMaster() + { + return $this->_conn !== null && $this->_conn === $this->connections['master']; + } + + /** + * {@inheritDoc} + */ + public function connect($connectionName = 'slave') + { + if ( $connectionName !== 'slave' && $connectionName !== 'master' ) { + throw new \InvalidArgumentException("Invalid option to connect(), only master or slave allowed."); + } + + $forceMasterAsSlave = false; + + if ($this->getTransactionNestingLevel() > 0) { + $connectionName = 'master'; + $forceMasterAsSlave = true; + } + + if ($this->connections[$connectionName]) { + if ($forceMasterAsSlave) { + $this->connections['slave'] = $this->_conn = $this->connections['master']; + } else { + $this->_conn = $this->connections[$connectionName]; + } + return false; + } + + if ($connectionName === 'master') { + /** Set slave connection to master to avoid invalid reads */ + if ($this->connections['slave']) { + unset($this->connections['slave']); + } + + $this->connections['master'] = $this->connections['slave'] = $this->_conn = $this->connectTo($connectionName); + } else { + $this->connections['slave'] = $this->_conn = $this->connectTo($connectionName); + } + + if ($this->_eventManager->hasListeners(Events::postConnect)) { + $eventArgs = new Event\ConnectionEventArgs($this); + $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs); + } + + return true; + } + + /** + * Connect to a specific connection + * + * @param string $connectionName + * @return Driver + */ + protected function connectTo($connectionName) + { + $params = $this->getParams(); + + $driverOptions = isset($params['driverOptions']) ? $params['driverOptions'] : array(); + + $connectionParams = $this->chooseConnectionConfiguration($connectionName, $params); + + $user = isset($connectionParams['user']) ? $connectionParams['user'] : null; + $password = isset($connectionParams['password']) ? $connectionParams['password'] : null; + + return $this->_driver->connect($connectionParams, $user, $password, $driverOptions); + } + + protected function chooseConnectionConfiguration($connectionName, $params) + { + if ($connectionName === 'master') { + return $params['master']; + } + + return $params['slaves'][array_rand($params['slaves'])]; + } + + /** + * {@inheritDoc} + */ + public function executeUpdate($query, array $params = array(), array $types = array()) + { + $this->connect('master'); + return parent::executeUpdate($query, $params, $types); + } + + /** + * {@inheritDoc} + */ + public function beginTransaction() + { + $this->connect('master'); + return parent::beginTransaction(); + } + + /** + * {@inheritDoc} + */ + public function commit() + { + $this->connect('master'); + return parent::commit(); + } + + /** + * {@inheritDoc} + */ + public function rollback() + { + $this->connect('master'); + return parent::rollback(); + } + + /** + * {@inheritDoc} + */ + public function delete($tableName, array $identifier) + { + $this->connect('master'); + return parent::delete($tableName, $identifier); + } + + /** + * {@inheritDoc} + */ + public function update($tableName, array $data, array $identifier, array $types = array()) + { + $this->connect('master'); + return parent::update($tableName, $data, $identifier, $types); + } + + /** + * {@inheritDoc} + */ + public function insert($tableName, array $data, array $types = array()) + { + $this->connect('master'); + return parent::insert($tableName, $data, $types); + } + + /** + * {@inheritDoc} + */ + public function exec($statement) + { + $this->connect('master'); + return parent::exec($statement); + } + + /** + * {@inheritDoc} + */ + public function createSavepoint($savepoint) + { + $this->connect('master'); + + return parent::createSavepoint($savepoint); + } + + /** + * {@inheritDoc} + */ + public function releaseSavepoint($savepoint) + { + $this->connect('master'); + + return parent::releaseSavepoint($savepoint); + } + + /** + * {@inheritDoc} + */ + public function rollbackSavepoint($savepoint) + { + $this->connect('master'); + + return parent::rollbackSavepoint($savepoint); + } + + public function query() + { + $this->connect('master'); + + $args = func_get_args(); + + $logger = $this->getConfiguration()->getSQLLogger(); + if ($logger) { + $logger->startQuery($args[0]); + } + + $statement = call_user_func_array(array($this->_conn, 'query'), $args); + + if ($logger) { + $logger->stopQuery(); + } + + return $statement; + } + + public function prepare($statement) + { + $this->connect('master'); + + return parent::prepare($statement); + } +} diff --git a/src/lib/Doctrine/DBAL/Driver/Connection.php b/src/lib/Doctrine/DBAL/Driver/Connection.php index 4cc5776a63..c3f0d5624e 100644 --- a/src/lib/Doctrine/DBAL/Driver/Connection.php +++ b/src/lib/Doctrine/DBAL/Driver/Connection.php @@ -24,7 +24,7 @@ * Driver connections must implement this interface. * * This resembles (a subset of) the PDO interface. - * + * * @since 2.0 */ interface Connection diff --git a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php index 5d706de7bc..c9d2fef53a 100644 --- a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php +++ b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -39,7 +39,7 @@ public function __construct(array $params, $username, $password, $driverOptions } } - function prepare($sql) + public function prepare($sql) { $stmt = @db2_prepare($this->_conn, $sql); if (!$stmt) { @@ -47,8 +47,8 @@ function prepare($sql) } return new DB2Statement($stmt); } - - function query() + + public function query() { $args = func_get_args(); $sql = $args[0]; @@ -57,7 +57,7 @@ function query() return $stmt; } - function quote($input, $type=\PDO::PARAM_STR) + public function quote($input, $type=\PDO::PARAM_STR) { $input = db2_escape_string($input); if ($type == \PDO::PARAM_INT ) { @@ -67,24 +67,24 @@ function quote($input, $type=\PDO::PARAM_STR) } } - function exec($statement) + public function exec($statement) { $stmt = $this->prepare($statement); $stmt->execute(); return $stmt->rowCount(); } - function lastInsertId($name = null) + public function lastInsertId($name = null) { return db2_last_insert_id($this->_conn); } - function beginTransaction() + public function beginTransaction() { db2_autocommit($this->_conn, DB2_AUTOCOMMIT_OFF); } - function commit() + public function commit() { if (!db2_commit($this->_conn)) { throw new DB2Exception(db2_conn_errormsg($this->_conn)); @@ -92,7 +92,7 @@ function commit() db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); } - function rollBack() + public function rollBack() { if (!db2_rollback($this->_conn)) { throw new DB2Exception(db2_conn_errormsg($this->_conn)); @@ -100,12 +100,12 @@ function rollBack() db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); } - function errorCode() + public function errorCode() { return db2_conn_error($this->_conn); } - function errorInfo() + public function errorInfo() { return array( 0 => db2_conn_errormsg($this->_conn), diff --git a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php index b32dcbd475..d574b68869 100644 --- a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php +++ b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php @@ -41,8 +41,8 @@ class DB2Driver implements Driver */ public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { - if ( !isset($params['schema']) ) { - + if ( ! isset($params['protocol'])) { + $params['protocol'] = 'TCPIP'; } if ($params['host'] !== 'localhost' && $params['host'] != '127.0.0.1') { @@ -50,10 +50,13 @@ public function connect(array $params, $username = null, $password = null, array $params['dbname'] = 'DRIVER={IBM DB2 ODBC DRIVER}' . ';DATABASE=' . $params['dbname'] . ';HOSTNAME=' . $params['host'] . - ';PORT=' . $params['port'] . ';PROTOCOL=' . $params['protocol'] . ';UID=' . $username . ';PWD=' . $password .';'; + if (isset($params['port'])) { + $params['dbname'] .= 'PORT=' . $params['port']; + } + $username = null; $password = null; } diff --git a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php index b2a8de63ab..7a6cc41e62 100644 --- a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php +++ b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php @@ -23,5 +23,5 @@ class DB2Exception extends \Exception { - + } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php index 41bff920e4..a4819462dc 100644 --- a/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php +++ b/src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php @@ -21,15 +21,19 @@ namespace Doctrine\DBAL\Driver\IBMDB2; -class DB2Statement implements \Doctrine\DBAL\Driver\Statement +use \Doctrine\DBAL\Driver\Statement; + +class DB2Statement implements \IteratorAggregate, Statement { private $_stmt = null; private $_bindParam = array(); + private $_defaultFetchStyle = \PDO::FETCH_BOTH; + /** - * DB2_BINARY, DB2_CHAR, DB2_DOUBLE, or DB2_LONG - * @var + * DB2_BINARY, DB2_CHAR, DB2_DOUBLE, or DB2_LONG + * @var array */ static private $_typeMap = array( \PDO::PARAM_INT => DB2_LONG, @@ -42,46 +46,17 @@ public function __construct($stmt) } /** - * Binds a value to a corresponding named or positional - * placeholder in the SQL statement that was used to prepare the statement. - * - * @param mixed $param Parameter identifier. For a prepared statement using named placeholders, - * this will be a parameter name of the form :name. For a prepared statement - * using question mark placeholders, this will be the 1-indexed position of the parameter - * - * @param mixed $value The value to bind to the parameter. - * @param integer $type Explicit data type for the parameter using the PDO::PARAM_* constants. - * - * @return boolean Returns TRUE on success or FALSE on failure. + * {@inheritdoc} */ - function bindValue($param, $value, $type = null) + public function bindValue($param, $value, $type = null) { return $this->bindParam($param, $value, $type); } /** - * Binds a PHP variable to a corresponding named or question mark placeholder in the - * SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(), - * the variable is bound as a reference and will only be evaluated at the time - * that PDOStatement->execute() is called. - * - * Most parameters are input parameters, that is, parameters that are - * used in a read-only fashion to build up the query. Some drivers support the invocation - * of stored procedures that return data as output parameters, and some also as input/output - * parameters that both send in data and are updated to receive it. - * - * @param mixed $param Parameter identifier. For a prepared statement using named placeholders, - * this will be a parameter name of the form :name. For a prepared statement - * using question mark placeholders, this will be the 1-indexed position of the parameter - * - * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter. - * - * @param integer $type Explicit data type for the parameter using the PDO::PARAM_* constants. To return - * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the - * PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter. - * @return boolean Returns TRUE on success or FALSE on failure. + * {@inheritdoc} */ - function bindParam($column, &$variable, $type = null) + public function bindParam($column, &$variable, $type = null) { $this->_bindParam[$column] =& $variable; @@ -98,11 +73,9 @@ function bindParam($column, &$variable, $type = null) } /** - * Closes the cursor, enabling the statement to be executed again. - * - * @return boolean Returns TRUE on success or FALSE on failure. + * {@inheritdoc} */ - function closeCursor() + public function closeCursor() { if (!$this->_stmt) { return false; @@ -116,14 +89,9 @@ function closeCursor() } /** - * columnCount - * Returns the number of columns in the result set - * - * @return integer Returns the number of columns in the result set represented - * by the PDOStatement object. If there is no result set, - * this method should return 0. + * {@inheritdoc} */ - function columnCount() + public function columnCount() { if (!$this->_stmt) { return false; @@ -132,25 +100,17 @@ function columnCount() } /** - * errorCode - * Fetch the SQLSTATE associated with the last operation on the statement handle - * - * @see Doctrine_Adapter_Interface::errorCode() - * @return string error code string + * {@inheritdoc} */ - function errorCode() + public function errorCode() { return db2_stmt_error(); } /** - * errorInfo - * Fetch extended error information associated with the last operation on the statement handle - * - * @see Doctrine_Adapter_Interface::errorInfo() - * @return array error info array + * {@inheritdoc} */ - function errorInfo() + public function errorInfo() { return array( 0 => db2_stmt_errormsg(), @@ -159,20 +119,9 @@ function errorInfo() } /** - * Executes a prepared statement - * - * If the prepared statement included parameter markers, you must either: - * call PDOStatement->bindParam() to bind PHP variables to the parameter markers: - * bound variables pass their value as input and receive the output value, - * if any, of their associated parameter markers or pass an array of input-only - * parameter values - * - * - * @param array $params An array of values with as many elements as there are - * bound parameters in the SQL statement being executed. - * @return boolean Returns TRUE on success or FALSE on failure. + * {@inheritdoc} */ - function execute($params = null) + public function execute($params = null) { if (!$this->_stmt) { return false; @@ -197,34 +146,28 @@ function execute($params = null) } /** - * fetch - * - * @see Query::HYDRATE_* constants - * @param integer $fetchStyle Controls how the next row will be returned to the caller. - * This value must be one of the Query::HYDRATE_* constants, - * defaulting to Query::HYDRATE_BOTH - * - * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor, - * this value determines which row will be returned to the caller. - * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to - * Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your - * PDOStatement object, - * you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you - * prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). - * - * @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the - * $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies - * the absolute number of the row in the result set that shall be fetched. - * - * For a PDOStatement object representing a scrollable cursor for - * which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value - * specifies the row to fetch relative to the cursor position before - * PDOStatement->fetch() was called. - * - * @return mixed + * {@inheritdoc} + */ + public function setFetchMode($fetchStyle = \PDO::FETCH_BOTH) + { + $this->_defaultFetchStyle = $fetchStyle; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll($this->_defaultFetchStyle); + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} */ - function fetch($fetchStyle = \PDO::FETCH_BOTH) + public function fetch($fetchStyle = null) { + $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle; switch ($fetchStyle) { case \PDO::FETCH_BOTH: return db2_fetch_both($this->_stmt); @@ -238,19 +181,11 @@ function fetch($fetchStyle = \PDO::FETCH_BOTH) } /** - * Returns an array containing all of the result set rows - * - * @param integer $fetchStyle Controls how the next row will be returned to the caller. - * This value must be one of the Query::HYDRATE_* constants, - * defaulting to Query::HYDRATE_BOTH - * - * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is - * Query::HYDRATE_COLUMN. Defaults to 0. - * - * @return array + * {@inheritdoc} */ - function fetchAll($fetchStyle = \PDO::FETCH_BOTH) + public function fetchAll($fetchStyle = null) { + $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle; $rows = array(); while ($row = $this->fetch($fetchStyle)) { $rows[] = $row; @@ -259,17 +194,9 @@ function fetchAll($fetchStyle = \PDO::FETCH_BOTH) } /** - * fetchColumn - * Returns a single column from the next row of a - * result set or FALSE if there are no more rows. - * - * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no - * value is supplied, PDOStatement->fetchColumn() - * fetches the first column. - * - * @return string returns a single column in the next row of a result set. + * {@inheritdoc} */ - function fetchColumn($columnIndex = 0) + public function fetchColumn($columnIndex = 0) { $row = $this->fetch(\PDO::FETCH_NUM); if ($row && isset($row[$columnIndex])) { @@ -279,18 +206,9 @@ function fetchColumn($columnIndex = 0) } /** - * rowCount - * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement - * executed by the corresponding object. - * - * If the last SQL statement executed by the associated Statement object was a SELECT statement, - * some databases may return the number of rows returned by that statement. However, - * this behaviour is not guaranteed for all databases and should not be - * relied on for portable applications. - * - * @return integer Returns the number of rows. + * {@inheritdoc} */ - function rowCount() + public function rowCount() { return (@db2_num_rows($this->_stmt))?:0; } diff --git a/src/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php b/src/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php new file mode 100644 index 0000000000..b77de676a4 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php @@ -0,0 +1,69 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver as DriverInterface; + +/** + * @author Kim Hemsø Rasmussen + */ +class Driver implements DriverInterface +{ + /** + * {@inheritdoc} + */ + public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) + { + return new MysqliConnection($params, $username, $password, $driverOptions); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'mysqli'; + } + + /** + * {@inheritdoc} + */ + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new \Doctrine\DBAL\Schema\MySqlSchemaManager($conn); + } + + /** + * {@inheritdoc} + */ + public function getDatabasePlatform() + { + return new \Doctrine\DBAL\Platforms\MySqlPlatform(); + } + + /** + * {@inheritdoc} + */ + public function getDatabase(\Doctrine\DBAL\Connection $conn) + { + $params = $conn->getParams(); + return $params['dbname']; + } +} diff --git a/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php new file mode 100644 index 0000000000..b69535b1dd --- /dev/null +++ b/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -0,0 +1,146 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver\Connection as Connection; + +/** + * @author Kim Hemsø Rasmussen + */ +class MysqliConnection implements Connection +{ + /** + * @var \mysqli + */ + private $_conn; + + public function __construct(array $params, $username, $password, array $driverOptions = array()) + { + $port = isset($params['port']) ? $params['port'] : ini_get('mysqli.default_port'); + $socket = isset($params['unix_socket']) ? $params['unix_socket'] : ini_get('mysqli.default_socket'); + + $this->_conn = mysqli_init(); + if (!$this->_conn->real_connect($params['host'], $username, $password, $params['dbname'], $port, $socket)) { + throw new MysqliException($this->_conn->connect_error, $this->_conn->connect_errno); + } + + if (isset($params['charset'])) { + $this->_conn->set_charset($params['charset']); + } + } + + /** + * Retrieve mysqli native resource handle. + * + * Could be used if part of your application is not using DBAL + * + * @return mysqli + */ + public function getWrappedResourceHandle() + { + return $this->_conn; + } + + /** + * {@inheritdoc} + */ + public function prepare($prepareString) + { + return new MysqliStatement($this->_conn, $prepareString); + } + + /** + * {@inheritdoc} + */ + public function query() + { + $args = func_get_args(); + $sql = $args[0]; + $stmt = $this->prepare($sql); + $stmt->execute(); + return $stmt; + } + + /** + * {@inheritdoc} + */ + public function quote($input, $type=\PDO::PARAM_STR) + { + return "'". $this->_conn->escape_string($input) ."'"; + } + + /** + * {@inheritdoc} + */ + public function exec($statement) + { + $this->_conn->query($statement); + return $this->_conn->affected_rows; + } + + /** + * {@inheritdoc} + */ + public function lastInsertId($name = null) + { + return $this->_conn->insert_id; + } + + /** + * {@inheritdoc} + */ + public function beginTransaction() + { + $this->_conn->query('START TRANSACTION'); + return true; + } + + /** + * {@inheritdoc} + */ + public function commit() + { + return $this->_conn->commit(); + } + + /** + * {@inheritdoc}non-PHPdoc) + */ + public function rollBack() + { + return $this->_conn->rollback(); + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return $this->_conn->errno; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return $this->_conn->error; + } +} diff --git a/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php b/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php new file mode 100644 index 0000000000..e59a8033ce --- /dev/null +++ b/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php @@ -0,0 +1,26 @@ +. +*/ + +namespace Doctrine\DBAL\Driver\Mysqli; + +/** + * @author Kim Hemsø Rasmussen + */ +class MysqliException extends \Exception +{} diff --git a/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php new file mode 100644 index 0000000000..80006425fe --- /dev/null +++ b/src/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php @@ -0,0 +1,335 @@ +. + */ + +namespace Doctrine\DBAL\Driver\Mysqli; + +use Doctrine\DBAL\Driver\Statement; +use PDO; + +/** + * @author Kim Hemsø Rasmussen + */ +class MysqliStatement implements \IteratorAggregate, Statement +{ + protected static $_paramTypeMap = array( + PDO::PARAM_STR => 's', + PDO::PARAM_BOOL => 'i', + PDO::PARAM_NULL => 's', + PDO::PARAM_INT => 'i', + PDO::PARAM_LOB => 's' // TODO Support LOB bigger then max package size. + ); + + protected $_conn; + protected $_stmt; + + /** + * @var null|false|array + */ + protected $_columnNames; + + /** + * @var null|array + */ + protected $_rowBindedValues; + + /** + * @var array + */ + protected $_bindedValues; + + /** + * Contains ref values for bindValue() + * + * @var array + */ + protected $_values = array(); + + protected $_defaultFetchStyle = PDO::FETCH_BOTH; + + public function __construct(\mysqli $conn, $prepareString) + { + $this->_conn = $conn; + $this->_stmt = $conn->prepare($prepareString); + if (false === $this->_stmt) { + throw new MysqliException($this->_conn->error, $this->_conn->errno); + } + + $paramCount = $this->_stmt->param_count; + if (0 < $paramCount) { + // Index 0 is types + // Need to init the string else php think we are trying to access it as a array. + $bindedValues = array(0 => str_repeat('s', $paramCount)); + $null = null; + for ($i = 1; $i < $paramCount; $i++) { + $bindedValues[] =& $null; + } + $this->_bindedValues = $bindedValues; + } + } + + /** + * {@inheritdoc} + */ + public function bindParam($column, &$variable, $type = null) + { + if (null === $type) { + $type = 's'; + } else { + if (isset(self::$_paramTypeMap[$type])) { + $type = self::$_paramTypeMap[$type]; + } else { + throw new MysqliException("Unkown type: '{$type}'"); + } + } + + $this->_bindedValues[$column] =& $variable; + $this->_bindedValues[0][$column - 1] = 's'; + return true; + } + + /** + * {@inheritdoc} + */ + public function bindValue($param, $value, $type = null) + { + if (null === $type) { + $type = 's'; + } else { + if (isset(self::$_paramTypeMap[$type])) { + $type = self::$_paramTypeMap[$type]; + } else { + throw new MysqliException("Unknown type: '{$type}'"); + } + } + + $this->_values[$param] = $value; + $this->_bindedValues[$param] =& $this->_values[$param]; + $this->_bindedValues[0][$param - 1] = 's'; + return true; + } + + /** + * {@inheritdoc} + */ + public function execute($params = null) + { + if (null !== $this->_bindedValues) { + if (null !== $params) { + if (!$this->_bindValues($params)) { + throw new MysqliException($this->_stmt->error, $this->_stmt->errno); + } + } else { + if (!call_user_func_array(array($this->_stmt, 'bind_param'), $this->_bindedValues)) { + throw new MysqliException($this->_stmt->error, $this->_stmt->errno); + } + } + } + + if (!$this->_stmt->execute()) { + throw new MysqliException($this->_stmt->error, $this->_stmt->errno); + } + + if (null === $this->_columnNames) { + $meta = $this->_stmt->result_metadata(); + if (false !== $meta) { + $columnNames = array(); + foreach ($meta->fetch_fields() as $col) { + $columnNames[] = $col->name; + } + $meta->free(); + + $this->_columnNames = $columnNames; + $this->_rowBindedValues = array_fill(0, count($columnNames), NULL); + + $refs = array(); + foreach ($this->_rowBindedValues as $key => &$value) { + $refs[$key] =& $value; + } + + if (!call_user_func_array(array($this->_stmt, 'bind_result'), $refs)) { + throw new MysqliException($this->_stmt->error, $this->_stmt->errno); + } + } else { + $this->_columnNames = false; + } + } + + // We have a result. + if (false !== $this->_columnNames) { + $this->_stmt->store_result(); + } + return true; + } + + /** + * Bind a array of values to bound parameters + * + * @param array $values + * @return boolean + */ + private function _bindValues($values) + { + $params = array(); + $types = str_repeat('s', count($values)); + $params[0] = $types; + + foreach ($values as &$v) { + $params[] =& $v; + } + return call_user_func_array(array($this->_stmt, 'bind_param'), $params); + } + + /** + * @return null|false|array + */ + private function _fetch() + { + $ret = $this->_stmt->fetch(); + + if (true === $ret) { + $values = array(); + foreach ($this->_rowBindedValues as $v) { + // Mysqli converts them to a scalar type it can fit in. + $values[] = null === $v ? null : (string)$v; + } + return $values; + } + return $ret; + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchStyle = null) + { + $values = $this->_fetch(); + if (null === $values) { + return null; + } + + if (false === $values) { + throw new MysqliException($this->_stmt->error, $this->_stmt->errno); + } + + $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle; + + switch ($fetchStyle) { + case PDO::FETCH_NUM: + return $values; + + case PDO::FETCH_ASSOC: + return array_combine($this->_columnNames, $values); + + case PDO::FETCH_BOTH: + $ret = array_combine($this->_columnNames, $values); + $ret += $values; + return $ret; + + default: + throw new MysqliException("Unknown fetch type '{$fetchStyle}'"); + } + } + + /** + * {@inheritdoc} + */ + public function fetchAll($fetchStyle = null) + { + $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle; + + $a = array(); + while (($row = $this->fetch($fetchStyle)) !== null) { + $a[] = $row; + } + return $a; + } + + /** + * {@inheritdoc} + */ + public function fetchColumn($columnIndex = 0) + { + $row = $this->fetch(PDO::FETCH_NUM); + if (null === $row) { + return null; + } + return $row[$columnIndex]; + } + + /** + * {@inheritdoc} + */ + public function errorCode() + { + return $this->_stmt->errno; + } + + /** + * {@inheritdoc} + */ + public function errorInfo() + { + return $this->_stmt->error; + } + + /** + * {@inheritdoc} + */ + public function closeCursor() + { + $this->_stmt->free_result(); + return true; + } + + /** + * {@inheritdoc} + */ + public function rowCount() + { + if (false === $this->_columnNames) { + return $this->_stmt->affected_rows; + } + return $this->_stmt->num_rows; + } + + /** + * {@inheritdoc} + */ + public function columnCount() + { + return $this->_stmt->field_count; + } + + /** + * {@inheritdoc} + */ + public function setFetchMode($fetchMode = PDO::FETCH_BOTH) + { + $this->_defaultFetchStyle = $fetchMode; + } + + /** + * {@inheritdoc} + */ + public function getIterator() + { + $data = $this->fetchAll($this->_defaultFetchStyle); + return new \ArrayIterator($data); + } +} diff --git a/src/lib/Doctrine/DBAL/Driver/OCI8/Driver.php b/src/lib/Doctrine/DBAL/Driver/OCI8/Driver.php index 3d546691b1..650ad9b6b0 100644 --- a/src/lib/Doctrine/DBAL/Driver/OCI8/Driver.php +++ b/src/lib/Doctrine/DBAL/Driver/OCI8/Driver.php @@ -25,7 +25,7 @@ /** * A Doctrine DBAL driver for the Oracle OCI8 PHP extensions. - * + * * @author Roman Borschel * @since 2.0 */ @@ -47,10 +47,10 @@ public function connect(array $params, $username = null, $password = null, array * * @return string The DSN. */ - private function _constructDsn(array $params) + protected function _constructDsn(array $params) { $dsn = ''; - if (isset($params['host'])) { + if (isset($params['host']) && $params['host'] != '') { $dsn .= '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' . '(HOST=' . $params['host'] . ')'; @@ -60,11 +60,11 @@ private function _constructDsn(array $params) $dsn .= '(PORT=1521)'; } - $dsn .= '))'; - if (isset($params['dbname'])) { - $dsn .= '(CONNECT_DATA=(SID=' . $params['dbname'] . ')'; + if (isset($params['service']) && $params['service'] == true) { + $dsn .= '))(CONNECT_DATA=(SERVICE_NAME=' . $params['dbname'] . ')))'; + } else { + $dsn .= '))(CONNECT_DATA=(SID=' . $params['dbname'] . ')))'; } - $dsn .= '))'; } else { $dsn .= $params['dbname']; } diff --git a/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php b/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php index f65b40d2d0..18653965e4 100644 --- a/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php +++ b/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php @@ -26,13 +26,13 @@ */ class OCI8Connection implements \Doctrine\DBAL\Driver\Connection { - private $_dbh; + protected $_dbh; - private $_executeMode = OCI_COMMIT_ON_SUCCESS; + protected $_executeMode = OCI_COMMIT_ON_SUCCESS; /** * Create a Connection to an Oracle Database using oci8 extension. - * + * * @param string $username * @param string $password * @param string $db @@ -51,7 +51,7 @@ public function __construct($username, $password, $db, $charset = null, $session /** * Create a non-executed prepared statement. - * + * * @param string $prepareString * @return OCI8Statement */ @@ -78,12 +78,16 @@ public function query() * Quote input value. * * @param mixed $input - * @param int $type PDO::PARAM* + * @param int $type PDO::PARAM* * @return mixed */ - public function quote($input, $type=\PDO::PARAM_STR) + public function quote($value, $type=\PDO::PARAM_STR) { - return is_numeric($input) ? $input : "'$input'"; + if (is_int($value) || is_float($value)) { + return $value; + } + $value = str_replace("'", "''", $value); + return "'" . addcslashes($value, "\000\n\r\\\032") . "'"; } /** @@ -97,7 +101,7 @@ public function exec($statement) $stmt->execute(); return $stmt->rowCount(); } - + public function lastInsertId($name = null) { //TODO: throw exception or support sequences? @@ -143,7 +147,7 @@ public function rollBack() $this->_executeMode = OCI_COMMIT_ON_SUCCESS; return true; } - + public function errorCode() { $error = oci_error($this->_dbh); @@ -152,7 +156,7 @@ public function errorCode() } return $error; } - + public function errorInfo() { return oci_error($this->_dbh); diff --git a/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php b/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php index 60ccc10b46..048cbe6727 100644 --- a/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php +++ b/src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php @@ -19,7 +19,9 @@ namespace Doctrine\DBAL\Driver\OCI8; -use \PDO; +use PDO; +use IteratorAggregate; +use Doctrine\DBAL\Driver\Statement; /** * The OCI8 implementation of the Statement interface. @@ -27,18 +29,21 @@ * @since 2.0 * @author Roman Borschel */ -class OCI8Statement implements \Doctrine\DBAL\Driver\Statement +class OCI8Statement implements \IteratorAggregate, Statement { /** Statement handle. */ - private $_sth; - private $_executeMode; - private static $_PARAM = ':param'; - private static $fetchStyleMap = array( + protected $_dbh; + protected $_sth; + protected $_executeMode; + protected static $_PARAM = ':param'; + protected static $fetchStyleMap = array( PDO::FETCH_BOTH => OCI_BOTH, PDO::FETCH_ASSOC => OCI_ASSOC, - PDO::FETCH_NUM => OCI_NUM + PDO::FETCH_NUM => OCI_NUM, + PDO::PARAM_LOB => OCI_B_BLOB, ); - private $_paramMap = array(); + protected $_defaultFetchStyle = PDO::FETCH_BOTH; + protected $_paramMap = array(); /** * Creates a new OCI8Statement that uses the given connection handle and SQL statement. @@ -50,6 +55,7 @@ public function __construct($dbh, $statement, $executeMode) { list($statement, $paramMap) = self::convertPositionalToNamedPlaceholders($statement); $this->_sth = oci_parse($dbh, $statement); + $this->_dbh = $dbh; $this->_paramMap = $paramMap; $this->_executeMode = $executeMode; } @@ -72,7 +78,7 @@ public function __construct($dbh, $statement, $executeMode) * @return string */ static public function convertPositionalToNamedPlaceholders($statement) - { + { $count = 1; $inLiteral = false; // a valid query never starts with quotes $stmtLen = strlen($statement); @@ -108,8 +114,15 @@ public function bindValue($param, $value, $type = null) public function bindParam($column, &$variable, $type = null) { $column = isset($this->_paramMap[$column]) ? $this->_paramMap[$column] : $column; - - return oci_bind_by_name($this->_sth, $column, $variable); + + if ($type == \PDO::PARAM_LOB) { + $lob = oci_new_descriptor($this->_dbh, OCI_D_LOB); + $lob->writeTemporary($variable, OCI_TEMP_BLOB); + + return oci_bind_by_name($this->_sth, $column, $lob, -1, OCI_B_BLOB); + } else { + return oci_bind_by_name($this->_sth, $column, $variable); + } } /** @@ -122,7 +135,7 @@ public function closeCursor() return oci_free_statement($this->_sth); } - /** + /** * {@inheritdoc} */ public function columnCount() @@ -141,7 +154,7 @@ public function errorCode() } return $error; } - + /** * {@inheritdoc} */ @@ -156,7 +169,7 @@ public function errorInfo() public function execute($params = null) { if ($params) { - $hasZeroIndex = isset($params[0]); + $hasZeroIndex = array_key_exists(0, $params); foreach ($params as $key => $val) { if ($hasZeroIndex && is_numeric($key)) { $this->bindValue($key + 1, $val); @@ -176,28 +189,53 @@ public function execute($params = null) /** * {@inheritdoc} */ - public function fetch($fetchStyle = PDO::FETCH_BOTH) + public function setFetchMode($fetchStyle = PDO::FETCH_BOTH) + { + $this->_defaultFetchStyle = $fetchStyle; + } + + /** + * {@inheritdoc} + */ + public function getIterator() { + $data = $this->fetchAll($this->_defaultFetchStyle); + return new \ArrayIterator($data); + } + + /** + * {@inheritdoc} + */ + public function fetch($fetchStyle = null) + { + $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle; if ( ! isset(self::$fetchStyleMap[$fetchStyle])) { throw new \InvalidArgumentException("Invalid fetch style: " . $fetchStyle); } - + return oci_fetch_array($this->_sth, self::$fetchStyleMap[$fetchStyle] | OCI_RETURN_NULLS | OCI_RETURN_LOBS); } /** * {@inheritdoc} */ - public function fetchAll($fetchStyle = PDO::FETCH_BOTH) + public function fetchAll($fetchStyle = null) { + $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle; if ( ! isset(self::$fetchStyleMap[$fetchStyle])) { throw new \InvalidArgumentException("Invalid fetch style: " . $fetchStyle); } - + $result = array(); - oci_fetch_all($this->_sth, $result, 0, -1, - self::$fetchStyleMap[$fetchStyle] | OCI_RETURN_NULLS | OCI_FETCHSTATEMENT_BY_ROW | OCI_RETURN_LOBS); - + if (self::$fetchStyleMap[$fetchStyle] === OCI_BOTH) { + while ($row = $this->fetch($fetchStyle)) { + $result[] = $row; + } + } else { + oci_fetch_all($this->_sth, $result, 0, -1, + self::$fetchStyleMap[$fetchStyle] | OCI_RETURN_NULLS | OCI_FETCHSTATEMENT_BY_ROW | OCI_RETURN_LOBS); + } + return $result; } @@ -216,5 +254,5 @@ public function fetchColumn($columnIndex = 0) public function rowCount() { return oci_num_rows($this->_sth); - } + } } diff --git a/src/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php b/src/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php index 41ad2965b0..cb2df85e89 100644 --- a/src/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php +++ b/src/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php @@ -56,7 +56,7 @@ public function connect(array $params, $username = null, $password = null, array private function _constructPdoDsn(array $params) { $dsn = 'mysql:'; - if (isset($params['host'])) { + if (isset($params['host']) && $params['host'] != '') { $dsn .= 'host=' . $params['host'] . ';'; } if (isset($params['port'])) { @@ -71,7 +71,7 @@ private function _constructPdoDsn(array $params) if (isset($params['charset'])) { $dsn .= 'charset=' . $params['charset'] . ';'; } - + return $dsn; } @@ -93,6 +93,10 @@ public function getName() public function getDatabase(\Doctrine\DBAL\Connection $conn) { $params = $conn->getParams(); - return $params['dbname']; + + if (isset($params['dbname'])) { + return $params['dbname']; + } + return $conn->query('SELECT DATABASE()')->fetchColumn(); } } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php b/src/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php index 61102ebebb..1f007c1f70 100644 --- a/src/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php +++ b/src/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php @@ -1,7 +1,5 @@ getParams(); return $params['dbname']; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php b/src/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php index 1721d5dc73..e13526ad85 100644 --- a/src/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php +++ b/src/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php @@ -80,7 +80,7 @@ protected function _constructPdoDsn(array $params) } else if (isset($params['memory'])) { $dsn .= ':memory:'; } - + return $dsn; } diff --git a/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php b/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php index f45900422a..ba8aaf09a3 100644 --- a/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php +++ b/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php @@ -34,12 +34,12 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection implements \Doctrin public function quote($value, $type=\PDO::PARAM_STR) { $val = parent::quote($value, $type); - + // Fix for a driver version terminating all values with null byte if (strpos($val, "\0") !== false) { $val = substr($val, 0, -1); } - + return $val; } } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php b/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php index 3c71ce03b5..d3c6bf1ece 100644 --- a/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php +++ b/src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php @@ -1,7 +1,5 @@ _constructPdoDsn($params), $username, @@ -46,31 +44,35 @@ public function connect(array $params, $username = null, $password = null, array private function _constructPdoDsn(array $params) { $dsn = 'sqlsrv:server='; - + if (isset($params['host'])) { $dsn .= $params['host']; } - + if (isset($params['port']) && !empty($params['port'])) { $dsn .= ',' . $params['port']; } - - if (isset($params['dbname'])) { - $dsn .= ';Database=' . $params['dbname']; - } - + + if (isset($params['dbname'])) {; + $dsn .= ';Database=' . $params['dbname']; + } + + if (isset($params['MultipleActiveResultSets'])) { + $dsn .= '; MultipleActiveResultSets=' . ($params['MultipleActiveResultSets'] ? 'true' : 'false'); + } + return $dsn; } public function getDatabasePlatform() { - return new \Doctrine\DBAL\Platforms\MsSqlPlatform(); + return new \Doctrine\DBAL\Platforms\SQLServer2008Platform(); } public function getSchemaManager(\Doctrine\DBAL\Connection $conn) { - return new \Doctrine\DBAL\Schema\MsSqlSchemaManager($conn); + return new \Doctrine\DBAL\Schema\SQLServerSchemaManager($conn); } public function getName() @@ -83,4 +85,4 @@ public function getDatabase(\Doctrine\DBAL\Connection $conn) $params = $conn->getParams(); return $params['dbname']; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Driver/PDOStatement.php b/src/lib/Doctrine/DBAL/Driver/PDOStatement.php index 50b1e211a3..75e4fdad40 100644 --- a/src/lib/Doctrine/DBAL/Driver/PDOStatement.php +++ b/src/lib/Doctrine/DBAL/Driver/PDOStatement.php @@ -30,4 +30,13 @@ class PDOStatement extends \PDOStatement implements Statement { private function __construct() {} + + public function setFetchMode($fetchStyle, $params = NULL) + { + // This thin wrapper is necessary to shield against the weird signature + // of PDOStatement::setFetchMode(): even if the second and third + // parameters are optional, PHP will not let us remove it from this + // declaration. + return parent::setFetchMode($fetchStyle); + } } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Driver/ResultStatement.php b/src/lib/Doctrine/DBAL/Driver/ResultStatement.php new file mode 100644 index 0000000000..60dfce767a --- /dev/null +++ b/src/lib/Doctrine/DBAL/Driver/ResultStatement.php @@ -0,0 +1,113 @@ +. + */ + +namespace Doctrine\DBAL\Driver; + +use PDO; + +/** + * Interface for the reading part of a prepare statement only. + * + * @author Benjamin Eberlei + */ +interface ResultStatement extends \Traversable +{ + /** + * Closes the cursor, enabling the statement to be executed again. + * + * @return boolean Returns TRUE on success or FALSE on failure. + */ + function closeCursor(); + + + /** + * columnCount + * Returns the number of columns in the result set + * + * @return integer Returns the number of columns in the result set represented + * by the PDOStatement object. If there is no result set, + * this method should return 0. + */ + function columnCount(); + + /** + * setFetchMode + * Set the fetch mode to use while iterating this statement. + * + * @param integer $fetchStyle + */ + public function setFetchMode($fetchStyle); + + /** + * fetch + * + * @see Query::HYDRATE_* constants + * @param integer $fetchStyle Controls how the next row will be returned to the caller. + * This value must be one of the Query::HYDRATE_* constants, + * defaulting to Query::HYDRATE_BOTH + * + * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor, + * this value determines which row will be returned to the caller. + * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to + * Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your + * PDOStatement object, + * you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you + * prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). + * + * @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the + * $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies + * the absolute number of the row in the result set that shall be fetched. + * + * For a PDOStatement object representing a scrollable cursor for + * which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value + * specifies the row to fetch relative to the cursor position before + * PDOStatement->fetch() was called. + * + * @return mixed + */ + function fetch($fetchStyle = PDO::FETCH_BOTH); + + /** + * Returns an array containing all of the result set rows + * + * @param integer $fetchStyle Controls how the next row will be returned to the caller. + * This value must be one of the Query::HYDRATE_* constants, + * defaulting to Query::HYDRATE_BOTH + * + * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is + * Query::HYDRATE_COLUMN. Defaults to 0. + * + * @return array + */ + function fetchAll($fetchStyle = PDO::FETCH_BOTH); + + /** + * fetchColumn + * Returns a single column from the next row of a + * result set or FALSE if there are no more rows. + * + * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no + * value is supplied, PDOStatement->fetchColumn() + * fetches the first column. + * + * @return string returns a single column in the next row of a result set. + */ + function fetchColumn($columnIndex = 0); +} + diff --git a/src/lib/Doctrine/DBAL/Driver/Statement.php b/src/lib/Doctrine/DBAL/Driver/Statement.php index 6cb8b64022..d417833754 100644 --- a/src/lib/Doctrine/DBAL/Driver/Statement.php +++ b/src/lib/Doctrine/DBAL/Driver/Statement.php @@ -1,7 +1,5 @@ * @author Roman Borschel * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision$ */ -interface Statement +interface Statement extends ResultStatement { /** * Binds a value to a corresponding named or positional @@ -54,13 +51,13 @@ interface Statement function bindValue($param, $value, $type = null); /** - * Binds a PHP variable to a corresponding named or question mark placeholder in the + * Binds a PHP variable to a corresponding named or question mark placeholder in the * SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(), - * the variable is bound as a reference and will only be evaluated at the time + * the variable is bound as a reference and will only be evaluated at the time * that PDOStatement->execute() is called. * - * Most parameters are input parameters, that is, parameters that are - * used in a read-only fashion to build up the query. Some drivers support the invocation + * Most parameters are input parameters, that is, parameters that are + * used in a read-only fashion to build up the query. Some drivers support the invocation * of stored procedures that return data as output parameters, and some also as input/output * parameters that both send in data and are updated to receive it. * @@ -77,26 +74,9 @@ function bindValue($param, $value, $type = null); */ function bindParam($column, &$variable, $type = null); - /** - * Closes the cursor, enabling the statement to be executed again. - * - * @return boolean Returns TRUE on success or FALSE on failure. - */ - function closeCursor(); - - /** - * columnCount - * Returns the number of columns in the result set - * - * @return integer Returns the number of columns in the result set represented - * by the PDOStatement object. If there is no result set, - * this method should return 0. - */ - function columnCount(); - /** * errorCode - * Fetch the SQLSTATE associated with the last operation on the statement handle + * Fetch the SQLSTATE associated with the last operation on the statement handle * * @see Doctrine_Adapter_Interface::errorCode() * @return string error code string @@ -128,70 +108,14 @@ function errorInfo(); */ function execute($params = null); - /** - * fetch - * - * @see Query::HYDRATE_* constants - * @param integer $fetchStyle Controls how the next row will be returned to the caller. - * This value must be one of the Query::HYDRATE_* constants, - * defaulting to Query::HYDRATE_BOTH - * - * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor, - * this value determines which row will be returned to the caller. - * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to - * Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your - * PDOStatement object, - * you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you - * prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). - * - * @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the - * $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies - * the absolute number of the row in the result set that shall be fetched. - * - * For a PDOStatement object representing a scrollable cursor for - * which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value - * specifies the row to fetch relative to the cursor position before - * PDOStatement->fetch() was called. - * - * @return mixed - */ - function fetch($fetchStyle = PDO::FETCH_BOTH); - - /** - * Returns an array containing all of the result set rows - * - * @param integer $fetchStyle Controls how the next row will be returned to the caller. - * This value must be one of the Query::HYDRATE_* constants, - * defaulting to Query::HYDRATE_BOTH - * - * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is - * Query::HYDRATE_COLUMN. Defaults to 0. - * - * @return array - */ - function fetchAll($fetchStyle = PDO::FETCH_BOTH); - - /** - * fetchColumn - * Returns a single column from the next row of a - * result set or FALSE if there are no more rows. - * - * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no - * value is supplied, PDOStatement->fetchColumn() - * fetches the first column. - * - * @return string returns a single column in the next row of a result set. - */ - function fetchColumn($columnIndex = 0); - /** * rowCount - * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement + * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement * executed by the corresponding object. * - * If the last SQL statement executed by the associated Statement object was a SELECT statement, - * some databases may return the number of rows returned by that statement. However, - * this behaviour is not guaranteed for all databases and should not be + * If the last SQL statement executed by the associated Statement object was a SELECT statement, + * some databases may return the number of rows returned by that statement. However, + * this behaviour is not guaranteed for all databases and should not be * relied on for portable applications. * * @return integer Returns the number of rows. diff --git a/src/lib/Doctrine/DBAL/DriverManager.php b/src/lib/Doctrine/DBAL/DriverManager.php index b66c2f87f5..b670ee587a 100644 --- a/src/lib/Doctrine/DBAL/DriverManager.php +++ b/src/lib/Doctrine/DBAL/DriverManager.php @@ -44,6 +44,7 @@ final class DriverManager 'ibm_db2' => 'Doctrine\DBAL\Driver\IBMDB2\DB2Driver', 'pdo_ibm' => 'Doctrine\DBAL\Driver\PDOIbm\Driver', 'pdo_sqlsrv' => 'Doctrine\DBAL\Driver\PDOSqlsrv\Driver', + 'mysqli' => 'Doctrine\DBAL\Driver\Mysqli\Driver', ); /** Private constructor. This class cannot be instantiated. */ @@ -55,37 +56,40 @@ private function __construct() { } * driver connection. * * $params must contain at least one of the following. - * + * * Either 'driver' with one of the following values: * pdo_mysql * pdo_sqlite * pdo_pgsql * pdo_oracle * pdo_sqlsrv - * + * * OR 'driverClass' that contains the full class name (with namespace) of the * driver class to instantiate. - * + * * Other (optional) parameters: - * + * * user (string): - * The username to use when connecting. - * + * The username to use when connecting. + * * password (string): * The password to use when connecting. - * + * * driverOptions (array): * Any additional driver-specific options for the driver. These are just passed * through to the driver. - * + * * pdo: * You can pass an existing PDO instance through this parameter. The PDO * instance will be wrapped in a Doctrine\DBAL\Connection. - * + * * wrapperClass: * You may specify a custom wrapper class through the 'wrapperClass' * parameter but this class MUST inherit from Doctrine\DBAL\Connection. - * + * + * driverClass: + * The driver class to use. + * * @param array $params The parameters. * @param Doctrine\DBAL\Configuration The configuration to use. * @param Doctrine\Common\EventManager The event manager to use. @@ -103,7 +107,7 @@ public static function getConnection( if ( ! $eventManager) { $eventManager = new EventManager(); } - + // check for existing pdo object if (isset($params['pdo']) && ! $params['pdo'] instanceof \PDO) { throw DBALException::invalidPdoInstance(); @@ -118,9 +122,9 @@ public static function getConnection( } else { $className = self::$_driverMap[$params['driver']]; } - + $driver = new $className(); - + $wrapperClass = 'Doctrine\DBAL\Connection'; if (isset($params['wrapperClass'])) { if (is_subclass_of($params['wrapperClass'], $wrapperClass)) { @@ -129,7 +133,7 @@ public static function getConnection( throw DBALException::invalidWrapperClass($params['wrapperClass']); } } - + return new $wrapperClass($params, $driver, $config, $eventManager); } @@ -139,16 +143,16 @@ public static function getConnection( * @param array $params */ private static function _checkParams(array $params) - { + { // check existance of mandatory parameters - + // driver if ( ! isset($params['driver']) && ! isset($params['driverClass'])) { throw DBALException::driverRequired(); } - + // check validity of parameters - + // driver if ( isset($params['driver']) && ! isset(self::$_driverMap[$params['driver']])) { throw DBALException::unknownDriver($params['driver'], array_keys(self::$_driverMap)); @@ -158,4 +162,4 @@ private static function _checkParams(array $params) throw DBALException::invalidDriverClass($params['driverClass']); } } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php b/src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php index 3e5dd31b4e..7f5caa3b91 100644 --- a/src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php +++ b/src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php @@ -1,7 +1,5 @@ */ class OracleSessionInit implements EventSubscriber diff --git a/src/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php b/src/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php new file mode 100644 index 0000000000..670a61e774 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php @@ -0,0 +1,63 @@ +. +*/ + +namespace Doctrine\DBAL\Event\Listeners; + +use Doctrine\DBAL\Event\ConnectionEventArgs; +use Doctrine\DBAL\Events; +use Doctrine\Common\EventSubscriber; + +/** + * Session init listener for executing a single SQL statement right after a connection is opened. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + */ +class SQLSessionInit implements EventSubscriber +{ + /** + * @var string + */ + protected $sql; + + /** + * @param string $sql + */ + public function __construct($sql) + { + $this->sql = $sql; + } + + /** + * @param ConnectionEventArgs $args + * @return void + */ + public function postConnect(ConnectionEventArgs $args) + { + $conn = $args->getConnection(); + $conn->exec($this->sql); + } + + public function getSubscribedEvents() + { + return array(Events::postConnect); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php new file mode 100644 index 0000000000..453f942c4b --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php @@ -0,0 +1,114 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Column, + Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column = null; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_column = $column; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php new file mode 100644 index 0000000000..180fbee37a --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php @@ -0,0 +1,114 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\ColumnDiff, + Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\ColumnDiff + */ + private $_columnDiff = null; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\ColumnDiff $columnDiff + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_columnDiff = $columnDiff; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\ColumnDiff + */ + public function getColumnDiff() + { + return $this->_columnDiff; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php new file mode 100644 index 0000000000..0f9a0a5616 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php @@ -0,0 +1,99 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Column, + Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaAlterTableEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php new file mode 100644 index 0000000000..b64bbc1ff6 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php @@ -0,0 +1,114 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Column, + Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column = null; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_column = $column; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php new file mode 100644 index 0000000000..4b9a88b54f --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php @@ -0,0 +1,129 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Column, + Doctrine\DBAL\Schema\TableDiff; + +/** + * Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform\*Platform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs +{ + /** + * @var string + */ + private $_oldColumnName = null; + + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column = null; + + /** + * @var \Doctrine\DBAL\Schema\TableDiff + */ + private $_tableDiff = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param string $oldColumnName + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform) + { + $this->_oldColumnName = $oldColumnName; + $this->_column = $column; + $this->_tableDiff = $tableDiff; + $this->_platform = $platform; + } + + /** + * @return string + */ + public function getOldColumnName() + { + return $this->_oldColumnName; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getTableDiff() + { + return $this->_tableDiff; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php new file mode 100644 index 0000000000..4cde46c39e --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php @@ -0,0 +1,137 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Connection, + Doctrine\DBAL\Schema\Column; + +/** + * Event Arguments used when the portable column definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaColumnDefinitionEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column = null; + + /** + * Raw column data as fetched from the database + * + * @var array + */ + private $_tableColumn = null; + + /** + * @var string + */ + private $_table = null; + + /** + * @var string + */ + private $_database = null; + + /** + * @var \Doctrine\DBAL\Connection + */ + private $_connection = null; + + /** + * @param array $tableColumn + * @param string $table + * @param string $database + * @param \Doctrine\DBAL\Connection $conn + */ + public function __construct(array $tableColumn, $table, $database, Connection $connection) + { + $this->_tableColumn = $tableColumn; + $this->_table = $table; + $this->_database = $database; + $this->_connection = $connection; + } + + /** + * Allows to clear the column which means the column will be excluded from + * tables column list. + * + * @param null|\Doctrine\DBAL\Schema\Column $column + * @return SchemaColumnDefinitionEventArgs + */ + public function setColumn(Column $column = null) + { + $this->_column = $column; + + return $this; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return array + */ + public function getTableColumn() + { + return $this->_tableColumn; + } + + /** + * @return string + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return string + */ + public function getDatabase() + { + return $this->_database; + } + + /** + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + return $this->_connection->getDatabasePlatform(); + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php new file mode 100644 index 0000000000..5e9a440ea2 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php @@ -0,0 +1,114 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Column, + Doctrine\DBAL\Schema\Table; + +/** + * Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaCreateTableColumnEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Column + */ + private $_column = null; + + /** + * @var \Doctrine\DBAL\Schema\Table + */ + private $_table = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Column $column, Table $table, AbstractPlatform $platform) + { + $this->_column = $column; + $this->_table = $table; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Column + */ + public function getColumn() + { + return $this->_column; + } + + /** + * @return \Doctrine\DBAL\Schema\Table + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php new file mode 100644 index 0000000000..138981c1b4 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php @@ -0,0 +1,128 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Table; + +/** + * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaCreateTableEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Table + */ + private $_table = null; + + /** + * @var array + */ + private $_columns = null; + + /** + * @var array + */ + private $_options = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var array + */ + private $_sql = array(); + + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param array $columns + * @param array $options + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform) + { + $this->_table = $table; + $this->_columns = $columns; + $this->_options = $options; + $this->_platform = $platform; + } + + /** + * @return \Doctrine\DBAL\Schema\Table + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return array + */ + public function getColumns() + { + return $this->_columns; + } + + /** + * @return array + */ + public function getOptions() + { + return $this->_options; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string|array $sql + * @return \Doctrine\DBAL\Event\SchemaCreateTableEventArgs + */ + public function addSql($sql) + { + if (is_array($sql)) { + $this->_sql = array_merge($this->_sql, $sql); + } else { + $this->_sql[] = $sql; + } + + return $this; + } + + /** + * @return array + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php new file mode 100644 index 0000000000..ebd21635a5 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php @@ -0,0 +1,98 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Table; + +/** + * Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaDropTableEventArgs extends SchemaEventArgs +{ + /** + * @var string|\Doctrine\DBAL\Schema\Table + */ + private $_table = null; + + /** + * @var \Doctrine\DBAL\Platforms\AbstractPlatform + */ + private $_platform = null; + + /** + * @var string + */ + private $_sql = null; + + /** + * @param string|\Doctrine\DBAL\Schema\Table $table + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function __construct($table, AbstractPlatform $platform) + { + if (!$table instanceof Table && !is_string($table)) { + throw new \InvalidArgumentException('SchemaCreateTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + $this->_table = $table; + $this->_platform = $platform; + } + + /** + * @return string|\Doctrine\DBAL\Schema\Table + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getPlatform() + { + return $this->_platform; + } + + /** + * @param string $sql + * @return \Doctrine\DBAL\Event\SchemaDropTableEventArgs + */ + public function setSql($sql) + { + $this->_sql = $sql; + + return $this; + } + + /** + * @return string + */ + public function getSql() + { + return $this->_sql; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaEventArgs.php new file mode 100644 index 0000000000..8181225145 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaEventArgs.php @@ -0,0 +1,56 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\Common\EventArgs; + +/** + * Base class for schema related events. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaEventArgs extends EventArgs +{ + /** + * @var boolean + */ + private $_preventDefault = false; + + /** + * @return \Doctrine\DBAL\Event\SchemaEventArgs + */ + public function preventDefault() + { + $this->_preventDefault = true; + + return $this; + } + + /** + * @return boolean + */ + public function isDefaultPrevented() + { + return $this->_preventDefault; + } +} diff --git a/src/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php b/src/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php new file mode 100644 index 0000000000..9eb95af382 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php @@ -0,0 +1,122 @@ +. +*/ + +namespace Doctrine\DBAL\Event; + +use Doctrine\DBAL\Connection, + Doctrine\DBAL\Schema\Index; + +/** + * Event Arguments used when the portable index definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Jan Sorgalla + */ +class SchemaIndexDefinitionEventArgs extends SchemaEventArgs +{ + /** + * @var \Doctrine\DBAL\Schema\Index + */ + private $_index = null; + + /** + * Raw index data as fetched from the database + * + * @var array + */ + private $_tableIndex = null; + + /** + * @var string + */ + private $_table = null; + + /** + * @var \Doctrine\DBAL\Connection + */ + private $_connection = null; + + /** + * @param array $tableIndex + * @param string $table + * @param \Doctrine\DBAL\Connection $conn + */ + public function __construct(array $tableIndex, $table, Connection $connection) + { + $this->_tableIndex = $tableIndex; + $this->_table = $table; + $this->_connection = $connection; + } + + /** + * Allows to clear the index which means the index will be excluded from + * tables index list. + * + * @param null|\Doctrine\DBAL\Schema\Index $index + * @return SchemaIndexDefinitionEventArgs + */ + public function setIndex(Index $index = null) + { + $this->_index = $index; + + return $this; + } + + /** + * @return \Doctrine\DBAL\Schema\Index + */ + public function getIndex() + { + return $this->_index; + } + + /** + * @return array + */ + public function getTableIndex() + { + return $this->_tableIndex; + } + + /** + * @return string + */ + public function getTable() + { + return $this->_table; + } + + /** + * @return \Doctrine\DBAL\Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * @return \Doctrine\DBAL\Platforms\AbstractPlatform + */ + public function getDatabasePlatform() + { + return $this->_connection->getDatabasePlatform(); + } +} diff --git a/src/lib/Doctrine/DBAL/Events.php b/src/lib/Doctrine/DBAL/Events.php index 643789ba32..25e31f0e23 100644 --- a/src/lib/Doctrine/DBAL/Events.php +++ b/src/lib/Doctrine/DBAL/Events.php @@ -34,5 +34,15 @@ final class Events private function __construct() {} const postConnect = 'postConnect'; -} + const onSchemaCreateTable = 'onSchemaCreateTable'; + const onSchemaCreateTableColumn = 'onSchemaCreateTableColumn'; + const onSchemaDropTable = 'onSchemaDropTable'; + const onSchemaAlterTable = 'onSchemaAlterTable'; + const onSchemaAlterTableAddColumn = 'onSchemaAlterTableAddColumn'; + const onSchemaAlterTableRemoveColumn = 'onSchemaAlterTableRemoveColumn'; + const onSchemaAlterTableChangeColumn = 'onSchemaAlterTableChangeColumn'; + const onSchemaAlterTableRenameColumn = 'onSchemaAlterTableRenameColumn'; + const onSchemaColumnDefinition = 'onSchemaColumnDefinition'; + const onSchemaIndexDefinition = 'onSchemaIndexDefinition'; +} diff --git a/src/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php b/src/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php index 5545f250d2..2c3caf26a7 100644 --- a/src/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php +++ b/src/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php @@ -23,7 +23,7 @@ /** * A SQL logger that logs to the standard output using echo/var_dump. - * + * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 diff --git a/src/lib/Doctrine/DBAL/Logging/LoggerChain.php b/src/lib/Doctrine/DBAL/Logging/LoggerChain.php new file mode 100644 index 0000000000..0711c9baa3 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Logging/LoggerChain.php @@ -0,0 +1,64 @@ +. + */ + +namespace Doctrine\DBAL\Logging; + +/** + * Chains multiple SQLLogger + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.2 + * @author Christophe Coevoet + */ +class LoggerChain implements SQLLogger +{ + private $loggers = array(); + + /** + * Adds a logger in the chain + * + * @param SQLLogger $logger + */ + public function addLogger(SQLLogger $logger) + { + $this->loggers[] = $logger; + } + + /** + * {@inheritdoc} + */ + public function startQuery($sql, array $params = null, array $types = null) + { + foreach ($this->loggers as $logger) { + $logger->startQuery($sql, $params, $types); + } + } + + /** + * {@inheritdoc} + */ + public function stopQuery() + { + foreach ($this->loggers as $logger) { + $logger->stopQuery(); + } + } +} + diff --git a/src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index dea2defdd7..7f5024dcd6 100644 --- a/src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -27,7 +27,18 @@ Doctrine\DBAL\Schema\ForeignKeyConstraint, Doctrine\DBAL\Schema\TableDiff, Doctrine\DBAL\Schema\Column, - Doctrine\DBAL\Types\Type; + Doctrine\DBAL\Schema\ColumnDiff, + Doctrine\DBAL\Types\Type, + Doctrine\DBAL\Events, + Doctrine\Common\EventManager, + Doctrine\DBAL\Event\SchemaCreateTableEventArgs, + Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs, + Doctrine\DBAL\Event\SchemaDropTableEventArgs, + Doctrine\DBAL\Event\SchemaAlterTableEventArgs, + Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs, + Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs, + Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs, + Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs; /** * Base class for all DatabasePlatforms. The DatabasePlatforms are the central @@ -90,11 +101,36 @@ abstract class AbstractPlatform */ protected $doctrineTypeComments = null; + /** + * @var Doctrine\Common\EventManager + */ + protected $_eventManager; + /** * Constructor. */ public function __construct() {} + /** + * Sets the EventManager used by the Platform. + * + * @param \Doctrine\Common\EventManager + */ + public function setEventManager(EventManager $eventManager) + { + $this->_eventManager = $eventManager; + } + + /** + * Gets the EventManager used by the Platform. + * + * @return \Doctrine\Common\EventManager + */ + public function getEventManager() + { + return $this->_eventManager; + } + /** * Gets the SQL snippet that declares a boolean column. * @@ -174,6 +210,11 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) */ abstract public function getClobTypeDeclarationSQL(array $field); + /** + * Gets the SQL Snippet used to declare a BLOB column type. + */ + abstract public function getBlobTypeDeclarationSQL(array $field); + /** * Gets the name of the platform. * @@ -203,7 +244,7 @@ public function registerDoctrineTypeMapping($dbType, $doctrineType) /** * Get the Doctrine type that is mapped for the given database column type. - * + * * @param string $dbType * @return string */ @@ -212,7 +253,7 @@ public function getDoctrineTypeMapping($dbType) if ($this->doctrineTypeMapping === null) { $this->initializeDoctrineTypeMappings(); } - + $dbType = strtolower($dbType); if (isset($this->doctrineTypeMapping[$dbType])) { return $this->doctrineTypeMapping[$dbType]; @@ -264,7 +305,7 @@ public function isCommentedDoctrineType(Type $doctrineType) /** * Mark this type as to be commented in ALTER TABLE and CREATE TABLE statements. - * + * * @param Type $doctrineType * @return void */ @@ -278,7 +319,7 @@ public function markDoctrineTypeCommented(Type $doctrineType) /** * Get the comment to append to a column comment that helps parsing this type in reverse engineering. - * + * * @param Type $doctrineType * @return string */ @@ -289,7 +330,7 @@ public function getDoctrineTypeComment(Type $doctrineType) /** * Return the comment of a passed column modified by potential doctrine type comment hints. - * + * * @param Column $column * @return string */ @@ -372,6 +413,16 @@ public function getRegexpExpression() throw DBALException::notSupported(__METHOD__); } + /** + * Returns global unique identifier + * + * @return string to get global unique identifier + */ + public function getGuidExpression() + { + throw DBALException::notSupported(__METHOD__); + } + /** * Returns the average value of a column * @@ -493,7 +544,7 @@ public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = f { $posStr = ''; $trimChar = ($char != false) ? $char . ' FROM ' : ''; - + if ($pos == self::TRIM_LEADING) { $posStr = 'LEADING '.$trimChar; } else if($pos == self::TRIM_TRAILING) { @@ -781,6 +832,30 @@ public function getDateSubMonthExpression($date, $months) throw DBALException::notSupported(__METHOD__); } + /** + * Gets SQL bit AND comparison expression + * + * @param string $value1 + * @param string $value2 + * @return string + */ + public function getBitAndComparisonExpression($value1, $value2) + { + return '(' . $value1 . ' & ' . $value2 . ')'; + } + + /** + * Gets SQL bit OR comparison expression + * + * @param string $value1 + * @param string $value2 + * @return string + */ + public function getBitOrComparisonExpression($value1, $value2) + { + return '(' . $value1 . ' | ' . $value2 . ')'; + } + public function getForUpdateSQL() { return 'FOR UPDATE'; @@ -830,19 +905,44 @@ public function getDropDatabaseSQL($database) /** * Drop a Table - * + * + * @throws \InvalidArgumentException * @param Table|string $table * @return string */ public function getDropTableSQL($table) { + $tableArg = $table; + if ($table instanceof \Doctrine\DBAL\Schema\Table) { $table = $table->getQuotedName($this); + } else if(!is_string($table)) { + throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaDropTable)) { + $eventArgs = new SchemaDropTableEventArgs($tableArg, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaDropTable, $eventArgs); + + if ($eventArgs->isDefaultPrevented()) { + return $eventArgs->getSql(); + } } return 'DROP TABLE ' . $table; } + /** + * Get SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction. + * + * @param Table|string $table + * @return string + */ + public function getDropTemporaryTableSQL($table) + { + return $this->getDropTableSQL($table); + } + /** * Drop index from a table * @@ -863,7 +963,7 @@ public function getDropIndexSQL($index, $table=null) /** * Get drop constraint sql - * + * * @param \Doctrine\DBAL\Schema\Constraint $constraint * @param string|Table $table * @return string @@ -934,9 +1034,22 @@ public function getCreateTableSQL(Table $table, $createFlags=self::CREATE_INDEXE } } + $columnSql = array(); $columns = array(); foreach ($table->getColumns() AS $column) { /* @var \Doctrine\DBAL\Schema\Column $column */ + + if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaCreateTableColumn)) { + $eventArgs = new SchemaCreateTableColumnEventArgs($column, $table, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaCreateTableColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + if ($eventArgs->isDefaultPrevented()) { + continue; + } + } + $columnData = array(); $columnData['name'] = $column->getQuotedName($this); $columnData['type'] = $column->getType(); @@ -970,15 +1083,25 @@ public function getCreateTableSQL(Table $table, $createFlags=self::CREATE_INDEXE } } + if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaCreateTable)) { + $eventArgs = new SchemaCreateTableEventArgs($table, $columns, $options, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaCreateTable, $eventArgs); + + if ($eventArgs->isDefaultPrevented()) { + return array_merge($eventArgs->getSql(), $columnSql); + } + } + $sql = $this->_getCreateTableSQL($tableName, $columns, $options); if ($this->supportsCommentOnStatement()) { foreach ($table->getColumns() AS $column) { - if ($column->getComment()) { + if ($this->getColumnComment($column)) { $sql[] = $this->getCommentOnColumnSQL($tableName, $column->getName(), $this->getColumnComment($column)); } } } - return $sql; + + return array_merge($sql, $columnSql); } public function getCommentOnColumnSQL($tableName, $columnName, $comment) @@ -995,13 +1118,13 @@ public function getCommentOnColumnSQL($tableName, $columnName, $comment) protected function _getCreateTableSQL($tableName, array $columns, array $options = array()) { $columnListSql = $this->getColumnDeclarationListSQL($columns); - + if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) { foreach ($options['uniqueConstraints'] as $name => $definition) { $columnListSql .= ', ' . $this->getUniqueConstraintDeclarationSQL($name, $definition); } } - + if (isset($options['primary']) && ! empty($options['primary'])) { $columnListSql .= ', PRIMARY KEY(' . implode(', ', array_unique(array_values($options['primary']))) . ')'; } @@ -1030,7 +1153,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options return $sql; } - + public function getCreateTemporaryTableSnippetSQL() { return "CREATE TEMPORARY TABLE"; @@ -1046,11 +1169,11 @@ public function getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) { throw DBALException::notSupported(__METHOD__); } - + /** * Gets the SQL statement to change a sequence on this platform. - * - * @param \Doctrine\DBAL\Schema\Sequence $sequence + * + * @param \Doctrine\DBAL\Schema\Sequence $sequence * @return string */ public function getAlterSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) @@ -1097,7 +1220,7 @@ public function getCreateConstraintSQL(\Doctrine\DBAL\Schema\Constraint $constra foreach ($constraint->getForeignColumns() AS $column) { $foreignColumns[] = $column; } - + $referencesClause = ' REFERENCES '.$constraint->getForeignTableName(). ' ('.implode(', ', $foreignColumns).')'; } $query .= ' '.$columnList.$referencesClause; @@ -1123,7 +1246,7 @@ public function getCreateIndexSQL(Index $index, $table) if (count($columns) == 0) { throw new \InvalidArgumentException("Incomplete definition. 'columns' required."); } - + if ($index->isPrimary()) { return $this->getCreatePrimaryKeySQL($index, $table); } else { @@ -1138,10 +1261,10 @@ public function getCreateIndexSQL(Index $index, $table) return $query; } - + /** * Get SQL to create an unnamed primary key constraint. - * + * * @param Index $index * @param string|Table $table * @return string @@ -1153,7 +1276,8 @@ public function getCreatePrimaryKeySQL(Index $index, $table) /** * Quotes a string so that it can be safely used as a table or column name, - * even if it is a reserved word of the platform. + * even if it is a reserved word of the platform. This also detects identifier + * chains seperated by dot and quotes them independently. * * NOTE: Just because you CAN use quoted identifiers doesn't mean * you SHOULD use them. In general, they end up causing way more @@ -1163,10 +1287,26 @@ public function getCreatePrimaryKeySQL(Index $index, $table) * @return string quoted identifier string */ public function quoteIdentifier($str) + { + if (strpos($str, ".") !== false) { + $parts = array_map(array($this, "quoteIdentifier"), explode(".", $str)); + return implode(".", $parts); + } + + return $this->quoteSingleIdentifier($str); + } + + /** + * Quote a single identifier (no dot chain seperation) + * + * @param string $str + * @return string + */ + public function quoteSingleIdentifier($str) { $c = $this->getIdentifierQuoteCharacter(); - return $c . $str . $c; + return $c . str_replace($c, $c.$c, $str) . $c; } /** @@ -1200,10 +1340,124 @@ public function getAlterTableSQL(TableDiff $diff) throw DBALException::notSupported(__METHOD__); } + /** + * @param Column $column + * @param TableDiff $diff + * @param array $columnSql + */ + protected function onSchemaAlterTableAddColumn(Column $column, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableAddColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableAddColumnEventArgs($column, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableAddColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param Column $column + * @param TableDiff $diff + * @param array $columnSql + */ + protected function onSchemaAlterTableRemoveColumn(Column $column, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableRemoveColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableRemoveColumnEventArgs($column, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableRemoveColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param ColumnDiff $columnDiff + * @param TableDiff $diff + * @param array $columnSql + */ + protected function onSchemaAlterTableChangeColumn(ColumnDiff $columnDiff, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableChangeColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableChangeColumnEventArgs($columnDiff, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableChangeColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + + /** + * @param string $oldColumnName + * @param Column $column + * @param TableDiff $diff + * @param array $columnSql + */ + protected function onSchemaAlterTableRenameColumn($oldColumnName, Column $column, TableDiff $diff, &$columnSql) + { + if (null === $this->_eventManager) { + return false; + } + + if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTableRenameColumn)) { + return false; + } + + $eventArgs = new SchemaAlterTableRenameColumnEventArgs($oldColumnName, $column, $diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTableRenameColumn, $eventArgs); + + $columnSql = array_merge($columnSql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + /** + * @param TableDiff $diff + * @param array $columnSql + */ + protected function onSchemaAlterTable(TableDiff $diff, &$sql) + { + if (null === $this->_eventManager) { + return false; + } + + if (!$this->_eventManager->hasListeners(Events::onSchemaAlterTable)) { + return false; + } + + $eventArgs = new SchemaAlterTableEventArgs($diff, $this); + $this->_eventManager->dispatchEvent(Events::onSchemaAlterTable, $eventArgs); + + $sql = array_merge($sql, $eventArgs->getSql()); + + return $eventArgs->isDefaultPrevented(); + } + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) { $tableName = $diff->name; - + $sql = array(); if ($this->supportsForeignKeyConstraints()) { foreach ($diff->removedForeignKeys AS $foreignKey) { @@ -1223,7 +1477,7 @@ protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) return $sql; } - + protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff) { if ($diff->newName !== false) { @@ -1251,7 +1505,7 @@ protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff) return $sql; } - + /** * Common code for alter table statement generation that updates the changed Index and Foreign Key definitions. * @@ -1366,20 +1620,20 @@ public function getColumnDeclarationSQL($name, array $field) return $name . ' ' . $columnDef; } - + /** * Gets the SQL snippet that declares a floating point column of arbitrary precision. * * @param array $columnDef * @return string */ - public function getDecimalTypeDeclarationSQL(array $columnDef) + public function getDecimalTypeDeclarationSQL(array $columnDef) { $columnDef['precision'] = ( ! isset($columnDef['precision']) || empty($columnDef['precision'])) ? 10 : $columnDef['precision']; $columnDef['scale'] = ( ! isset($columnDef['scale']) || empty($columnDef['scale'])) ? 0 : $columnDef['scale']; - + return 'NUMERIC(' . $columnDef['precision'] . ', ' . $columnDef['scale'] . ')'; } @@ -1401,6 +1655,9 @@ public function getDefaultValueDeclarationSQL($field) $default = " DEFAULT ".$field['default']; } else if ((string)$field['type'] == 'DateTime' && $field['default'] == $this->getCurrentTimestampSQL()) { $default = " DEFAULT ".$this->getCurrentTimestampSQL(); + + } else if ((string) $field['type'] == 'Boolean') { + $default = " DEFAULT '" . $this->convertBooleans($field['default']) . "'"; } } } @@ -1433,14 +1690,14 @@ public function getCheckDeclarationSQL(array $definition) return implode(', ', $constraints); } - + /** * Obtain DBMS specific SQL code portion needed to set a unique * constraint declaration to be used in statements like CREATE TABLE. * * @param string $name name of the unique constraint * @param Index $index index definition - * @return string DBMS specific SQL code portion needed + * @return string DBMS specific SQL code portion needed * to set a constraint */ public function getUniqueConstraintDeclarationSQL($name, Index $index) @@ -1448,9 +1705,9 @@ public function getUniqueConstraintDeclarationSQL($name, Index $index) if (count($index->getColumns()) == 0) { throw \InvalidArgumentException("Incomplete definition. 'columns' required."); } - + return 'CONSTRAINT ' . $name . ' UNIQUE (' - . $this->getIndexFieldDeclarationListSQL($index->getColumns()) + . $this->getIndexFieldDeclarationListSQL($index->getColumns()) . ')'; } @@ -1475,7 +1732,7 @@ public function getIndexDeclarationSQL($name, Index $index) } return $type . 'INDEX ' . $name . ' (' - . $this->getIndexFieldDeclarationListSQL($index->getColumns()) + . $this->getIndexFieldDeclarationListSQL($index->getColumns()) . ')'; } @@ -1671,7 +1928,7 @@ public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey $sql .= implode(', ', $foreignKey->getLocalColumns()) . ') REFERENCES ' - . $foreignKey->getForeignTableName() . '(' + . $foreignKey->getForeignTableName() . ' (' . implode(', ', $foreignKey->getForeignColumns()) . ')'; return $sql; @@ -1739,7 +1996,7 @@ public function prefersIdentityColumns() /** * Some platforms need the boolean values to be converted. - * + * * The default conversion in this implementation converts to integers (false => 0, true => 1). * * @param mixed $item @@ -1866,16 +2123,16 @@ public function getListViewsSQL($database) /** * Get the list of indexes for the current database. - * + * * The current database parameter is optional but will always be passed * when using the SchemaManager API and is the database the given table is in. - * + * * Attention: Some platforms only support currentDatabase when they * are connected with that database. Cross-database information schema * requests may be impossible. - * + * * @param string $table - * @param string $currentDatabase + * @param string $currentDatabase */ public function getListTableIndexesSQL($table, $currentDatabase = null) { @@ -1923,10 +2180,10 @@ public function getSetTransactionIsolationSQL($level) } /** - * Obtain DBMS specific SQL to be used to create datetime fields in + * Obtain DBMS specific SQL to be used to create datetime fields in * statements like CREATE TABLE * - * @param array $fieldDeclaration + * @param array $fieldDeclaration * @return string */ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) @@ -1936,19 +2193,19 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) /** * Obtain DBMS specific SQL to be used to create datetime with timezone offset fields. - * + * * @param array $fieldDeclaration */ public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) { return $this->getDateTimeTypeDeclarationSQL($fieldDeclaration); } - - + + /** * Obtain DBMS specific SQL to be used to create date fields in statements * like CREATE TABLE. - * + * * @param array $fieldDeclaration * @return string */ @@ -1985,7 +2242,7 @@ public function getDefaultTransactionIsolationLevel() return Connection::TRANSACTION_READ_COMMITTED; } - /* supports*() metods */ + /* supports*() methods */ /** * Whether the platform supports sequences. @@ -2076,17 +2333,17 @@ public function supportsForeignKeyConstraints() /** * Does this platform supports onUpdate in foreign key constraints? - * + * * @return bool */ public function supportsForeignKeyOnUpdate() { return ($this->supportsForeignKeyConstraints() && true); } - + /** * Whether the platform supports database schemas. - * + * * @return boolean */ public function supportsSchemas() @@ -2094,6 +2351,20 @@ public function supportsSchemas() return false; } + /** + * Can this platform emulate schemas? + * + * Platforms that either support or emulate schemas don't automatically + * filter a schema for the namespaced elements in {@link + * AbstractManager#createSchema}. + * + * @return bool + */ + public function canEmulateSchemas() + { + return false; + } + /** * Some databases don't allow to create and drop databases at all or only with certain tools. * @@ -2127,7 +2398,7 @@ public function supportsInlineColumnComments() /** * Does this platform support the propriortary synatx "COMMENT ON asset" - * + * * @return bool */ public function supportsCommentOnStatement() @@ -2143,7 +2414,7 @@ public function getIdentityColumnNullInsertSQL() /** * Gets the format string, as accepted by the date() function, that describes * the format of a stored datetime value of this platform. - * + * * @return string The format string. */ public function getDateTimeFormatString() @@ -2165,18 +2436,18 @@ public function getDateTimeTzFormatString() /** * Gets the format string, as accepted by the date() function, that describes * the format of a stored date value of this platform. - * + * * @return string The format string. */ public function getDateFormatString() { return 'Y-m-d'; } - + /** * Gets the format string, as accepted by the date() function, that describes * the format of a stored time value of this platform. - * + * * @return string The format string. */ public function getTimeFormatString() @@ -2186,7 +2457,7 @@ public function getTimeFormatString() /** * Modify limit query - * + * * @param string $query * @param int $limit * @param int $offset @@ -2200,6 +2471,13 @@ final public function modifyLimitQuery($query, $limit, $offset = null) if ( $offset !== null) { $offset = (int)$offset; + + if ($offset < 0) { + throw new DBALException("LIMIT argument offset=$offset is not valid"); + } + if ( $offset > 0 && ! $this->supportsLimitOffset()) { + throw new DBALException(sprintf("Platform %s does not support offset values in limit queries.", $this->getName())); + } } return $this->doModifyLimitQuery($query, $limit, $offset); @@ -2223,10 +2501,20 @@ protected function doModifyLimitQuery($query, $limit, $offset) return $query; } - + + /** + * Does the database platform support offsets in modify limit clauses? + * + * @return bool + */ + public function supportsLimitOffset() + { + return true; + } + /** * Gets the character casing of a column in an SQL result set of this platform. - * + * * @param string $column The column name for which to get the correct character casing. * @return string The column name in the character casing used in SQL result sets. */ @@ -2234,11 +2522,11 @@ public function getSQLResultCasing($column) { return $column; } - + /** * Makes any fixes to a name of a schema element (table, sequence, ...) that are required * by restrictions of the platform, like a maximum length. - * + * * @param string $schemaName * @return string */ @@ -2249,7 +2537,7 @@ public function fixSchemaElementName($schemaElementName) /** * Maximum length of any given databse identifier, like tables or column names. - * + * * @return int */ public function getMaxIdentifierLength() @@ -2260,8 +2548,8 @@ public function getMaxIdentifierLength() /** * Get the insert sql for an empty insert statement * - * @param string $tableName - * @param string $identifierColumnName + * @param string $tableName + * @param string $identifierColumnName * @return string $sql */ public function getEmptyIdentityInsertSQL($tableName, $identifierColumnName) @@ -2286,7 +2574,7 @@ public function getTruncateTableSQL($tableName, $cascade = false) /** * This is for test reasons, many vendors have special requirements for dummy statements. - * + * * @return string */ public function getDummySelectSQL() @@ -2329,9 +2617,9 @@ public function rollbackSavePoint($savepoint) /** * Return the keyword list instance of this platform. - * + * * Throws exception if no keyword list is specified. - * + * * @throws DBALException * @return KeywordList */ @@ -2344,14 +2632,14 @@ final public function getReservedKeywordsList() } return $keywords; } - + /** * The class name of the reserved keywords list. - * + * * @return string */ protected function getReservedKeywordsClass() { throw DBALException::notSupported(__METHOD__); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/src/lib/Doctrine/DBAL/Platforms/DB2Platform.php index ee21fc2c6f..198be83929 100644 --- a/src/lib/Doctrine/DBAL/Platforms/DB2Platform.php +++ b/src/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -25,6 +25,14 @@ class DB2Platform extends AbstractPlatform { + /** + * Gets the SQL Snippet used to declare a BLOB column type. + */ + public function getBlobTypeDeclarationSQL(array $field) + { + throw DBALException::notSupported(__METHOD__); + } + public function initializeDoctrineTypeMappings() { $this->doctrineTypeMapping = array( @@ -347,7 +355,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options $indexes = $options['indexes']; } $options['indexes'] = array(); - + $sqls = parent::_getCreateTableSQL($tableName, $columns, $options); foreach ($indexes as $index => $definition) { @@ -365,17 +373,30 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options public function getAlterTableSQL(TableDiff $diff) { $sql = array(); + $columnSql = array(); $queryParts = array(); foreach ($diff->addedColumns AS $fieldName => $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + $queryParts[] = 'ADD COLUMN ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); } foreach ($diff->removedColumns AS $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + $queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this); } foreach ($diff->changedColumns AS $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + /* @var $columnDiff Doctrine\DBAL\Schema\ColumnDiff */ $column = $columnDiff->column; $queryParts[] = 'ALTER ' . ($columnDiff->oldColumnName) . ' ' @@ -383,20 +404,28 @@ public function getAlterTableSQL(TableDiff $diff) } foreach ($diff->renamedColumns AS $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + $queryParts[] = 'RENAME ' . $oldColumnName . ' TO ' . $column->getQuotedName($this); } - if (count($queryParts) > 0) { - $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(" ", $queryParts); - } + $tableSql = array(); - $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff)); + if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if (count($queryParts) > 0) { + $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(" ", $queryParts); + } + + $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff)); - if ($diff->newName !== false) { - $sql[] = 'RENAME TABLE TO ' . $diff->newName; + if ($diff->newName !== false) { + $sql[] = 'RENAME TABLE TO ' . $diff->newName; + } } - return $sql; + return array_merge($sql, $tableSql, $columnSql); } public function getDefaultValueDeclarationSQL($field) @@ -550,7 +579,7 @@ public function supportsSavepoints() { return false; } - + protected function getReservedKeywordsClass() { return 'Doctrine\DBAL\Platforms\Keywords\DB2Keywords'; diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php index f700804e66..4b77cac33f 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php @@ -34,7 +34,7 @@ public function getName() { return 'DB2'; } - + protected function getKeywords() { return array( @@ -435,5 +435,4 @@ protected function getKeywords() ); } } - - \ No newline at end of file + diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php index 7805b73242..dccd717270 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php @@ -31,32 +31,32 @@ abstract class KeywordList { private $keywords = null; - + /** * Check if the given word is a keyword of this dialect/vendor platform. - * + * * @param string $word - * @return bool + * @return bool */ public function isKeyword($word) { if ($this->keywords === null) { $this->initializeKeywords(); } - + return isset($this->keywords[strtoupper($word)]); } - + protected function initializeKeywords() { $this->keywords = array_flip(array_map('strtoupper', $this->getKeywords())); } - + abstract protected function getKeywords(); - + /** * Name of this keyword list. - * + * * @return string */ abstract public function getName(); diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php index 59003ca24c..f59ae814ad 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php @@ -35,7 +35,7 @@ public function getName() { return 'MsSQL'; } - + protected function getKeywords() { return array( diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php index 81702ab236..1d58749a2e 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php @@ -35,7 +35,7 @@ public function getName() { return 'MySQL'; } - + protected function getKeywords() { return array( diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php index 5bedc5f9f5..a5840a099a 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php @@ -35,7 +35,7 @@ public function getName() { return 'Oracle'; } - + protected function getKeywords() { return array( diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php index e6dd779005..e5acea0d31 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php @@ -35,7 +35,7 @@ public function getName() { return 'PostgreSQL'; } - + protected function getKeywords() { return array( diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php index 396e43e1dd..5c99ba3b4e 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php @@ -34,22 +34,22 @@ class ReservedKeywordsValidator implements Visitor * @var KeywordList[] */ private $keywordLists = array(); - + /** * @var array */ private $violations = array(); - + public function __construct(array $keywordLists) { $this->keywordLists = $keywordLists; } - + public function getViolations() { return $this->violations; } - + /** * @param string $word * @return array @@ -59,7 +59,7 @@ private function isReservedWord($word) if ($word[0] == "`") { $word = str_replace('`', '', $word); } - + $keywordLists = array(); foreach ($this->keywordLists AS $keywordList) { if ($keywordList->isKeyword($word)) { @@ -68,16 +68,16 @@ private function isReservedWord($word) } return $keywordLists; } - + private function addViolation($asset, $violatedPlatforms) { if (!$violatedPlatforms) { return; } - + $this->violations[] = $asset . ' keyword violations: ' . implode(', ', $violatedPlatforms); } - + public function acceptColumn(Table $table, Column $column) { $this->addViolation( @@ -88,7 +88,7 @@ public function acceptColumn(Table $table, Column $column) public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) { - + } public function acceptIndex(Table $table, Index $index) @@ -98,12 +98,12 @@ public function acceptIndex(Table $table, Index $index) public function acceptSchema(Schema $schema) { - + } public function acceptSequence(Sequence $sequence) { - + } public function acceptTable(Table $table) diff --git a/src/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php b/src/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php index 9b46f3ed2b..4d12aff87f 100644 --- a/src/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php +++ b/src/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php @@ -34,7 +34,7 @@ public function getName() { return 'SQLite'; } - + protected function getKeywords() { return array( diff --git a/src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php index 0b8c154660..8520e4543b 100644 --- a/src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php +++ b/src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -46,7 +46,7 @@ public function getIdentifierQuoteCharacter() { return '`'; } - + /** * Returns the regular expression operator. * @@ -108,22 +108,22 @@ public function getDateDiffExpression($date1, $date2) public function getDateAddDaysExpression($date, $days) { - return 'DATE_ADD(' . $date . ', INTERVAL ' . (int)$days . ' DAY)'; + return 'DATE_ADD(' . $date . ', INTERVAL ' . $days . ' DAY)'; } public function getDateSubDaysExpression($date, $days) { - return 'DATE_SUB(' . $date . ', INTERVAL ' . (int)$days . ' DAY)'; + return 'DATE_SUB(' . $date . ', INTERVAL ' . $days . ' DAY)'; } public function getDateAddMonthExpression($date, $months) { - return 'DATE_ADD(' . $date . ', INTERVAL ' . (int)$months . ' MONTH)'; + return 'DATE_ADD(' . $date . ', INTERVAL ' . $months . ' MONTH)'; } public function getDateSubMonthExpression($date, $months) { - return 'DATE_SUB(' . $date . ', INTERVAL ' . (int)$months . ' MONTH)'; + return 'DATE_SUB(' . $date . ', INTERVAL ' . $months . ' MONTH)'; } public function getListDatabasesSQL() @@ -137,9 +137,9 @@ public function getListTableConstraintsSQL($table) } /** - * Two approaches to listing the table indexes. The information_schema is + * Two approaches to listing the table indexes. The information_schema is * prefered, because it doesn't cause problems with SQL keywords such as "order" or "table". - * + * * @param string $table * @param string $currentDatabase * @return string @@ -150,7 +150,7 @@ public function getListTableIndexesSQL($table, $currentDatabase = null) return "SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, ". "SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, ". "CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, " . - "NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment " . + "NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment " . "FROM information_schema.STATISTICS WHERE TABLE_NAME = '" . $table . "' AND TABLE_SCHEMA = '" . $currentDatabase . "'"; } else { return 'SHOW INDEX FROM ' . $table; @@ -228,7 +228,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) return 'DATETIME'; } } - + /** * @override */ @@ -240,10 +240,10 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) /** * @override */ - public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) { return 'TIME'; - } + } /** * @override @@ -265,7 +265,7 @@ public function getCollationFieldDeclaration($collation) { return 'COLLATE ' . $collation; } - + /** * Whether the platform prefers identity columns for ID generation. * MySql prefers "autoincrement" identity columns since sequences can only @@ -278,7 +278,7 @@ public function prefersIdentityColumns() { return true; } - + /** * Whether the platform supports identity columns. * MySql supports this through AUTO_INCREMENT columns. @@ -300,7 +300,7 @@ public function getShowDatabasesSQL() { return 'SHOW DATABASES'; } - + public function getListTablesSQL() { return "SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'"; @@ -329,7 +329,7 @@ public function getCreateDatabaseSQL($name) { return 'CREATE DATABASE ' . $name; } - + /** * drop an existing database * @@ -341,7 +341,7 @@ public function getDropDatabaseSQL($name) { return 'DROP DATABASE ' . $name; } - + /** * create a new table * @@ -431,7 +431,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options // default to innodb $optionStrings[] = 'ENGINE = InnoDB'; } - + if ( ! empty($optionStrings)) { $query.= ' '.implode(' ', $optionStrings); } @@ -442,10 +442,10 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options $sql[] = $this->getCreateForeignKeySQL($definition, $tableName); } } - + return $sql; } - + /** * Gets the SQL to alter an existing table. * @@ -454,22 +454,35 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options */ public function getAlterTableSQL(TableDiff $diff) { + $columnSql = array(); $queryParts = array(); if ($diff->newName !== false) { $queryParts[] = 'RENAME TO ' . $diff->newName; } foreach ($diff->addedColumns AS $fieldName => $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + $columnArray = $column->toArray(); $columnArray['comment'] = $this->getColumnComment($column); $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $columnArray); } foreach ($diff->removedColumns AS $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + $queryParts[] = 'DROP ' . $column->getQuotedName($this); } foreach ($diff->changedColumns AS $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + /* @var $columnDiff Doctrine\DBAL\Schema\ColumnDiff */ $column = $columnDiff->column; $columnArray = $column->toArray(); @@ -479,6 +492,10 @@ public function getAlterTableSQL(TableDiff $diff) } foreach ($diff->renamedColumns AS $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + $columnArray = $column->toArray(); $columnArray['comment'] = $this->getColumnComment($column); $queryParts[] = 'CHANGE ' . $oldColumnName . ' ' @@ -486,17 +503,63 @@ public function getAlterTableSQL(TableDiff $diff) } $sql = array(); - if (count($queryParts) > 0) { - $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(", ", $queryParts); + $tableSql = array(); + + if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if (count($queryParts) > 0) { + $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(", ", $queryParts); + } + $sql = array_merge( + $this->getPreAlterTableIndexForeignKeySQL($diff), + $sql, + $this->getPostAlterTableIndexForeignKeySQL($diff) + ); } - $sql = array_merge( - $this->getPreAlterTableIndexForeignKeySQL($diff), - $sql, - $this->getPostAlterTableIndexForeignKeySQL($diff) - ); + + return array_merge($sql, $tableSql, $columnSql); + } + + /** + * Fix for DROP/CREATE index after foreign key change from OneToOne to ManyToOne + * + * @param TableDiff $diff + * @return array + */ + protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff) + { + $sql = array(); + $table = $diff->name; + + foreach ($diff->removedIndexes AS $remKey => $remIndex) { + + foreach ($diff->addedIndexes as $addKey => $addIndex) { + if ($remIndex->getColumns() == $addIndex->getColumns()) { + + $columns = $addIndex->getColumns(); + $type = ''; + if ($addIndex->isUnique()) { + $type = 'UNIQUE '; + } + + $query = 'ALTER TABLE ' . $table . ' DROP INDEX ' . $remIndex->getName() . ', '; + $query .= 'ADD ' . $type . 'INDEX ' . $addIndex->getName(); + $query .= ' (' . $this->getIndexFieldDeclarationListSQL($columns) . ')'; + + $sql[] = $query; + + unset($diff->removedIndexes[$remKey]); + unset($diff->addedIndexes[$addKey]); + + break; + } + } + } + + $sql = array_merge($sql, parent::getPreAlterTableIndexForeignKeySQL($diff)); + return $sql; } - + /** * Obtain DBMS specific SQL code portion needed to declare an integer type * field to be used in statements like CREATE TABLE. @@ -551,7 +614,7 @@ protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) return $unsigned . $autoinc; } - + /** * Return the FOREIGN KEY query section dealing with non-standard options * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... @@ -569,7 +632,7 @@ public function getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKey $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); return $query; } - + /** * Gets the SQL to drop an index of a table. * @@ -578,7 +641,7 @@ public function getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKey * @override */ public function getDropIndexSQL($index, $table=null) - { + { if($index instanceof Index) { $indexName = $index->getQuotedName($this); } else if(is_string($index)) { @@ -586,47 +649,30 @@ public function getDropIndexSQL($index, $table=null) } else { throw new \InvalidArgumentException('MysqlPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.'); } - + if($table instanceof Table) { $table = $table->getQuotedName($this); } else if(!is_string($table)) { throw new \InvalidArgumentException('MysqlPlatform::getDropIndexSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); } - + if ($index instanceof Index && $index->isPrimary()) { - // mysql primary keys are always named "PRIMARY", + // mysql primary keys are always named "PRIMARY", // so we cannot use them in statements because of them being keyword. return $this->getDropPrimaryKeySQL($table); } return 'DROP INDEX ' . $indexName . ' ON ' . $table; } - + /** * @param Index $index - * @param Table $table + * @param Table $table */ protected function getDropPrimaryKeySQL($table) { return 'ALTER TABLE ' . $table . ' DROP PRIMARY KEY'; } - - /** - * Gets the SQL to drop a table. - * - * @param string $table The name of table to drop. - * @override - */ - public function getDropTableSQL($table) - { - if ($table instanceof \Doctrine\DBAL\Schema\Table) { - $table = $table->getQuotedName($this); - } else if(!is_string($table)) { - throw new \InvalidArgumentException('MysqlPlatform::getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); - } - - return 'DROP TABLE ' . $table; - } public function getSetTransactionIsolationSQL($level) { @@ -674,6 +720,10 @@ protected function initializeDoctrineTypeMappings() 'decimal' => 'decimal', 'numeric' => 'decimal', 'year' => 'date', + 'longblob' => 'blob', + 'blob' => 'blob', + 'mediumblob' => 'blob', + 'tinyblob' => 'blob', ); } @@ -681,9 +731,38 @@ public function getVarcharMaxLength() { return 65535; } - + protected function getReservedKeywordsClass() { return 'Doctrine\DBAL\Platforms\Keywords\MySQLKeywords'; } + + /** + * Get SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction. + * + * MySQL commits a transaction implicitly when DROP TABLE is executed, however not + * if DROP TEMPORARY TABLE is executed. + * + * @throws \InvalidArgumentException + * @param $table + * @return string + */ + public function getDropTemporaryTableSQL($table) + { + if ($table instanceof \Doctrine\DBAL\Schema\Table) { + $table = $table->getQuotedName($this); + } else if(!is_string($table)) { + throw new \InvalidArgumentException('getDropTableSQL() expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); + } + + return 'DROP TEMPORARY TABLE ' . $table; + } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'LONGBLOB'; + } } diff --git a/src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index 7fc07377ed..215ea1c660 100644 --- a/src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -102,40 +102,70 @@ public function getGuidExpression() /** * Get the number of days difference between two dates. - * + * * Note: Since Oracle timestamp differences are calculated down to the microsecond we have to truncate * them to the difference in days. This is obviously a restriction of the original functionality, but we * need to make this a portable function. - * + * * @param type $date1 * @param type $date2 - * @return type + * @return type */ public function getDateDiffExpression($date1, $date2) { return "TRUNC(TO_NUMBER(SUBSTR((" . $date1 . "-" . $date2 . "), 1, INSTR(" . $date1 . "-" . $date2 .", ' '))))"; } + /** + * {@inheritdoc} + */ public function getDateAddDaysExpression($date, $days) { - return '(' . $date . '+' . (int)$days . ')'; + return '(' . $date . '+' . $days . ')'; } + /** + * {@inheritdoc} + */ public function getDateSubDaysExpression($date, $days) { - return '(' . $date . '-' . (int)$days . ')'; + return '(' . $date . '-' . $days . ')'; } + /** + * {@inheritdoc} + */ public function getDateAddMonthExpression($date, $months) { - return "ADD_MONTHS(" . $date . ", " . (int)$months . ")"; + return "ADD_MONTHS(" . $date . ", " . $months . ")"; } + /** + * {@inheritdoc} + */ public function getDateSubMonthExpression($date, $months) { - return "ADD_MONTHS(" . $date . ", -" . (int)$months . ")"; + return "ADD_MONTHS(" . $date . ", -" . $months . ")"; + } + + /** + * {@inheritdoc} + */ + public function getBitAndComparisonExpression($value1, $value2) + { + return 'BITAND('.$value1 . ', ' . $value2 . ')'; } - + + /** + * {@inheritdoc} + */ + public function getBitOrComparisonExpression($value1, $value2) + { + return '(' . $value1 . '-' . + $this->getBitAndComparisonExpression($value1, $value2) + . '+' . $value2 . ')'; + } + /** * Gets the SQL used to create a sequence that starts with a given value * and increments by the given allocation size. @@ -151,13 +181,13 @@ public function getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) { return 'CREATE SEQUENCE ' . $sequence->getQuotedName($this) . ' START WITH ' . $sequence->getInitialValue() . - ' MINVALUE ' . $sequence->getInitialValue() . + ' MINVALUE ' . $sequence->getInitialValue() . ' INCREMENT BY ' . $sequence->getAllocationSize(); } - + public function getAlterSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) { - return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . ' INCREMENT BY ' . $sequence->getAllocationSize(); } @@ -171,7 +201,7 @@ public function getSequenceNextValSQL($sequenceName) { return 'SELECT ' . $sequenceName . '.nextval FROM DUAL'; } - + /** * {@inheritdoc} * @@ -197,7 +227,7 @@ protected function _getTransactionIsolationLevelSQL($level) return parent::_getTransactionIsolationLevelSQL($level); } } - + /** * @override */ @@ -281,7 +311,7 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(2000)') : ($length ? 'VARCHAR2(' . $length . ')' : 'VARCHAR2(4000)'); } - + /** @override */ public function getClobTypeDeclarationSQL(array $field) { @@ -318,11 +348,11 @@ protected function _getCreateTableSQL($table, array $columns, array $options = a } if (isset($column['autoincrement']) && $column['autoincrement'] || - (isset($column['autoinc']) && $column['autoinc'])) { + (isset($column['autoinc']) && $column['autoinc'])) { $sql = array_merge($sql, $this->getCreateAutoincrementSql($name, $table)); } } - + if (isset($indexes) && ! empty($indexes)) { foreach ($indexes as $indexName => $index) { $sql[] = $this->getCreateIndexSQL($index, $table); @@ -341,7 +371,7 @@ protected function _getCreateTableSQL($table, array $columns, array $options = a public function getListTableIndexesSQL($table, $currentDatabase = null) { $table = strtoupper($table); - + return "SELECT uind.index_name AS name, " . " uind.index_type AS type, " . " decode( uind.uniqueness, 'NONUNIQUE', 0, 'UNIQUE', 1 ) AS is_unique, " . @@ -392,7 +422,7 @@ public function getCreateAutoincrementSql($name, $table, $start = 1) IF constraints_Count = 0 OR constraints_Count = \'\' THEN EXECUTE IMMEDIATE \''.$this->getCreateConstraintSQL($idx, $table).'\'; END IF; -END;'; +END;'; $sequenceName = $table . '_SEQ'; $sequence = new \Doctrine\DBAL\Schema\Sequence($sequenceName, $start); @@ -450,16 +480,13 @@ public function getListTableForeignKeysSQL($table) cols.position, r_alc.table_name \"references_table\", r_cols.column_name \"foreign_column\" - FROM all_cons_columns cols -LEFT JOIN all_constraints alc + FROM user_cons_columns cols +LEFT JOIN user_constraints alc ON alc.constraint_name = cols.constraint_name - AND alc.owner = cols.owner -LEFT JOIN all_constraints r_alc +LEFT JOIN user_constraints r_alc ON alc.r_constraint_name = r_alc.constraint_name - AND alc.r_owner = r_alc.owner -LEFT JOIN all_cons_columns r_cols +LEFT JOIN user_cons_columns r_cols ON r_alc.constraint_name = r_cols.constraint_name - AND r_alc.owner = r_cols.owner AND cols.position = r_cols.position WHERE alc.constraint_name = cols.constraint_name AND alc.constraint_type = 'R' @@ -475,9 +502,18 @@ public function getListTableConstraintsSQL($table) public function getListTableColumnsSQL($table, $database = null) { $table = strtoupper($table); - return "SELECT c.*, d.comments FROM all_tab_columns c ". - "INNER JOIN all_col_comments d ON d.OWNER = c.OWNER AND d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME ". - "WHERE c.table_name = '" . $table . "' ORDER BY c.column_name"; + + $tabColumnsTableName = "user_tab_columns"; + $ownerCondition = ''; + if(null !== $database){ + $database = strtoupper($database); + $tabColumnsTableName = "all_tab_columns"; + $ownerCondition = "AND c.owner = '".$database."'"; + } + + return "SELECT c.*, d.comments FROM $tabColumnsTableName c ". + "INNER JOIN user_col_comments d ON d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME ". + "WHERE c.table_name = '" . $table . "' ".$ownerCondition." ORDER BY c.column_name"; } /** @@ -533,9 +569,14 @@ public function getAlterTableSQL(TableDiff $diff) { $sql = array(); $commentsSQL = array(); + $columnSql = array(); $fields = array(); foreach ($diff->addedColumns AS $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + $fields[] = $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); if ($comment = $this->getColumnComment($column)) { $commentsSQL[] = $this->getCommentOnColumnSQL($diff->name, $column->getName(), $comment); @@ -547,6 +588,10 @@ public function getAlterTableSQL(TableDiff $diff) $fields = array(); foreach ($diff->changedColumns AS $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + $column = $columnDiff->column; $fields[] = $column->getQuotedName($this). ' ' . $this->getColumnDeclarationSQL('', $column->toArray()); if ($columnDiff->hasChanged('comment') && $comment = $this->getColumnComment($column)) { @@ -558,22 +603,36 @@ public function getAlterTableSQL(TableDiff $diff) } foreach ($diff->renamedColumns AS $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME COLUMN ' . $oldColumnName .' TO ' . $column->getQuotedName($this); } $fields = array(); foreach ($diff->removedColumns AS $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + $fields[] = $column->getQuotedName($this); } if (count($fields)) { $sql[] = 'ALTER TABLE ' . $diff->name . ' DROP (' . implode(', ', $fields).')'; } - if ($diff->newName !== false) { - $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName; + $tableSql = array(); + + if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ($diff->newName !== false) { + $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName; + } + + $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff), $commentsSQL); } - return array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff), $commentsSQL); + return array_merge($sql, $tableSql, $columnSql); } /** @@ -632,12 +691,12 @@ protected function doModifyLimitQuery($query, $limit, $offset = null) } return $query; } - + /** * Gets the character casing of a column in an SQL result set of this platform. - * + * * Oracle returns all column names in SQL result sets in uppercase. - * + * * @param string $column The column name for which to get the correct character casing. * @return string The column name in the character casing used in SQL result sets. */ @@ -645,12 +704,12 @@ public function getSQLResultCasing($column) { return strtoupper($column); } - + public function getCreateTemporaryTableSnippetSQL() { return "CREATE GLOBAL TEMPORARY TABLE"; } - + public function getDateTimeTzFormatString() { return 'Y-m-d H:i:sP'; @@ -665,7 +724,7 @@ public function getTimeFormatString() { return '1900-01-01 H:i:s'; } - + public function fixSchemaElementName($schemaElementName) { if (strlen($schemaElementName) > 30) { @@ -747,8 +806,11 @@ protected function initializeDoctrineTypeMappings() 'long' => 'string', 'clob' => 'text', 'nclob' => 'text', + 'raw' => 'text', + 'long raw' => 'text', 'rowid' => 'string', - 'urowid' => 'string' + 'urowid' => 'string', + 'blob' => 'blob', ); } @@ -762,9 +824,17 @@ public function releaseSavePoint($savepoint) { return ''; } - + protected function getReservedKeywordsClass() { return 'Doctrine\DBAL\Platforms\Keywords\OracleKeywords'; } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BLOB'; + } } diff --git a/src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index fa2ce6b8bf..d398651b9d 100644 --- a/src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -94,29 +94,29 @@ public function getLocateExpression($str, $substr, $startPos = false) public function getDateDiffExpression($date1, $date2) { - return '('.$date1 . '-'.$date2.')'; + return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))'; } public function getDateAddDaysExpression($date, $days) { - return "(" . $date . "+ interval '" . (int)$days . " day')"; + return "(" . $date ." + (" . $days . " || ' day')::interval)"; } public function getDateSubDaysExpression($date, $days) { - return "(" . $date . "- interval '" . (int)$days . " day')"; + return "(" . $date ." - (" . $days . " || ' day')::interval)"; } public function getDateAddMonthExpression($date, $months) { - return "(" . $date . "+ interval '" . (int)$months . " month')"; + return "(" . $date ." + (" . $months . " || ' month')::interval)"; } public function getDateSubMonthExpression($date, $months) { - return "(" . $date . "- interval '" . (int)$months . " month')"; + return "(" . $date ." - (" . $months . " || ' month')::interval)"; } - + /** * parses a literal boolean value and returns * proper sql equivalent @@ -128,7 +128,7 @@ public function getDateSubMonthExpression($date, $months) { return $value; }*/ - + /** * Whether the platform supports sequences. * Postgres has native support for sequences. @@ -139,17 +139,17 @@ public function supportsSequences() { return true; } - + /** * Whether the platform supports database schemas. - * + * * @return boolean */ public function supportsSchemas() { return true; } - + /** * Whether the platform supports identity columns. * Postgres supports these through the SERIAL keyword. @@ -165,7 +165,7 @@ public function supportsCommentOnStatement() { return true; } - + /** * Whether the platform prefers sequences for ID generation. * @@ -187,14 +187,14 @@ public function getListSequencesSQL($database) c.relname, n.nspname AS schemaname FROM pg_class c, pg_namespace n - WHERE relkind = 'S' AND n.oid = c.relnamespace AND + WHERE relkind = 'S' AND n.oid = c.relnamespace AND (n.nspname NOT LIKE 'pg_%' AND n.nspname != 'information_schema')"; } public function getListTablesSQL() { return "SELECT tablename AS table_name, schemaname AS schema_name - FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' AND schemaname != 'information_schema'"; + FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' AND schemaname != 'information_schema' AND tablename != 'geometry_columns' AND tablename != 'spatial_ref_sys'"; } public function getListViewsSQL($database) @@ -210,8 +210,7 @@ public function getListTableForeignKeysSQL($table, $database = null) ( SELECT c.oid FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n - WHERE " .$this->getTableWhereClause($table) ." - AND n.oid = c.relnamespace + WHERE " .$this->getTableWhereClause($table) ." AND n.oid = c.relnamespace ) AND r.contype = 'f'"; } @@ -259,15 +258,23 @@ public function getListTableIndexesSQL($table, $currentDatabase = null) ) AND pg_index.indexrelid = oid"; } + /** + * @param string $table + * @param string $classAlias + * @param string $namespaceAlias + * @return string + */ private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias = 'n') { - $whereClause = ""; + $whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND "; if (strpos($table, ".") !== false) { list($schema, $table) = explode(".", $table); - $whereClause = "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = '" . $schema . "'"; + $schema = "'" . $schema . "'"; } else { - $whereClause = "$classAlias.relname = '" . $table . "'"; + $schema = "ANY(string_to_array((select setting from pg_catalog.pg_settings where name = 'search_path'),','))"; } + $whereClause .= "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = $schema"; + return $whereClause; } @@ -304,7 +311,7 @@ public function getListTableColumnsSQL($table, $database = null) AND n.oid = c.relnamespace ORDER BY a.attnum"; } - + /** * create a new database * @@ -357,7 +364,7 @@ public function getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKey } return $query; } - + /** * generates the sql for altering an existing table on postgresql * @@ -374,8 +381,13 @@ public function getAlterTableSQL(TableDiff $diff) { $sql = array(); $commentsSQL = array(); + $columnSql = array(); foreach ($diff->addedColumns as $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + $query = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query; if ($comment = $this->getColumnComment($column)) { @@ -384,14 +396,22 @@ public function getAlterTableSQL(TableDiff $diff) } foreach ($diff->removedColumns as $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + $query = 'DROP ' . $column->getQuotedName($this); $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query; } foreach ($diff->changedColumns AS $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + $oldColumnName = $columnDiff->oldColumnName; $column = $columnDiff->column; - + if ($columnDiff->hasChanged('type')) { $type = $column->getType(); @@ -428,16 +448,26 @@ public function getAlterTableSQL(TableDiff $diff) } foreach ($diff->renamedColumns as $oldColumnName => $column) { + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME COLUMN ' . $oldColumnName . ' TO ' . $column->getQuotedName($this); } - if ($diff->newName !== false) { - $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName; + $tableSql = array(); + + if (!$this->onSchemaAlterTable($diff, $tableSql)) { + if ($diff->newName !== false) { + $sql[] = 'ALTER TABLE ' . $diff->name . ' RENAME TO ' . $diff->newName; + } + + $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff), $commentsSQL); } - return array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff), $commentsSQL); + return array_merge($sql, $tableSql, $columnSql); } - + /** * Gets the SQL to create a sequence on this platform. * @@ -451,13 +481,13 @@ public function getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) ' MINVALUE ' . $sequence->getInitialValue() . ' START ' . $sequence->getInitialValue(); } - + public function getAlterSequenceSQL(\Doctrine\DBAL\Schema\Sequence $sequence) { - return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . + return 'ALTER SEQUENCE ' . $sequence->getQuotedName($this) . ' INCREMENT BY ' . $sequence->getAllocationSize(); } - + /** * Drop existing sequence * @param \Doctrine\DBAL\Schema\Sequence $sequence @@ -480,7 +510,7 @@ public function getDropForeignKeySQL($foreignKey, $table) { return $this->getDropConstraintSQL($foreignKey, $table); } - + /** * Gets the SQL used to create a table. * @@ -516,7 +546,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options return $sql; } - + /** * Postgres wants boolean values converted to the strings 'true'/'false'. * @@ -549,7 +579,7 @@ public function getSetTransactionIsolationSQL($level) return 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSQL($level); } - + /** * @override */ @@ -566,7 +596,7 @@ public function getIntegerTypeDeclarationSQL(array $field) if ( ! empty($field['autoincrement'])) { return 'SERIAL'; } - + return 'INT'; } @@ -604,7 +634,7 @@ public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) { return 'TIMESTAMP(0) WITH TIME ZONE'; } - + /** * @override */ @@ -640,7 +670,7 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') : ($length ? 'VARCHAR(' . $length . ')' : 'VARCHAR(255)'); } - + /** @override */ public function getClobTypeDeclarationSQL(array $field) { @@ -656,12 +686,12 @@ public function getName() { return 'postgresql'; } - + /** * Gets the character casing of a column in an SQL result set. - * + * * PostgreSQL returns all column names in SQL result sets in lowercase. - * + * * @param string $column The column name for which to get the correct character casing. * @return string The column name in the character casing used in SQL result sets. */ @@ -669,7 +699,7 @@ public function getSQLResultCasing($column) { return strtolower($column); } - + public function getDateTimeTzFormatString() { return 'Y-m-d H:i:sO'; @@ -678,8 +708,8 @@ public function getDateTimeTzFormatString() /** * Get the insert sql for an empty insert statement * - * @param string $tableName - * @param string $identifierColumnName + * @param string $tableName + * @param string $identifierColumnName * @return string $sql */ public function getEmptyIdentityInsertSQL($quotedTableName, $quotedIdentifierColumnName) @@ -738,6 +768,7 @@ protected function initializeDoctrineTypeMappings() 'money' => 'decimal', 'numeric' => 'decimal', 'year' => 'date', + 'bytea' => 'blob', ); } @@ -745,9 +776,17 @@ public function getVarcharMaxLength() { return 65535; } - + protected function getReservedKeywordsClass() { return 'Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords'; } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BYTEA'; + } } diff --git a/src/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php b/src/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php new file mode 100644 index 0000000000..2bbcee2826 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php @@ -0,0 +1,52 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * Platform to ensure compatibility of Doctrine with SQLServer2005 version and + * higher. + * + * Differences to SQL Server 2008 are: + * + * - DATETIME2 datatype does not exist, only DATETIME which has a precision of + * 3. This is not supported by PHP DateTime, so we are emulating it by + * setting .000 manually. + * - Starting with SQLServer2005 VARCHAR(MAX), VARBINARY(MAX) and + * NVARCHAR(max) replace the old TEXT, NTEXT and IMAGE types. See + * {@link http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx} + * for more information. + */ +class SQLServer2005Platform extends SQLServerPlatform +{ + /** + * @override + */ + public function supportsLimitOffset() + { + return true; + } + + /** @override */ + public function getClobTypeDeclarationSQL(array $field) + { + return 'VARCHAR(MAX)'; + } +} + diff --git a/src/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php b/src/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php new file mode 100644 index 0000000000..2938d4abcc --- /dev/null +++ b/src/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php @@ -0,0 +1,90 @@ +. + */ + +namespace Doctrine\DBAL\Platforms; + +/** + * Platform to ensure compatibility of Doctrine with SQLServer2008 version. + * + * Differences to SQL Server 2005 and before are that a new DATETIME2 type was + * introduced that has a higher precision. + */ +class SQLServer2008Platform extends SQLServer2005Platform +{ + /** + * @override + */ + public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) + { + // 3 - microseconds precision length + // http://msdn.microsoft.com/en-us/library/ms187819.aspx + return 'DATETIME2(6)'; + } + + /** + * @override + */ + public function getDateTypeDeclarationSQL(array $fieldDeclaration) + { + return 'DATE'; + } + + /** + * @override + */ + public function getTimeTypeDeclarationSQL(array $fieldDeclaration) + { + return 'TIME(0)'; + } + + /** + * @override + */ + public function getDateTimeFormatString() + { + return 'Y-m-d H:i:s.u'; + } + + /** + * @override + */ + public function getDateFormatString() + { + return 'Y-m-d'; + } + + /** + * @override + */ + public function getTimeFormatString() + { + return 'H:i:s'; + } + + /** + * Adding Datetime2 Type + */ + protected function initializeDoctrineTypeMappings() + { + parent::initializeDoctrineTypeMappings(); + $this->doctrineTypeMapping['datetime2'] = 'datetime'; + $this->doctrineTypeMapping['date'] = 'date'; + $this->doctrineTypeMapping['time'] = 'time'; + } +} diff --git a/src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php b/src/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php similarity index 84% rename from src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php rename to src/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php index f32cde9f2b..ddb075af3d 100644 --- a/src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php +++ b/src/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -26,17 +26,43 @@ Doctrine\DBAL\Schema\Table; /** - * The MsSqlPlatform provides the behavior, features and SQL dialect of the - * MySQL database platform. + * The SQLServerPlatform provides the behavior, features and SQL dialect of the + * Microsoft SQL Server database platform. * * @since 2.0 * @author Roman Borschel * @author Jonathan H. Wage * @author Benjamin Eberlei - * @todo Rename: MsSQLPlatform */ -class MsSqlPlatform extends AbstractPlatform +class SQLServerPlatform extends AbstractPlatform { + /** + * {@inheritDoc} + */ + public function getDateDiffExpression($date1, $date2) + { + return 'DATEDIFF(day, ' . $date2 . ',' . $date1 . ')'; + } + + public function getDateAddDaysExpression($date, $days) + { + return 'DATEADD(day, ' . $days . ', ' . $date . ')'; + } + + public function getDateSubDaysExpression($date, $days) + { + return 'DATEADD(day, -1 * ' . $days . ', ' . $date . ')'; + } + + public function getDateAddMonthExpression($date, $months) + { + return 'DATEADD(month, ' . $months . ', ' . $date . ')'; + } + + public function getDateSubMonthExpression($date, $months) + { + return 'DATEADD(month, -1 * ' . $months . ', ' . $date . ')'; + } /** * Whether the platform prefers identity columns for ID generation. @@ -250,31 +276,55 @@ private function _appendUniqueConstraintDefinition($sql, Index $index) public function getAlterTableSQL(TableDiff $diff) { $queryParts = array(); + $sql = array(); + $columnSql = array(); + if ($diff->newName !== false) { $queryParts[] = 'RENAME TO ' . $diff->newName; } foreach ($diff->addedColumns AS $fieldName => $column) { + if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { + continue; + } + $queryParts[] = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); } foreach ($diff->removedColumns AS $column) { + if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { + continue; + } + $queryParts[] = 'DROP COLUMN ' . $column->getQuotedName($this); } foreach ($diff->changedColumns AS $columnDiff) { + if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { + continue; + } + /* @var $columnDiff Doctrine\DBAL\Schema\ColumnDiff */ $column = $columnDiff->column; - $queryParts[] = 'CHANGE ' . ($columnDiff->oldColumnName) . ' ' - . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + $queryParts[] = 'ALTER COLUMN ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); } foreach ($diff->renamedColumns AS $oldColumnName => $column) { - $queryParts[] = 'CHANGE ' . $oldColumnName . ' ' - . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); + if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { + continue; + } + + $sql[] = "sp_RENAME '". $diff->name. ".". $oldColumnName . "' , '".$column->getQuotedName($this)."', 'COLUMN'"; + $queryParts[] = 'ALTER COLUMN ' . + $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); } - $sql = array(); + $tableSql = array(); + + if ($this->onSchemaAlterTable($diff, $tableSql)) { + return array_merge($tableSql, $columnSql); + } foreach ($queryParts as $query) { $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . $query; @@ -282,7 +332,7 @@ public function getAlterTableSQL(TableDiff $diff) $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff)); - return $sql; + return array_merge($sql, $tableSql, $columnSql); } /** @@ -306,7 +356,8 @@ public function getShowDatabasesSQL() */ public function getListTablesSQL() { - return "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name"; + // "sysdiagrams" table must be ignored as it's internal SQL Server table for Database Diagrams + return "SELECT name FROM sysobjects WHERE type = 'U' AND name != 'sysdiagrams' ORDER BY name"; } /** @@ -314,7 +365,7 @@ public function getListTablesSQL() */ public function getListTableColumnsSQL($table, $database = null) { - return 'exec sp_columns @table_name = ' . $table; + return "exec sp_columns @table_name = '" . $table . "'"; } /** @@ -547,8 +598,7 @@ protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) */ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) { - // 6 - microseconds precision length - return 'DATETIME2(6)'; + return 'DATETIME'; } /** @@ -556,7 +606,7 @@ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) */ public function getDateTypeDeclarationSQL(array $fieldDeclaration) { - return 'DATE'; + return 'DATETIME'; } /** @@ -564,7 +614,7 @@ public function getDateTypeDeclarationSQL(array $fieldDeclaration) */ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) { - return 'TIME(0)'; + return 'DATETIME'; } /** @@ -579,23 +629,16 @@ public function getBooleanTypeDeclarationSQL(array $field) * Adds an adapter-specific LIMIT clause to the SELECT statement. * * @param string $query - * @param mixed $limit - * @param mixed $offset + * @param integer $limit + * @param integer $offset * @link http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html * @return string */ protected function doModifyLimitQuery($query, $limit, $offset = null) { if ($limit > 0) { - $count = intval($limit); - $offset = intval($offset); - - if ($offset < 0) { - throw new DBALException("LIMIT argument offset=$offset is not valid"); - } - if ($offset == 0) { - $query = preg_replace('/^SELECT\s/i', 'SELECT TOP ' . $count . ' ', $query); + $query = preg_replace('/^(SELECT\s(DISTINCT\s)?)/i', '\1TOP ' . $limit . ' ', $query); } else { $orderby = stristr($query, 'ORDER BY'); @@ -607,20 +650,26 @@ protected function doModifyLimitQuery($query, $limit, $offset = null) // Remove ORDER BY clause from $query $query = preg_replace('/\s+ORDER BY(.*)/', '', $query); - - // Add ORDER BY clause as an argument for ROW_NUMBER() - $query = "SELECT ROW_NUMBER() OVER ($over) AS \"doctrine_rownum\", * FROM ($query) AS inner_tbl"; + $query = preg_replace('/^SELECT\s/', '', $query); $start = $offset + 1; - $end = $offset + $count; + $end = $offset + $limit; - $query = "WITH outer_tbl AS ($query) SELECT * FROM outer_tbl WHERE \"doctrine_rownum\" BETWEEN $start AND $end"; + $query = "SELECT * FROM (SELECT ROW_NUMBER() OVER ($over) AS \"doctrine_rownum\", $query) AS doctrine_tbl WHERE \"doctrine_rownum\" BETWEEN $start AND $end"; } } return $query; } + /** + * @override + */ + public function supportsLimitOffset() + { + return false; + } + /** * @override */ @@ -661,7 +710,23 @@ public function getTemporaryTableName($tableName) */ public function getDateTimeFormatString() { - return 'Y-m-d H:i:s.u'; + return 'Y-m-d H:i:s.000'; + } + + /** + * @override + */ + public function getDateFormatString() + { + return 'Y-m-d H:i:s.000'; + } + + /** + * @override + */ + public function getTimeFormatString() + { + return 'Y-m-d H:i:s.000'; } /** @@ -701,12 +766,9 @@ protected function initializeDoctrineTypeMappings() 'real' => 'float', 'double' => 'float', 'double precision' => 'float', - 'date' => 'date', 'datetimeoffset' => 'datetimetz', - 'datetime2' => 'datetime', 'smalldatetime' => 'datetime', 'datetime' => 'datetime', - 'time' => 'time', 'char' => 'string', 'varchar' => 'string', 'text' => 'text', @@ -714,7 +776,7 @@ protected function initializeDoctrineTypeMappings() 'nvarchar' => 'string', 'ntext' => 'text', 'binary' => 'text', - 'varbinary' => 'text', + 'varbinary' => 'blob', 'image' => 'text', ); } @@ -781,18 +843,23 @@ protected function getReservedKeywordsClass() } /** - * Quotes a string so that it can be safely used as a table or column name, - * even if it is a reserved word of the platform. - * - * NOTE: Just because you CAN use quoted identifiers doesn't mean - * you SHOULD use them. In general, they end up causing way more - * problems than they solve. - * - * @param string $str identifier name to be quoted - * @return string quoted identifier string + * {@inheritDoc} + */ + public function quoteSingleIdentifier($str) + { + return "[" . str_replace("]", "][", $str) . "]"; + } + + public function getTruncateTableSQL($tableName, $cascade = false) + { + return 'TRUNCATE TABLE '.$tableName; + } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. */ - public function quoteIdentifier($str) + public function getBlobTypeDeclarationSQL(array $field) { - return "[" . $str . "]"; + return 'VARBINARY(MAX)'; } } diff --git a/src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php b/src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php index f034abb5fa..9cfa726c0a 100644 --- a/src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php +++ b/src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php @@ -132,22 +132,22 @@ public function getDateDiffExpression($date1, $date2) public function getDateAddDaysExpression($date, $days) { - return "DATE(" . $date . ",'+". (int)$days . " day')"; + return "DATE(" . $date . ",'+". $days . " day')"; } public function getDateSubDaysExpression($date, $days) { - return "DATE(" . $date . ",'-". (int)$days . " day')"; + return "DATE(" . $date . ",'-". $days . " day')"; } public function getDateAddMonthExpression($date, $months) { - return "DATE(" . $date . ",'+". (int)$months . " month')"; + return "DATE(" . $date . ",'+". $months . " month')"; } public function getDateSubMonthExpression($date, $months) { - return "DATE(" . $date . ",'-". (int)$months . " month')"; + return "DATE(" . $date . ",'-". $months . " month')"; } protected function _getTransactionIsolationLevelSQL($level) @@ -169,70 +169,70 @@ public function getSetTransactionIsolationSQL($level) return 'PRAGMA read_uncommitted = ' . $this->_getTransactionIsolationLevelSQL($level); } - /** - * @override + /** + * @override */ public function prefersIdentityColumns() { return true; } - - /** - * @override + + /** + * @override */ public function getBooleanTypeDeclarationSQL(array $field) { return 'BOOLEAN'; } - /** - * @override + /** + * @override */ public function getIntegerTypeDeclarationSQL(array $field) { return $this->_getCommonIntegerTypeDeclarationSQL($field); } - /** - * @override + /** + * @override */ public function getBigIntTypeDeclarationSQL(array $field) { return $this->_getCommonIntegerTypeDeclarationSQL($field); } - /** - * @override + /** + * @override */ public function getTinyIntTypeDeclarationSql(array $field) { return $this->_getCommonIntegerTypeDeclarationSQL($field); } - /** - * @override + /** + * @override */ public function getSmallIntTypeDeclarationSQL(array $field) { return $this->_getCommonIntegerTypeDeclarationSQL($field); } - /** - * @override + /** + * @override */ public function getMediumIntTypeDeclarationSql(array $field) { return $this->_getCommonIntegerTypeDeclarationSQL($field); } - /** - * @override + /** + * @override */ public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) { return 'DATETIME'; } - + /** * @override */ @@ -249,15 +249,12 @@ public function getTimeTypeDeclarationSQL(array $fieldDeclaration) return 'TIME'; } - /** - * @override + /** + * @override */ protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) { - $autoinc = ! empty($columnDef['autoincrement']) ? ' AUTOINCREMENT' : ''; - $pk = ! empty($columnDef['primary']) && ! empty($autoinc) ? ' PRIMARY KEY' : ''; - - return 'INTEGER' . $pk . $autoinc; + return 'INTEGER'; } /** @@ -291,17 +288,10 @@ protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) */ protected function _getCreateTableSQL($name, array $columns, array $options = array()) { + $name = str_replace(".", "__", $name); $queryFields = $this->getColumnDeclarationListSQL($columns); - $autoinc = false; - foreach($columns as $field) { - if (isset($field['autoincrement']) && $field['autoincrement']) { - $autoinc = true; - break; - } - } - - if ( ! $autoinc && isset($options['primary']) && ! empty($options['primary'])) { + if (isset($options['primary']) && ! empty($options['primary'])) { $keyColumns = array_unique(array_values($options['primary'])); $keyColumns = array_map(array($this, 'quoteIdentifier'), $keyColumns); $queryFields.= ', PRIMARY KEY('.implode(', ', $keyColumns).')'; @@ -330,7 +320,7 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed) return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') : ($length ? 'VARCHAR(' . $length . ')' : 'TEXT'); } - + public function getClobTypeDeclarationSQL(array $field) { return 'CLOB'; @@ -338,22 +328,25 @@ public function getClobTypeDeclarationSQL(array $field) public function getListTableConstraintsSQL($table) { + $table = str_replace(".", "__", $table); return "SELECT sql FROM sqlite_master WHERE type='index' AND tbl_name = '$table' AND sql NOT NULL ORDER BY name"; } public function getListTableColumnsSQL($table, $currentDatabase = null) { + $table = str_replace(".", "__", $table); return "PRAGMA table_info($table)"; } public function getListTableIndexesSQL($table, $currentDatabase = null) { + $table = str_replace(".", "__", $table); return "PRAGMA index_list($table)"; } public function getListTablesSQL() { - return "SELECT name FROM sqlite_master WHERE type = 'table' AND name != 'sqlite_sequence' " + return "SELECT name FROM sqlite_master WHERE type = 'table' AND name != 'sqlite_sequence' AND name != 'geometry_columns' AND name != 'spatial_ref_sys' " . "UNION ALL SELECT name FROM sqlite_temp_master " . "WHERE type = 'table' ORDER BY name"; } @@ -411,6 +404,7 @@ public function getName() */ public function getTruncateTableSQL($tableName, $cascade = false) { + $tableName = str_replace(".", "__", $tableName); return 'DELETE FROM '.$tableName; } @@ -455,40 +449,71 @@ public function getForUpdateSql() protected function initializeDoctrineTypeMappings() { $this->doctrineTypeMapping = array( - 'boolean' => 'boolean', - 'tinyint' => 'boolean', - 'smallint' => 'smallint', - 'mediumint' => 'integer', - 'int' => 'integer', - 'integer' => 'integer', - 'serial' => 'integer', - 'bigint' => 'bigint', - 'bigserial' => 'bigint', - 'clob' => 'text', - 'tinytext' => 'text', - 'mediumtext' => 'text', - 'longtext' => 'text', - 'text' => 'text', - 'varchar' => 'string', - 'varchar2' => 'string', - 'nvarchar' => 'string', - 'image' => 'string', - 'ntext' => 'string', - 'char' => 'string', - 'date' => 'date', - 'datetime' => 'datetime', - 'timestamp' => 'datetime', - 'time' => 'time', - 'float' => 'float', - 'double' => 'float', - 'real' => 'float', - 'decimal' => 'decimal', - 'numeric' => 'decimal', + 'boolean' => 'boolean', + 'tinyint' => 'boolean', + 'smallint' => 'smallint', + 'mediumint' => 'integer', + 'int' => 'integer', + 'integer' => 'integer', + 'serial' => 'integer', + 'bigint' => 'bigint', + 'bigserial' => 'bigint', + 'clob' => 'text', + 'tinytext' => 'text', + 'mediumtext' => 'text', + 'longtext' => 'text', + 'text' => 'text', + 'varchar' => 'string', + 'longvarchar' => 'string', + 'varchar2' => 'string', + 'nvarchar' => 'string', + 'image' => 'string', + 'ntext' => 'string', + 'char' => 'string', + 'date' => 'date', + 'datetime' => 'datetime', + 'timestamp' => 'datetime', + 'time' => 'time', + 'float' => 'float', + 'double' => 'float', + 'double precision' => 'float', + 'real' => 'float', + 'decimal' => 'decimal', + 'numeric' => 'decimal', + 'blob' => 'blob', ); } - + protected function getReservedKeywordsClass() { return 'Doctrine\DBAL\Platforms\Keywords\SQLiteKeywords'; } + + /** + * Gets the SQL Snippet used to declare a BLOB column type. + */ + public function getBlobTypeDeclarationSQL(array $field) + { + return 'BLOB'; + } + + public function getTemporaryTableName($tableName) + { + $tableName = str_replace(".", "__", $tableName); + return $tableName; + } + + /** + * Sqlite Platform emulates schema by underscoring each dot and generating tables + * into the default database. + * + * This hack is implemented to be able to use SQLite as testdriver when + * using schema supporting databases. + * + * @return bool + */ + public function canEmulateSchemas() + { + return true; + } } diff --git a/src/lib/Doctrine/DBAL/Portability/Connection.php b/src/lib/Doctrine/DBAL/Portability/Connection.php index 95d7c71b08..93ee9fc21b 100644 --- a/src/lib/Doctrine/DBAL/Portability/Connection.php +++ b/src/lib/Doctrine/DBAL/Portability/Connection.php @@ -23,6 +23,7 @@ use Doctrine\Common\EventManager; use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Cache\QueryCacheProfile; class Connection extends \Doctrine\DBAL\Connection { @@ -31,26 +32,26 @@ class Connection extends \Doctrine\DBAL\Connection const PORTABILITY_RTRIM = 1; const PORTABILITY_EMPTY_TO_NULL = 4; const PORTABILITY_FIX_CASE = 8; - + const PORTABILITY_ORACLE = 9; const PORTABILITY_POSTGRESQL = 13; const PORTABILITY_SQLITE = 13; const PORTABILITY_OTHERVENDORS = 12; - + /** * @var int */ private $portability = self::PORTABILITY_NONE; - + /** * @var int */ - private $case = \PDO::CASE_NATURAL; - + private $case; + public function connect() { $ret = parent::connect(); - if ($ret) { + if ($ret) { $params = $this->getParams(); if (isset($params['portability'])) { if ($this->_platform->getName() === "oracle") { @@ -71,26 +72,26 @@ public function connect() } else { $this->case = ($params['fetch_case'] == \PDO::CASE_LOWER) ? CASE_LOWER : CASE_UPPER; } - } + } } return $ret; } - + public function getPortability() { return $this->portability; } - + public function getFetchCase() { return $this->case; } - - public function executeQuery($query, array $params = array(), $types = array()) + + public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null) { - return new Statement(parent::executeQuery($query, $params, $types), $this); + return new Statement(parent::executeQuery($query, $params, $types, $qcp), $this); } - + /** * Prepares an SQL statement. * @@ -101,7 +102,7 @@ public function prepare($statement) { return new Statement(parent::prepare($statement), $this); } - + public function query() { $this->connect(); diff --git a/src/lib/Doctrine/DBAL/Portability/Statement.php b/src/lib/Doctrine/DBAL/Portability/Statement.php index cff30592d9..74a4de3fc3 100644 --- a/src/lib/Doctrine/DBAL/Portability/Statement.php +++ b/src/lib/Doctrine/DBAL/Portability/Statement.php @@ -30,24 +30,29 @@ * @since 2.0 * @author Benjamin Eberlei */ -class Statement implements \Doctrine\DBAL\Driver\Statement +class Statement implements \IteratorAggregate, \Doctrine\DBAL\Driver\Statement { /** * @var int */ private $portability; - + /** * @var Doctrine\DBAL\Driver\Statement */ private $stmt; - + /** * @var int */ private $case; + /** + * @var int + */ + private $defaultFetchStyle = PDO::FETCH_BOTH; + /** * Wraps Statement and applies portability measures * @@ -96,15 +101,26 @@ public function execute($params = null) return $this->stmt->execute($params); } + public function setFetchMode($fetchStyle) + { + $this->defaultFetchStyle = $fetchStyle; + } + + public function getIterator() + { + $data = $this->fetchAll($this->defaultFetchStyle); + return new \ArrayIterator($data); + } + public function fetch($fetchStyle = PDO::FETCH_BOTH) { $row = $this->stmt->fetch($fetchStyle); - + $row = $this->fixRow($row, $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM), - ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE) + !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE) ); - + return $row; } @@ -115,9 +131,9 @@ public function fetchAll($fetchStyle = PDO::FETCH_BOTH, $columnIndex = 0) } else { $rows = $this->stmt->fetchAll($fetchStyle); } - + $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM); - $fixCase = ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE); + $fixCase = !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE); if (!$iterateRow && !$fixCase) { return $rows; } @@ -125,16 +141,16 @@ public function fetchAll($fetchStyle = PDO::FETCH_BOTH, $columnIndex = 0) foreach ($rows AS $num => $row) { $rows[$num] = $this->fixRow($row, $iterateRow, $fixCase); } - + return $rows; } - + protected function fixRow($row, $iterateRow, $fixCase) { if (!$row) { return $row; } - + if ($fixCase) { $row = array_change_key_case($row, $this->case); } @@ -154,7 +170,7 @@ protected function fixRow($row, $iterateRow, $fixCase) public function fetchColumn($columnIndex = 0) { $value = $this->stmt->fetchColumn($columnIndex); - + if ($this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM)) { if (($this->portability & Connection::PORTABILITY_EMPTY_TO_NULL) && $value === '') { $value = null; @@ -162,7 +178,7 @@ public function fetchColumn($columnIndex = 0) $value = rtrim($value); } } - + return $value; } @@ -171,4 +187,4 @@ public function rowCount() return $this->stmt->rowCount(); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php b/src/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php index a016d800f0..5da1889c2b 100644 --- a/src/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php +++ b/src/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php @@ -34,40 +34,40 @@ class CompositeExpression implements \Countable * Constant that represents an AND composite expression */ const TYPE_AND = 'AND'; - + /** * Constant that represents an OR composite expression */ const TYPE_OR = 'OR'; - + /** * @var string Holds the instance type of composite expression */ private $type; - + /** * @var array Each expression part of the composite expression */ private $parts = array(); - + /** * Constructor. - * + * * @param string $type Instance type of composite expression * @param array $parts Composition of expressions to be joined on composite expression */ public function __construct($type, array $parts = array()) { $this->type = $type; - + $this->addMultiple($parts); } - + /** * Adds multiple parts to composite expression. - * + * * @param array $args - * + * * @return CompositeExpression */ public function addMultiple(array $parts = array()) @@ -75,38 +75,38 @@ public function addMultiple(array $parts = array()) foreach ((array) $parts as $part) { $this->add($part); } - + return $this; } - + /** * Adds an expression to composite expression. - * + * * @param mixed $part - * @return CompositeExpression + * @return CompositeExpression */ public function add($part) { if ( ! empty($part) || ($part instanceof self && $part->count() > 0)) { $this->parts[] = $part; } - + return $this; } - + /** * Retrieves the amount of expressions on composite expression. - * - * @return integer + * + * @return integer */ public function count() { return count($this->parts); } - + /** * Retrieve the string representation of this composite expression. - * + * * @return string */ public function __toString() @@ -114,13 +114,13 @@ public function __toString() if (count($this->parts) === 1) { return (string) $this->parts[0]; } - + return '(' . implode(') ' . $this->type . ' (', $this->parts) . ')'; } - + /** * Return type of this composite expression (AND/OR) - * + * * @return string */ public function getType() diff --git a/src/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php b/src/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php index 20fcf60859..35f0762d5f 100644 --- a/src/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php +++ b/src/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php @@ -38,7 +38,7 @@ class ExpressionBuilder const LTE = '<='; const GT = '>'; const GTE = '>='; - + /** * @var Doctrine\DBAL\Connection DBAL Connection */ @@ -53,7 +53,7 @@ public function __construct(Connection $connection) { $this->connection = $connection; } - + /** * Creates a conjunction of the given boolean expressions. * @@ -92,7 +92,7 @@ public function orX($x = null) /** * Creates a comparison expression. - * + * * @param mixed $x Left expression * @param string $operator One of the ExpressionBuikder::* constants. * @param mixed $y Right expression @@ -102,7 +102,7 @@ public function comparison($x, $operator, $y) { return $x . ' ' . $operator . ' ' . $y; } - + /** * Creates an equality comparison expression with the given arguments. * @@ -216,7 +216,7 @@ public function gte($x, $y) * Creates an IS NULL expression with the given arguments. * * @param string $x Field in string format to be restricted by IS NULL - * + * * @return string */ public function isNull($x) @@ -228,7 +228,7 @@ public function isNull($x) * Creates an IS NOT NULL expression with the given arguments. * * @param string $x Field in string format to be restricted by IS NOT NULL - * + * * @return string */ public function isNotNull($x) @@ -241,20 +241,20 @@ public function isNotNull($x) * * @param string $x Field in string format to be inspected by LIKE() comparison. * @param mixed $y Argument to be used in LIKE() comparison. - * + * * @return string */ public function like($x, $y) { return $this->comparison($x, 'LIKE', $y); } - + /** * Quotes a given input parameter. - * + * * @param mixed $input Parameter to be quoted. * @param string $type Type of the parameter. - * + * * @return string */ public function literal($input, $type = null) diff --git a/src/lib/Doctrine/DBAL/Query/QueryBuilder.php b/src/lib/Doctrine/DBAL/Query/QueryBuilder.php index eff760328b..4fb3a06239 100644 --- a/src/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/src/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -24,10 +24,10 @@ /** * QueryBuilder class is responsible to dynamically create SQL queries. - * + * * Important: Verify that every feature you use will work with your database vendor. * SQL Query Builder does not attempt to validate the generated SQL at all. - * + * * The query builder does no validation whatsoever if certain features even work with the * underlying database vendor. Limit queries and joins are NOT applied to UPDATE and DELETE statements * even if some vendors such as MySQL support it. @@ -102,10 +102,10 @@ class QueryBuilder * @var integer The maximum number of results to retrieve. */ private $maxResults = null; - + /** * The counter of bound parameters used with {@see bindValue) - * + * * @var int */ private $boundCounter = 0; @@ -170,14 +170,14 @@ public function getState() { return $this->state; } - + /** * Execute this query using the bound parameters and their types. - * + * * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeUpdate} * for insert, update and delete statements. - * - * @return mixed + * + * @return mixed */ public function execute() { @@ -390,7 +390,7 @@ public function add($sqlPartName, $sqlPart, $append = false) } $this->sqlParts[$sqlPartName] = $sqlPart; - + return $this; } @@ -604,7 +604,7 @@ public function leftJoin($fromAlias, $join, $alias, $condition = null) ) ), true); } - + /** * Creates and adds a right join to the query. * @@ -939,69 +939,76 @@ public function resetQueryPart($queryPartName) return $this; } - + /** * Converts this instance into a SELECT string in SQL. - * + * * @return string */ private function getSQLForSelect() { $query = 'SELECT ' . implode(', ', $this->sqlParts['select']) . ' FROM '; - + $fromClauses = array(); - + // Loop through all FROM clauses foreach ($this->sqlParts['from'] as $from) { $fromClause = $from['table'] . ' ' . $from['alias']; - + if (isset($this->sqlParts['join'][$from['alias']])) { foreach ($this->sqlParts['join'][$from['alias']] as $join) { - $fromClause .= ' ' . strtoupper($join['joinType']) - . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias'] + $fromClause .= ' ' . strtoupper($join['joinType']) + . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias'] . ' ON ' . ((string) $join['joinCondition']); } } - - $fromClauses[] = $fromClause; + + $fromClauses[$from['alias']] = $fromClause; } - - $query .= implode(', ', $fromClauses) + + // loop through all JOIN clasues for validation purpose + foreach ($this->sqlParts['join'] as $fromAlias => $joins) { + if ( ! isset($fromClauses[$fromAlias]) ) { + throw QueryException::unknownFromAlias($fromAlias, array_keys($fromClauses)); + } + } + + $query .= implode(', ', $fromClauses) . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '') . ($this->sqlParts['groupBy'] ? ' GROUP BY ' . implode(', ', $this->sqlParts['groupBy']) : '') . ($this->sqlParts['having'] !== null ? ' HAVING ' . ((string) $this->sqlParts['having']) : '') . ($this->sqlParts['orderBy'] ? ' ORDER BY ' . implode(', ', $this->sqlParts['orderBy']) : ''); - - return ($this->maxResults === null && $this->firstResult == null) + + return ($this->maxResults === null && $this->firstResult == null) ? $query : $this->connection->getDatabasePlatform()->modifyLimitQuery($query, $this->maxResults, $this->firstResult); } - + /** * Converts this instance into an UPDATE string in SQL. - * + * * @return string */ private function getSQLForUpdate() { $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : ''); - $query = 'UPDATE ' . $table + $query = 'UPDATE ' . $table . ' SET ' . implode(", ", $this->sqlParts['set']) . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : ''); - + return $query; } - + /** * Converts this instance into a DELETE string in SQL. - * + * * @return string */ private function getSQLForDelete() { $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : ''); $query = 'DELETE FROM ' . $table . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : ''); - + return $query; } @@ -1015,7 +1022,7 @@ public function __toString() { return $this->getSQL(); } - + /** * Create a new named parameter and bind the value $value to it. * @@ -1053,15 +1060,15 @@ public function createNamedParameter( $value, $type = \PDO::PARAM_STR, $placeHol return $placeHolder; } - + /** * Create a new positional parameter and bind the given value to it. - * + * * Attention: If you are using positional parameters with the query builder you have * to be very careful to bind all parameters in the order they appear in the SQL * statement , otherwise they get bound in the wrong order which can lead to serious * bugs in your code. - * + * * Example: * * $qb = $conn->createQueryBuilder(); @@ -1070,7 +1077,7 @@ public function createNamedParameter( $value, $type = \PDO::PARAM_STR, $placeHol * ->where('u.username = ' . $qb->createPositionalParameter('Foo', PDO::PARAM_STR)) * ->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', PDO::PARAM_STR)) * - * + * * @param mixed $value * @param mixed $type * @return string diff --git a/src/lib/Doctrine/DBAL/Query/QueryException.php b/src/lib/Doctrine/DBAL/Query/QueryException.php new file mode 100644 index 0000000000..fe2cc2f384 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Query/QueryException.php @@ -0,0 +1,40 @@ +. + */ + +namespace Doctrine\DBAL\Query; + +use Doctrine\DBAL\DBALException; + +/** + * Driver interface. + * Interface that all DBAL drivers must implement. + * + * @since 2.1.4 + */ +class QueryException extends DBALException +{ + static public function unknownFromAlias($alias, $registeredAliases) + { + return new self("The given alias '" . $alias . "' is not part of " . + "any FROM clause table. The currently registered FROM-clause " . + "aliases are: " . implode(", ", $registeredAliases) . ". Join clauses " . + "are bound to from clauses to provide support for mixing of multiple " . + "from and join clauses."); + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/SQLParserUtils.php b/src/lib/Doctrine/DBAL/SQLParserUtils.php index 582757e5ce..b3704df99e 100644 --- a/src/lib/Doctrine/DBAL/SQLParserUtils.php +++ b/src/lib/Doctrine/DBAL/SQLParserUtils.php @@ -34,21 +34,21 @@ class SQLParserUtils { /** * Get an array of the placeholders in an sql statements as keys and their positions in the query string. - * + * * Returns an integer => integer pair (indexed from zero) for a positional statement * and a string => int[] pair for a named statement. - * + * * @param string $statement * @param bool $isPositional * @return array */ static public function getPlaceholderPositions($statement, $isPositional = true) - { + { $match = ($isPositional) ? '?' : ':'; if (strpos($statement, $match) === false) { return array(); } - + $count = 0; $inLiteral = false; // a valid query never starts with quotes $stmtLen = strlen($statement); @@ -61,7 +61,7 @@ static public function getPlaceholderPositions($statement, $isPositional = true) } else { $name = ""; // TODO: Something faster/better to match this than regex? - for ($j = $i; ($j < $stmtLen && preg_match('(([:a-zA-Z0-9]{1}))', $statement[$j])); $j++) { + for ($j = $i; ($j < $stmtLen && preg_match('(([:a-zA-Z0-9_]{1}))', $statement[$j])); $j++) { $name .= $statement[$j]; } $paramMap[$name][] = $i; // named parameters can be duplicated! @@ -75,34 +75,34 @@ static public function getPlaceholderPositions($statement, $isPositional = true) return $paramMap; } - + /** * For a positional query this method can rewrite the sql statement with regard to array parameters. - * + * * @param string $query * @param array $params - * @param array $types + * @param array $types */ static public function expandListParameters($query, $params, $types) - { + { $isPositional = is_int(key($params)); $arrayPositions = array(); $bindIndex = -1; foreach ($types AS $name => $type) { ++$bindIndex; - if ($type === Connection::PARAM_INT_ARRAY || $type == Connection::PARAM_STR_ARRAY) { + if ($type === Connection::PARAM_INT_ARRAY || $type === Connection::PARAM_STR_ARRAY) { if ($isPositional) { $name = $bindIndex; } - + $arrayPositions[$name] = false; } } - - if (!$arrayPositions || count($params) != count($types)) { + + if ((!$arrayPositions && $isPositional) || (count($params) != count($types))) { return array($query, $params, $types); } - + $paramPos = self::getPlaceholderPositions($query, $isPositional); if ($isPositional) { $paramOffset = 0; @@ -111,33 +111,69 @@ static public function expandListParameters($query, $params, $types) if (!isset($arrayPositions[$needle])) { continue; } - + $needle += $paramOffset; $needlePos += $queryOffset; $len = count($params[$needle]); - + $params = array_merge( array_slice($params, 0, $needle), $params[$needle], array_slice($params, $needle + 1) ); - + $types = array_merge( array_slice($types, 0, $needle), array_fill(0, $len, $types[$needle] - Connection::ARRAY_PARAM_OFFSET), // array needles are at PDO::PARAM_* + 100 array_slice($types, $needle + 1) ); - + $expandStr = implode(", ", array_fill(0, $len, "?")); $query = substr($query, 0, $needlePos) . $expandStr . substr($query, $needlePos + 1); - + $paramOffset += ($len - 1); // Grows larger by number of parameters minus the replaced needle. $queryOffset += (strlen($expandStr) - 1); } + } else { - throw new DBALException("Array parameters are not supported for named placeholders."); + $queryOffset= 0; + $typesOrd = array(); + $paramsOrd = array(); + foreach ($paramPos as $needle => $needlePos) { + $paramLen = strlen($needle); + $token = substr($needle,0,1); + $needle = substr($needle,1); + $value = $params[$needle]; + + if (!isset($arrayPositions[$needle])) { + foreach ($needlePos as $pos) { + $pos += $queryOffset; + $queryOffset -= ($paramLen - 1); + $paramsOrd[] = $value; + $typesOrd[] = $types[$needle]; + $query = substr($query, 0, $pos) . '?' . substr($query, ($pos + $paramLen)); + } + } else { + $len = count($value); + $expandStr = implode(", ", array_fill(0, $len, "?")); + foreach ($needlePos as $pos) { + + foreach ($value as $val) { + $paramsOrd[] = $val; + $typesOrd[] = $types[$needle] - Connection::ARRAY_PARAM_OFFSET; + } + + $pos += $queryOffset; + $queryOffset += (strlen($expandStr) - $paramLen); + $query = substr($query, 0, $pos) . $expandStr . substr($query, ($pos + $paramLen)); + } + } + } + + $types = $typesOrd; + $params = $paramsOrd; } - + return array($query, $params, $types); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/AbstractAsset.php b/src/lib/Doctrine/DBAL/Schema/AbstractAsset.php index cd4b10754f..a14218a652 100644 --- a/src/lib/Doctrine/DBAL/Schema/AbstractAsset.php +++ b/src/lib/Doctrine/DBAL/Schema/AbstractAsset.php @@ -1,7 +1,5 @@ */ abstract class AbstractAsset @@ -42,6 +39,16 @@ abstract class AbstractAsset */ protected $_name; + /** + * Namespace of the asset. If none isset the default namespace is assumed. + * + * @var string + */ + protected $_namespace; + + /** + * @var bool + */ protected $_quoted = false; /** @@ -55,9 +62,73 @@ protected function _setName($name) $this->_quoted = true; $name = $this->trimQuotes($name); } + if (strpos($name, ".") !== false) { + $parts = explode(".", $name); + $this->_namespace = $parts[0]; + $name = $parts[1]; + } $this->_name = $name; } + /** + * Is this asset in the default namespace? + * + * @param string $defaultNamespaceName + * @return bool + */ + public function isInDefaultNamespace($defaultNamespaceName) + { + return $this->_namespace == $defaultNamespaceName || $this->_namespace === null; + } + + /** + * Get namespace name of this asset. + * + * If NULL is returned this means the default namespace is used. + * + * @return string + */ + public function getNamespaceName() + { + return $this->_namespace; + } + + /** + * The shortest name is stripped of the default namespace. All other + * namespaced elements are returned as full-qualified names. + * + * @param string + * @return string + */ + public function getShortestName($defaultNamespaceName) + { + $shortestName = $this->getName(); + if ($this->_namespace == $defaultNamespaceName) { + $shortestName = $this->_name; + } + return strtolower($shortestName); + } + + /** + * The normalized name is full-qualified and lowerspaced. Lowerspacing is + * actually wrong, but we have to do it to keep our sanity. If you are + * using database objects that only differentiate in the casing (FOO vs + * Foo) then you will NOT be able to use Doctrine Schema abstraction. + * + * Every non-namespaced element is prefixed with the default namespace + * name which is passed as argument to this method. + * + * @return string + */ + public function getFullQualifiedName($defaultNamespaceName) + { + $name = $this->getName(); + if (!$this->_namespace) { + $name = $defaultNamespaceName . "." . $name; + } + return strtolower($name); + } + /** * Check if this identifier is quoted. * @@ -71,22 +142,25 @@ protected function isQuoted($identifier) /** * Trim quotes from the identifier. - * + * * @param string $identifier * @return string */ protected function trimQuotes($identifier) { - return trim($identifier, '`"'); + return str_replace(array('`', '"'), '', $identifier); } /** * Return name of this schema asset. - * + * * @return string */ public function getName() { + if ($this->_namespace) { + return $this->_namespace . "." . $this->_name; + } return $this->_name; } @@ -99,7 +173,13 @@ public function getName() */ public function getQuotedName(AbstractPlatform $platform) { - return ($this->_quoted) ? $platform->quoteIdentifier($this->_name) : $this->_name; + $keywords = $platform->getReservedKeywordsList(); + $parts = explode(".", $this->getName()); + foreach ($parts AS $k => $v) { + $parts[$k] = ($this->_quoted || $keywords->isKeyword($v)) ? $platform->quoteIdentifier($v) : $v; + } + + return implode(".", $parts); } /** @@ -116,28 +196,9 @@ public function getQuotedName(AbstractPlatform $platform) */ protected function _generateIdentifierName($columnNames, $prefix='', $maxSize=30) { - /*$columnCount = count($columnNames); - $postfixLen = strlen($postfix); - $parts = array_map(function($columnName) use($columnCount, $postfixLen, $maxSize) { - return substr($columnName, -floor(($maxSize-$postfixLen)/$columnCount - 1)); - }, $columnNames); - $parts[] = $postfix; - - $identifier = trim(implode("_", $parts), '_'); - // using implicit schema support of DB2 and Postgres there might be dots in the auto-generated - // identifier names which can easily be replaced by underscores. - $identifier = str_replace(".", "_", $identifier); - - if (is_numeric(substr($identifier, 0, 1))) { - $identifier = "i" . substr($identifier, 0, strlen($identifier)-1); - } - - return $identifier;*/ - - $hash = implode("", array_map(function($column) { return dechex(crc32($column)); }, $columnNames)); return substr(strtoupper($prefix . "_" . $hash), 0, $maxSize); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php index 39f6702427..57fd67a7f6 100644 --- a/src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Schema; +use Doctrine\DBAL\Events; +use Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs; +use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; use Doctrine\DBAL\Types; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Platforms\AbstractPlatform; @@ -73,7 +76,7 @@ public function getDatabasePlatform() } /** - * Try any method on the schema manager. Normally a method throws an + * Try any method on the schema manager. Normally a method throws an * exception when your DBMS doesn't support it or if an error occurs. * This method allows you to try and method on your SchemaManager * instance and will return false if it does not work or is not supported. @@ -126,7 +129,7 @@ public function listSequences($database = null) $sequences = $this->_conn->fetchAll($sql); - return $this->_getPortableSequencesList($sequences); + return $this->filterAssetNames($this->_getPortableSequencesList($sequences)); } /** @@ -153,7 +156,7 @@ public function listTableColumns($table, $database = null) $tableColumns = $this->_conn->fetchAll($sql); - return $this->_getPortableTableColumnList($tableColumns); + return $this->_getPortableTableColumnList($table, $database, $tableColumns); } /** @@ -175,7 +178,7 @@ public function listTableIndexes($table) /** * Return true if all the given tables exist. - * + * * @param array $tableNames * @return bool */ @@ -185,7 +188,6 @@ public function tablesExist($tableNames) return count($tableNames) == count(\array_intersect($tableNames, array_map('strtolower', $this->listTableNames()))); } - /** * Return a list of all tables in the current database * @@ -196,8 +198,34 @@ public function listTableNames() $sql = $this->_platform->getListTablesSQL(); $tables = $this->_conn->fetchAll($sql); + $tableNames = $this->_getPortableTablesList($tables); + return $this->filterAssetNames($tableNames); + } - return $this->_getPortableTablesList($tables); + /** + * Filter asset names if they are configured to return only a subset of all + * the found elements. + * + * @param array $assetNames + * @return array + */ + protected function filterAssetNames($assetNames) + { + $filterExpr = $this->getFilterSchemaAssetsExpression(); + if (!$filterExpr) { + return $assetNames; + } + return array_values ( + array_filter($assetNames, function ($assetName) use ($filterExpr) { + $assetName = ($assetName instanceof AbstractAsset) ? $assetName->getName() : $assetName; + return preg_match('(' . $filterExpr . ')', $assetName); + }) + ); + } + + protected function getFilterSchemaAssetsExpression() + { + return $this->_conn->getConfiguration()->getFilterSchemaAssetsExpression(); } /** @@ -268,7 +296,7 @@ public function listTableForeignKeys($table, $database = null) /** * Drops a database. - * + * * NOTE: You can not drop the database this SchemaManager is currently connected to. * * @param string $database The name of the database to drop @@ -473,8 +501,8 @@ public function dropAndCreateForeignKey(ForeignKeyConstraint $foreignKey, $table */ public function dropAndCreateSequence(Sequence $sequence) { - $this->tryMethod('createSequence', $seqName, $start, $allocationSize); - $this->createSequence($seqName, $start, $allocationSize); + $this->tryMethod('dropSequence', $sequence->getQuotedName($this->_platform)); + $this->createSequence($sequence); } /** @@ -618,14 +646,33 @@ protected function _getPortableSequenceDefinition($sequence) * * The name of the created column instance however is kept in its case. * - * @param array $tableColumns + * @param string $table The name of the table. + * @param string $database + * @param array $tableColumns * @return array */ - protected function _getPortableTableColumnList($tableColumns) + protected function _getPortableTableColumnList($table, $database, $tableColumns) { + $eventManager = $this->_platform->getEventManager(); + $list = array(); - foreach ($tableColumns as $key => $column) { - if ($column = $this->_getPortableTableColumnDefinition($column)) { + foreach ($tableColumns as $key => $tableColumn) { + $column = null; + $defaultPrevented = false; + + if (null !== $eventManager && $eventManager->hasListeners(Events::onSchemaColumnDefinition)) { + $eventArgs = new SchemaColumnDefinitionEventArgs($tableColumn, $table, $database, $this->_conn); + $eventManager->dispatchEvent(Events::onSchemaColumnDefinition, $eventArgs); + + $defaultPrevented = $eventArgs->isDefaultPrevented(); + $column = $eventArgs->getColumn(); + } + + if (!$defaultPrevented) { + $column = $this->_getPortableTableColumnDefinition($tableColumn); + } + + if ($column) { $name = strtolower($column->getQuotedName($this->_platform)); $list[$name] = $column; } @@ -670,9 +717,28 @@ protected function _getPortableTableIndexesList($tableIndexRows, $tableName=null } } + $eventManager = $this->_platform->getEventManager(); + $indexes = array(); foreach($result AS $indexKey => $data) { - $indexes[$indexKey] = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); + $index = null; + $defaultPrevented = false; + + if (null !== $eventManager && $eventManager->hasListeners(Events::onSchemaIndexDefinition)) { + $eventArgs = new SchemaIndexDefinitionEventArgs($data, $tableName, $this->_conn); + $eventManager->dispatchEvent(Events::onSchemaIndexDefinition, $eventArgs); + + $defaultPrevented = $eventArgs->isDefaultPrevented(); + $index = $eventArgs->getIndex(); + } + + if (!$defaultPrevented) { + $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); + } + + if ($index) { + $indexes[$indexKey] = $index; + } } return $indexes; @@ -752,7 +818,7 @@ protected function _execSql($sql) /** * Create a schema instance for the current database. - * + * * @return Schema */ public function createSchema() @@ -776,13 +842,35 @@ public function createSchemaConfig() $schemaConfig = new SchemaConfig(); $schemaConfig->setMaxIdentifierLength($this->_platform->getMaxIdentifierLength()); + $searchPaths = $this->getSchemaSearchPaths(); + if (isset($searchPaths[0])) { + $schemaConfig->setName($searchPaths[0]); + } + return $schemaConfig; } + /** + * The search path for namespaces in the currently connected database. + * + * The first entry is usually the default namespace in the Schema. All + * further namespaces contain tables/sequences which can also be addressed + * with a short, not full-qualified name. + * + * For databases that don't support subschema/namespaces this method + * returns the name of the currently connected database. + * + * @return array + */ + public function getSchemaSearchPaths() + { + return array($this->_conn->getDatabase()); + } + /** * Given a table comment this method tries to extract a typehint for Doctrine Type, or returns * the type given as default. - * + * * @param string $comment * @param string $currentType * @return string @@ -799,4 +887,4 @@ public function removeDoctrineTypeFromComment($comment, $type) { return str_replace('(DC2Type:'.$type.')', '', $comment); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/Column.php b/src/lib/Doctrine/DBAL/Schema/Column.php index 46e7fe501b..cb28bc8b35 100644 --- a/src/lib/Doctrine/DBAL/Schema/Column.php +++ b/src/lib/Doctrine/DBAL/Schema/Column.php @@ -93,9 +93,14 @@ class Column extends AbstractAsset */ protected $_comment = null; + /** + * @var array + */ + protected $_customSchemaOptions = array(); + /** * Create a new Column - * + * * @param string $columnName * @param Doctrine\DBAL\Types\Type $type * @param int $length @@ -340,6 +345,53 @@ public function getComment() return $this->_comment; } + /** + * @param string $name + * @param mixed $value + * @return Column + */ + public function setCustomSchemaOption($name, $value) + { + $this->_customSchemaOptions[$name] = $value; + return $this; + } + + /** + * @param string $name + * @return boolean + */ + public function hasCustomSchemaOption($name) + { + return isset($this->_customSchemaOptions[$name]); + } + + /** + * @param string $name + * @return mixed + */ + public function getCustomSchemaOption($name) + { + return $this->_customSchemaOptions[$name]; + } + + /** + * @param array $customSchemaOptions + * @return Column + */ + public function setCustomSchemaOptions(array $customSchemaOptions) + { + $this->_customSchemaOptions = $customSchemaOptions; + return $this; + } + + /** + * @return array + */ + public function getCustomSchemaOptions() + { + return $this->_customSchemaOptions; + } + /** * @param Visitor $visitor */ @@ -366,6 +418,6 @@ public function toArray() 'autoincrement' => $this->_autoincrement, 'columnDefinition' => $this->_columnDefinition, 'comment' => $this->_comment, - ), $this->_platformOptions); + ), $this->_platformOptions, $this->_customSchemaOptions); } } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Schema/Comparator.php b/src/lib/Doctrine/DBAL/Schema/Comparator.php index cccb7ce4fa..52b8ad8d0a 100644 --- a/src/lib/Doctrine/DBAL/Schema/Comparator.php +++ b/src/lib/Doctrine/DBAL/Schema/Comparator.php @@ -61,20 +61,24 @@ public function compare(Schema $fromSchema, Schema $toSchema) $foreignKeysToTable = array(); - foreach ( $toSchema->getTables() AS $tableName => $table ) { - if ( !$fromSchema->hasTable($tableName) ) { - $diff->newTables[$tableName] = $table; + foreach ( $toSchema->getTables() AS $table ) { + $tableName = $table->getShortestName($toSchema->getName()); + if ( ! $fromSchema->hasTable($tableName)) { + $diff->newTables[$tableName] = $toSchema->getTable($tableName); } else { - $tableDifferences = $this->diffTable( $fromSchema->getTable($tableName), $table ); - if ( $tableDifferences !== false ) { + $tableDifferences = $this->diffTable($fromSchema->getTable($tableName), $toSchema->getTable($tableName)); + if ($tableDifferences !== false) { $diff->changedTables[$tableName] = $tableDifferences; } } } /* Check if there are tables removed */ - foreach ( $fromSchema->getTables() AS $tableName => $table ) { - if ( !$toSchema->hasTable($tableName) ) { + foreach ($fromSchema->getTables() AS $table) { + $tableName = $table->getShortestName($fromSchema->getName()); + + $table = $fromSchema->getTable($tableName); + if ( ! $toSchema->hasTable($tableName) ) { $diff->removedTables[$tableName] = $table; } @@ -94,7 +98,8 @@ public function compare(Schema $fromSchema, Schema $toSchema) } } - foreach ( $toSchema->getSequences() AS $sequenceName => $sequence) { + foreach ($toSchema->getSequences() AS $sequence) { + $sequenceName = $sequence->getShortestName($toSchema->getName()); if (!$fromSchema->hasSequence($sequenceName)) { $diff->newSequences[] = $sequence; } else { @@ -104,7 +109,8 @@ public function compare(Schema $fromSchema, Schema $toSchema) } } - foreach ($fromSchema->getSequences() AS $sequenceName => $sequence) { + foreach ($fromSchema->getSequences() AS $sequence) { + $sequenceName = $sequence->getShortestName($fromSchema->getName()); if (!$toSchema->hasSequence($sequenceName)) { $diff->removedSequences[] = $sequence; } @@ -163,7 +169,7 @@ public function diffTable(Table $table1, Table $table2) $changes++; } } - + foreach ( $table1Columns as $columnName => $column ) { if ( $table2->hasColumn($columnName) ) { $changedProperties = $this->diffColumn( $column, $table2->getColumn($columnName) ); @@ -241,7 +247,7 @@ public function diffTable(Table $table1, Table $table2) /** * Try to find columns that only changed their name, rename operations maybe cheaper than add/drop * however ambiguouties between different possibilites should not lead to renaming at all. - * + * * @param TableDiff $tableDifferences */ private function detectColumnRenamings(TableDiff $tableDifferences) @@ -278,7 +284,7 @@ public function diffForeignKey(ForeignKeyConstraint $key1, ForeignKeyConstraint if (array_map('strtolower', $key1->getLocalColumns()) != array_map('strtolower', $key2->getLocalColumns())) { return true; } - + if (array_map('strtolower', $key1->getForeignColumns()) != array_map('strtolower', $key2->getForeignColumns())) { return true; } @@ -325,7 +331,10 @@ public function diffColumn(Column $column1, Column $column2) } if ($column1->getType() instanceof \Doctrine\DBAL\Types\StringType) { - if ($column1->getLength() != $column2->getLength()) { + // check if value of length is set at all, default value assumed otherwise. + $length1 = $column1->getLength() ?: 255; + $length2 = $column2->getLength() ?: 255; + if ($length1 != $length2) { $changedProperties[] = 'length'; } @@ -352,6 +361,21 @@ public function diffColumn(Column $column1, Column $column2) $changedProperties[] = 'comment'; } + $options1 = $column1->getCustomSchemaOptions(); + $options2 = $column2->getCustomSchemaOptions(); + + $commonKeys = array_keys(array_intersect_key($options1, $options2)); + + foreach ($commonKeys as $key) { + if ($options1[$key] !== $options2[$key]) { + $changedProperties[] = $key; + } + } + + $diffKeys = array_keys(array_diff_key($options1, $options2) + array_diff_key($options2, $options1)); + + $changedProperties = array_merge($changedProperties, $diffKeys); + return $changedProperties; } diff --git a/src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php b/src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php index 280647b212..4e41effa53 100644 --- a/src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php @@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Schema; +use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; + /** * IBM Db2 Schema Manager * @@ -46,7 +48,7 @@ public function listTableNames() $sql .= " AND CREATOR = UPPER('".$this->_conn->getUsername()."')"; $tables = $this->_conn->fetchAll($sql); - + return $this->_getPortableTablesList($tables); } @@ -68,7 +70,7 @@ protected function _getPortableTableColumnDefinition($tableColumn) $precision = false; $type = $this->_platform->getDoctrineTypeMapping($tableColumn['typename']); - + switch (strtolower($tableColumn['typename'])) { case 'varchar': $length = $tableColumn['length']; @@ -120,6 +122,8 @@ protected function _getPortableTablesList($tables) protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) { + $eventManager = $this->_platform->getEventManager(); + $tableIndexRows = array(); $indexes = array(); foreach($tableIndexes AS $indexKey => $data) { @@ -134,7 +138,31 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) $keyName = $indexName; } - $indexes[$keyName] = new Index($indexName, explode("+", ltrim($data['colnames'], '+')), $unique, $primary); + $data = array( + 'name' => $indexName, + 'columns' => explode("+", ltrim($data['colnames'], '+')), + 'unique' => $unique, + 'primary' => $primary + ); + + $index = null; + $defaultPrevented = false; + + if (null !== $eventManager && $eventManager->hasListeners(Events::onSchemaIndexDefinition)) { + $eventArgs = new SchemaIndexDefinitionEventArgs($data, $tableName, $this->_conn); + $eventManager->dispatchEvent(Events::onSchemaIndexDefinition, $eventArgs); + + $defaultPrevented = $eventArgs->isDefaultPrevented(); + $index = $eventArgs->getIndex(); + } + + if (!$defaultPrevented) { + $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); + } + + if ($index) { + $indexes[$indexKey] = $index; + } } return $indexes; diff --git a/src/lib/Doctrine/DBAL/Schema/Index.php b/src/lib/Doctrine/DBAL/Schema/Index.php index 22c9421f5a..5a8e6c3719 100644 --- a/src/lib/Doctrine/DBAL/Schema/Index.php +++ b/src/lib/Doctrine/DBAL/Schema/Index.php @@ -76,10 +76,10 @@ public function getColumns() { return $this->_columns; } - + /** * Is the index neither unique nor primary key? - * + * * @return bool */ public function isSimpleIndex() diff --git a/src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index b3fce1d323..ffa310544e 100644 --- a/src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -61,7 +61,7 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) } $tableIndexes[$k] = $v; } - + return parent::_getPortableTableIndexesList($tableIndexes, $tableName); } @@ -74,12 +74,12 @@ protected function _getPortableDatabaseDefinition($database) { return $database['Database']; } - + /** * Gets a portable column definition. - * + * * The database type is mapped to a corresponding Doctrine mapping type. - * + * * @param $tableColumn * @return array */ @@ -102,10 +102,10 @@ protected function _getPortableTableColumnDefinition($tableColumn) if ( ! isset($tableColumn['name'])) { $tableColumn['name'] = ''; } - + $scale = null; $precision = null; - + $type = $this->_platform->getDoctrineTypeMapping($dbType); $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type); $tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type); @@ -154,7 +154,7 @@ protected function _getPortableTableColumnDefinition($tableColumn) 'length' => $length, 'unsigned' => (bool)$unsigned, 'fixed' => (bool)$fixed, - 'default' => $tableColumn['default'], + 'default' => isset($tableColumn['default']) ? $tableColumn['default'] : null, 'notnull' => (bool) ($tableColumn['null'] != 'YES'), 'scale' => null, 'precision' => null, @@ -170,26 +170,44 @@ protected function _getPortableTableColumnDefinition($tableColumn) return new Column($tableColumn['field'], \Doctrine\DBAL\Types\Type::getType($type), $options); } - public function _getPortableTableForeignKeyDefinition($tableForeignKey) + protected function _getPortableTableForeignKeysList($tableForeignKeys) { - $tableForeignKey = array_change_key_case($tableForeignKey, CASE_LOWER); + $list = array(); + foreach ($tableForeignKeys as $key => $value) { + $value = array_change_key_case($value, CASE_LOWER); + if (!isset($list[$value['constraint_name']])) { + if (!isset($value['delete_rule']) || $value['delete_rule'] == "RESTRICT") { + $value['delete_rule'] = null; + } + if (!isset($value['update_rule']) || $value['update_rule'] == "RESTRICT") { + $value['update_rule'] = null; + } - if (!isset($tableForeignKey['delete_rule']) || $tableForeignKey['delete_rule'] == "RESTRICT") { - $tableForeignKey['delete_rule'] = null; + $list[$value['constraint_name']] = array( + 'name' => $value['constraint_name'], + 'local' => array(), + 'foreign' => array(), + 'foreignTable' => $value['referenced_table_name'], + 'onDelete' => $value['delete_rule'], + 'onUpdate' => $value['update_rule'], + ); + } + $list[$value['constraint_name']]['local'][] = $value['column_name']; + $list[$value['constraint_name']]['foreign'][] = $value['referenced_column_name']; } - if (!isset($tableForeignKey['update_rule']) || $tableForeignKey['update_rule'] == "RESTRICT") { - $tableForeignKey['update_rule'] = null; + + $result = array(); + foreach($list AS $constraint) { + $result[] = new ForeignKeyConstraint( + array_values($constraint['local']), $constraint['foreignTable'], + array_values($constraint['foreign']), $constraint['name'], + array( + 'onDelete' => $constraint['onDelete'], + 'onUpdate' => $constraint['onUpdate'], + ) + ); } - - return new ForeignKeyConstraint( - (array)$tableForeignKey['column_name'], - $tableForeignKey['referenced_table_name'], - (array)$tableForeignKey['referenced_column_name'], - $tableForeignKey['constraint_name'], - array( - 'onUpdate' => $tableForeignKey['update_rule'], - 'onDelete' => $tableForeignKey['delete_rule'], - ) - ); + + return $result; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php b/src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php index 79f955a4c5..3bbefb6b8a 100644 --- a/src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php @@ -89,7 +89,7 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) protected function _getPortableTableColumnDefinition($tableColumn) { $tableColumn = \array_change_key_case($tableColumn, CASE_LOWER); - + $dbType = strtolower($tableColumn['data_type']); if(strpos($dbType, "timestamp(") === 0) { if (strpos($dbType, "WITH TIME ZONE")) { diff --git a/src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php index 7ae2a1b5e7..80ac9a7f03 100644 --- a/src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -21,27 +21,90 @@ namespace Doctrine\DBAL\Schema; /** - * xxx + * PostgreSQL Schema Manager * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @author Konsta Vesterinen * @author Lukas Smith (PEAR MDB2 library) * @author Benjamin Eberlei - * @version $Revision$ * @since 2.0 */ class PostgreSqlSchemaManager extends AbstractSchemaManager { + /** + * @var array + */ + private $existingSchemaPaths; + + /** + * Get all the existing schema names. + * + * @return array + */ + public function getSchemaNames() + { + $rows = $this->_conn->fetchAll('SELECT schema_name FROM information_schema.schemata'); + return array_map(function($v) { return $v['schema_name']; }, $rows); + } + + /** + * Return an array of schema search paths + * + * This is a PostgreSQL only function. + * + * @return array + */ + public function getSchemaSearchPaths() + { + $params = $this->_conn->getParams(); + $schema = explode(",", $this->_conn->fetchColumn('SHOW search_path')); + if (isset($params['user'])) { + $schema = str_replace('"$user"', $params['user'], $schema); + } + return $schema; + } + + /** + * Get names of all existing schemas in the current users search path. + * + * This is a PostgreSQL only function. + * + * @return array + */ + public function getExistingSchemaSearchPaths() + { + if ($this->existingSchemaPaths === null) { + $this->determineExistingSchemaSearchPaths(); + } + return $this->existingSchemaPaths; + } + + /** + * Use this to set or reset the order of the existing schemas in the current search path of the user + * + * This is a PostgreSQL only function. + * + * @return type + */ + public function determineExistingSchemaSearchPaths() + { + $names = $this->getSchemaNames(); + $paths = $this->getSchemaSearchPaths(); + + $this->existingSchemaPaths = array_filter($paths, function ($v) use ($names) { + return in_array($v, $names); + }); + } protected function _getPortableTableForeignKeyDefinition($tableForeignKey) { $onUpdate = null; $onDelete = null; - if (preg_match('(ON UPDATE ([a-zA-Z0-9]+))', $tableForeignKey['condef'], $match)) { + if (preg_match('(ON UPDATE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) { $onUpdate = $match[1]; } - if (preg_match('(ON DELETE ([a-zA-Z0-9]+))', $tableForeignKey['condef'], $match)) { + if (preg_match('(ON DELETE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) { $onDelete = $match[1]; } @@ -111,7 +174,10 @@ protected function _getPortableUserDefinition($user) protected function _getPortableTableDefinition($table) { - if ($table['schema_name'] == 'public') { + $schemas = $this->getExistingSchemaSearchPaths(); + $firstSchema = array_shift($schemas); + + if ($table['schema_name'] == $firstSchema) { return $table['table_name']; } else { return $table['schema_name'] . "." . $table['table_name']; @@ -151,7 +217,7 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) } } } - return parent::_getPortableTableIndexesList($buffer); + return parent::_getPortableTableIndexesList($buffer, $tableName); } protected function _getPortableDatabaseDefinition($database) @@ -210,9 +276,8 @@ protected function _getPortableTableColumnDefinition($tableColumn) $precision = null; $scale = null; - if ($this->_platform->hasDoctrineTypeMappingFor($tableColumn['type'])) { - $dbType = strtolower($tableColumn['type']); - } else { + $dbType = strtolower($tableColumn['type']); + if (strlen($tableColumn['domain_type']) && !$this->_platform->hasDoctrineTypeMappingFor($tableColumn['type'])) { $dbType = strtolower($tableColumn['domain_type']); $tableColumn['complete_type'] = $tableColumn['domain_complete_type']; } @@ -271,6 +336,10 @@ protected function _getPortableTableColumnDefinition($tableColumn) break; } + if ($tableColumn['default'] && preg_match("('([^']+)'::)", $tableColumn['default'], $match)) { + $tableColumn['default'] = $match[1]; + } + $options = array( 'length' => $length, 'notnull' => (bool) $tableColumn['isnotnull'], @@ -287,4 +356,4 @@ protected function _getPortableTableColumnDefinition($tableColumn) return new Column($tableColumn['field'], \Doctrine\DBAL\Types\Type::getType($type), $options); } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php b/src/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php similarity index 75% rename from src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php rename to src/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php index b09518a1bf..0d6c668dea 100644 --- a/src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -19,19 +19,20 @@ namespace Doctrine\DBAL\Schema; +use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; +use Doctrine\DBAL\Events; + /** - * xxx + * SQL Server Schema Manager * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @author Konsta Vesterinen * @author Lukas Smith (PEAR MDB2 library) * @author Juozas Kaziukenas - * @version $Revision$ * @since 2.0 */ -class MsSqlSchemaManager extends AbstractSchemaManager +class SQLServerSchemaManager extends AbstractSchemaManager { - /** * @override */ @@ -55,7 +56,7 @@ protected function _getPortableTableColumnDefinition($tableColumn) $default = $tableColumn['COLUMN_DEF']; while ($default != ($default2 = preg_replace("/^\((.*)\)$/", '$1', $default))) { - $default = $default2; + $default = trim($default2, "'"); } $length = (int) $tableColumn['LENGTH']; @@ -119,9 +120,28 @@ protected function _getPortableTableIndexesList($tableIndexRows, $tableName=null ); } + $eventManager = $this->_platform->getEventManager(); + $indexes = array(); foreach ($result AS $indexKey => $data) { - $indexes[$indexKey] = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); + $index = null; + $defaultPrevented = false; + + if (null !== $eventManager && $eventManager->hasListeners(Events::onSchemaIndexDefinition)) { + $eventArgs = new SchemaIndexDefinitionEventArgs($data, $tableName, $this->_conn); + $eventManager->dispatchEvent(Events::onSchemaIndexDefinition, $eventArgs); + + $defaultPrevented = $eventArgs->isDefaultPrevented(); + $index = $eventArgs->getIndex(); + } + + if (!$defaultPrevented) { + $index = new Index($data['name'], $data['columns'], $data['unique'], $data['primary']); + } + + if ($index) { + $indexes[$indexKey] = $index; + } } return $indexes; @@ -169,4 +189,28 @@ protected function _getPortableViewDefinition($view) return new View($view['name'], null); } -} \ No newline at end of file + /** + * List the indexes for a given table returning an array of Index instances. + * + * Keys of the portable indexes list are all lower-cased. + * + * @param string $table The name of the table + * @return Index[] $tableIndexes + */ + public function listTableIndexes($table) + { + $sql = $this->_platform->getListTableIndexesSQL($table, $this->_conn->getDatabase()); + + try { + $tableIndexes = $this->_conn->fetchAll($sql); + } catch(\PDOException $e) { + if ($e->getCode() == "IMSSP") { + return array(); + } else { + throw $e; + } + } + + return $this->_getPortableTableIndexesList($tableIndexes, $table); + } +} diff --git a/src/lib/Doctrine/DBAL/Schema/Schema.php b/src/lib/Doctrine/DBAL/Schema/Schema.php index 89243f817d..2c1b642c57 100644 --- a/src/lib/Doctrine/DBAL/Schema/Schema.php +++ b/src/lib/Doctrine/DBAL/Schema/Schema.php @@ -1,7 +1,5 @@ */ class Schema extends AbstractAsset @@ -40,7 +58,7 @@ class Schema extends AbstractAsset * @var array */ protected $_tables = array(); - + /** * @var array */ @@ -64,6 +82,7 @@ public function __construct(array $tables=array(), array $sequences=array(), Sch $schemaConfig = new SchemaConfig(); } $this->_schemaConfig = $schemaConfig; + $this->_setName($schemaConfig->getName() ?: 'public'); foreach ($tables AS $table) { $this->_addTable($table); @@ -86,7 +105,7 @@ public function hasExplicitForeignKeyIndexes() */ protected function _addTable(Table $table) { - $tableName = strtolower($table->getName()); + $tableName = $table->getFullQualifiedName($this->getName()); if(isset($this->_tables[$tableName])) { throw SchemaException::tableAlreadyExists($tableName); } @@ -100,7 +119,7 @@ protected function _addTable(Table $table) */ protected function _addSequence(Sequence $sequence) { - $seqName = strtolower($sequence->getName()); + $seqName = $sequence->getFullQualifiedName($this->getName()); if (isset($this->_sequences[$seqName])) { throw SchemaException::sequenceAlreadyExists($seqName); } @@ -109,7 +128,7 @@ protected function _addSequence(Sequence $sequence) /** * Get all tables of this schema. - * + * * @return array */ public function getTables() @@ -123,7 +142,7 @@ public function getTables() */ public function getTable($tableName) { - $tableName = strtolower($tableName); + $tableName = $this->getFullQualifiedAssetName($tableName); if (!isset($this->_tables[$tableName])) { throw SchemaException::tableDoesNotExist($tableName); } @@ -131,25 +150,46 @@ public function getTable($tableName) return $this->_tables[$tableName]; } + /** + * @return string + */ + private function getFullQualifiedAssetName($name) + { + if ($this->isQuoted($name)) { + $name = $this->trimQuotes($name); + } + if (strpos($name, ".") === false) { + $name = $this->getName() . "." . $name; + } + return strtolower($name); + } + /** * Does this schema have a table with the given name? - * + * * @param string $tableName * @return Schema */ public function hasTable($tableName) { - $tableName = strtolower($tableName); + $tableName = $this->getFullQualifiedAssetName($tableName); return isset($this->_tables[$tableName]); } /** - * @param string $sequenceName - * @return bool + * Get all table names, prefixed with a schema name, even the default one + * if present. + * + * @return array */ + public function getTableNames() + { + return array_keys($this->_tables); + } + public function hasSequence($sequenceName) { - $sequenceName = strtolower($sequenceName); + $sequenceName = $this->getFullQualifiedAssetName($sequenceName); return isset($this->_sequences[$sequenceName]); } @@ -160,7 +200,7 @@ public function hasSequence($sequenceName) */ public function getSequence($sequenceName) { - $sequenceName = strtolower($sequenceName); + $sequenceName = $this->getFullQualifiedAssetName($sequenceName); if(!$this->hasSequence($sequenceName)) { throw SchemaException::sequenceDoesNotExist($sequenceName); } @@ -177,7 +217,7 @@ public function getSequences() /** * Create a new table - * + * * @param string $tableName * @return Table */ @@ -213,7 +253,7 @@ public function renameTable($oldTableName, $newTableName) */ public function dropTable($tableName) { - $tableName = strtolower($tableName); + $tableName = $this->getFullQualifiedAssetName($tableName); $table = $this->getTable($tableName); unset($this->_tables[$tableName]); return $this; @@ -221,7 +261,7 @@ public function dropTable($tableName) /** * Create a new sequence - * + * * @param string $sequenceName * @param int $allocationSize * @param int $initialValue @@ -240,7 +280,7 @@ public function createSequence($sequenceName, $allocationSize=1, $initialValue=1 */ public function dropSequence($sequenceName) { - $sequenceName = strtolower($sequenceName); + $sequenceName = $this->getFullQualifiedAssetName($sequenceName); unset($this->_sequences[$sequenceName]); return $this; } @@ -301,7 +341,7 @@ public function getMigrateFromSql(Schema $fromSchema, \Doctrine\DBAL\Platforms\A public function visit(Visitor $visitor) { $visitor->acceptSchema($this); - + foreach ($this->_tables AS $table) { $table->visit($visitor); } diff --git a/src/lib/Doctrine/DBAL/Schema/SchemaConfig.php b/src/lib/Doctrine/DBAL/Schema/SchemaConfig.php index 291babb4a3..d4961f432b 100644 --- a/src/lib/Doctrine/DBAL/Schema/SchemaConfig.php +++ b/src/lib/Doctrine/DBAL/Schema/SchemaConfig.php @@ -1,7 +1,5 @@ */ class SchemaConfig @@ -42,6 +39,11 @@ class SchemaConfig */ protected $_maxIdentifierLength = 63; + /** + * @var string + */ + protected $_name; + /** * @return bool */ @@ -73,4 +75,24 @@ public function getMaxIdentifierLength() { return $this->_maxIdentifierLength; } -} \ No newline at end of file + + /** + * Get default namespace of schema objects. + * + * @return string + */ + public function getName() + { + return $this->_name; + } + + /** + * set default namespace name of schema objects. + * + * @param _name the value to set. + */ + public function setName($name) + { + $this->_name = $name; + } +} diff --git a/src/lib/Doctrine/DBAL/Schema/Sequence.php b/src/lib/Doctrine/DBAL/Schema/Sequence.php index 7d6075f605..6344cc7125 100644 --- a/src/lib/Doctrine/DBAL/Schema/Sequence.php +++ b/src/lib/Doctrine/DBAL/Schema/Sequence.php @@ -66,7 +66,7 @@ public function getInitialValue() { return $this->_initialValue; } - + public function setAllocationSize($allocationSize) { $this->_allocationSize = (is_numeric($allocationSize))?$allocationSize:1; diff --git a/src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php b/src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php index e395b155b8..9e912991de 100644 --- a/src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php +++ b/src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php @@ -33,7 +33,7 @@ class SqliteSchemaManager extends AbstractSchemaManager { /** * {@inheritdoc} - * + * * @override */ public function dropDatabase($database) @@ -45,7 +45,7 @@ public function dropDatabase($database) /** * {@inheritdoc} - * + * * @override */ public function createDatabase($database) @@ -93,18 +93,21 @@ protected function _getPortableTableIndexesList($tableIndexes, $tableName=null) // fetch regular indexes foreach($tableIndexes AS $tableIndex) { - $keyName = $tableIndex['name']; - $idx = array(); - $idx['key_name'] = $keyName; - $idx['primary'] = false; - $idx['non_unique'] = $tableIndex['unique']?false:true; - - $stmt = $this->_conn->executeQuery( "PRAGMA INDEX_INFO ( '{$keyName}' )" ); - $indexArray = $stmt->fetchAll(\PDO::FETCH_ASSOC); - - foreach ( $indexArray as $indexColumnRow ) { - $idx['column_name'] = $indexColumnRow['name']; - $indexBuffer[] = $idx; + // Ignore indexes with reserved names, e.g. autoindexes + if (strpos($tableIndex['name'], 'sqlite_') !== 0) { + $keyName = $tableIndex['name']; + $idx = array(); + $idx['key_name'] = $keyName; + $idx['primary'] = false; + $idx['non_unique'] = $tableIndex['unique']?false:true; + + $stmt = $this->_conn->executeQuery( "PRAGMA INDEX_INFO ( '{$keyName}' )" ); + $indexArray = $stmt->fetchAll(\PDO::FETCH_ASSOC); + + foreach ( $indexArray as $indexColumnRow ) { + $idx['column_name'] = $indexColumnRow['name']; + $indexBuffer[] = $idx; + } } } @@ -137,6 +140,10 @@ protected function _getPortableTableColumnDefinition($tableColumn) if ($default == 'NULL') { $default = null; } + if ($default !== null) { + // SQLite returns strings wrapped in single quotes, so we need to strip them + $default = preg_replace("/^'(.*)'$/", '\1', $default); + } $notnull = (bool) $tableColumn['notnull']; if ( ! isset($tableColumn['name'])) { @@ -170,7 +177,7 @@ protected function _getPortableTableColumnDefinition($tableColumn) 'default' => $default, 'precision' => $precision, 'scale' => $scale, - 'autoincrement' => (bool) $tableColumn['pk'], + 'autoincrement' => false, ); return new Column($tableColumn['name'], \Doctrine\DBAL\Types\Type::getType($type), $options); diff --git a/src/lib/Doctrine/DBAL/Schema/Table.php b/src/lib/Doctrine/DBAL/Schema/Table.php index 320bb60a4e..b7e3d04a57 100644 --- a/src/lib/Doctrine/DBAL/Schema/Table.php +++ b/src/lib/Doctrine/DBAL/Schema/Table.php @@ -88,11 +88,11 @@ public function __construct($tableName, array $columns=array(), array $indexes=a $this->_setName($tableName); $this->_idGeneratorType = $idGeneratorType; - + foreach ($columns AS $column) { $this->_addColumn($column); } - + foreach ($indexes AS $idx) { $this->_addIndex($idx); } @@ -167,7 +167,7 @@ public function addIndex(array $columnNames, $indexName = null) */ public function addUniqueIndex(array $columnNames, $indexName = null) { - if ($indexName == null) { + if ($indexName === null) { $indexName = $this->_generateIdentifierName( array_merge(array($this->getName()), $columnNames), "uniq", $this->_getMaxIdentifierLength() ); @@ -252,7 +252,7 @@ public function renameColumn($oldColumnName, $newColumnName) /** * Change Column Details - * + * * @param string $columnName * @param array $options * @return Table @@ -266,7 +266,7 @@ public function changeColumn($columnName, array $options) /** * Drop Column from Table - * + * * @param string $columnName * @return Table */ @@ -288,12 +288,13 @@ public function dropColumn($columnName) * @param array $localColumns * @param array $foreignColumns * @param array $options + * @param string $constraintName * @return Table */ - public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array()) + public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array(), $constraintName = null) { - $name = $this->_generateIdentifierName(array_merge((array)$this->getName(), $localColumnNames), "fk", $this->_getMaxIdentifierLength()); - return $this->addNamedForeignKeyConstraint($name, $foreignTable, $localColumnNames, $foreignColumnNames, $options); + $constraintName = $constraintName ?: $this->_generateIdentifierName(array_merge((array)$this->getName(), $localColumnNames), "fk", $this->_getMaxIdentifierLength()); + return $this->addNamedForeignKeyConstraint($constraintName, $foreignTable, $localColumnNames, $foreignColumnNames, $options); } /** @@ -301,6 +302,7 @@ public function addForeignKeyConstraint($foreignTable, array $localColumnNames, * * Name is to be generated by the database itsself. * + * @deprecated Use {@link addForeignKeyConstraint} * @param Table $foreignTable * @param array $localColumns * @param array $foreignColumns @@ -309,12 +311,13 @@ public function addForeignKeyConstraint($foreignTable, array $localColumnNames, */ public function addUnnamedForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array()) { - return $this->addNamedForeignKeyConstraint(null, $foreignTable, $localColumnNames, $foreignColumnNames, $options); + return $this->addForeignKeyConstraint($foreignTable, $localColumnNames, $foreignColumnNames, $options); } /** * Add a foreign key constraint with a given name * + * @deprecated Use {@link addForeignKeyConstraint} * @param string $name * @param Table $foreignTable * @param array $localColumns @@ -341,7 +344,7 @@ public function addNamedForeignKeyConstraint($name, $foreignTable, array $localC throw SchemaException::columnDoesNotExist($columnName, $this->_name); } } - + $constraint = new ForeignKeyConstraint( $localColumnNames, $foreignTableName, $foreignColumnNames, $name, $options ); @@ -378,7 +381,7 @@ protected function _addColumn(Column $column) /** * Add index to table - * + * * @param Index $indexCandidate * @return Table */ @@ -419,7 +422,7 @@ protected function _addIndex(Index $indexCandidate) protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint) { $constraint->setLocalTable($this); - + if(strlen($constraint->getName())) { $name = $constraint->getName(); } else { @@ -462,6 +465,16 @@ public function getForeignKey($constraintName) return $this->_fkConstraints[$constraintName]; } + public function removeForeignKey($constraintName) + { + $constraintName = strtolower($constraintName); + if(!$this->hasForeignKey($constraintName)) { + throw SchemaException::foreignKeyDoesNotExist($constraintName, $this->_name); + } + + unset($this->_fkConstraints[$constraintName]); + } + /** * @return Column[] */ @@ -472,7 +485,7 @@ public function getColumns() $pkCols = array(); $fkCols = array(); - if ($this->hasIndex($this->_primaryKeyName)) { + if ($this->hasPrimaryKey()) { $pkCols = $this->getPrimaryKey()->getColumns(); } foreach ($this->getForeignKeys() AS $fk) { @@ -502,7 +515,7 @@ public function hasColumn($columnName) /** * Get a column instance - * + * * @param string $columnName * @return Column */ @@ -517,10 +530,13 @@ public function getColumn($columnName) } /** - * @return Index + * @return Index|null */ public function getPrimaryKey() { + if (!$this->hasPrimaryKey()) { + return null; + } return $this->getIndex($this->_primaryKeyName); } @@ -626,4 +642,4 @@ public function __clone() $this->_fkConstraints[$k]->setLocalTable($this); } } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/TableDiff.php b/src/lib/Doctrine/DBAL/Schema/TableDiff.php index 3351a23933..5f99ce29e6 100644 --- a/src/lib/Doctrine/DBAL/Schema/TableDiff.php +++ b/src/lib/Doctrine/DBAL/Schema/TableDiff.php @@ -1,7 +1,5 @@ */ class TableDiff @@ -61,7 +58,7 @@ class TableDiff /** * All removed fields * - * @var array(string=>bool) + * @var array(string=>Column) */ public $removedColumns = array(); @@ -136,4 +133,4 @@ public function __construct($tableName, $addedColumns = array(), $this->changedIndexes = $changedIndexes; $this->removedIndexes = $removedIndexes; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php b/src/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php index 212fa2b3d3..d0a5ac4408 100644 --- a/src/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php +++ b/src/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php @@ -83,7 +83,7 @@ public function acceptTable(Table $table) public function acceptColumn(Table $table, Column $column) { - + } /** @@ -96,7 +96,7 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons if ($this->_platform->supportsForeignKeyConstraints()) { $this->_createFkConstraintQueries = array_merge($this->_createFkConstraintQueries, (array) $this->_platform->getCreateForeignKeySQL( - $fkConstraint, $localTable->getQuotedName($this->_platform) + $fkConstraint, $localTable ) ); } @@ -108,7 +108,7 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons */ public function acceptIndex(Table $table, Index $index) { - + } /** diff --git a/src/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php b/src/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php index a5da493e2f..f59a7ea584 100644 --- a/src/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php +++ b/src/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php @@ -36,38 +36,38 @@ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision$ * @author Benjamin Eberlei */ class DropSchemaSqlCollector implements Visitor { /** - * @var array + * @var \SplObjectStorage */ - private $_constraints = array(); - + private $constraints; + /** - * @var array + * @var \SplObjectStorage */ - private $_sequences = array(); + private $sequences; /** - * @var array + * @var \SplObjectStorage */ - private $_tables = array(); + private $tables; /** * * @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $_platform = null; + private $platform; /** * @param AbstractPlatform $platform */ public function __construct(AbstractPlatform $platform) { - $this->_platform = $platform; + $this->platform = $platform; + $this->clearQueries(); } /** @@ -75,7 +75,7 @@ public function __construct(AbstractPlatform $platform) */ public function acceptSchema(Schema $schema) { - + } /** @@ -83,7 +83,7 @@ public function acceptSchema(Schema $schema) */ public function acceptTable(Table $table) { - $this->_tables[] = $this->_platform->getDropTableSQL($table->getQuotedName($this->_platform)); + $this->tables->attach($table); } /** @@ -91,7 +91,7 @@ public function acceptTable(Table $table) */ public function acceptColumn(Table $table, Column $column) { - + } /** @@ -104,7 +104,8 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons throw SchemaException::namedForeignKeyRequired($localTable, $fkConstraint); } - $this->_constraints[] = $this->_platform->getDropForeignKeySQL($fkConstraint->getQuotedName($this->_platform), $localTable->getQuotedName($this->_platform)); + $this->constraints->attach($fkConstraint); + $this->constraints[$fkConstraint] = $localTable; } /** @@ -113,7 +114,7 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons */ public function acceptIndex(Table $table, Index $index) { - + } /** @@ -121,15 +122,17 @@ public function acceptIndex(Table $table, Index $index) */ public function acceptSequence(Sequence $sequence) { - $this->_sequences[] = $this->_platform->getDropSequenceSQL($sequence->getQuotedName($this->_platform)); + $this->sequences->attach($sequence); } /** - * @return array + * @return void */ public function clearQueries() { - $this->_constraints = $this->_sequences = $this->_tables = array(); + $this->constraints = new \SplObjectStorage(); + $this->sequences = new \SplObjectStorage(); + $this->tables = new \SplObjectStorage(); } /** @@ -137,6 +140,20 @@ public function clearQueries() */ public function getQueries() { - return array_merge($this->_constraints, $this->_sequences, $this->_tables); + $sql = array(); + foreach ($this->constraints AS $fkConstraint) { + $localTable = $this->constraints[$fkConstraint]; + $sql[] = $this->platform->getDropForeignKeySQL($fkConstraint, $localTable); + } + + foreach ($this->sequences AS $sequence) { + $sql[] = $this->platform->getDropSequenceSQL($sequence); + } + + foreach ($this->tables AS $table) { + $sql[] = $this->platform->getDropTableSQL($table); + } + + return $sql; } } diff --git a/src/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php b/src/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php index 0898c899fc..762f551eec 100644 --- a/src/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php +++ b/src/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php @@ -35,7 +35,7 @@ class Graphviz implements \Doctrine\DBAL\Schema\Visitor\Visitor public function acceptColumn(Table $table, Column $column) { - + } public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) @@ -53,7 +53,7 @@ public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkCons public function acceptIndex(Table $table, Index $index) { - + } public function acceptSchema(Schema $schema) @@ -68,7 +68,7 @@ public function acceptSchema(Schema $schema) public function acceptSequence(Sequence $sequence) { - + } public function acceptTable(Table $table) @@ -99,7 +99,7 @@ private function createTableLabel( Table $table ) $label .= '' . $columnLabel . ''; $label .= '' . strtolower($column->getType()) . ''; $label .= ''; - if (in_array($column->getName(), $table->getPrimaryKey()->getColumns())) { + if ($table->hasPrimaryKey() && in_array($column->getName(), $table->getPrimaryKey()->getColumns())) { $label .= "\xe2\x9c\xb7"; } $label .= ''; @@ -139,7 +139,7 @@ private function createNodeRelation( $node1, $node2, $options ) * You have to convert the output into a viewable format. For example use "neato" on linux systems * and execute: * - * neato -Tpng -o er.png er.dot + * neato -Tpng -o er.png er.dot * * @param string $filename * @return void diff --git a/src/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php b/src/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php new file mode 100644 index 0000000000..f5db5af190 --- /dev/null +++ b/src/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php @@ -0,0 +1,113 @@ +. + */ + +namespace Doctrine\DBAL\Schema\Visitor; + +use Doctrine\DBAL\Platforms\AbstractPlatform, + Doctrine\DBAL\Schema\Table, + Doctrine\DBAL\Schema\Schema, + Doctrine\DBAL\Schema\Column, + Doctrine\DBAL\Schema\ForeignKeyConstraint, + Doctrine\DBAL\Schema\Constraint, + Doctrine\DBAL\Schema\Sequence, + Doctrine\DBAL\Schema\Index; + +/** + * Remove assets from a schema that are not in the default namespace. + * + * Some databases such as MySQL support cross databases joins, but don't + * allow to call DDLs to a database from another connected database. + * Before a schema is serialized into SQL this visitor can cleanup schemas with + * non default namespaces. + * + * This visitor filters all these non-default namespaced tables and sequences + * and removes them from the SChema instance. + * + * @author Benjamin Eberlei + * @since 2.2 + */ +class RemoveNamespacedAssets implements Visitor +{ + /** + * @var Schema + */ + private $schema; + + /** + * @param Schema $schema + */ + public function acceptSchema(Schema $schema) + { + $this->schema = $schema; + } + + /** + * @param Table $table + */ + public function acceptTable(Table $table) + { + if ( ! $table->isInDefaultNamespace($this->schema->getName()) ) { + $this->schema->dropTable($table->getName()); + } + } + /** + * @param Sequence $sequence + */ + public function acceptSequence(Sequence $sequence) + { + if ( ! $sequence->isInDefaultNamespace($this->schema->getName()) ) { + $this->schema->dropSequence($sequence->getName()); + } + } + + /** + * @param Column $column + */ + public function acceptColumn(Table $table, Column $column) + { + } + + /** + * @param Table $localTable + * @param ForeignKeyConstraint $fkConstraint + */ + public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) + { + // The table may already be deleted in a previous + // RemoveNamespacedAssets#acceptTable call. Removing Foreign keys that + // point to nowhere. + if ( ! $this->schema->hasTable($fkConstraint->getForeignTableName())) { + $localTable->removeForeignKey($fkConstraint->getName()); + return; + } + + $foreignTable = $this->schema->getTable($fkConstraint->getForeignTableName()); + if ( ! $foreignTable->isInDefaultNamespace($this->schema->getName()) ) { + $localTable->removeForeignKey($fkConstraint->getName()); + } + } + + /** + * @param Table $table + * @param Index $index + */ + public function acceptIndex(Table $table, Index $index) + { + } +} diff --git a/src/lib/Doctrine/DBAL/Statement.php b/src/lib/Doctrine/DBAL/Statement.php index 45f12434a7..4c677cb4bb 100644 --- a/src/lib/Doctrine/DBAL/Statement.php +++ b/src/lib/Doctrine/DBAL/Statement.php @@ -28,32 +28,32 @@ /** * A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support * for logging, DBAL mapping types, etc. - * + * * @author Roman Borschel * @since 2.0 */ -class Statement implements DriverStatement +class Statement implements \IteratorAggregate, DriverStatement { /** * @var string The SQL statement. */ - private $_sql; + protected $sql; /** * @var array The bound parameters. */ - private $_params = array(); + protected $params = array(); /** * @var Doctrine\DBAL\Driver\Statement The underlying driver statement. */ - private $_stmt; + protected $stmt; /** * @var Doctrine\DBAL\Platforms\AbstractPlatform The underlying database platform. */ - private $_platform; + protected $platform; /** * @var Doctrine\DBAL\Connection The connection this statement is bound to and executed on. */ - private $_conn; + protected $conn; /** * Creates a new Statement for the given SQL and Connection. @@ -63,20 +63,20 @@ class Statement implements DriverStatement */ public function __construct($sql, Connection $conn) { - $this->_sql = $sql; - $this->_stmt = $conn->getWrappedConnection()->prepare($sql); - $this->_conn = $conn; - $this->_platform = $conn->getDatabasePlatform(); + $this->sql = $sql; + $this->stmt = $conn->getWrappedConnection()->prepare($sql); + $this->conn = $conn; + $this->platform = $conn->getDatabasePlatform(); } /** * Binds a parameter value to the statement. - * + * * The value can optionally be bound with a PDO binding type or a DBAL mapping type. * If bound with a DBAL mapping type, the binding type is derived from the mapping * type and the value undergoes the conversion routines of the mapping type before * being bound. - * + * * @param $name The name or position of the parameter. * @param $value The value of the parameter. * @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance. @@ -84,28 +84,28 @@ public function __construct($sql, Connection $conn) */ public function bindValue($name, $value, $type = null) { - $this->_params[$name] = $value; + $this->params[$name] = $value; if ($type !== null) { if (is_string($type)) { $type = Type::getType($type); } if ($type instanceof Type) { - $value = $type->convertToDatabaseValue($value, $this->_platform); + $value = $type->convertToDatabaseValue($value, $this->platform); $bindingType = $type->getBindingType(); } else { $bindingType = $type; // PDO::PARAM_* constants } - return $this->_stmt->bindValue($name, $value, $bindingType); + return $this->stmt->bindValue($name, $value, $bindingType); } else { - return $this->_stmt->bindValue($name, $value); + return $this->stmt->bindValue($name, $value); } } /** * Binds a parameter to a value by reference. - * + * * Binding a parameter by reference does not support DBAL mapping types. - * + * * @param string $name The name or position of the parameter. * @param mixed $value The reference to the variable to bind * @param integer $type The PDO binding type. @@ -113,125 +113,135 @@ public function bindValue($name, $value, $type = null) */ public function bindParam($name, &$var, $type = PDO::PARAM_STR) { - return $this->_stmt->bindParam($name, $var, $type); + return $this->stmt->bindParam($name, $var, $type); } /** * Executes the statement with the currently bound parameters. - * + * * @return boolean TRUE on success, FALSE on failure. */ public function execute($params = null) { - $hasLogger = $this->_conn->getConfiguration()->getSQLLogger(); + $hasLogger = $this->conn->getConfiguration()->getSQLLogger(); if ($hasLogger) { - $this->_conn->getConfiguration()->getSQLLogger()->startQuery($this->_sql, $this->_params); + $this->conn->getConfiguration()->getSQLLogger()->startQuery($this->sql, $this->params); } - $stmt = $this->_stmt->execute($params); + $stmt = $this->stmt->execute($params); if ($hasLogger) { - $this->_conn->getConfiguration()->getSQLLogger()->stopQuery(); + $this->conn->getConfiguration()->getSQLLogger()->stopQuery(); } - $this->_params = array(); + $this->params = array(); return $stmt; } /** - * Closes the cursor, freeing the database resources used by this statement. - * + * Closes the cursor, freeing the database resources used by this statement. + * * @return boolean TRUE on success, FALSE on failure. */ public function closeCursor() { - return $this->_stmt->closeCursor(); + return $this->stmt->closeCursor(); } /** * Returns the number of columns in the result set. - * + * * @return integer */ public function columnCount() { - return $this->_stmt->columnCount(); + return $this->stmt->columnCount(); } /** * Fetches the SQLSTATE associated with the last operation on the statement. - * + * * @return string */ public function errorCode() { - return $this->_stmt->errorCode(); + return $this->stmt->errorCode(); } /** * Fetches extended error information associated with the last operation on the statement. - * + * * @return array */ public function errorInfo() { - return $this->_stmt->errorInfo(); + return $this->stmt->errorInfo(); + } + + public function setFetchMode($fetchStyle) + { + return $this->stmt->setFetchMode($fetchStyle); + } + + public function getIterator() + { + return $this->stmt; } /** * Fetches the next row from a result set. - * + * * @param integer $fetchStyle * @return mixed The return value of this function on success depends on the fetch type. * In all cases, FALSE is returned on failure. */ public function fetch($fetchStyle = PDO::FETCH_BOTH) { - return $this->_stmt->fetch($fetchStyle); + return $this->stmt->fetch($fetchStyle); } /** * Returns an array containing all of the result set rows. - * + * * @param integer $fetchStyle - * @param integer $columnIndex + * @param mixed $fetchArgument * @return array An array containing all of the remaining rows in the result set. */ - public function fetchAll($fetchStyle = PDO::FETCH_BOTH, $columnIndex = 0) + public function fetchAll($fetchStyle = PDO::FETCH_BOTH, $fetchArgument = 0) { - if ($columnIndex != 0) { - return $this->_stmt->fetchAll($fetchStyle, $columnIndex); + if ($fetchArgument !== 0) { + return $this->stmt->fetchAll($fetchStyle, $fetchArgument); } - return $this->_stmt->fetchAll($fetchStyle); + return $this->stmt->fetchAll($fetchStyle); } /** * Returns a single column from the next row of a result set. - * + * * @param integer $columnIndex - * @return mixed A single column from the next row of a result set or FALSE if there are no more rows. + * @return mixed A single column from the next row of a result set or FALSE if there are no more rows. */ public function fetchColumn($columnIndex = 0) { - return $this->_stmt->fetchColumn($columnIndex); + return $this->stmt->fetchColumn($columnIndex); } /** * Returns the number of rows affected by the last execution of this statement. - * + * * @return integer The number of affected rows. */ public function rowCount() { - return $this->_stmt->rowCount(); + return $this->stmt->rowCount(); } /** * Gets the wrapped driver statement. - * + * * @return Doctrine\DBAL\Driver\Statement */ public function getWrappedStatement() { - return $this->_stmt; + return $this->stmt; } } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php index 5f0970ec22..9bf0a27cf7 100644 --- a/src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php +++ b/src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -37,18 +37,18 @@ class ReservedWordsCommand extends Command 'oracle' => 'Doctrine\DBAL\Platforms\Keywords\OracleKeywords', 'db2' => 'Doctrine\DBAL\Platforms\Keywords\DB2Keywords', ); - + /** * If you want to add or replace a keywords list use this command - * + * * @param string $name - * @param string $class + * @param string $class */ public function setKeywordListClass($name, $class) { $this->keywordListClasses[$name] = $class; } - + /** * @see Console\Command\Command */ @@ -70,12 +70,12 @@ protected function configure() keywords are checked: doctrine dbal:reserved-words - + If you want to check against specific dialects you can pass them to the command: doctrine dbal:reserved-words mysql pgsql - + The following keyword lists are currently shipped with Doctrine: * mysql @@ -87,7 +87,7 @@ protected function configure() EOT ); } - + /** * @see Console\Command\Command */ @@ -95,12 +95,12 @@ protected function execute(InputInterface $input, OutputInterface $output) { /* @var $conn Doctrine\DBAL\Connection */ $conn = $this->getHelper('db')->getConnection(); - + $keywordLists = (array)$input->getOption('list'); if (!$keywordLists) { $keywordLists = array('mysql', 'pgsql', 'sqlite', 'oracle', 'mssql'); } - + $keywords = array(); foreach ($keywordLists AS $keywordList) { if (!isset($this->keywordListClasses[$keywordList])) { @@ -112,14 +112,14 @@ protected function execute(InputInterface $input, OutputInterface $output) $class = $this->keywordListClasses[$keywordList]; $keywords[] = new $class; } - + $output->write('Checking keyword violations for ' . implode(", ", $keywordLists) . "...", true); - + /* @var $schema \Doctrine\DBAL\Schema\Schema */ $schema = $conn->getSchemaManager()->createSchema(); $visitor = new ReservedKeywordsValidator($keywords); $schema->visit($visitor); - + $violations = $visitor->getViolations(); if (count($violations) == 0) { $output->write("No reserved keywords violations have been found!", true); diff --git a/src/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php b/src/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php index 70c42fb17c..856c1a29a9 100644 --- a/src/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php +++ b/src/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php @@ -26,7 +26,7 @@ /** * Task for executing arbitrary SQL that can come from a file or directly from * the command line. - * + * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 @@ -71,13 +71,17 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O if ( ! is_numeric($depth)) { throw new \LogicException("Option 'depth' must contains an integer value"); } - + if (preg_match('/^select/i', $sql)) { $resultSet = $conn->fetchAll($sql); } else { $resultSet = $conn->executeUpdate($sql); } + ob_start(); \Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth); + $message = ob_get_clean(); + + $output->write($message); } } diff --git a/src/lib/Doctrine/DBAL/Types/BigIntType.php b/src/lib/Doctrine/DBAL/Types/BigIntType.php index 3ab551d5c6..6c3f4b046a 100644 --- a/src/lib/Doctrine/DBAL/Types/BigIntType.php +++ b/src/lib/Doctrine/DBAL/Types/BigIntType.php @@ -43,6 +43,6 @@ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $pla public function getBindingType() { - return \PDO::PARAM_INT; + return \PDO::PARAM_STR; } } \ No newline at end of file diff --git a/src/lib/Doctrine/DBAL/Types/BlobType.php b/src/lib/Doctrine/DBAL/Types/BlobType.php new file mode 100644 index 0000000000..5be8c3033f --- /dev/null +++ b/src/lib/Doctrine/DBAL/Types/BlobType.php @@ -0,0 +1,67 @@ +. + */ + +namespace Doctrine\DBAL\Types; + +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Type that maps an SQL BLOB to a PHP resource stream + * + * @since 2.2 + */ +class BlobType extends Type +{ + /** @override */ + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getBlobTypeDeclarationSQL($fieldDeclaration); + } + + /** + * Converts a value from its database representation to its PHP representation + * of this type. + * + * @param mixed $value The value to convert. + * @param AbstractPlatform $platform The currently used database platform. + * @return mixed The PHP representation of the value. + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return null; + } + if (is_string($value)) { + $value = fopen('data://text/plain;base64,' . base64_encode($value), 'r'); + } else if ( ! is_resource($value)) { + throw ConversionException::conversionFailed($value, self::BLOB); + } + return $value; + } + + public function getName() + { + return Type::BLOB; + } + + public function getBindingType() + { + return \PDO::PARAM_LOB; + } +} diff --git a/src/lib/Doctrine/DBAL/Types/BooleanType.php b/src/lib/Doctrine/DBAL/Types/BooleanType.php index 8c93ef6e5f..e3cb9a16d9 100644 --- a/src/lib/Doctrine/DBAL/Types/BooleanType.php +++ b/src/lib/Doctrine/DBAL/Types/BooleanType.php @@ -39,7 +39,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) { return $platform->convertBooleans($value); } - + public function convertToPHPValue($value, AbstractPlatform $platform) { return (null === $value) ? null : (bool) $value; diff --git a/src/lib/Doctrine/DBAL/Types/ConversionException.php b/src/lib/Doctrine/DBAL/Types/ConversionException.php index ab150f71fb..ef3270fcad 100644 --- a/src/lib/Doctrine/DBAL/Types/ConversionException.php +++ b/src/lib/Doctrine/DBAL/Types/ConversionException.php @@ -35,7 +35,7 @@ class ConversionException extends \Doctrine\DBAL\DBALException { /** * Thrown when a Database to Doctrine Type Conversion fails. - * + * * @param string $value * @param string $toType * @return ConversionException @@ -45,11 +45,11 @@ static public function conversionFailed($value, $toType) $value = (strlen($value) > 32) ? substr($value, 0, 20) . "..." : $value; return new self('Could not convert database value "' . $value . '" to Doctrine Type ' . $toType); } - + /** * Thrown when a Database to Doctrine Type Conversion fails and we can make a statement * about the expected format. - * + * * @param string $value * @param string $toType * @return ConversionException diff --git a/src/lib/Doctrine/DBAL/Types/DateTimeType.php b/src/lib/Doctrine/DBAL/Types/DateTimeType.php index ac4d324603..d073173b5c 100644 --- a/src/lib/Doctrine/DBAL/Types/DateTimeType.php +++ b/src/lib/Doctrine/DBAL/Types/DateTimeType.php @@ -43,7 +43,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) return ($value !== null) ? $value->format($platform->getDateTimeFormatString()) : null; } - + public function convertToPHPValue($value, AbstractPlatform $platform) { if ($value === null) { diff --git a/src/lib/Doctrine/DBAL/Types/DateTimeTzType.php b/src/lib/Doctrine/DBAL/Types/DateTimeTzType.php index 028b671998..4dc60586a7 100644 --- a/src/lib/Doctrine/DBAL/Types/DateTimeTzType.php +++ b/src/lib/Doctrine/DBAL/Types/DateTimeTzType.php @@ -52,7 +52,7 @@ public function getName() { return Type::DATETIMETZ; } - + public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { return $platform->getDateTimeTzTypeDeclarationSQL($fieldDeclaration); diff --git a/src/lib/Doctrine/DBAL/Types/DateType.php b/src/lib/Doctrine/DBAL/Types/DateType.php index 4646a214f3..42c4803f25 100644 --- a/src/lib/Doctrine/DBAL/Types/DateType.php +++ b/src/lib/Doctrine/DBAL/Types/DateType.php @@ -40,10 +40,10 @@ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $pla public function convertToDatabaseValue($value, AbstractPlatform $platform) { - return ($value !== null) + return ($value !== null) ? $value->format($platform->getDateFormatString()) : null; } - + public function convertToPHPValue($value, AbstractPlatform $platform) { if ($value === null) { diff --git a/src/lib/Doctrine/DBAL/Types/TimeType.php b/src/lib/Doctrine/DBAL/Types/TimeType.php index bc36286904..d4c49c468b 100644 --- a/src/lib/Doctrine/DBAL/Types/TimeType.php +++ b/src/lib/Doctrine/DBAL/Types/TimeType.php @@ -46,7 +46,7 @@ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $pla */ public function convertToDatabaseValue($value, AbstractPlatform $platform) { - return ($value !== null) + return ($value !== null) ? $value->format($platform->getTimeFormatString()) : null; } diff --git a/src/lib/Doctrine/DBAL/Types/Type.php b/src/lib/Doctrine/DBAL/Types/Type.php index fc71c89d06..320dfa9d0a 100644 --- a/src/lib/Doctrine/DBAL/Types/Type.php +++ b/src/lib/Doctrine/DBAL/Types/Type.php @@ -46,6 +46,7 @@ abstract class Type const SMALLINT = 'smallint'; const STRING = 'string'; const TEXT = 'text'; + const BLOB = 'blob'; const FLOAT = 'float'; /** Map of already instantiated type objects. One instance per type (flyweight). */ @@ -67,6 +68,7 @@ abstract class Type self::TIME => 'Doctrine\DBAL\Types\TimeType', self::DECIMAL => 'Doctrine\DBAL\Types\DecimalType', self::FLOAT => 'Doctrine\DBAL\Types\FloatType', + self::BLOB => 'Doctrine\DBAL\Types\BlobType', ); /* Prevent instantiation and force use of the factory method. */ @@ -187,6 +189,10 @@ public static function overrideType($name, $className) if ( ! isset(self::$_typesMap[$name])) { throw DBALException::typeNotFound($name); } + + if (isset(self::$_typeObjects[$name])) { + unset(self::$_typeObjects[$name]); + } self::$_typesMap[$name] = $className; } @@ -194,15 +200,15 @@ public static function overrideType($name, $className) /** * Gets the (preferred) binding type for values of this type that * can be used when binding parameters to prepared statements. - * + * * This method should return one of the PDO::PARAM_* constants, that is, one of: - * + * * PDO::PARAM_BOOL * PDO::PARAM_NULL * PDO::PARAM_INT * PDO::PARAM_STR * PDO::PARAM_LOB - * + * * @return integer */ public function getBindingType() @@ -244,7 +250,7 @@ public function canRequireSQLConversion() /** * Modifies the SQL expression (identifier, parameter) to convert to a database value. - * + * * @param string $sqlExpr * @param AbstractPlatform $platform * @return string diff --git a/src/lib/Doctrine/DBAL/Version.php b/src/lib/Doctrine/DBAL/Version.php index 6c2dc2fab6..0fb2e779ea 100644 --- a/src/lib/Doctrine/DBAL/Version.php +++ b/src/lib/Doctrine/DBAL/Version.php @@ -16,7 +16,7 @@ * and is licensed under the LGPL. For more information, see * . */ - + namespace Doctrine\DBAL; /** @@ -36,13 +36,13 @@ class Version /** * Current Doctrine Version */ - const VERSION = '2.1.0-DEV'; + const VERSION = '2.2.2'; /** * Compares a Doctrine version with the current one. * * @param string $version Doctrine version to compare. - * @return int Returns -1 if older, 0 if it is the same, 1 if version + * @return int Returns -1 if older, 0 if it is the same, 1 if version * passed as argument is newer. */ public static function compare($version) diff --git a/src/lib/Doctrine/ORM/AbstractQuery.php b/src/lib/Doctrine/ORM/AbstractQuery.php index 26eee1fb89..0dba9dc6ee 100644 --- a/src/lib/Doctrine/ORM/AbstractQuery.php +++ b/src/lib/Doctrine/ORM/AbstractQuery.php @@ -20,7 +20,9 @@ namespace Doctrine\ORM; use Doctrine\DBAL\Types\Type, - Doctrine\ORM\Query\QueryException; + Doctrine\DBAL\Cache\QueryCacheProfile, + Doctrine\ORM\Query\QueryException, + Doctrine\ORM\Internal\Hydration\CacheHydrator; /** * Base contract for ORM queries. Base class for Query and NativeQuery. @@ -28,7 +30,6 @@ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision$ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage @@ -76,7 +77,7 @@ abstract class AbstractQuery protected $_resultSetMapping; /** - * @var Doctrine\ORM\EntityManager The entity manager used by this query object. + * @var \Doctrine\ORM\EntityManager The entity manager used by this query object. */ protected $_em; @@ -91,23 +92,9 @@ abstract class AbstractQuery protected $_hydrationMode = self::HYDRATE_OBJECT; /** - * The locally set cache driver used for caching result sets of this query. - * - * @var CacheDriver - */ - protected $_resultCacheDriver; - - /** - * Boolean flag for whether or not to cache the results of this query. - * - * @var boolean + * @param \Doctrine\DBAL\Cache\QueryCacheProfile */ - protected $_useResultCache; - - /** - * @var string The id to store the result cache entry under. - */ - protected $_resultCacheId; + protected $_queryCacheProfile; /** * @var boolean Boolean value that indicates whether or not expire the result cache. @@ -115,14 +102,14 @@ abstract class AbstractQuery protected $_expireResultCache = false; /** - * @var int Result Cache lifetime. + * @param \Doctrine\DBAL\Cache\QueryCacheProfile */ - protected $_resultCacheTTL; + protected $_hydrationCacheProfile; /** * Initializes a new instance of a class derived from AbstractQuery. * - * @param Doctrine\ORM\EntityManager $entityManager + * @param \Doctrine\ORM\EntityManager $entityManager */ public function __construct(EntityManager $em) { @@ -132,7 +119,7 @@ public function __construct(EntityManager $em) /** * Retrieves the associated EntityManager of this Query instance. * - * @return Doctrine\ORM\EntityManager + * @return \Doctrine\ORM\EntityManager */ public function getEntityManager() { @@ -163,6 +150,16 @@ public function getParameters() return $this->_params; } + /** + * Get all defined parameter types. + * + * @return array The defined query parameter types. + */ + public function getParameterTypes() + { + return $this->_paramTypes; + } + /** * Gets a query parameter. * @@ -171,7 +168,26 @@ public function getParameters() */ public function getParameter($key) { - return isset($this->_params[$key]) ? $this->_params[$key] : null; + if (isset($this->_params[$key])) { + return $this->_params[$key]; + } + + return null; + } + + /** + * Gets a query parameter type. + * + * @param mixed $key The key (index or name) of the bound parameter. + * @return mixed The parameter type of the bound parameter. + */ + public function getParameterType($key) + { + if (isset($this->_paramTypes[$key])) { + return $this->_paramTypes[$key]; + } + + return null; } /** @@ -191,36 +207,83 @@ abstract public function getSQL(); * @param string $type The parameter type. If specified, the given value will be run through * the type conversion of this type. This is usually not needed for * strings and numeric types. - * @return Doctrine\ORM\AbstractQuery This query instance. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ public function setParameter($key, $value, $type = null) { + $key = trim($key, ':'); + + $value = $this->processParameterValue($value); if ($type === null) { $type = Query\ParameterTypeInferer::inferType($value); } - + $this->_paramTypes[$key] = $type; $this->_params[$key] = $value; - + return $this; } + /** + * Process an individual parameter value + * + * @param mixed $value + * @return array + */ + private function processParameterValue($value) + { + switch (true) { + case is_array($value): + for ($i = 0, $l = count($value); $i < $l; $i++) { + $paramValue = $this->processParameterValue($value[$i]); + $value[$i] = is_array($paramValue) ? $paramValue[key($paramValue)] : $paramValue; + } + + return $value; + + case is_object($value) && $this->_em->getMetadataFactory()->hasMetadataFor(get_class($value)): + return $this->convertObjectParameterToScalarValue($value); + + default: + return $value; + } + } + + protected function convertObjectParameterToScalarValue($value) + { + $class = $this->_em->getClassMetadata(get_class($value)); + + if ($class->isIdentifierComposite) { + throw new \InvalidArgumentException("Binding an entity with a composite primary key to a query is not supported. You should split the parameter into the explicit fields and bind them seperately."); + } + + if ($this->_em->getUnitOfWork()->getEntityState($value) === UnitOfWork::STATE_MANAGED) { + $values = $this->_em->getUnitOfWork()->getEntityIdentifier($value); + } else { + $values = $class->getIdentifierValues($value); + } + + $value = $values[$class->getSingleIdentifierFieldName()]; + if (!$value) { + throw new \InvalidArgumentException("Binding entities to query parameters only allowed for entities that have an identifier."); + } + + return $value; + } + /** * Sets a collection of query parameters. * * @param array $params * @param array $types - * @return Doctrine\ORM\AbstractQuery This query instance. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ public function setParameters(array $params, array $types = array()) { foreach ($params as $key => $value) { - if (isset($types[$key])) { - $this->setParameter($key, $value, $types[$key]); - } else { - $this->setParameter($key, $value); - } + $this->setParameter($key, $value, isset($types[$key]) ? $types[$key] : null); } + return $this; } @@ -228,44 +291,109 @@ public function setParameters(array $params, array $types = array()) * Sets the ResultSetMapping that should be used for hydration. * * @param ResultSetMapping $rsm - * @return Doctrine\ORM\AbstractQuery + * @return \Doctrine\ORM\AbstractQuery */ public function setResultSetMapping(Query\ResultSetMapping $rsm) { $this->_resultSetMapping = $rsm; + return $this; } /** - * Defines a cache driver to be used for caching result sets. + * Set a cache profile for hydration caching. * - * @param Doctrine\Common\Cache\Cache $driver Cache driver - * @return Doctrine\ORM\AbstractQuery + * If no result cache driver is set in the QueryCacheProfile, the default + * result cache driver is used from the configuration. + * + * Important: Hydration caching does NOT register entities in the + * UnitOfWork when retrieved from the cache. Never use result cached + * entities for requests that also flush the EntityManager. If you want + * some form of caching with UnitOfWork registration you should use + * {@see AbstractQuery::setResultCacheProfile()}. + * + * @example + * $lifetime = 100; + * $resultKey = "abc"; + * $query->setHydrationCacheProfile(new QueryCacheProfile()); + * $query->setHydrationCacheProfile(new QueryCacheProfile($lifetime, $resultKey)); + * + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile + * @return \Doctrine\ORM\AbstractQuery + */ + public function setHydrationCacheProfile(QueryCacheProfile $profile = null) + { + if ( ! $profile->getResultCacheDriver()) { + $resultCacheDriver = $this->_em->getConfiguration()->getHydrationCacheImpl(); + $profile = $profile->setResultCacheDriver($resultCacheDriver); + } + + $this->_hydrationCacheProfile = $profile; + + return $this; + } + + /** + * @return \Doctrine\DBAL\Cache\QueryCacheProfile + */ + public function getHydrationCacheProfile() + { + return $this->_hydrationCacheProfile; + } + + /** + * Set a cache profile for the result cache. + * + * If no result cache driver is set in the QueryCacheProfile, the default + * result cache driver is used from the configuration. + * + * @param \Doctrine\DBAL\Cache\QueryCacheProfile $profile + * @return \Doctrine\ORM\AbstractQuery + */ + public function setResultCacheProfile(QueryCacheProfile $profile = null) + { + if ( ! $profile->getResultCacheDriver()) { + $resultCacheDriver = $this->_em->getConfiguration()->getResultCacheImpl(); + $profile = $profile->setResultCacheDriver($resultCacheDriver); + } + + $this->_queryCacheProfile = $profile; + + return $this; + } + + /** + * Defines a cache driver to be used for caching result sets and implictly enables caching. + * + * @param \Doctrine\Common\Cache\Cache $driver Cache driver + * @return \Doctrine\ORM\AbstractQuery */ public function setResultCacheDriver($resultCacheDriver = null) { if ($resultCacheDriver !== null && ! ($resultCacheDriver instanceof \Doctrine\Common\Cache\Cache)) { throw ORMException::invalidResultCacheDriver(); } - $this->_resultCacheDriver = $resultCacheDriver; - if ($resultCacheDriver) { - $this->_useResultCache = true; - } + + $this->_queryCacheProfile = $this->_queryCacheProfile + ? $this->_queryCacheProfile->setResultCacheDriver($resultCacheDriver) + : new QueryCacheProfile(0, null, $resultCacheDriver); + return $this; } /** * Returns the cache driver used for caching result sets. * - * @return Doctrine\Common\Cache\Cache Cache driver + * @deprecated + * @return \Doctrine\Common\Cache\Cache Cache driver */ public function getResultCacheDriver() { - if ($this->_resultCacheDriver) { - return $this->_resultCacheDriver; - } else { - return $this->_em->getConfiguration()->getResultCacheImpl(); + if ($this->_queryCacheProfile && $this->_queryCacheProfile->getResultCacheDriver()) { + return $this->_queryCacheProfile->getResultCacheDriver(); } + + return $this->_em->getConfiguration()->getResultCacheImpl(); } /** @@ -273,57 +401,62 @@ public function getResultCacheDriver() * how long and which ID to use for the cache entry. * * @param boolean $bool - * @param integer $timeToLive + * @param integer $lifetime * @param string $resultCacheId - * @return Doctrine\ORM\AbstractQuery This query instance. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ - public function useResultCache($bool, $timeToLive = null, $resultCacheId = null) + public function useResultCache($bool, $lifetime = null, $resultCacheId = null) { - $this->_useResultCache = $bool; - if ($timeToLive) { - $this->setResultCacheLifetime($timeToLive); - } - if ($resultCacheId) { - $this->_resultCacheId = $resultCacheId; + if ($bool) { + $this->setResultCacheLifetime($lifetime); + $this->setResultCacheId($resultCacheId); + + return $this; } + + $this->_queryCacheProfile = null; + return $this; } /** * Defines how long the result cache will be active before expire. * - * @param integer $timeToLive How long the cache entry is valid. - * @return Doctrine\ORM\AbstractQuery This query instance. + * @param integer $lifetime How long the cache entry is valid. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ - public function setResultCacheLifetime($timeToLive) + public function setResultCacheLifetime($lifetime) { - if ($timeToLive !== null) { - $timeToLive = (int) $timeToLive; - } + $lifetime = ($lifetime !== null) ? (int) $lifetime : 0; + + $this->_queryCacheProfile = $this->_queryCacheProfile + ? $this->_queryCacheProfile->setLifetime($lifetime) + : new QueryCacheProfile($lifetime, null, $this->_em->getConfiguration()->getResultCacheImpl()); - $this->_resultCacheTTL = $timeToLive; return $this; } /** * Retrieves the lifetime of resultset cache. * + * @deprecated * @return integer */ public function getResultCacheLifetime() { - return $this->_resultCacheTTL; + return $this->_queryCacheProfile ? $this->_queryCacheProfile->getLifetime() : 0; } /** * Defines if the result cache is active or not. * * @param boolean $expire Whether or not to force resultset cache expiration. - * @return Doctrine\ORM\AbstractQuery This query instance. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ public function expireResultCache($expire = true) { $this->_expireResultCache = $expire; + return $this; } @@ -337,6 +470,14 @@ public function getExpireResultCache() return $this->_expireResultCache; } + /** + * @return QueryCacheProfile + */ + public function getQueryCacheProfile() + { + return $this->_queryCacheProfile; + } + /** * Change the default fetch mode of an association for this query. * @@ -354,6 +495,7 @@ public function setFetchMode($class, $assocName, $fetchMode) } $this->_hints['fetchMode'][$class][$assocName] = $fetchMode; + return $this; } @@ -362,11 +504,12 @@ public function setFetchMode($class, $assocName, $fetchMode) * * @param integer $hydrationMode Doctrine processing mode to be used during hydration process. * One of the Query::HYDRATE_* constants. - * @return Doctrine\ORM\AbstractQuery This query instance. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ public function setHydrationMode($hydrationMode) { $this->_hydrationMode = $hydrationMode; + return $this; } @@ -431,14 +574,15 @@ public function getOneOrNullResult($hydrationMode = null) return null; } - if (is_array($result)) { - if (count($result) > 1) { - throw new NonUniqueResultException; - } - return array_shift($result); + if ( ! is_array($result)) { + return $result; + } + + if (count($result) > 1) { + throw new NonUniqueResultException; } - return $result; + return array_shift($result); } /** @@ -462,14 +606,15 @@ public function getSingleResult($hydrationMode = null) throw new NoResultException; } - if (is_array($result)) { - if (count($result) > 1) { - throw new NonUniqueResultException; - } - return array_shift($result); + if ( ! is_array($result)) { + return $result; } - return $result; + if (count($result) > 1) { + throw new NonUniqueResultException; + } + + return array_shift($result); } /** @@ -490,11 +635,12 @@ public function getSingleScalarResult() * * @param string $name The name of the hint. * @param mixed $value The value of the hint. - * @return Doctrine\ORM\AbstractQuery + * @return \Doctrine\ORM\AbstractQuery */ public function setHint($name, $value) { $this->_hints[$name] = $value; + return $this; } @@ -511,7 +657,7 @@ public function getHint($name) /** * Return the key value map of query hints that are currently set. - * + * * @return array */ public function getHints() @@ -525,7 +671,7 @@ public function getHints() * * @param array $params The query parameters. * @param integer $hydrationMode The hydration mode to use. - * @return IterableResult + * @return \Doctrine\ORM\Internal\Hydration\IterableResult */ public function iterate(array $params = array(), $hydrationMode = null) { @@ -561,37 +707,68 @@ public function execute($params = array(), $hydrationMode = null) $this->setParameters($params); } - // Check result cache - if ($this->_useResultCache && $cacheDriver = $this->getResultCacheDriver()) { - list($key, $hash) = $this->getResultCacheId(); - $cached = $this->_expireResultCache ? false : $cacheDriver->fetch($hash); + $setCacheEntry = function() {}; - if ($cached === false || !isset($cached[$key])) { - // Cache miss. - $stmt = $this->_doExecute(); + if ($this->_hydrationCacheProfile !== null) { + list($cacheKey, $realCacheKey) = $this->getHydrationCacheId(); - $result = $this->_em->getHydrator($this->_hydrationMode)->hydrateAll( - $stmt, $this->_resultSetMapping, $this->_hints - ); + $queryCacheProfile = $this->getHydrationCacheProfile(); + $cache = $queryCacheProfile->getResultCacheDriver(); + $result = $cache->fetch($cacheKey); - $cacheDriver->save($hash, array($key => $result), $this->_resultCacheTTL); + if (isset($result[$realCacheKey])) { + return $result[$realCacheKey]; + } - return $result; - } else { - // Cache hit. - return $cached[$key]; + if ( ! $result) { + $result = array(); } + + $setCacheEntry = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $queryCacheProfile) { + $result[$realCacheKey] = $data; + $cache->save($cacheKey, $result, $queryCacheProfile->getLifetime()); + }; } $stmt = $this->_doExecute(); if (is_numeric($stmt)) { + $setCacheEntry($stmt); + return $stmt; } - return $this->_em->getHydrator($this->_hydrationMode)->hydrateAll( - $stmt, $this->_resultSetMapping, $this->_hints - ); + $data = $this->_em->getHydrator($this->_hydrationMode)->hydrateAll( + $stmt, $this->_resultSetMapping, $this->_hints + ); + + $setCacheEntry($data); + + return $data; + } + + /** + * Get the result cache id to use to store the result set cache entry. + * Will return the configured id if it exists otherwise a hash will be + * automatically generated for you. + * + * @return array ($key, $hash) + */ + protected function getHydrationCacheId() + { + $params = $this->getParameters(); + + foreach ($params AS $key => $value) { + $params[$key] = $this->processParameterValue($value); + } + + $sql = $this->getSQL(); + $queryCacheProfile = $this->getHydrationCacheProfile(); + $hints = $this->getHints(); + $hints['hydrationMode'] = $this->getHydrationMode(); + ksort($hints); + + return $queryCacheProfile->generateCacheKeys($sql, $params, $hints); } /** @@ -600,53 +777,32 @@ public function execute($params = array(), $hydrationMode = null) * generated for you. * * @param string $id - * @return Doctrine\ORM\AbstractQuery This query instance. + * @return \Doctrine\ORM\AbstractQuery This query instance. */ public function setResultCacheId($id) { - $this->_resultCacheId = $id; + $this->_queryCacheProfile = $this->_queryCacheProfile + ? $this->_queryCacheProfile->setCacheKey($id) + : new QueryCacheProfile(0, $id, $this->_em->getConfiguration()->getResultCacheImpl()); + return $this; } /** - * Get the result cache id to use to store the result set cache entry. - * Will return the configured id if it exists otherwise a hash will be - * automatically generated for you. + * Get the result cache id to use to store the result set cache entry if set. * - * @return array ($key, $hash) + * @deprecated + * @return string */ - protected function getResultCacheId() + public function getResultCacheId() { - if ($this->_resultCacheId) { - return array($this->_resultCacheId, $this->_resultCacheId); - } else { - $params = $this->_params; - foreach ($params AS $key => $value) { - if (is_object($value) && $this->_em->getMetadataFactory()->hasMetadataFor(get_class($value))) { - if ($this->_em->getUnitOfWork()->getEntityState($value) == UnitOfWork::STATE_MANAGED) { - $idValues = $this->_em->getUnitOfWork()->getEntityIdentifier($value); - } else { - $class = $this->_em->getClassMetadata(get_class($value)); - $idValues = $class->getIdentifierValues($value); - } - $params[$key] = $idValues; - } else { - $params[$key] = $value; - } - } - - $sql = $this->getSql(); - ksort($this->_hints); - $key = implode(";", (array)$sql) . var_export($params, true) . - var_export($this->_hints, true)."&hydrationMode=".$this->_hydrationMode; - return array($key, md5($key)); - } + return $this->_queryCacheProfile ? $this->_queryCacheProfile->getCacheKey() : null; } /** * Executes the query and returns a the resulting Statement object. * - * @return Doctrine\DBAL\Driver\Statement The executed database statement that holds the results. + * @return \Doctrine\DBAL\Driver\Statement The executed database statement that holds the results. */ abstract protected function _doExecute(); diff --git a/src/lib/Doctrine/ORM/Configuration.php b/src/lib/Doctrine/ORM/Configuration.php index a7219da8bb..4189f91ac4 100644 --- a/src/lib/Doctrine/ORM/Configuration.php +++ b/src/lib/Doctrine/ORM/Configuration.php @@ -85,7 +85,7 @@ public function setAutoGenerateProxyClasses($bool) /** * Gets the namespace where proxy classes reside. - * + * * @return string */ public function getProxyNamespace() @@ -96,7 +96,7 @@ public function getProxyNamespace() /** * Sets the namespace where proxy classes reside. - * + * * @param string $ns */ public function setProxyNamespace($ns) @@ -118,22 +118,23 @@ public function setMetadataDriverImpl(Driver $driverImpl) /** * Add a new default annotation driver with a correctly configured annotation reader. - * + * * @param array $paths * @return Mapping\Driver\AnnotationDriver */ public function newDefaultAnnotationDriver($paths = array()) { - if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) { + if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) { // Register the ORM Annotations in the AnnotationRegistry AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php'); - - $reader = new AnnotationReader(); + + $reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader(); + $reader->addNamespace('Doctrine\ORM\Mapping'); $reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache()); } else if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-DEV', '>=')) { // Register the ORM Annotations in the AnnotationRegistry AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php'); - + $reader = new AnnotationReader(); $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); $reader->setIgnoreNotImportedAnnotations(true); @@ -162,7 +163,7 @@ public function addEntityNamespace($alias, $namespace) /** * Resolves a registered namespace alias to the full namespace. * - * @param string $entityNamespaceAlias + * @param string $entityNamespaceAlias * @return string * @throws MappingException */ @@ -185,10 +186,10 @@ public function setEntityNamespaces(array $entityNamespaces) { $this->_attributes['entityNamespaces'] = $entityNamespaces; } - + /** * Retrieves the list of registered entity namespace aliases. - * + * * @return array */ public function getEntityNamespaces() @@ -209,45 +210,46 @@ public function getMetadataDriverImpl() } /** - * Gets the cache driver implementation that is used for query result caching. + * Gets the cache driver implementation that is used for the query cache (SQL cache). * * @return \Doctrine\Common\Cache\Cache */ - public function getResultCacheImpl() + public function getQueryCacheImpl() { - return isset($this->_attributes['resultCacheImpl']) ? - $this->_attributes['resultCacheImpl'] : null; + return isset($this->_attributes['queryCacheImpl']) ? + $this->_attributes['queryCacheImpl'] : null; } /** - * Sets the cache driver implementation that is used for query result caching. + * Sets the cache driver implementation that is used for the query cache (SQL cache). * * @param \Doctrine\Common\Cache\Cache $cacheImpl */ - public function setResultCacheImpl(Cache $cacheImpl) + public function setQueryCacheImpl(Cache $cacheImpl) { - $this->_attributes['resultCacheImpl'] = $cacheImpl; + $this->_attributes['queryCacheImpl'] = $cacheImpl; } /** - * Gets the cache driver implementation that is used for the query cache (SQL cache). + * Gets the cache driver implementation that is used for the hydration cache (SQL cache). * * @return \Doctrine\Common\Cache\Cache */ - public function getQueryCacheImpl() + public function getHydrationCacheImpl() { - return isset($this->_attributes['queryCacheImpl']) ? - $this->_attributes['queryCacheImpl'] : null; + return isset($this->_attributes['hydrationCacheImpl']) + ? $this->_attributes['hydrationCacheImpl'] + : null; } /** - * Sets the cache driver implementation that is used for the query cache (SQL cache). + * Sets the cache driver implementation that is used for the hydration cache (SQL cache). * * @param \Doctrine\Common\Cache\Cache $cacheImpl */ - public function setQueryCacheImpl(Cache $cacheImpl) + public function setHydrationCacheImpl(Cache $cacheImpl) { - $this->_attributes['queryCacheImpl'] = $cacheImpl; + $this->_attributes['hydrationCacheImpl'] = $cacheImpl; } /** @@ -360,7 +362,7 @@ public function addCustomStringFunction($name, $className) /** * Gets the implementation class name of a registered custom string DQL function. - * + * * @param string $name * @return string */ @@ -403,7 +405,7 @@ public function addCustomNumericFunction($name, $className) /** * Gets the implementation class name of a registered custom numeric DQL function. - * + * * @param string $name * @return string */ @@ -446,7 +448,7 @@ public function addCustomDatetimeFunction($name, $className) /** * Gets the implementation class name of a registered custom date/time DQL function. - * + * * @param string $name * @return string */ @@ -497,7 +499,7 @@ public function addCustomHydrationMode($modeName, $hydrator) /** * Set a class metadata factory. - * + * * @param string $cmf */ public function setClassMetadataFactoryName($cmfName) @@ -515,4 +517,57 @@ public function getClassMetadataFactoryName() } return $this->_attributes['classMetadataFactoryName']; } -} \ No newline at end of file + + /** + * Add a filter to the list of possible filters. + * + * @param string $name The name of the filter. + * @param string $className The class name of the filter. + */ + public function addFilter($name, $className) + { + $this->_attributes['filters'][$name] = $className; + } + + /** + * Gets the class name for a given filter name. + * + * @param string $name The name of the filter. + * + * @return string The class name of the filter, or null of it is not + * defined. + */ + public function getFilterClassName($name) + { + return isset($this->_attributes['filters'][$name]) ? + $this->_attributes['filters'][$name] : null; + } + + /** + * Set default repository class. + * + * @since 2.2 + * @param string $className + * @throws ORMException If not is a \Doctrine\ORM\EntityRepository + */ + public function setDefaultRepositoryClassName($className) + { + if ($className != "Doctrine\ORM\EntityRepository" && + !is_subclass_of($className, 'Doctrine\ORM\EntityRepository')){ + throw ORMException::invalidEntityRepository($className); + } + $this->_attributes['defaultRepositoryClassName'] = $className; + } + + /** + * Get default repository class. + * + * @since 2.2 + * @return string + */ + public function getDefaultRepositoryClassName() + { + return isset($this->_attributes['defaultRepositoryClassName']) ? + $this->_attributes['defaultRepositoryClassName'] : 'Doctrine\ORM\EntityRepository'; + } +} diff --git a/src/lib/Doctrine/ORM/EntityManager.php b/src/lib/Doctrine/ORM/EntityManager.php index 0379cc4355..ab3e4c7ee9 100644 --- a/src/lib/Doctrine/ORM/EntityManager.php +++ b/src/lib/Doctrine/ORM/EntityManager.php @@ -27,7 +27,8 @@ Doctrine\ORM\Mapping\ClassMetadata, Doctrine\ORM\Mapping\ClassMetadataFactory, Doctrine\ORM\Query\ResultSetMapping, - Doctrine\ORM\Proxy\ProxyFactory; + Doctrine\ORM\Proxy\ProxyFactory, + Doctrine\ORM\Query\FilterCollection; /** * The EntityManager is the central access point to ORM functionality. @@ -43,21 +44,21 @@ class EntityManager implements ObjectManager /** * The used Configuration. * - * @var Doctrine\ORM\Configuration + * @var \Doctrine\ORM\Configuration */ private $config; /** * The database connection used by the EntityManager. * - * @var Doctrine\DBAL\Connection + * @var \Doctrine\DBAL\Connection */ private $conn; /** * The metadata factory, used to retrieve the ORM metadata of entity classes. * - * @var Doctrine\ORM\Mapping\ClassMetadataFactory + * @var \Doctrine\ORM\Mapping\ClassMetadataFactory */ private $metadataFactory; @@ -71,14 +72,14 @@ class EntityManager implements ObjectManager /** * The UnitOfWork used to coordinate object-level transactions. * - * @var Doctrine\ORM\UnitOfWork + * @var \Doctrine\ORM\UnitOfWork */ private $unitOfWork; /** * The event manager that is the central point of the event system. * - * @var Doctrine\Common\EventManager + * @var \Doctrine\Common\EventManager */ private $eventManager; @@ -92,14 +93,14 @@ class EntityManager implements ObjectManager /** * The proxy factory used to create dynamic proxies. * - * @var Doctrine\ORM\Proxy\ProxyFactory + * @var \Doctrine\ORM\Proxy\ProxyFactory */ private $proxyFactory; /** * The expression builder instance used to generate query expressions. * - * @var Doctrine\ORM\Query\Expr + * @var \Doctrine\ORM\Query\Expr */ private $expressionBuilder; @@ -110,13 +111,20 @@ class EntityManager implements ObjectManager */ private $closed = false; + /** + * Collection of query filters. + * + * @var Doctrine\ORM\Query\FilterCollection + */ + private $filterCollection; + /** * Creates a new EntityManager that operates on the given database connection * and uses the given Configuration and EventManager implementations. * - * @param Doctrine\DBAL\Connection $conn - * @param Doctrine\ORM\Configuration $config - * @param Doctrine\Common\EventManager $eventManager + * @param \Doctrine\DBAL\Connection $conn + * @param \Doctrine\ORM\Configuration $config + * @param \Doctrine\Common\EventManager $eventManager */ protected function __construct(Connection $conn, Configuration $config, EventManager $eventManager) { @@ -128,18 +136,20 @@ protected function __construct(Connection $conn, Configuration $config, EventMan $this->metadataFactory = new $metadataFactoryClassName; $this->metadataFactory->setEntityManager($this); $this->metadataFactory->setCacheDriver($this->config->getMetadataCacheImpl()); - + $this->unitOfWork = new UnitOfWork($this); - $this->proxyFactory = new ProxyFactory($this, - $config->getProxyDir(), - $config->getProxyNamespace(), - $config->getAutoGenerateProxyClasses()); + $this->proxyFactory = new ProxyFactory( + $this, + $config->getProxyDir(), + $config->getProxyNamespace(), + $config->getAutoGenerateProxyClasses() + ); } /** * Gets the database connection object used by the EntityManager. * - * @return Doctrine\DBAL\Connection + * @return \Doctrine\DBAL\Connection */ public function getConnection() { @@ -149,7 +159,7 @@ public function getConnection() /** * Gets the metadata factory used to gather the metadata of classes. * - * @return Doctrine\ORM\Mapping\ClassMetadataFactory + * @return \Doctrine\ORM\Mapping\ClassMetadataFactory */ public function getMetadataFactory() { @@ -168,13 +178,14 @@ public function getMetadataFactory() * ->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2))); * * - * @return Doctrine\ORM\Query\Expr + * @return \Doctrine\ORM\Query\Expr */ public function getExpressionBuilder() { if ($this->expressionBuilder === null) { $this->expressionBuilder = new Query\Expr; } + return $this->expressionBuilder; } @@ -199,22 +210,23 @@ public function beginTransaction() * the transaction is rolled back, the EntityManager closed and the exception re-thrown. * * @param Closure $func The function to execute transactionally. + * @return mixed Returns the non-empty value returned from the closure or true instead */ public function transactional(Closure $func) { $this->conn->beginTransaction(); - + try { $return = $func($this); - + $this->flush(); $this->conn->commit(); - + return $return ?: true; } catch (Exception $e) { $this->close(); $this->conn->rollback(); - + throw $e; } } @@ -244,12 +256,12 @@ public function rollback() * * The class name must be the fully-qualified class name without a leading backslash * (as it is returned by get_class($obj)) or an aliased class name. - * + * * Examples: * MyProject\Domain\User * sales:PriceRequest * - * @return Doctrine\ORM\Mapping\ClassMetadata + * @return \Doctrine\ORM\Mapping\ClassMetadata * @internal Performance-sensitive method. */ public function getClassMetadata($className) @@ -261,14 +273,16 @@ public function getClassMetadata($className) * Creates a new Query object. * * @param string The DQL string. - * @return Doctrine\ORM\Query + * @return \Doctrine\ORM\Query */ public function createQuery($dql = "") { $query = new Query($this); + if ( ! empty($dql)) { $query->setDql($dql); } + return $query; } @@ -276,7 +290,7 @@ public function createQuery($dql = "") * Creates a Query from a named query. * * @param string $name - * @return Doctrine\ORM\Query + * @return \Doctrine\ORM\Query */ public function createNamedQuery($name) { @@ -295,6 +309,7 @@ public function createNativeQuery($sql, ResultSetMapping $rsm) $query = new NativeQuery($this); $query->setSql($sql); $query->setResultSetMapping($rsm); + return $query; } @@ -302,11 +317,12 @@ public function createNativeQuery($sql, ResultSetMapping $rsm) * Creates a NativeQuery from a named native query. * * @param string $name - * @return Doctrine\ORM\NativeQuery + * @return \Doctrine\ORM\NativeQuery */ public function createNamedNativeQuery($name) { list($sql, $rsm) = $this->config->getNamedNativeQuery($name); + return $this->createNativeQuery($sql, $rsm); } @@ -325,13 +341,18 @@ public function createQueryBuilder() * This effectively synchronizes the in-memory state of managed objects with the * database. * - * @throws Doctrine\ORM\OptimisticLockException If a version check on an entity that + * If an entity is explicitly passed to this method only this entity and + * the cascade-persist semantics + scheduled inserts/removals are synchronized. + * + * @param object $entity + * @throws \Doctrine\ORM\OptimisticLockException If a version check on an entity that * makes use of optimistic locking fails. */ - public function flush() + public function flush($entity = null) { $this->errorIfClosed(); - $this->unitOfWork->commit(); + + $this->unitOfWork->commit($entity); } /** @@ -355,27 +376,39 @@ public function find($entityName, $identifier, $lockMode = LockMode::NONE, $lock * without actually loading it, if the entity is not yet loaded. * * @param string $entityName The name of the entity type. - * @param mixed $identifier The entity identifier. + * @param mixed $id The entity identifier. * @return object The entity reference. */ - public function getReference($entityName, $identifier) + public function getReference($entityName, $id) { $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); + if ( ! is_array($id)) { + $id = array($class->identifier[0] => $id); + } + $sortedId = array(); + foreach ($class->identifier as $identifier) { + if (!isset($id[$identifier])) { + throw ORMException::missingIdentifierField($class->name, $identifier); + } + $sortedId[$identifier] = $id[$identifier]; + } // Check identity map first, if its already in there just return it. - if ($entity = $this->unitOfWork->tryGetById($identifier, $class->rootEntityName)) { + if ($entity = $this->unitOfWork->tryGetById($sortedId, $class->rootEntityName)) { return ($entity instanceof $class->name) ? $entity : null; } + if ($class->subClasses) { - $entity = $this->find($entityName, $identifier); - } else { - if ( ! is_array($identifier)) { - $identifier = array($class->identifier[0] => $identifier); - } - $entity = $this->proxyFactory->getProxy($class->name, $identifier); - $this->unitOfWork->registerManaged($entity, $identifier, array()); + return $this->find($entityName, $sortedId); } + if ( ! is_array($sortedId)) { + $sortedId = array($class->identifier[0] => $sortedId); + } + + $entity = $this->proxyFactory->getProxy($class->name, $sortedId); + $this->unitOfWork->registerManaged($entity, $sortedId, array()); + return $entity; } @@ -406,6 +439,7 @@ public function getPartialReference($entityName, $identifier) if ($entity = $this->unitOfWork->tryGetById($identifier, $class->rootEntityName)) { return ($entity instanceof $class->name) ? $entity : null; } + if ( ! is_array($identifier)) { $identifier = array($class->identifier[0] => $identifier); } @@ -413,6 +447,7 @@ public function getPartialReference($entityName, $identifier) $entity = $class->newInstance(); $class->setIdentifierValues($entity, $identifier); $this->unitOfWork->registerManaged($entity, $identifier, array()); + $this->unitOfWork->markReadOnly($entity); return $entity; } @@ -421,16 +456,11 @@ public function getPartialReference($entityName, $identifier) * Clears the EntityManager. All entities that are currently managed * by this EntityManager become detached. * - * @param string $entityName + * @param string $entityName if given, only entities of this type will get detached */ public function clear($entityName = null) { - if ($entityName === null) { - $this->unitOfWork->clear(); - } else { - //TODO - throw new ORMException("EntityManager#clear(\$entityName) not yet implemented."); - } + $this->unitOfWork->clear($entityName); } /** @@ -449,7 +479,7 @@ public function close() * * The entity will be entered into the database at or before transaction * commit or as a result of the flush operation. - * + * * NOTE: The persist operation always considers entities that are not yet known to * this EntityManager as NEW. Do not pass detached entities to the persist operation. * @@ -460,7 +490,9 @@ public function persist($entity) if ( ! is_object($entity)) { throw new \InvalidArgumentException(gettype($entity)); } + $this->errorIfClosed(); + $this->unitOfWork->persist($entity); } @@ -477,7 +509,9 @@ public function remove($entity) if ( ! is_object($entity)) { throw new \InvalidArgumentException(gettype($entity)); } + $this->errorIfClosed(); + $this->unitOfWork->remove($entity); } @@ -492,7 +526,9 @@ public function refresh($entity) if ( ! is_object($entity)) { throw new \InvalidArgumentException(gettype($entity)); } + $this->errorIfClosed(); + $this->unitOfWork->refresh($entity); } @@ -510,6 +546,7 @@ public function detach($entity) if ( ! is_object($entity)) { throw new \InvalidArgumentException(gettype($entity)); } + $this->unitOfWork->detach($entity); } @@ -526,7 +563,9 @@ public function merge($entity) if ( ! is_object($entity)) { throw new \InvalidArgumentException(gettype($entity)); } + $this->errorIfClosed(); + return $this->unitOfWork->merge($entity); } @@ -566,19 +605,20 @@ public function lock($entity, $lockMode, $lockVersion = null) public function getRepository($entityName) { $entityName = ltrim($entityName, '\\'); + if (isset($this->repositories[$entityName])) { return $this->repositories[$entityName]; } $metadata = $this->getClassMetadata($entityName); - $customRepositoryClassName = $metadata->customRepositoryClassName; + $repositoryClassName = $metadata->customRepositoryClassName; - if ($customRepositoryClassName !== null) { - $repository = new $customRepositoryClassName($this, $metadata); - } else { - $repository = new EntityRepository($this, $metadata); + if ($repositoryClassName === null) { + $repositoryClassName = $this->config->getDefaultRepositoryClassName(); } + $repository = new $repositoryClassName($this, $metadata); + $this->repositories[$entityName] = $repository; return $repository; @@ -592,15 +632,15 @@ public function getRepository($entityName) */ public function contains($entity) { - return $this->unitOfWork->isScheduledForInsert($entity) || - $this->unitOfWork->isInIdentityMap($entity) && - ! $this->unitOfWork->isScheduledForDelete($entity); + return $this->unitOfWork->isScheduledForInsert($entity) + || $this->unitOfWork->isInIdentityMap($entity) + && ! $this->unitOfWork->isScheduledForDelete($entity); } /** * Gets the EventManager used by the EntityManager. * - * @return Doctrine\Common\EventManager + * @return \Doctrine\Common\EventManager */ public function getEventManager() { @@ -610,7 +650,7 @@ public function getEventManager() /** * Gets the Configuration used by the EntityManager. * - * @return Doctrine\ORM\Configuration + * @return \Doctrine\ORM\Configuration */ public function getConfiguration() { @@ -631,7 +671,7 @@ private function errorIfClosed() /** * Check if the Entity manager is open or closed. - * + * * @return bool */ public function isOpen() @@ -642,7 +682,7 @@ public function isOpen() /** * Gets the UnitOfWork used by the EntityManager to coordinate operations. * - * @return Doctrine\ORM\UnitOfWork + * @return \Doctrine\ORM\UnitOfWork */ public function getUnitOfWork() { @@ -656,7 +696,7 @@ public function getUnitOfWork() * selectively iterate over the result. * * @param int $hydrationMode - * @return Doctrine\ORM\Internal\Hydration\AbstractHydrator + * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ public function getHydrator($hydrationMode) { @@ -671,35 +711,33 @@ public function getHydrator($hydrationMode) * Create a new instance for the given hydration mode. * * @param int $hydrationMode - * @return Doctrine\ORM\Internal\Hydration\AbstractHydrator + * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ public function newHydrator($hydrationMode) { switch ($hydrationMode) { case Query::HYDRATE_OBJECT: - $hydrator = new Internal\Hydration\ObjectHydrator($this); - break; + return new Internal\Hydration\ObjectHydrator($this); + case Query::HYDRATE_ARRAY: - $hydrator = new Internal\Hydration\ArrayHydrator($this); - break; + return new Internal\Hydration\ArrayHydrator($this); + case Query::HYDRATE_SCALAR: - $hydrator = new Internal\Hydration\ScalarHydrator($this); - break; + return new Internal\Hydration\ScalarHydrator($this); + case Query::HYDRATE_SINGLE_SCALAR: - $hydrator = new Internal\Hydration\SingleScalarHydrator($this); - break; + return new Internal\Hydration\SingleScalarHydrator($this); + case Query::HYDRATE_SIMPLEOBJECT: - $hydrator = new Internal\Hydration\SimpleObjectHydrator($this); - break; + return new Internal\Hydration\SimpleObjectHydrator($this); + default: if ($class = $this->config->getCustomHydrationMode($hydrationMode)) { - $hydrator = new $class($this); - break; + return new $class($this); } - throw ORMException::invalidHydrationMode($hydrationMode); } - return $hydrator; + throw ORMException::invalidHydrationMode($hydrationMode); } /** @@ -712,6 +750,18 @@ public function getProxyFactory() return $this->proxyFactory; } + /** + * Helper method to initialize a lazy loading proxy or persistent collection. + * + * This method is a no-op for other objects + * + * @param object $obj + */ + public function initializeObject($obj) + { + $this->unitOfWork->initializeObject($obj); + } + /** * Factory method to create EntityManager instances. * @@ -723,20 +773,62 @@ public function getProxyFactory() */ public static function create($conn, Configuration $config, EventManager $eventManager = null) { - if (!$config->getMetadataDriverImpl()) { + if ( ! $config->getMetadataDriverImpl()) { throw ORMException::missingMappingDriverImpl(); } - if (is_array($conn)) { - $conn = \Doctrine\DBAL\DriverManager::getConnection($conn, $config, ($eventManager ?: new EventManager())); - } else if ($conn instanceof Connection) { - if ($eventManager !== null && $conn->getEventManager() !== $eventManager) { - throw ORMException::mismatchedEventManager(); - } - } else { - throw new \InvalidArgumentException("Invalid argument: " . $conn); + switch (true) { + case (is_array($conn)): + $conn = \Doctrine\DBAL\DriverManager::getConnection( + $conn, $config, ($eventManager ?: new EventManager()) + ); + break; + + case ($conn instanceof Connection): + if ($eventManager !== null && $conn->getEventManager() !== $eventManager) { + throw ORMException::mismatchedEventManager(); + } + break; + + default: + throw new \InvalidArgumentException("Invalid argument: " . $conn); } return new EntityManager($conn, $config, $conn->getEventManager()); } + + /** + * Gets the enabled filters. + * + * @return FilterCollection The active filter collection. + */ + public function getFilters() + { + if (null === $this->filterCollection) { + $this->filterCollection = new FilterCollection($this); + } + + return $this->filterCollection; + } + + /** + * Checks whether the state of the filter collection is clean. + * + * @return boolean True, if the filter collection is clean. + */ + public function isFiltersStateClean() + { + return null === $this->filterCollection + || $this->filterCollection->isClean(); + } + + /** + * Checks whether the Entity Manager has filters. + * + * @return True, if the EM has a filter collection. + */ + public function hasFilters() + { + return null !== $this->filterCollection; + } } diff --git a/src/lib/Doctrine/ORM/EntityRepository.php b/src/lib/Doctrine/ORM/EntityRepository.php index de2689db2a..17cc298074 100644 --- a/src/lib/Doctrine/ORM/EntityRepository.php +++ b/src/lib/Doctrine/ORM/EntityRepository.php @@ -48,7 +48,7 @@ class EntityRepository implements ObjectRepository protected $_em; /** - * @var Doctrine\ORM\Mapping\ClassMetadata + * @var \Doctrine\ORM\Mapping\ClassMetadata */ protected $_class; @@ -107,42 +107,51 @@ public function clear() */ public function find($id, $lockMode = LockMode::NONE, $lockVersion = null) { + if ( ! is_array($id)) { + $id = array($this->_class->identifier[0] => $id); + } + $sortedId = array(); + foreach ($this->_class->identifier as $identifier) { + if (!isset($id[$identifier])) { + throw ORMException::missingIdentifierField($this->_class->name, $identifier); + } + $sortedId[$identifier] = $id[$identifier]; + } + // Check identity map first - if ($entity = $this->_em->getUnitOfWork()->tryGetById($id, $this->_class->rootEntityName)) { - if (!($entity instanceof $this->_class->name)) { + if ($entity = $this->_em->getUnitOfWork()->tryGetById($sortedId, $this->_class->rootEntityName)) { + if ( ! ($entity instanceof $this->_class->name)) { return null; } - - if ($lockMode != LockMode::NONE) { + + if ($lockMode !== LockMode::NONE) { $this->_em->lock($entity, $lockMode, $lockVersion); } return $entity; // Hit! } - if ( ! is_array($id) || count($id) <= 1) { - // @todo FIXME: Not correct. Relies on specific order. - $value = is_array($id) ? array_values($id) : array($id); - $id = array_combine($this->_class->identifier, $value); - } + switch ($lockMode) { + case LockMode::NONE: + return $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($sortedId); - if ($lockMode == LockMode::NONE) { - return $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($id); - } else if ($lockMode == LockMode::OPTIMISTIC) { - if (!$this->_class->isVersioned) { - throw OptimisticLockException::notVersioned($this->_entityName); - } - $entity = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($id); + case LockMode::OPTIMISTIC: + if ( ! $this->_class->isVersioned) { + throw OptimisticLockException::notVersioned($this->_entityName); + } - $this->_em->getUnitOfWork()->lock($entity, $lockMode, $lockVersion); + $entity = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($sortedId); - return $entity; - } else { - if (!$this->_em->getConnection()->isTransactionActive()) { - throw TransactionRequiredException::transactionRequired(); - } - - return $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($id, null, null, array(), $lockMode); + $this->_em->getUnitOfWork()->lock($entity, $lockMode, $lockVersion); + + return $entity; + + default: + if ( ! $this->_em->getConnection()->isTransactionActive()) { + throw TransactionRequiredException::transactionRequired(); + } + + return $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($sortedId, null, null, array(), $lockMode); } } @@ -178,7 +187,7 @@ public function findBy(array $criteria, array $orderBy = null, $limit = null, $o */ public function findOneBy(array $criteria) { - return $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($criteria); + return $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName)->load($criteria, null, null, array(), 0, 1); } /** @@ -191,31 +200,35 @@ public function findOneBy(array $criteria) */ public function __call($method, $arguments) { - if (substr($method, 0, 6) == 'findBy') { - $by = substr($method, 6, strlen($method)); - $method = 'findBy'; - } else if (substr($method, 0, 9) == 'findOneBy') { - $by = substr($method, 9, strlen($method)); - $method = 'findOneBy'; - } else { - throw new \BadMethodCallException( - "Undefined method '$method'. The method name must start with ". - "either findBy or findOneBy!" - ); + switch (true) { + case (substr($method, 0, 6) == 'findBy'): + $by = substr($method, 6, strlen($method)); + $method = 'findBy'; + break; + + case (substr($method, 0, 9) == 'findOneBy'): + $by = substr($method, 9, strlen($method)); + $method = 'findOneBy'; + break; + + default: + throw new \BadMethodCallException( + "Undefined method '$method'. The method name must start with ". + "either findBy or findOneBy!" + ); } - if ( !isset($arguments[0])) { - // we dont even want to allow null at this point, because we cannot (yet) transform it into IS NULL. - throw ORMException::findByRequiresParameter($method.$by); + if (empty($arguments)) { + throw ORMException::findByRequiresParameter($method . $by); } $fieldName = lcfirst(\Doctrine\Common\Util\Inflector::classify($by)); if ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName)) { return $this->$method(array($fieldName => $arguments[0])); - } else { - throw ORMException::invalidFindByCall($this->_entityName, $fieldName, $method.$by); } + + throw ORMException::invalidFindByCall($this->_entityName, $fieldName, $method.$by); } /** @@ -226,6 +239,14 @@ protected function getEntityName() return $this->_entityName; } + /** + * @return string + */ + public function getClassName() + { + return $this->getEntityName(); + } + /** * @return EntityManager */ @@ -241,4 +262,4 @@ protected function getClassMetadata() { return $this->_class; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/ORM/Event/LifecycleEventArgs.php b/src/lib/Doctrine/ORM/Event/LifecycleEventArgs.php index a5dd39cfd4..6740a3e12a 100644 --- a/src/lib/Doctrine/ORM/Event/LifecycleEventArgs.php +++ b/src/lib/Doctrine/ORM/Event/LifecycleEventArgs.php @@ -19,42 +19,59 @@ namespace Doctrine\ORM\Event; +use Doctrine\Common\EventArgs; +use Doctrine\ORM\EntityManager; + /** * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions * of entities. * - * @since 2.0 + * @link www.doctrine-project.org + * @since 2.0 * @author Roman Borschel * @author Benjamin Eberlei */ -class LifecycleEventArgs extends \Doctrine\Common\EventArgs +class LifecycleEventArgs extends EventArgs { /** - * @var EntityManager + * @var \Doctrine\ORM\EntityManager */ - private $_em; + private $em; /** * @var object */ - private $_entity; - - public function __construct($entity, $em) + private $entity; + + /** + * Constructor + * + * @param object $entity + * @param \Doctrine\ORM\EntityManager $em + */ + public function __construct($entity, EntityManager $em) { - $this->_entity = $entity; - $this->_em = $em; + $this->entity = $entity; + $this->em = $em; } - + + /** + * Retireve associated Entity. + * + * @return object + */ public function getEntity() { - return $this->_entity; + return $this->entity; } /** - * @return EntityManager + * Retrieve associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager */ public function getEntityManager() { - return $this->_em; + return $this->em; } } \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php b/src/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php index f00520a208..901bf3a780 100644 --- a/src/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php +++ b/src/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php @@ -1,9 +1,25 @@ . + */ namespace Doctrine\ORM\Event; use Doctrine\Common\EventArgs; - use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\ORM\EntityManager; @@ -11,32 +27,36 @@ * Class that holds event arguments for a loadMetadata event. * * @author Jonathan H. Wage - * @since 2.0 + * @since 2.0 */ class LoadClassMetadataEventArgs extends EventArgs { /** - * @var ClassMetadata + * @var \Doctrine\ORM\Mapping\ClassMetadata */ private $classMetadata; /** - * @var EntityManager + * @var \Doctrine\ORM\EntityManager */ private $em; /** - * @param ClassMetadataInfo $classMetadata - * @param EntityManager $em + * Constructor. + * + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $classMetadata + * @param \Doctrine\ORM\EntityManager $em */ public function __construct(ClassMetadataInfo $classMetadata, EntityManager $em) { $this->classMetadata = $classMetadata; - $this->em = $em; + $this->em = $em; } /** - * @return ClassMetadataInfo + * Retrieve associated ClassMetadata. + * + * @return \Doctrine\ORM\Mapping\ClassMetadataInfo */ public function getClassMetadata() { @@ -44,7 +64,9 @@ public function getClassMetadata() } /** - * @return EntityManager + * Retrieve associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager */ public function getEntityManager() { diff --git a/src/lib/Doctrine/ORM/Event/OnClearEventArgs.php b/src/lib/Doctrine/ORM/Event/OnClearEventArgs.php index ad89fbc90d..542ac45e3a 100644 --- a/src/lib/Doctrine/ORM/Event/OnClearEventArgs.php +++ b/src/lib/Doctrine/ORM/Event/OnClearEventArgs.php @@ -15,7 +15,7 @@ * This software consists of voluntary contributions made by many individuals * and is licensed under the LGPL. For more information, see * . -*/ + */ namespace Doctrine\ORM\Event; @@ -23,9 +23,8 @@ * Provides event arguments for the onClear event. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.com + * @link www.doctrine-project.org * @since 2.0 - * @version $Revision$ * @author Roman Borschel * @author Benjamin Eberlei */ @@ -37,18 +36,49 @@ class OnClearEventArgs extends \Doctrine\Common\EventArgs private $em; /** + * @var string + */ + private $entityClass; + + /** + * Constructor. + * * @param \Doctrine\ORM\EntityManager $em + * @param string $entityClass Optional entity class */ - public function __construct($em) + public function __construct($em, $entityClass = null) { - $this->em = $em; + $this->em = $em; + $this->entityClass = $entityClass; } /** + * Retrieve associated EntityManager. + * * @return \Doctrine\ORM\EntityManager */ public function getEntityManager() { return $this->em; } + + /** + * Name of the entity class that is cleared, or empty if all are cleared. + * + * @return string + */ + public function getEntityClass() + { + return $this->entityClass; + } + + /** + * Check if event clears all entities. + * + * @return bool + */ + public function clearsAllEntities() + { + return ($this->entityClass === null); + } } \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Event/OnFlushEventArgs.php b/src/lib/Doctrine/ORM/Event/OnFlushEventArgs.php index 1b4cb9ba81..c4aeb2a164 100644 --- a/src/lib/Doctrine/ORM/Event/OnFlushEventArgs.php +++ b/src/lib/Doctrine/ORM/Event/OnFlushEventArgs.php @@ -21,55 +21,63 @@ namespace Doctrine\ORM\Event; +use Doctrine\ORM\EntityManager; + /** * Provides event arguments for the preFlush event. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.com + * @link www.doctrine-project.org * @since 2.0 - * @version $Revision$ * @author Roman Borschel * @author Benjamin Eberlei */ class OnFlushEventArgs extends \Doctrine\Common\EventArgs { /** - * @var EntityManager + * @var Doctirne\ORM\EntityManager + */ + private $em; + + //private $entitiesToPersist = array(); + //private $entitiesToRemove = array(); + + /** + * Constructor. + * + * @param \Doctrine\ORM\EntityManager $em */ - private $_em; - - //private $_entitiesToPersist = array(); - //private $_entitiesToRemove = array(); - - public function __construct($em) + public function __construct(EntityManager $em) { - $this->_em = $em; + $this->em = $em; } /** - * @return EntityManager + * Retrieve associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager */ public function getEntityManager() { - return $this->_em; + return $this->em; } - + /* public function addEntityToPersist($entity) { - + } - + public function addEntityToRemove($entity) { - + } - + public function addEntityToUpdate($entity) { - + } - + public function getEntitiesToPersist() { return $this->_entitiesToPersist; diff --git a/src/lib/Doctrine/ORM/Event/PostFlushEventArgs.php b/src/lib/Doctrine/ORM/Event/PostFlushEventArgs.php new file mode 100644 index 0000000000..f45030de73 --- /dev/null +++ b/src/lib/Doctrine/ORM/Event/PostFlushEventArgs.php @@ -0,0 +1,61 @@ +. + */ + +namespace Doctrine\ORM\Event; + +use Doctrine\ORM\EntityManager; +use Doctrine\Common\EventArgs; + +/** + * Provides event arguments for the postFlush event. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @author Daniel Freudenberger + */ +class PostFlushEventArgs extends EventArgs +{ + /** + * @var \Doctrine\ORM\EntityManager + */ + private $em; + + /** + * Constructor. + * + * @param \Doctrine\ORM\EntityManager $em + */ + public function __construct(EntityManager $em) + { + $this->em = $em; + } + + /** + * Retrieve associated EntityManager. + * + * @return \Doctrine\ORM\EntityManager + */ + public function getEntityManager() + { + return $this->em; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Event/PreFlushEventArgs.php b/src/lib/Doctrine/ORM/Event/PreFlushEventArgs.php new file mode 100644 index 0000000000..b86967a72f --- /dev/null +++ b/src/lib/Doctrine/ORM/Event/PreFlushEventArgs.php @@ -0,0 +1,53 @@ +. +*/ + +namespace Doctrine\ORM\Event; + +/** + * Provides event arguments for the preFlush event. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.0 + * @version $Revision$ + * @author Roman Borschel + * @author Benjamin Eberlei + */ +class PreFlushEventArgs extends \Doctrine\Common\EventArgs +{ + /** + * @var EntityManager + */ + private $_em; + + public function __construct($em) + { + $this->_em = $em; + } + + /** + * @return EntityManager + */ + public function getEntityManager() + { + return $this->_em; + } +} diff --git a/src/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php b/src/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php index c61e26d4cd..0bebba1c8b 100644 --- a/src/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php +++ b/src/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php @@ -1,4 +1,23 @@ . + */ namespace Doctrine\ORM\Event; @@ -8,55 +27,63 @@ /** * Class that holds event arguments for a preInsert/preUpdate event. * + * @author Guilherme Blanco * @author Roman Borschel * @author Benjamin Eberlei - * @since 2.0 + * @since 2.0 */ class PreUpdateEventArgs extends LifecycleEventArgs { /** * @var array */ - private $_entityChangeSet; + private $entityChangeSet; /** + * Constructor. * * @param object $entity - * @param EntityManager $em + * @param \Doctrine\ORM\EntityManager $em * @param array $changeSet */ - public function __construct($entity, $em, array &$changeSet) + public function __construct($entity, EntityManager $em, array &$changeSet) { parent::__construct($entity, $em); - $this->_entityChangeSet = &$changeSet; + + $this->entityChangeSet = &$changeSet; } + /** + * Retrieve entity changeset. + * + * @return array + */ public function getEntityChangeSet() { - return $this->_entityChangeSet; + return $this->entityChangeSet; } /** - * Field has a changeset? + * Check if field has a changeset. * - * @return bool + * @return boolean */ public function hasChangedField($field) { - return isset($this->_entityChangeSet[$field]); + return isset($this->entityChangeSet[$field]); } /** * Get the old value of the changeset of the changed field. - * + * * @param string $field * @return mixed */ public function getOldValue($field) { - $this->_assertValidField($field); + $this->assertValidField($field); - return $this->_entityChangeSet[$field][0]; + return $this->entityChangeSet[$field][0]; } /** @@ -67,31 +94,37 @@ public function getOldValue($field) */ public function getNewValue($field) { - $this->_assertValidField($field); + $this->assertValidField($field); - return $this->_entityChangeSet[$field][1]; + return $this->entityChangeSet[$field][1]; } /** * Set the new value of this field. - * + * * @param string $field * @param mixed $value */ public function setNewValue($field, $value) { - $this->_assertValidField($field); + $this->assertValidField($field); - $this->_entityChangeSet[$field][1] = $value; + $this->entityChangeSet[$field][1] = $value; } - private function _assertValidField($field) + /** + * Assert the field exists in changeset. + * + * @param string $field + */ + private function assertValidField($field) { - if (!isset($this->_entityChangeSet[$field])) { - throw new \InvalidArgumentException( - "Field '".$field."' is not a valid field of the entity ". - "'".get_class($this->getEntity())."' in PreInsertUpdateEventArgs." - ); + if ( ! isset($this->entityChangeSet[$field])) { + throw new \InvalidArgumentException(sprintf( + 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', + $field, + get_class($this->getEntity()) + )); } } } diff --git a/src/lib/Doctrine/ORM/Events.php b/src/lib/Doctrine/ORM/Events.php index 8344b07c1d..45424e7c23 100644 --- a/src/lib/Doctrine/ORM/Events.php +++ b/src/lib/Doctrine/ORM/Events.php @@ -35,55 +35,55 @@ private function __construct() {} /** * The preRemove event occurs for a given entity before the respective * EntityManager remove operation for that entity is executed. - * + * * This is an entity lifecycle event. - * + * * @var string */ const preRemove = 'preRemove'; /** - * The postRemove event occurs for an entity after the entity has + * The postRemove event occurs for an entity after the entity has * been deleted. It will be invoked after the database delete operations. - * + * * This is an entity lifecycle event. - * + * * @var string */ const postRemove = 'postRemove'; /** * The prePersist event occurs for a given entity before the respective * EntityManager persist operation for that entity is executed. - * + * * This is an entity lifecycle event. - * + * * @var string */ const prePersist = 'prePersist'; /** - * The postPersist event occurs for an entity after the entity has + * The postPersist event occurs for an entity after the entity has * been made persistent. It will be invoked after the database insert operations. * Generated primary key values are available in the postPersist event. - * + * * This is an entity lifecycle event. - * + * * @var string */ const postPersist = 'postPersist'; /** - * The preUpdate event occurs before the database update operations to - * entity data. - * + * The preUpdate event occurs before the database update operations to + * entity data. + * * This is an entity lifecycle event. - * + * * @var string */ const preUpdate = 'preUpdate'; /** - * The postUpdate event occurs after the database update operations to - * entity data. - * + * The postUpdate event occurs after the database update operations to + * entity data. + * * This is an entity lifecycle event. - * + * * @var string */ const postUpdate = 'postUpdate'; @@ -91,35 +91,53 @@ private function __construct() {} * The postLoad event occurs for an entity after the entity has been loaded * into the current EntityManager from the database or after the refresh operation * has been applied to it. - * + * * Note that the postLoad event occurs for an entity before any associations have been * initialized. Therefore it is not safe to access associations in a postLoad callback * or event handler. - * + * * This is an entity lifecycle event. - * + * * @var string */ const postLoad = 'postLoad'; /** * The loadClassMetadata event occurs after the mapping metadata for a class * has been loaded from a mapping source (annotations/xml/yaml). - * + * * @var string */ const loadClassMetadata = 'loadClassMetadata'; - + + /** + * The preFlush event occurs when the EntityManager#flush() operation is invoked, + * but before any changes to managed entites have been calculated. This event is + * always raised right after EntityManager#flush() call. + */ + const preFlush = 'preFlush'; + /** * The onFlush event occurs when the EntityManager#flush() operation is invoked, * after any changes to managed entities have been determined but before any * actual database operations are executed. The event is only raised if there is * actually something to do for the underlying UnitOfWork. If nothing needs to be done, * the onFlush event is not raised. - * + * * @var string */ const onFlush = 'onFlush'; + /** + * The postFlush event occurs when the EntityManager#flush() operation is invoked and + * after all actual database operations are executed successfully. The event is only raised if there is + * actually something to do for the underlying UnitOfWork. If nothing needs to be done, + * the postFlush event is not raised. The event won't be raised if an error occurs during the + * flush operation. + * + * @var string + */ + const postFlush = 'postFlush'; + /** * The onClear event occurs when the EntityManager#clear() operation is invoked, * after all references to entities have been removed from the unit of work. diff --git a/src/lib/Doctrine/ORM/Id/AbstractIdGenerator.php b/src/lib/Doctrine/ORM/Id/AbstractIdGenerator.php index cfe3b5dafc..d27c00b772 100644 --- a/src/lib/Doctrine/ORM/Id/AbstractIdGenerator.php +++ b/src/lib/Doctrine/ORM/Id/AbstractIdGenerator.php @@ -26,7 +26,7 @@ abstract class AbstractIdGenerator /** * Generates an identifier for an entity. * - * @param Doctrine\ORM\Entity $entity + * @param \Doctrine\ORM\Entity $entity * @return mixed */ abstract public function generate(EntityManager $em, $entity); @@ -35,7 +35,7 @@ abstract public function generate(EntityManager $em, $entity); * Gets whether this generator is a post-insert generator which means that * {@link generate()} must be called after the entity has been inserted * into the database. - * + * * By default, this method returns FALSE. Generators that have this requirement * must override this method and return TRUE. * diff --git a/src/lib/Doctrine/ORM/Id/AssignedGenerator.php b/src/lib/Doctrine/ORM/Id/AssignedGenerator.php index 05c3790afb..c9f9adad88 100644 --- a/src/lib/Doctrine/ORM/Id/AssignedGenerator.php +++ b/src/lib/Doctrine/ORM/Id/AssignedGenerator.php @@ -20,6 +20,7 @@ namespace Doctrine\ORM\Id; use Doctrine\ORM\EntityManager; +use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\ORMException; /** @@ -42,46 +43,29 @@ class AssignedGenerator extends AbstractIdGenerator */ public function generate(EntityManager $em, $entity) { - $class = $em->getClassMetadata(get_class($entity)); + $class = $em->getClassMetadata(get_class($entity)); + $idFields = $class->getIdentifierFieldNames(); $identifier = array(); - if ($class->isIdentifierComposite) { - $idFields = $class->getIdentifierFieldNames(); - foreach ($idFields as $idField) { - $value = $class->reflFields[$idField]->getValue($entity); - if (isset($value)) { - if (isset($class->associationMappings[$idField])) { - if (!$em->getUnitOfWork()->isInIdentityMap($value)) { - throw ORMException::entityMissingForeignAssignedId($entity, $value); - } - - // NOTE: Single Columns as associated identifiers only allowed - this constraint it is enforced. - $identifier[$idField] = current($em->getUnitOfWork()->getEntityIdentifier($value)); - } else { - $identifier[$idField] = $value; - } - } else { - throw ORMException::entityMissingAssignedId($entity); - } - } - } else { - $idField = $class->identifier[0]; + + foreach ($idFields as $idField) { $value = $class->reflFields[$idField]->getValue($entity); - if (isset($value)) { - if (isset($class->associationMappings[$idField])) { - if (!$em->getUnitOfWork()->isInIdentityMap($value)) { - throw ORMException::entityMissingForeignAssignedId($entity, $value); - } - - // NOTE: Single Columns as associated identifiers only allowed - this constraint it is enforced. - $identifier[$idField] = current($em->getUnitOfWork()->getEntityIdentifier($value)); - } else { - $identifier[$idField] = $value; + + if ( ! isset($value)) { + throw ORMException::entityMissingAssignedIdForField($entity, $idField); + } + + if (isset($class->associationMappings[$idField])) { + if ( ! $em->getUnitOfWork()->isInIdentityMap($value)) { + throw ORMException::entityMissingForeignAssignedId($entity, $value); } - } else { - throw ORMException::entityMissingAssignedId($entity); + + // NOTE: Single Columns as associated identifiers only allowed - this constraint it is enforced. + $value = current($em->getUnitOfWork()->getEntityIdentifier($value)); } + + $identifier[$idField] = $value; } - + return $identifier; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/ORM/Id/IdentityGenerator.php b/src/lib/Doctrine/ORM/Id/IdentityGenerator.php index 75da2733d4..d244871f2f 100644 --- a/src/lib/Doctrine/ORM/Id/IdentityGenerator.php +++ b/src/lib/Doctrine/ORM/Id/IdentityGenerator.php @@ -46,7 +46,7 @@ public function __construct($seqName = null) */ public function generate(EntityManager $em, $entity) { - return $em->getConnection()->lastInsertId($this->_seqName); + return (int)$em->getConnection()->lastInsertId($this->_seqName); } /** diff --git a/src/lib/Doctrine/ORM/Id/SequenceGenerator.php b/src/lib/Doctrine/ORM/Id/SequenceGenerator.php index 0d564ed329..79240610e4 100644 --- a/src/lib/Doctrine/ORM/Id/SequenceGenerator.php +++ b/src/lib/Doctrine/ORM/Id/SequenceGenerator.php @@ -37,7 +37,7 @@ class SequenceGenerator extends AbstractIdGenerator implements Serializable /** * Initializes a new sequence generator. * - * @param Doctrine\ORM\EntityManager $em The EntityManager to use. + * @param \Doctrine\ORM\EntityManager $em The EntityManager to use. * @param string $sequenceName The name of the sequence. * @param integer $allocationSize The allocation size of the sequence. */ @@ -46,7 +46,7 @@ public function __construct($sequenceName, $allocationSize) $this->_sequenceName = $sequenceName; $this->_allocationSize = $allocationSize; } - + /** * Generates an ID for the given entity. * @@ -59,10 +59,12 @@ public function generate(EntityManager $em, $entity) if ($this->_maxValue === null || $this->_nextValue == $this->_maxValue) { // Allocate new values $conn = $em->getConnection(); - $sql = $conn->getDatabasePlatform()->getSequenceNextValSQL($this->_sequenceName); - $this->_nextValue = $conn->fetchColumn($sql); - $this->_maxValue = $this->_nextValue + $this->_allocationSize; + $sql = $conn->getDatabasePlatform()->getSequenceNextValSQL($this->_sequenceName); + + $this->_nextValue = (int)$conn->fetchColumn($sql); + $this->_maxValue = $this->_nextValue + $this->_allocationSize; } + return $this->_nextValue++; } @@ -90,13 +92,14 @@ public function serialize() { return serialize(array( 'allocationSize' => $this->_allocationSize, - 'sequenceName' => $this->_sequenceName + 'sequenceName' => $this->_sequenceName )); } public function unserialize($serialized) { $array = unserialize($serialized); + $this->_sequenceName = $array['sequenceName']; $this->_allocationSize = $array['allocationSize']; } diff --git a/src/lib/Doctrine/ORM/Id/TableGenerator.php b/src/lib/Doctrine/ORM/Id/TableGenerator.php index 5c46f8b5c1..24b1d90e56 100644 --- a/src/lib/Doctrine/ORM/Id/TableGenerator.php +++ b/src/lib/Doctrine/ORM/Id/TableGenerator.php @@ -50,11 +50,12 @@ public function generate(EntityManager $em, $entity) if ($this->_maxValue === null || $this->_nextValue == $this->_maxValue) { // Allocate new values $conn = $em->getConnection(); - if ($conn->getTransactionNestingLevel() == 0) { + if ($conn->getTransactionNestingLevel() === 0) { // use select for update - $sql = $conn->getDatabasePlatform()->getTableHiLoCurrentValSql($this->_tableName, $this->_sequenceName); + $sql = $conn->getDatabasePlatform()->getTableHiLoCurrentValSql($this->_tableName, $this->_sequenceName); $currentLevel = $conn->fetchColumn($sql); + if ($currentLevel != null) { $this->_nextValue = $currentLevel; $this->_maxValue = $this->_nextValue + $this->_allocationSize; @@ -62,7 +63,7 @@ public function generate(EntityManager $em, $entity) $updateSql = $conn->getDatabasePlatform()->getTableHiLoUpdateNextValSql( $this->_tableName, $this->_sequenceName, $this->_allocationSize ); - + if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel+1)) !== 1) { // no affected rows, concurrency issue, throw exception } @@ -74,6 +75,7 @@ public function generate(EntityManager $em, $entity) // or do we want to work with table locks exclusively? } } + return $this->_nextValue++; } } \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php b/src/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php index 8997b1ea53..049cab060a 100644 --- a/src/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php +++ b/src/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php @@ -23,20 +23,21 @@ * The CommitOrderCalculator is used by the UnitOfWork to sort out the * correct order in which changes to entities need to be persisted. * - * @since 2.0 - * @author Roman Borschel + * @since 2.0 + * @author Roman Borschel + * @author Guilherme Blanco */ class CommitOrderCalculator { const NOT_VISITED = 1; const IN_PROGRESS = 2; const VISITED = 3; - + private $_nodeStates = array(); private $_classes = array(); // The nodes to sort private $_relatedClasses = array(); private $_sorted = array(); - + /** * Clears the current graph. * @@ -47,10 +48,10 @@ public function clear() $this->_classes = $this->_relatedClasses = array(); } - + /** * Gets a valid commit order for all current nodes. - * + * * Uses a depth-first search (DFS) to traverse the graph. * The desired topological sorting is the reverse postorder of these searches. * @@ -60,17 +61,16 @@ public function getCommitOrder() { // Check whether we need to do anything. 0 or 1 node is easy. $nodeCount = count($this->_classes); - if ($nodeCount == 0) { - return array(); - } else if ($nodeCount == 1) { - return array_values($this->_classes); + + if ($nodeCount <= 1) { + return ($nodeCount == 1) ? array_values($this->_classes) : array(); } - + // Init foreach ($this->_classes as $node) { $this->_nodeStates[$node->name] = self::NOT_VISITED; } - + // Go foreach ($this->_classes as $node) { if ($this->_nodeStates[$node->name] == self::NOT_VISITED) { @@ -100,17 +100,17 @@ private function _visitNode($node) $this->_nodeStates[$node->name] = self::VISITED; $this->_sorted[] = $node; } - + public function addDependency($fromClass, $toClass) { $this->_relatedClasses[$fromClass->name][] = $toClass; } - + public function hasClass($className) { return isset($this->_classes[$className]); } - + public function addClass($class) { $this->_classes[$class->name] = $class; diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php b/src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php index 4bc53f7388..945288b768 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php @@ -22,15 +22,17 @@ use PDO, Doctrine\DBAL\Connection, Doctrine\DBAL\Types\Type, - Doctrine\ORM\EntityManager; + Doctrine\ORM\EntityManager, + Doctrine\ORM\Mapping\ClassMetadata; /** * Base class for all hydrators. A hydrator is a class that provides some form * of transformation of an SQL result set into another structure. * - * @since 2.0 - * @author Konsta Vesterinen - * @author Roman Borschel + * @since 2.0 + * @author Konsta Vesterinen + * @author Roman Borschel + * @author Guilherme Blanco */ abstract class AbstractHydrator { @@ -58,13 +60,13 @@ abstract class AbstractHydrator /** * Initializes a new instance of a class derived from AbstractHydrator. * - * @param Doctrine\ORM\EntityManager $em The EntityManager to use. + * @param \Doctrine\ORM\EntityManager $em The EntityManager to use. */ public function __construct(EntityManager $em) { - $this->_em = $em; + $this->_em = $em; $this->_platform = $em->getConnection()->getDatabasePlatform(); - $this->_uow = $em->getUnitOfWork(); + $this->_uow = $em->getUnitOfWork(); } /** @@ -72,14 +74,17 @@ public function __construct(EntityManager $em) * * @param object $stmt * @param object $resultSetMapping + * * @return IterableResult */ public function iterate($stmt, $resultSetMapping, array $hints = array()) { - $this->_stmt = $stmt; - $this->_rsm = $resultSetMapping; + $this->_stmt = $stmt; + $this->_rsm = $resultSetMapping; $this->_hints = $hints; - $this->_prepare(); + + $this->prepare(); + return new IterableResult($this); } @@ -92,12 +97,16 @@ public function iterate($stmt, $resultSetMapping, array $hints = array()) */ public function hydrateAll($stmt, $resultSetMapping, array $hints = array()) { - $this->_stmt = $stmt; - $this->_rsm = $resultSetMapping; + $this->_stmt = $stmt; + $this->_rsm = $resultSetMapping; $this->_hints = $hints; - $this->_prepare(); - $result = $this->_hydrateAll(); - $this->_cleanup(); + + $this->prepare(); + + $result = $this->hydrateAllData(); + + $this->cleanup(); + return $result; } @@ -110,12 +119,17 @@ public function hydrateAll($stmt, $resultSetMapping, array $hints = array()) public function hydrateRow() { $row = $this->_stmt->fetch(PDO::FETCH_ASSOC); + if ( ! $row) { - $this->_cleanup(); + $this->cleanup(); + return false; } + $result = array(); - $this->_hydrateRow($row, $this->_cache, $result); + + $this->hydrateRowData($row, $this->_cache, $result); + return $result; } @@ -123,16 +137,17 @@ public function hydrateRow() * Excutes one-time preparation tasks, once each time hydration is started * through {@link hydrateAll} or {@link iterate()}. */ - protected function _prepare() + protected function prepare() {} /** * Excutes one-time cleanup tasks at the end of a hydration that was initiated * through {@link hydrateAll} or {@link iterate()}. */ - protected function _cleanup() + protected function cleanup() { $this->_rsm = null; + $this->_stmt->closeCursor(); $this->_stmt = null; } @@ -146,61 +161,81 @@ protected function _cleanup() * @param array $cache The cache to use. * @param mixed $result The result to fill. */ - protected function _hydrateRow(array $data, array &$cache, array &$result) + protected function hydrateRowData(array $data, array &$cache, array &$result) { - throw new HydrationException("_hydrateRow() not implemented by this hydrator."); + throw new HydrationException("hydrateRowData() not implemented by this hydrator."); } /** * Hydrates all rows from the current statement instance at once. */ - abstract protected function _hydrateAll(); + abstract protected function hydrateAllData(); /** * Processes a row of the result set. + * * Used for identity-based hydration (HYDRATE_OBJECT and HYDRATE_ARRAY). - * Puts the elements of a result row into a new array, grouped by the class + * Puts the elements of a result row into a new array, grouped by the dql alias * they belong to. The column names in the result set are mapped to their * field names during this procedure as well as any necessary conversions on - * the values applied. + * the values applied. Scalar values are kept in a specfic key 'scalars'. + * + * @param array $data SQL Result Row + * @param array &$cache Cache for column to field result information + * @param array &$id Dql-Alias => ID-Hash + * @param array &$nonemptyComponents Does this DQL-Alias has at least one non NULL value? * * @return array An array with all the fields (name => value) of the data row, * grouped by their component alias. */ - protected function _gatherRowData(array $data, array &$cache, array &$id, array &$nonemptyComponents) + protected function gatherRowData(array $data, array &$cache, array &$id, array &$nonemptyComponents) { $rowData = array(); foreach ($data as $key => $value) { // Parse each column name only once. Cache the results. if ( ! isset($cache[$key])) { - if (isset($this->_rsm->scalarMappings[$key])) { - $cache[$key]['fieldName'] = $this->_rsm->scalarMappings[$key]; - $cache[$key]['isScalar'] = true; - } else if (isset($this->_rsm->fieldMappings[$key])) { - $fieldName = $this->_rsm->fieldMappings[$key]; - $classMetadata = $this->_em->getClassMetadata($this->_rsm->declaringClasses[$key]); - $cache[$key]['fieldName'] = $fieldName; - $cache[$key]['type'] = Type::getType($classMetadata->fieldMappings[$fieldName]['type']); - $cache[$key]['isIdentifier'] = $classMetadata->isIdentifier($fieldName); - $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; - } else if (!isset($this->_rsm->metaMappings[$key])) { - // this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2 - // maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping. - continue; - } else { - // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns). - $fieldName = $this->_rsm->metaMappings[$key]; - $cache[$key]['isMetaColumn'] = true; - $cache[$key]['fieldName'] = $fieldName; - $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; - $classMetadata = $this->_em->getClassMetadata($this->_rsm->aliasMap[$cache[$key]['dqlAlias']]); - $cache[$key]['isIdentifier'] = isset($this->_rsm->isIdentifierColumn[$cache[$key]['dqlAlias']][$key]); + switch (true) { + // NOTE: Most of the times it's a field mapping, so keep it first!!! + case (isset($this->_rsm->fieldMappings[$key])): + $fieldName = $this->_rsm->fieldMappings[$key]; + $classMetadata = $this->_em->getClassMetadata($this->_rsm->declaringClasses[$key]); + + $cache[$key]['fieldName'] = $fieldName; + $cache[$key]['type'] = Type::getType($classMetadata->fieldMappings[$fieldName]['type']); + $cache[$key]['isIdentifier'] = $classMetadata->isIdentifier($fieldName); + $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; + break; + + case (isset($this->_rsm->scalarMappings[$key])): + $cache[$key]['fieldName'] = $this->_rsm->scalarMappings[$key]; + $cache[$key]['type'] = Type::getType($this->_rsm->typeMappings[$key]); + $cache[$key]['isScalar'] = true; + break; + + case (isset($this->_rsm->metaMappings[$key])): + // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns). + $fieldName = $this->_rsm->metaMappings[$key]; + $classMetadata = $this->_em->getClassMetadata($this->_rsm->aliasMap[$this->_rsm->columnOwnerMap[$key]]); + + $cache[$key]['isMetaColumn'] = true; + $cache[$key]['fieldName'] = $fieldName; + $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; + $cache[$key]['isIdentifier'] = isset($this->_rsm->isIdentifierColumn[$cache[$key]['dqlAlias']][$key]); + break; + + default: + // this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2 + // maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping. + continue 2; } } - + if (isset($cache[$key]['isScalar'])) { + $value = $cache[$key]['type']->convertToPHPValue($value, $this->_platform); + $rowData['scalars'][$cache[$key]['fieldName']] = $value; + continue; } @@ -211,13 +246,17 @@ protected function _gatherRowData(array $data, array &$cache, array &$id, array } if (isset($cache[$key]['isMetaColumn'])) { - if (!isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) || $value !== null) { + if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value !== null) { $rowData[$dqlAlias][$cache[$key]['fieldName']] = $value; + if ($cache[$key]['isIdentifier']) { + $nonemptyComponents[$dqlAlias] = true; + } } + continue; } - - // in an inheritance hierachy the same field could be defined several times. + + // in an inheritance hierarchy the same field could be defined several times. // We overwrite this value so long we dont have a non-null value, that value we keep. // Per definition it cannot be that a field is defined several times and has several values. if (isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value === null) { @@ -236,6 +275,7 @@ protected function _gatherRowData(array $data, array &$cache, array &$id, array /** * Processes a row of the result set. + * * Used for HYDRATE_SCALAR. This is a variant of _gatherRowData() that * simply converts column names to field names and properly converts the * values according to their types. The resulting row has the same number @@ -243,48 +283,95 @@ protected function _gatherRowData(array $data, array &$cache, array &$id, array * * @param array $data * @param array $cache + * * @return array The processed row. */ - protected function _gatherScalarRowData(&$data, &$cache) + protected function gatherScalarRowData(&$data, &$cache) { $rowData = array(); foreach ($data as $key => $value) { // Parse each column name only once. Cache the results. if ( ! isset($cache[$key])) { - if (isset($this->_rsm->scalarMappings[$key])) { - $cache[$key]['fieldName'] = $this->_rsm->scalarMappings[$key]; - $cache[$key]['isScalar'] = true; - } else if (isset($this->_rsm->fieldMappings[$key])) { - $fieldName = $this->_rsm->fieldMappings[$key]; - $classMetadata = $this->_em->getClassMetadata($this->_rsm->declaringClasses[$key]); - $cache[$key]['fieldName'] = $fieldName; - $cache[$key]['type'] = Type::getType($classMetadata->fieldMappings[$fieldName]['type']); - $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; - } else if (!isset($this->_rsm->metaMappings[$key])) { - // this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2 - // maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping. - continue; - } else { - // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns). - $cache[$key]['isMetaColumn'] = true; - $cache[$key]['fieldName'] = $this->_rsm->metaMappings[$key]; - $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; + switch (true) { + // NOTE: During scalar hydration, most of the times it's a scalar mapping, keep it first!!! + case (isset($this->_rsm->scalarMappings[$key])): + $cache[$key]['fieldName'] = $this->_rsm->scalarMappings[$key]; + $cache[$key]['isScalar'] = true; + break; + + case (isset($this->_rsm->fieldMappings[$key])): + $fieldName = $this->_rsm->fieldMappings[$key]; + $classMetadata = $this->_em->getClassMetadata($this->_rsm->declaringClasses[$key]); + + $cache[$key]['fieldName'] = $fieldName; + $cache[$key]['type'] = Type::getType($classMetadata->fieldMappings[$fieldName]['type']); + $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; + break; + + case (isset($this->_rsm->metaMappings[$key])): + // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns). + $cache[$key]['isMetaColumn'] = true; + $cache[$key]['fieldName'] = $this->_rsm->metaMappings[$key]; + $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; + break; + + default: + // this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2 + // maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping. + continue 2; } } - + $fieldName = $cache[$key]['fieldName']; - if (isset($cache[$key]['isScalar'])) { - $rowData[$fieldName] = $value; - } else if (isset($cache[$key]['isMetaColumn'])) { - $rowData[$cache[$key]['dqlAlias'] . '_' . $fieldName] = $value; - } else { - $rowData[$cache[$key]['dqlAlias'] . '_' . $fieldName] = $cache[$key]['type'] - ->convertToPHPValue($value, $this->_platform); + switch (true) { + case (isset($cache[$key]['isScalar'])): + $rowData[$fieldName] = $value; + break; + + case (isset($cache[$key]['isMetaColumn'])): + $rowData[$cache[$key]['dqlAlias'] . '_' . $fieldName] = $value; + break; + + default: + $value = $cache[$key]['type']->convertToPHPValue($value, $this->_platform); + + $rowData[$cache[$key]['dqlAlias'] . '_' . $fieldName] = $value; } } return $rowData; } + + /** + * Register entity as managed in UnitOfWork. + * + * @param \Doctrine\ORM\Mapping\ClassMetadata $class + * @param object $entity + * @param array $data + * + * @todo The "$id" generation is the same of UnitOfWork#createEntity. Remove this duplication somehow + */ + protected function registerManaged(ClassMetadata $class, $entity, array $data) + { + if ($class->isIdentifierComposite) { + $id = array(); + foreach ($class->identifier as $fieldName) { + if (isset($class->associationMappings[$fieldName])) { + $id[$fieldName] = $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]; + } else { + $id[$fieldName] = $data[$fieldName]; + } + } + } else { + if (isset($class->associationMappings[$class->identifier[0]])) { + $id = array($class->identifier[0] => $data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']]); + } else { + $id = array($class->identifier[0] => $data[$class->identifier[0]]); + } + } + + $this->_em->getUnitOfWork()->registerManaged($entity, $id, $data); + } } diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php b/src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php index 92eb45c5c1..9a8fcee83e 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php @@ -25,8 +25,9 @@ * The ArrayHydrator produces a nested array "graph" that is often (not always) * interchangeable with the corresponding object graph for read-only access. * + * @since 2.0 * @author Roman Borschel - * @since 1.0 + * @author Guilherme Blanco */ class ArrayHydrator extends AbstractHydrator { @@ -38,45 +39,55 @@ class ArrayHydrator extends AbstractHydrator private $_idTemplate = array(); private $_resultCounter = 0; - /** @override */ - protected function _prepare() + /** + * {@inheritdoc} + */ + protected function prepare() { - $this->_isSimpleQuery = count($this->_rsm->aliasMap) <= 1; - $this->_identifierMap = array(); + $this->_isSimpleQuery = count($this->_rsm->aliasMap) <= 1; + $this->_identifierMap = array(); $this->_resultPointers = array(); - $this->_idTemplate = array(); - $this->_resultCounter = 0; + $this->_idTemplate = array(); + $this->_resultCounter = 0; + foreach ($this->_rsm->aliasMap as $dqlAlias => $className) { - $this->_identifierMap[$dqlAlias] = array(); + $this->_identifierMap[$dqlAlias] = array(); $this->_resultPointers[$dqlAlias] = array(); - $this->_idTemplate[$dqlAlias] = ''; + $this->_idTemplate[$dqlAlias] = ''; } } - /** @override */ - protected function _hydrateAll() + /** + * {@inheritdoc} + */ + protected function hydrateAllData() { $result = array(); - $cache = array(); + $cache = array(); + while ($data = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { - $this->_hydrateRow($data, $cache, $result); + $this->hydrateRowData($data, $cache, $result); } return $result; } - /** @override */ - protected function _hydrateRow(array $data, array &$cache, array &$result) + /** + * {@inheritdoc} + */ + protected function hydrateRowData(array $row, array &$cache, array &$result) { // 1) Initialize $id = $this->_idTemplate; // initialize the id-memory $nonemptyComponents = array(); - $rowData = $this->_gatherRowData($data, $cache, $id, $nonemptyComponents); + $rowData = $this->gatherRowData($row, $cache, $id, $nonemptyComponents); // Extract scalar values. They're appended at the end. if (isset($rowData['scalars'])) { $scalars = $rowData['scalars']; + unset($rowData['scalars']); + if (empty($rowData)) { ++$this->_resultCounter; } @@ -90,7 +101,12 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // It's a joined result $parent = $this->_rsm->parentAliasMap[$dqlAlias]; - $path = $parent . '.' . $dqlAlias; + $path = $parent . '.' . $dqlAlias; + + // missing parent data, skipping as RIGHT JOIN hydration is not supported. + if ( ! isset($nonemptyComponents[$parent]) ) { + continue; + } // Get a reference to the right element in the result tree. // This element will get the associated element attached. @@ -104,39 +120,41 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 continue; } - + $relationAlias = $this->_rsm->relationMap[$dqlAlias]; - $relation = $this->_getClassMetadata($this->_rsm->aliasMap[$parent])->associationMappings[$relationAlias]; + $relation = $this->getClassMetadata($this->_rsm->aliasMap[$parent])->associationMappings[$relationAlias]; // Check the type of the relation (many or single-valued) if ( ! ($relation['type'] & ClassMetadata::TO_ONE)) { $oneToOne = false; + if (isset($nonemptyComponents[$dqlAlias])) { if ( ! isset($baseElement[$relationAlias])) { $baseElement[$relationAlias] = array(); } - - $indexExists = isset($this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]]); - $index = $indexExists ? $this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false; + + $indexExists = isset($this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]]); + $index = $indexExists ? $this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false; $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false; - + if ( ! $indexExists || ! $indexIsValid) { $element = $data; if (isset($this->_rsm->indexByMap[$dqlAlias])) { - $field = $this->_rsm->indexByMap[$dqlAlias]; - $baseElement[$relationAlias][$element[$field]] = $element; + $baseElement[$relationAlias][$row[$this->_rsm->indexByMap[$dqlAlias]]] = $element; } else { $baseElement[$relationAlias][] = $element; } + end($baseElement[$relationAlias]); - $this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]] = - key($baseElement[$relationAlias]); + + $this->_identifierMap[$path][$id[$parent]][$id[$dqlAlias]] = key($baseElement[$relationAlias]); } } else if ( ! isset($baseElement[$relationAlias])) { $baseElement[$relationAlias] = array(); } } else { $oneToOne = true; + if ( ! isset($nonemptyComponents[$dqlAlias]) && ! isset($baseElement[$relationAlias])) { $baseElement[$relationAlias] = null; } else if ( ! isset($baseElement[$relationAlias])) { @@ -152,32 +170,42 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) } else { // It's a root result element - + $this->_rootAliases[$dqlAlias] = true; // Mark as root - + $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; + + // if this row has a NULL value for the root result id then make it a null result. + if ( ! isset($nonemptyComponents[$dqlAlias]) ) { + if ($this->_rsm->isMixed) { + $result[] = array($entityKey => null); + } else { + $result[] = null; + } + $resultKey = $this->_resultCounter; + ++$this->_resultCounter; + continue; + } + // Check for an existing element if ($this->_isSimpleQuery || ! isset($this->_identifierMap[$dqlAlias][$id[$dqlAlias]])) { $element = $rowData[$dqlAlias]; + if ($this->_rsm->isMixed) { + $element = array($entityKey => $element); + } + if (isset($this->_rsm->indexByMap[$dqlAlias])) { - $field = $this->_rsm->indexByMap[$dqlAlias]; - if ($this->_rsm->isMixed) { - $result[] = array($element[$field] => $element); - ++$this->_resultCounter; - } else { - $result[$element[$field]] = $element; - } + $resultKey = $row[$this->_rsm->indexByMap[$dqlAlias]]; + $result[$resultKey] = $element; } else { - if ($this->_rsm->isMixed) { - $result[] = array($element); - ++$this->_resultCounter; - } else { - $result[] = $element; - } + $resultKey = $this->_resultCounter; + $result[] = $element; + ++$this->_resultCounter; } - end($result); - $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = key($result); + + $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = $resultKey; } else { $index = $this->_identifierMap[$dqlAlias][$id[$dqlAlias]]; + $resultKey = $index; /*if ($this->_rsm->isMixed) { $result[] =& $result[$index]; ++$this->_resultCounter; @@ -189,8 +217,17 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // Append scalar values to mixed result sets if (isset($scalars)) { + if ( ! isset($resultKey) ) { + // this only ever happens when no object is fetched (scalar result only) + if (isset($this->_rsm->indexByMap['scalars'])) { + $resultKey = $row[$this->_rsm->indexByMap['scalars']]; + } else { + $resultKey = $this->_resultCounter - 1; + } + } + foreach ($scalars as $name => $value) { - $result[$this->_resultCounter - 1][$name] = $value; + $result[$resultKey][$name] = $value; } } } @@ -208,28 +245,45 @@ private function updateResultPointer(array &$coll, $index, $dqlAlias, $oneToOne) { if ($coll === null) { unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 + return; } + if ($index !== false) { $this->_resultPointers[$dqlAlias] =& $coll[$index]; + return; - } else { - if ($coll) { - if ($oneToOne) { - $this->_resultPointers[$dqlAlias] =& $coll; - } else { - end($coll); - $this->_resultPointers[$dqlAlias] =& $coll[key($coll)]; - } - } } + + if ( ! $coll) { + return; + } + + if ($oneToOne) { + $this->_resultPointers[$dqlAlias] =& $coll; + + return; + } + + end($coll); + $this->_resultPointers[$dqlAlias] =& $coll[key($coll)]; + + return; } - - private function _getClassMetadata($className) + + /** + * Retrieve ClassMetadata associated to entity class name. + * + * @param string $className + * + * @return \Doctrine\ORM\Mapping\ClassMetadata + */ + private function getClassMetadata($className) { if ( ! isset($this->_ce[$className])) { $this->_ce[$className] = $this->_em->getClassMetadata($className); } + return $this->_ce[$className]; } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php b/src/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php index 886b42dec7..147f6acae8 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php @@ -8,10 +8,19 @@ public static function nonUniqueResult() { return new self("The result returned by the query was not unique."); } - + public static function parentObjectOfRelationNotFound($alias, $parentAlias) { return new self("The parent object of entity result with alias '$alias' was not found." . " The parent alias is '$parentAlias'."); } + + public static function emptyDiscriminatorValue($dqlAlias) + { + return new self("The DQL alias '" . $dqlAlias . "' contains an entity ". + "of an inheritance hierachy with an empty discriminator value. This means " . + "that the database contains inconsistent data with an empty " . + "discriminator value in a table row." + ); + } } \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php b/src/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php index 530873bcc2..6243886b0c 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php @@ -29,7 +29,7 @@ class IterableResult implements \Iterator { /** - * @var Doctrine\ORM\Internal\Hydration\AbstractHydrator + * @var \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ private $_hydrator; @@ -49,7 +49,7 @@ class IterableResult implements \Iterator private $_current = null; /** - * @param Doctrine\ORM\Internal\Hydration\AbstractHydrator $hydrator + * @param \Doctrine\ORM\Internal\Hydration\AbstractHydrator $hydrator */ public function __construct($hydrator) { diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php b/src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php index 381fd4ab12..83b0954b7c 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php @@ -23,14 +23,19 @@ Doctrine\ORM\Mapping\ClassMetadata, Doctrine\ORM\PersistentCollection, Doctrine\ORM\Query, + Doctrine\ORM\Event\LifecycleEventArgs, + Doctrine\ORM\Events, Doctrine\Common\Collections\ArrayCollection, - Doctrine\Common\Collections\Collection; + Doctrine\Common\Collections\Collection, + Doctrine\ORM\Proxy\Proxy; /** * The ObjectHydrator constructs an object graph out of an SQL result set. * + * @since 2.0 * @author Roman Borschel - * @since 2.0 + * @author Guilherme Blanco + * * @internal Highly performance-sensitive code. */ class ObjectHydrator extends AbstractHydrator @@ -53,59 +58,63 @@ class ObjectHydrator extends AbstractHydrator /** @override */ - protected function _prepare() + protected function prepare() { $this->_identifierMap = $this->_resultPointers = $this->_idTemplate = array(); + $this->_resultCounter = 0; - if (!isset($this->_hints['deferEagerLoad'])) { + + if ( ! isset($this->_hints['deferEagerLoad'])) { $this->_hints['deferEagerLoad'] = true; } - + foreach ($this->_rsm->aliasMap as $dqlAlias => $className) { $this->_identifierMap[$dqlAlias] = array(); - $this->_idTemplate[$dqlAlias] = ''; - $class = $this->_em->getClassMetadata($className); + $this->_idTemplate[$dqlAlias] = ''; if ( ! isset($this->_ce[$className])) { - $this->_ce[$className] = $class; + $this->_ce[$className] = $this->_em->getClassMetadata($className); } // Remember which associations are "fetch joined", so that we know where to inject // collection stubs or proxies and where not. - if (isset($this->_rsm->relationMap[$dqlAlias])) { - if ( ! isset($this->_rsm->aliasMap[$this->_rsm->parentAliasMap[$dqlAlias]])) { - throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $this->_rsm->parentAliasMap[$dqlAlias]); - } + if ( ! isset($this->_rsm->relationMap[$dqlAlias])) { + continue; + } - $sourceClassName = $this->_rsm->aliasMap[$this->_rsm->parentAliasMap[$dqlAlias]]; - $sourceClass = $this->_getClassMetadata($sourceClassName); - $assoc = $sourceClass->associationMappings[$this->_rsm->relationMap[$dqlAlias]]; - $this->_hints['fetched'][$sourceClassName][$assoc['fieldName']] = true; - if ($sourceClass->subClasses) { - foreach ($sourceClass->subClasses as $sourceSubclassName) { - $this->_hints['fetched'][$sourceSubclassName][$assoc['fieldName']] = true; - } - } - if ($assoc['type'] != ClassMetadata::MANY_TO_MANY) { - // Mark any non-collection opposite sides as fetched, too. - if ($assoc['mappedBy']) { - $this->_hints['fetched'][$className][$assoc['mappedBy']] = true; - } else { - if ($assoc['inversedBy']) { - $inverseAssoc = $class->associationMappings[$assoc['inversedBy']]; - if ($inverseAssoc['type'] & ClassMetadata::TO_ONE) { - $this->_hints['fetched'][$className][$inverseAssoc['fieldName']] = true; - if ($class->subClasses) { - foreach ($class->subClasses as $targetSubclassName) { - $this->_hints['fetched'][$targetSubclassName][$inverseAssoc['fieldName']] = true; - } - } - } - } - } + if ( ! isset($this->_rsm->aliasMap[$this->_rsm->parentAliasMap[$dqlAlias]])) { + throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $this->_rsm->parentAliasMap[$dqlAlias]); + } + + $sourceClassName = $this->_rsm->aliasMap[$this->_rsm->parentAliasMap[$dqlAlias]]; + $sourceClass = $this->_getClassMetadata($sourceClassName); + $assoc = $sourceClass->associationMappings[$this->_rsm->relationMap[$dqlAlias]]; + + $this->_hints['fetched'][$this->_rsm->parentAliasMap[$dqlAlias]][$assoc['fieldName']] = true; + + if ($assoc['type'] === ClassMetadata::MANY_TO_MANY) { + continue; + } + + // Mark any non-collection opposite sides as fetched, too. + if ($assoc['mappedBy']) { + $this->_hints['fetched'][$dqlAlias][$assoc['mappedBy']] = true; + + continue; + } + + // handle fetch-joined owning side bi-directional one-to-one associations + if ($assoc['inversedBy']) { + $class = $this->_ce[$className]; + $inverseAssoc = $class->associationMappings[$assoc['inversedBy']]; + + if ( ! ($inverseAssoc['type'] & ClassMetadata::TO_ONE)) { + continue; } + + $this->_hints['fetched'][$dqlAlias][$inverseAssoc['fieldName']] = true; } } } @@ -113,16 +122,17 @@ protected function _prepare() /** * {@inheritdoc} */ - protected function _cleanup() + protected function cleanup() { $eagerLoad = (isset($this->_hints['deferEagerLoad'])) && $this->_hints['deferEagerLoad'] == true; - - parent::_cleanup(); + + parent::cleanup(); + $this->_identifierMap = $this->_initializedCollections = $this->_existingCollections = $this->_resultPointers = array(); - + if ($eagerLoad) { $this->_em->getUnitOfWork()->triggerEagerLoads(); } @@ -131,13 +141,13 @@ protected function _cleanup() /** * {@inheritdoc} */ - protected function _hydrateAll() + protected function hydrateAllData() { $result = array(); - $cache = array(); + $cache = array(); while ($row = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { - $this->_hydrateRow($row, $cache, $result); + $this->hydrateRowData($row, $cache, $result); } // Take snapshots from all newly initialized collections @@ -152,35 +162,40 @@ protected function _hydrateAll() * Initializes a related collection. * * @param object $entity The entity to which the collection belongs. + * @param ClassMetadata $class * @param string $name The name of the field on the entity that holds the collection. + * @param string $parentDqlAlias Alias of the parent fetch joining this collection. */ - private function _initRelatedCollection($entity, $class, $fieldName) + private function _initRelatedCollection($entity, $class, $fieldName, $parentDqlAlias) { - $oid = spl_object_hash($entity); + $oid = spl_object_hash($entity); $relation = $class->associationMappings[$fieldName]; + $value = $class->reflFields[$fieldName]->getValue($entity); - $value = $class->reflFields[$fieldName]->getValue($entity); if ($value === null) { $value = new ArrayCollection; } if ( ! $value instanceof PersistentCollection) { $value = new PersistentCollection( - $this->_em, - $this->_ce[$relation['targetEntity']], - $value + $this->_em, $this->_ce[$relation['targetEntity']], $value ); $value->setOwner($entity, $relation); + $class->reflFields[$fieldName]->setValue($entity, $value); $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value); + $this->_initializedCollections[$oid . $fieldName] = $value; - } else if (isset($this->_hints[Query::HINT_REFRESH]) || - isset($this->_hints['fetched'][$class->name][$fieldName]) && - ! $value->isInitialized()) { + } else if ( + isset($this->_hints[Query::HINT_REFRESH]) || + isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) && + ! $value->isInitialized() + ) { // Is already PersistentCollection, but either REFRESH or FETCH-JOIN and UNINITIALIZED! $value->setDirty(false); $value->setInitialized(true); $value->unwrap()->clear(); + $this->_initializedCollections[$oid . $fieldName] = $value; } else { // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! @@ -192,7 +207,7 @@ private function _initRelatedCollection($entity, $class, $fieldName) /** * Gets an entity instance. - * + * * @param $data The instance data. * @param $dqlAlias The DQL alias of the entity's class. * @return object The entity. @@ -200,23 +215,46 @@ private function _initRelatedCollection($entity, $class, $fieldName) private function _getEntity(array $data, $dqlAlias) { $className = $this->_rsm->aliasMap[$dqlAlias]; + if (isset($this->_rsm->discriminatorColumns[$dqlAlias])) { $discrColumn = $this->_rsm->metaMappings[$this->_rsm->discriminatorColumns[$dqlAlias]]; + + if ($data[$discrColumn] === "") { + throw HydrationException::emptyDiscriminatorValue($dqlAlias); + } + $className = $this->_ce[$className]->discriminatorMap[$data[$discrColumn]]; + unset($data[$discrColumn]); } + + if (isset($this->_hints[Query::HINT_REFRESH_ENTITY]) && isset($this->_rootAliases[$dqlAlias])) { + $this->registerManaged($this->_ce[$className], $this->_hints[Query::HINT_REFRESH_ENTITY], $data); + } + + $this->_hints['fetchAlias'] = $dqlAlias; + return $this->_uow->createEntity($className, $data, $this->_hints); } private function _getEntityFromIdentityMap($className, array $data) { + // TODO: Abstract this code and UnitOfWork::createEntity() equivalent? $class = $this->_ce[$className]; + + /* @var $class ClassMetadata */ if ($class->isIdentifierComposite) { $idHash = ''; foreach ($class->identifier as $fieldName) { - $idHash .= $data[$fieldName] . ' '; + if (isset($class->associationMappings[$fieldName])) { + $idHash .= $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] . ' '; + } else { + $idHash .= $data[$fieldName] . ' '; + } } return $this->_uow->tryGetByIdHash(rtrim($idHash), $class->rootEntityName); + } else if (isset($class->associationMappings[$class->identifier[0]])) { + return $this->_uow->tryGetByIdHash($data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']], $class->rootEntityName); } else { return $this->_uow->tryGetByIdHash($data[$class->identifier[0]], $class->rootEntityName); } @@ -226,7 +264,7 @@ private function _getEntityFromIdentityMap($className, array $data) * Gets a ClassMetadata instance from the local cache. * If the instance is not yet in the local cache, it is loaded into the * local cache. - * + * * @param string $className The name of the class. * @return ClassMetadata */ @@ -235,42 +273,45 @@ private function _getClassMetadata($className) if ( ! isset($this->_ce[$className])) { $this->_ce[$className] = $this->_em->getClassMetadata($className); } + return $this->_ce[$className]; } /** * Hydrates a single row in an SQL result set. - * + * * @internal * First, the data of the row is split into chunks where each chunk contains data * that belongs to a particular component/class. Afterwards, all these chunks * are processed, one after the other. For each chunk of class data only one of the * following code paths is executed: - * + * * Path A: The data chunk belongs to a joined/associated object and the association * is collection-valued. * Path B: The data chunk belongs to a joined/associated object and the association * is single-valued. * Path C: The data chunk belongs to a root result element/object that appears in the topmost * level of the hydrated result. A typical example are the objects of the type - * specified by the FROM clause in a DQL query. - * + * specified by the FROM clause in a DQL query. + * * @param array $data The data of the row to process. * @param array $cache The cache to use. * @param array $result The result array to fill. */ - protected function _hydrateRow(array $data, array &$cache, array &$result) + protected function hydrateRowData(array $row, array &$cache, array &$result) { // Initialize $id = $this->_idTemplate; // initialize the id-memory $nonemptyComponents = array(); // Split the row data into chunks of class data. - $rowData = $this->_gatherRowData($data, $cache, $id, $nonemptyComponents); + $rowData = $this->gatherRowData($row, $cache, $id, $nonemptyComponents); // Extract scalar values. They're appended at the end. if (isset($rowData['scalars'])) { $scalars = $rowData['scalars']; + unset($rowData['scalars']); + if (empty($rowData)) { ++$this->_resultCounter; } @@ -288,10 +329,16 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // seen for this parent-child relationship $path = $parentAlias . '.' . $dqlAlias; + // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs + if (!isset($nonemptyComponents[$parentAlias])) { + // TODO: Add special case code where we hydrate the right join objects into identity map at least + continue; + } + // Get a reference to the parent object to which the joined element belongs. if ($this->_rsm->isMixed && isset($this->_rootAliases[$parentAlias])) { $first = reset($this->_resultPointers); - $parentObject = $this->_resultPointers[$parentAlias][key($first)]; + $parentObject = $first[key($first)]; } else if (isset($this->_resultPointers[$parentAlias])) { $parentObject = $this->_resultPointers[$parentAlias]; } else { @@ -307,13 +354,14 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // Check the type of the relation (many or single-valued) if ( ! ($relation['type'] & ClassMetadata::TO_ONE)) { + $reflFieldValue = $reflField->getValue($parentObject); // PATH A: Collection-valued association if (isset($nonemptyComponents[$dqlAlias])) { $collKey = $oid . $relationField; if (isset($this->_initializedCollections[$collKey])) { $reflFieldValue = $this->_initializedCollections[$collKey]; } else if ( ! isset($this->_existingCollections[$collKey])) { - $reflFieldValue = $this->_initRelatedCollection($parentObject, $parentClass, $relationField); + $reflFieldValue = $this->_initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); } $indexExists = isset($this->_identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]]); @@ -332,8 +380,7 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) $element = $this->_getEntity($data, $dqlAlias); if (isset($this->_rsm->indexByMap[$dqlAlias])) { - $field = $this->_rsm->indexByMap[$dqlAlias]; - $indexValue = $this->_ce[$entityName]->reflFields[$field]->getValue($element); + $indexValue = $row[$this->_rsm->indexByMap[$dqlAlias]]; $reflFieldValue->hydrateSet($indexValue, $element); $this->_identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] = $indexValue; } else { @@ -348,21 +395,24 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // Update result pointer $this->_resultPointers[$dqlAlias] = $reflFieldValue[$index]; } - } else if ( ! $reflField->getValue($parentObject)) { - $coll = new PersistentCollection($this->_em, $this->_ce[$entityName], new ArrayCollection); - $coll->setOwner($parentObject, $relation); - $reflField->setValue($parentObject, $coll); - $this->_uow->setOriginalEntityProperty($oid, $relationField, $coll); + } else if ( ! $reflFieldValue) { + $reflFieldValue = $this->_initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); + } else if ($reflFieldValue instanceof PersistentCollection && $reflFieldValue->isInitialized() === false) { + $reflFieldValue->setInitialized(true); } + } else { // PATH B: Single-valued association $reflFieldValue = $reflField->getValue($parentObject); - if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH])) { + if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) { + // we only need to take action if this value is null, + // we refresh the entity or its an unitialized proxy. if (isset($nonemptyComponents[$dqlAlias])) { $element = $this->_getEntity($data, $dqlAlias); $reflField->setValue($parentObject, $element); $this->_uow->setOriginalEntityProperty($oid, $relationField, $element); $targetClass = $this->_ce[$relation['targetEntity']]; + if ($relation['isOwningSide']) { //TODO: Just check hints['fetched'] here? // If there is an inverse mapping on the target class its bidirectional @@ -383,6 +433,8 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) } // Update result pointer $this->_resultPointers[$dqlAlias] = $element; + } else { + $this->_uow->setOriginalEntityProperty($oid, $relationField, null); } // else leave $reflFieldValue null for single-valued associations } else { @@ -393,38 +445,48 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) } else { // PATH C: Its a root result element $this->_rootAliases[$dqlAlias] = true; // Mark as root alias + $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; + // if this row has a NULL value for the root result id then make it a null result. + if ( ! isset($nonemptyComponents[$dqlAlias]) ) { + if ($this->_rsm->isMixed) { + $result[] = array($entityKey => null); + } else { + $result[] = null; + } + $resultKey = $this->_resultCounter; + ++$this->_resultCounter; + continue; + } + + // check for existing result from the iterations before if ( ! isset($this->_identifierMap[$dqlAlias][$id[$dqlAlias]])) { $element = $this->_getEntity($rowData[$dqlAlias], $dqlAlias); + if ($this->_rsm->isMixed) { + $element = array($entityKey => $element); + } + if (isset($this->_rsm->indexByMap[$dqlAlias])) { - $field = $this->_rsm->indexByMap[$dqlAlias]; - $key = $this->_ce[$entityName]->reflFields[$field]->getValue($element); - if ($this->_rsm->isMixed) { - $element = array($key => $element); - $result[] = $element; - $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = $this->_resultCounter; - ++$this->_resultCounter; - } else { - $result[$key] = $element; - $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = $key; - } + $resultKey = $row[$this->_rsm->indexByMap[$dqlAlias]]; if (isset($this->_hints['collection'])) { - $this->_hints['collection']->hydrateSet($key, $element); + $this->_hints['collection']->hydrateSet($resultKey, $element); } + + $result[$resultKey] = $element; } else { - if ($this->_rsm->isMixed) { - $element = array(0 => $element); - } - $result[] = $element; - $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = $this->_resultCounter; + $resultKey = $this->_resultCounter; ++$this->_resultCounter; if (isset($this->_hints['collection'])) { $this->_hints['collection']->hydrateAdd($element); } + + $result[] = $element; } + $this->_identifierMap[$dqlAlias][$id[$dqlAlias]] = $resultKey; + // Update result pointer $this->_resultPointers[$dqlAlias] = $element; @@ -432,6 +494,7 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // Update result pointer $index = $this->_identifierMap[$dqlAlias][$id[$dqlAlias]]; $this->_resultPointers[$dqlAlias] = $result[$index]; + $resultKey = $index; /*if ($this->_rsm->isMixed) { $result[] = $result[$index]; ++$this->_resultCounter; @@ -442,8 +505,16 @@ protected function _hydrateRow(array $data, array &$cache, array &$result) // Append scalar values to mixed result sets if (isset($scalars)) { + if ( ! isset($resultKey) ) { + if (isset($this->_rsm->indexByMap['scalars'])) { + $resultKey = $row[$this->_rsm->indexByMap['scalars']]; + } else { + $resultKey = $this->_resultCounter - 1; + } + } + foreach ($scalars as $name => $value) { - $result[$this->_resultCounter - 1][$name] = $value; + $result[$resultKey][$name] = $value; } } } diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php b/src/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php index f153073107..d02651b29a 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php @@ -26,25 +26,32 @@ * The created result is almost the same as a regular SQL result set, except * that column names are mapped to field names and data type conversions take place. * + * @since 2.0 * @author Roman Borschel - * @since 2.0 + * @author Guilherme Blanco */ class ScalarHydrator extends AbstractHydrator { - /** @override */ - protected function _hydrateAll() + /** + * {@inheritdoc} + */ + protected function hydrateAllData() { $result = array(); - $cache = array(); + $cache = array(); + while ($data = $this->_stmt->fetch(\PDO::FETCH_ASSOC)) { - $result[] = $this->_gatherScalarRowData($data, $cache); + $this->hydrateRowData($data, $cache, $result); } + return $result; } - /** @override */ - protected function _hydrateRow(array $data, array &$cache, array &$result) + /** + * {@inheritdoc} + */ + protected function hydrateRowData(array $data, array &$cache, array &$result) { - $result[] = $this->_gatherScalarRowData($data, $cache); + $result[] = $this->gatherScalarRowData($data, $cache); } } \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php b/src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php index 3524f89e9b..09c2c7f3db 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php @@ -17,31 +17,37 @@ * . */ - namespace Doctrine\ORM\Internal\Hydration; -use \PDO; -use Doctrine\ORM\Mapping\ClassMetadata; -use Doctrine\DBAL\Types\Type; +use \PDO, + Doctrine\DBAL\Types\Type, + Doctrine\ORM\Mapping\ClassMetadata, + Doctrine\ORM\Event\LifecycleEventArgs, + Doctrine\ORM\Events, + Doctrine\ORM\Query; class SimpleObjectHydrator extends AbstractHydrator { - const REFRESH_ENTITY = 'doctrine_refresh_entity'; - /** * @var ClassMetadata */ private $class; + /** + * @var array + */ private $declaringClasses = array(); - protected function _hydrateAll() + /** + * {@inheritdoc} + */ + protected function hydrateAllData() { $result = array(); $cache = array(); while ($row = $this->_stmt->fetch(PDO::FETCH_ASSOC)) { - $this->_hydrateRow($row, $cache, $result); + $this->hydrateRowData($row, $cache, $result); } $this->_em->getUnitOfWork()->triggerEagerLoads(); @@ -49,93 +55,129 @@ protected function _hydrateAll() return $result; } - protected function _prepare() + /** + * {@inheritdoc} + */ + protected function prepare() { - if (count($this->_rsm->aliasMap) == 1) { - $this->class = $this->_em->getClassMetadata(reset($this->_rsm->aliasMap)); - if ($this->class->inheritanceType !== ClassMetadata::INHERITANCE_TYPE_NONE) { - foreach ($this->_rsm->declaringClasses AS $column => $class) { - $this->declaringClasses[$column] = $this->_em->getClassMetadata($class); - } - } - } else { - throw new \RuntimeException("Cannot use SimpleObjectHydrator with a ResultSetMapping not containing exactly one object result."); + if (count($this->_rsm->aliasMap) !== 1) { + throw new \RuntimeException("Cannot use SimpleObjectHydrator with a ResultSetMapping that contains more than one object result."); } + if ($this->_rsm->scalarMappings) { throw new \RuntimeException("Cannot use SimpleObjectHydrator with a ResultSetMapping that contains scalar mappings."); } + + $this->class = $this->_em->getClassMetadata(reset($this->_rsm->aliasMap)); + + // We only need to add declaring classes if we have inheritance. + if ($this->class->inheritanceType === ClassMetadata::INHERITANCE_TYPE_NONE) { + return; + } + + foreach ($this->_rsm->declaringClasses AS $column => $class) { + $this->declaringClasses[$column] = $this->_em->getClassMetadata($class); + } } - protected function _hydrateRow(array $sqlResult, array &$cache, array &$result) + /** + * {@inheritdoc} + */ + protected function hydrateRowData(array $sqlResult, array &$cache, array &$result) { - $data = array(); - if ($this->class->inheritanceType == ClassMetadata::INHERITANCE_TYPE_NONE) { - foreach ($sqlResult as $column => $value) { - - if (!isset($cache[$column])) { - if (isset($this->_rsm->fieldMappings[$column])) { - $cache[$column]['name'] = $this->_rsm->fieldMappings[$column]; - $cache[$column]['field'] = true; - } else { - $cache[$column]['name'] = $this->_rsm->metaMappings[$column]; - } - } + $entityName = $this->class->name; + $data = array(); - if (isset($cache[$column]['field'])) { - $value = Type::getType($this->class->fieldMappings[$cache[$column]['name']]['type']) - ->convertToPHPValue($value, $this->_platform); - } - $data[$cache[$column]['name']] = $value; - } - $entityName = $this->class->name; - } else { + // We need to find the correct entity class name if we have inheritance in resultset + if ($this->class->inheritanceType !== ClassMetadata::INHERITANCE_TYPE_NONE) { $discrColumnName = $this->_platform->getSQLResultCasing($this->class->discriminatorColumn['name']); + + if ($sqlResult[$discrColumnName] === '') { + throw HydrationException::emptyDiscriminatorValue(key($this->_rsm->aliasMap)); + } + $entityName = $this->class->discriminatorMap[$sqlResult[$discrColumnName]]; + unset($sqlResult[$discrColumnName]); - foreach ($sqlResult as $column => $value) { - if (!isset($cache[$column])) { - if (isset($this->_rsm->fieldMappings[$column])) { - $field = $this->_rsm->fieldMappings[$column]; - $class = $this->declaringClasses[$column]; - if ($class->name == $entityName || is_subclass_of($entityName, $class->name)) { - $cache[$column]['name'] = $field; - $cache[$column]['class'] = $class; - } - } else if (isset($this->_rsm->relationMap[$column])) { - if ($this->_rsm->relationMap[$column] == $entityName || is_subclass_of($entityName, $this->_rsm->relationMap[$column])) { - $cache[$column]['name'] = $field; - } - } else { - $cache[$column]['name'] = $this->_rsm->metaMappings[$column]; - } - } + } - if (isset($cache[$column]['class'])) { - $value = Type::getType($cache[$column]['class']->fieldMappings[$cache[$column]['name']]['type']) - ->convertToPHPValue($value, $this->_platform); + foreach ($sqlResult as $column => $value) { + // Hydrate column information if not yet present + if ( ! isset($cache[$column])) { + if (($info = $this->hydrateColumnInfo($entityName, $column)) === null) { + continue; } - // the second and part is to prevent overwrites in case of multiple - // inheritance classes using the same property name (See AbstractHydrator) - if (isset($cache[$column]) && (!isset($data[$cache[$column]['name']]) || $value !== null)) { - $data[$cache[$column]['name']] = $value; - } + $cache[$column] = $info; } - } - if (isset($this->_hints[self::REFRESH_ENTITY])) { - $this->_hints[Query::HINT_REFRESH] = true; - $id = array(); - if ($this->_class->isIdentifierComposite) { - foreach ($this->_class->identifier as $fieldName) { - $id[$fieldName] = $data[$fieldName]; - } - } else { - $id = array($this->_class->identifier[0] => $data[$this->_class->identifier[0]]); + // Convert field to a valid PHP value + if (isset($cache[$column]['field'])) { + $type = Type::getType($cache[$column]['class']->fieldMappings[$cache[$column]['name']]['type']); + $value = $type->convertToPHPValue($value, $this->_platform); } - $this->_em->getUnitOfWork()->registerManaged($this->_hints[self::REFRESH_ENTITY], $id, $data); + + // Prevent overwrite in case of inherit classes using same property name (See AbstractHydrator) + if (isset($cache[$column]) && ( ! isset($data[$cache[$column]['name']]) || $value !== null)) { + $data[$cache[$column]['name']] = $value; + } + } + + if (isset($this->_hints[Query::HINT_REFRESH_ENTITY])) { + $this->registerManaged($this->class, $this->_hints[Query::HINT_REFRESH_ENTITY], $data); } - $result[] = $this->_em->getUnitOfWork()->createEntity($entityName, $data, $this->_hints); + $uow = $this->_em->getUnitOfWork(); + $entity = $uow->createEntity($entityName, $data, $this->_hints); + + $result[] = $entity; + } + + /** + * Retrieve column information form ResultSetMapping. + * + * @param string $entityName + * @param string $column + * + * @return array + */ + protected function hydrateColumnInfo($entityName, $column) + { + switch (true) { + case (isset($this->_rsm->fieldMappings[$column])): + $class = isset($this->declaringClasses[$column]) + ? $this->declaringClasses[$column] + : $this->class; + + // If class is not part of the inheritance, ignore + if ( ! ($class->name === $entityName || is_subclass_of($entityName, $class->name))) { + return null; + } + + return array( + 'class' => $class, + 'name' => $this->_rsm->fieldMappings[$column], + 'field' => true, + ); + + case (isset($this->_rsm->relationMap[$column])): + $class = isset($this->_rsm->relationMap[$column]) + ? $this->_rsm->relationMap[$column] + : $this->class; + + // If class is not self referencing, ignore + if ( ! ($class === $entityName || is_subclass_of($entityName, $class))) { + return null; + } + + // TODO: Decide what to do with associations. It seems original code is incomplete. + // One solution is to load the association, but it might require extra efforts. + return array('name' => $column); + + default: + return array( + 'name' => $this->_rsm->metaMappings[$column] + ); + } } -} \ No newline at end of file +} diff --git a/src/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php b/src/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php index 4668155213..a5dabc60ce 100644 --- a/src/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php +++ b/src/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php @@ -19,31 +19,38 @@ namespace Doctrine\ORM\Internal\Hydration; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Connection, + Doctrine\ORM\NoResultException, + Doctrine\ORM\NonUniqueResultException; /** * Hydrator that hydrates a single scalar value from the result set. * + * @since 2.0 * @author Roman Borschel - * @since 2.0 + * @author Guilherme Blanco */ class SingleScalarHydrator extends AbstractHydrator { - /** @override */ - protected function _hydrateAll() + /** + * {@inheritdoc} + */ + protected function hydrateAllData() { - $cache = array(); - $result = $this->_stmt->fetchAll(\PDO::FETCH_ASSOC); - $num = count($result); + $data = $this->_stmt->fetchAll(\PDO::FETCH_ASSOC); + $numRows = count($data); - if ($num == 0) { - throw new \Doctrine\ORM\NoResultException; - } else if ($num > 1 || count($result[key($result)]) > 1) { - throw new \Doctrine\ORM\NonUniqueResultException; + if ($numRows === 0) { + throw new NoResultException(); } - - $result = $this->_gatherScalarRowData($result[key($result)], $cache); - + + if ($numRows > 1 || count($data[key($data)]) > 1) { + throw new NonUniqueResultException(); + } + + $cache = array(); + $result = $this->gatherScalarRowData($data[key($data)], $cache); + return array_shift($result); } } \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Mapping/Annotation.php b/src/lib/Doctrine/ORM/Mapping/Annotation.php new file mode 100644 index 0000000000..dd8f4efeec --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/Annotation.php @@ -0,0 +1,24 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +interface Annotation +{ +} diff --git a/src/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php b/src/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php new file mode 100644 index 0000000000..843e2ce5d3 --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/Builder/AssociationBuilder.php @@ -0,0 +1,167 @@ +. + */ + + +namespace Doctrine\ORM\Mapping\Builder; + +use Doctrine\ORM\Mapping\ClassMetadata; + +class AssociationBuilder +{ + /** + * @var ClassMetadataBuilder + */ + protected $builder; + + /** + * @var array + */ + protected $mapping; + + /** + * @var array + */ + protected $joinColumns; + + /** + * + * @var int + */ + protected $type; + + /** + * @param ClassMetadataBuilder $builder + * @param array $mapping + */ + public function __construct(ClassMetadataBuilder $builder, array $mapping, $type) + { + $this->builder = $builder; + $this->mapping = $mapping; + $this->type = $type; + } + + public function mappedBy($fieldName) + { + $this->mapping['mappedBy'] = $fieldName; + return $this; + } + + public function inversedBy($fieldName) + { + $this->mapping['inversedBy'] = $fieldName; + return $this; + } + + public function cascadeAll() + { + $this->mapping['cascade'] = array("ALL"); + return $this; + } + + public function cascadePersist() + { + $this->mapping['cascade'][] = "persist"; + return $this; + } + + public function cascadeRemove() + { + $this->mapping['cascade'][] = "remove"; + return $this; + } + + public function cascadeMerge() + { + $this->mapping['cascade'][] = "merge"; + return $this; + } + + public function cascadeDetach() + { + $this->mapping['cascade'][] = "detach"; + return $this; + } + + public function cascadeRefresh() + { + $this->mapping['cascade'][] = "refresh"; + return $this; + } + + public function fetchExtraLazy() + { + $this->mapping['fetch'] = ClassMetadata::FETCH_EXTRA_LAZY; + return $this; + } + + public function fetchEager() + { + $this->mapping['fetch'] = ClassMetadata::FETCH_EAGER; + return $this; + } + + public function fetchLazy() + { + $this->mapping['fetch'] = ClassMetadata::FETCH_LAZY; + return $this; + } + + /** + * Add Join Columns + * + * @param string $columnName + * @param string $referencedColumnName + * @param bool $nullable + * @param bool $unique + * @param string $onDelete + * @param string $columnDef + */ + public function addJoinColumn($columnName, $referencedColumnName, $nullable = true, $unique = false, $onDelete = null, $columnDef = null) + { + $this->joinColumns[] = array( + 'name' => $columnName, + 'referencedColumnName' => $referencedColumnName, + 'nullable' => $nullable, + 'unique' => $unique, + 'onDelete' => $onDelete, + 'columnDefinition' => $columnDef, + ); + return $this; + } + + /** + * @return ClassMetadataBuilder + */ + public function build() + { + $mapping = $this->mapping; + if ($this->joinColumns) { + $mapping['joinColumns'] = $this->joinColumns; + } + $cm = $this->builder->getClassMetadata(); + if ($this->type == ClassMetadata::MANY_TO_ONE) { + $cm->mapManyToOne($mapping); + } else if ($this->type == ClassMetadata::ONE_TO_ONE) { + $cm->mapOneToOne($mapping); + } else { + throw new \InvalidArgumentException("Type should be a ToOne Assocation here"); + } + return $this->builder; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php b/src/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php new file mode 100644 index 0000000000..fb1f1d5e52 --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/Builder/ClassMetadataBuilder.php @@ -0,0 +1,470 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Builder; + +use Doctrine\ORM\Mapping\ClassMetadata, + Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * Builder Object for ClassMetadata + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + * @author Guilherme Blanco + */ +class ClassMetadataBuilder +{ + /** + * @var \Doctrine\ORM\Mapping\ClassMetadataInfo + */ + private $cm; + + /** + * @param \Doctrine\ORM\Mapping\ClassMetadataInfo $cm + */ + public function __construct(ClassMetadataInfo $cm) + { + $this->cm = $cm; + } + + /** + * @return ClassMetadata + */ + public function getClassMetadata() + { + return $this->cm; + } + + /** + * Mark the class as mapped superclass. + * + * @return ClassMetadataBuilder + */ + public function setMappedSuperClass() + { + $this->cm->isMappedSuperclass = true; + + return $this; + } + + /** + * Set custom Repository class name + * + * @param string $repositoryClassName + * @return ClassMetadataBuilder + */ + public function setCustomRepositoryClass($repositoryClassName) + { + $this->cm->setCustomRepositoryClass($repositoryClassName); + + return $this; + } + + /** + * Mark class read only + * + * @return ClassMetadataBuilder + */ + public function setReadOnly() + { + $this->cm->markReadOnly(); + + return $this; + } + + /** + * Set the table name + * + * @param string $name + * @return ClassMetadataBuilder + */ + public function setTable($name) + { + $this->cm->setPrimaryTable(array('name' => $name)); + + return $this; + } + + /** + * Add Index + * + * @param array $columns + * @param string $name + * @return ClassMetadataBuilder + */ + public function addIndex(array $columns, $name) + { + if (!isset($this->cm->table['indexes'])) { + $this->cm->table['indexes'] = array(); + } + + $this->cm->table['indexes'][$name] = array('columns' => $columns); + + return $this; + } + + /** + * Add Unique Constraint + * + * @param array $columns + * @param string $name + * @return ClassMetadataBuilder + */ + public function addUniqueConstraint(array $columns, $name) + { + if ( ! isset($this->cm->table['uniqueConstraints'])) { + $this->cm->table['uniqueConstraints'] = array(); + } + + $this->cm->table['uniqueConstraints'][$name] = array('columns' => $columns); + + return $this; + } + + /** + * Add named query + * + * @param string $name + * @param string $dqlQuery + * @return ClassMetadataBuilder + */ + public function addNamedQuery($name, $dqlQuery) + { + $this->cm->addNamedQuery(array( + 'name' => $name, + 'query' => $dqlQuery, + )); + + return $this; + } + + /** + * Set class as root of a joined table inheritance hierachy. + * + * @return ClassMetadataBuilder + */ + public function setJoinedTableInheritance() + { + $this->cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_JOINED); + + return $this; + } + + /** + * Set class as root of a single table inheritance hierachy. + * + * @return ClassMetadataBuilder + */ + public function setSingleTableInheritance() + { + $this->cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE); + + return $this; + } + + /** + * Set the discriminator column details. + * + * @param string $name + * @param string $type + */ + public function setDiscriminatorColumn($name, $type = 'string', $length = 255) + { + $this->cm->setDiscriminatorColumn(array( + 'name' => $name, + 'type' => $type, + 'length' => $length, + )); + + return $this; + } + + /** + * Add a subclass to this inheritance hierachy. + * + * @param string $name + * @param string $class + * @return ClassMetadataBuilder + */ + public function addDiscriminatorMapClass($name, $class) + { + $this->cm->addDiscriminatorMapClass($name, $class); + + return $this; + } + + /** + * Set deferred explicit change tracking policy. + * + * @return ClassMetadataBuilder + */ + public function setChangeTrackingPolicyDeferredExplicit() + { + $this->cm->setChangeTrackingPolicy(ClassMetadata::CHANGETRACKING_DEFERRED_EXPLICIT); + + return $this; + } + + /** + * Set notify change tracking policy. + * + * @return ClassMetadataBuilder + */ + public function setChangeTrackingPolicyNotify() + { + $this->cm->setChangeTrackingPolicy(ClassMetadata::CHANGETRACKING_NOTIFY); + + return $this; + } + + /** + * Add lifecycle event + * + * @param string $methodName + * @param string $event + * @return ClassMetadataBuilder + */ + public function addLifecycleEvent($methodName, $event) + { + $this->cm->addLifecycleCallback($methodName, $event); + + return $this; + } + + /** + * Add Field + * + * @param string $name + * @param string $type + * @param array $mapping + */ + public function addField($name, $type, array $mapping = array()) + { + $mapping['fieldName'] = $name; + $mapping['type'] = $type; + + $this->cm->mapField($mapping); + + return $this; + } + + /** + * Create a field builder. + * + * @param string $name + * @param string $type + * @return FieldBuilder + */ + public function createField($name, $type) + { + return new FieldBuilder( + $this, + array( + 'fieldName' => $name, + 'type' => $type + ) + ); + } + + /** + * Add a simple many to one association, optionally with the inversed by field. + * + * @param string $name + * @param string $targetEntity + * @param string|null $inversedBy + * @return ClassMetadataBuilder + */ + public function addManyToOne($name, $targetEntity, $inversedBy = null) + { + $builder = $this->createManyToOne($name, $targetEntity); + + if ($inversedBy) { + $builder->inversedBy($inversedBy); + } + + return $builder->build(); + } + + /** + * Create a ManyToOne Assocation Builder. + * + * Note: This method does not add the association, you have to call build() on the AssociationBuilder. + * + * @param string $name + * @param string $targetEntity + * @return AssociationBuilder + */ + public function createManyToOne($name, $targetEntity) + { + return new AssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::MANY_TO_ONE + ); + } + + /** + * Create OneToOne Assocation Builder + * + * @param string $name + * @param string $targetEntity + * @return AssociationBuilder + */ + public function createOneToOne($name, $targetEntity) + { + return new AssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::ONE_TO_ONE + ); + } + + /** + * Add simple inverse one-to-one assocation. + * + * @param string $name + * @param string $targetEntity + * @param string $mappedBy + * @return ClassMetadataBuilder + */ + public function addInverseOneToOne($name, $targetEntity, $mappedBy) + { + $builder = $this->createOneToOne($name, $targetEntity); + $builder->mappedBy($mappedBy); + + return $builder->build(); + } + + /** + * Add simple owning one-to-one assocation. + * + * @param string $name + * @param string $targetEntity + * @param string $inversedBy + * @return ClassMetadataBuilder + */ + public function addOwningOneToOne($name, $targetEntity, $inversedBy = null) + { + $builder = $this->createOneToOne($name, $targetEntity); + + if ($inversedBy) { + $builder->inversedBy($inversedBy); + } + + return $builder->build(); + } + + /** + * Create ManyToMany Assocation Builder + * + * @param string $name + * @param string $targetEntity + * @return ManyToManyAssociationBuilder + */ + public function createManyToMany($name, $targetEntity) + { + return new ManyToManyAssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::MANY_TO_MANY + ); + } + + /** + * Add a simple owning many to many assocation. + * + * @param string $name + * @param string $targetEntity + * @param string|null $inversedBy + * @return ClassMetadataBuilder + */ + public function addOwningManyToMany($name, $targetEntity, $inversedBy = null) + { + $builder = $this->createManyToMany($name, $targetEntity); + + if ($inversedBy) { + $builder->inversedBy($inversedBy); + } + + return $builder->build(); + } + + /** + * Add a simple inverse many to many assocation. + * + * @param string $name + * @param string $targetEntity + * @param string $mappedBy + * @return ClassMetadataBuilder + */ + public function addInverseManyToMany($name, $targetEntity, $mappedBy) + { + $builder = $this->createManyToMany($name, $targetEntity); + $builder->mappedBy($mappedBy); + + return $builder->build(); + } + + /** + * Create a one to many assocation builder + * + * @param string $name + * @param string $targetEntity + * @return OneToManyAssociationBuilder + */ + public function createOneToMany($name, $targetEntity) + { + return new OneToManyAssociationBuilder( + $this, + array( + 'fieldName' => $name, + 'targetEntity' => $targetEntity + ), + ClassMetadata::ONE_TO_MANY + ); + } + + /** + * Add simple OneToMany assocation. + * + * @param string $name + * @param string $targetEntity + * @param string $mappedBy + * @return ClassMetadataBuilder + */ + public function addOneToMany($name, $targetEntity, $mappedBy) + { + $builder = $this->createOneToMany($name, $targetEntity); + $builder->mappedBy($mappedBy); + + return $builder->build(); + } +} diff --git a/src/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php b/src/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php new file mode 100644 index 0000000000..3f4a5bbafb --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/Builder/FieldBuilder.php @@ -0,0 +1,223 @@ +. + */ + + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * Field Builder + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.2 + * @author Benjamin Eberlei + */ +class FieldBuilder +{ + /** + * @var ClassMetadataBuilder + */ + private $builder; + /** + * @var array + */ + private $mapping; + /** + * @var bool + */ + private $version; + + /** + * @var string + */ + private $generatedValue; + + /** + * @var array + */ + private $sequenceDef; + + /** + * + * @param ClassMetadataBuilder $builder + * @param array $mapping + */ + public function __construct(ClassMetadataBuilder $builder, array $mapping) + { + $this->builder = $builder; + $this->mapping = $mapping; + } + + /** + * Set length. + * + * @param int $length + * @return FieldBuilder + */ + public function length($length) + { + $this->mapping['length'] = $length; + return $this; + } + + /** + * Set nullable + * + * @param bool + * @return FieldBuilder + */ + public function nullable($flag = true) + { + $this->mapping['nullable'] = (bool)$flag; + return $this; + } + + /** + * Set Unique + * + * @param bool + * @return FieldBuilder + */ + public function unique($flag = true) + { + $this->mapping['unique'] = (bool)$flag; + return $this; + } + + /** + * Set column name + * + * @param string $name + * @return FieldBuilder + */ + public function columnName($name) + { + $this->mapping['columnName'] = $name; + return $this; + } + + /** + * Set Precision + * + * @param int $p + * @return FieldBuilder + */ + public function precision($p) + { + $this->mapping['precision'] = $p; + return $this; + } + + /** + * Set scale. + * + * @param int $s + * @return FieldBuilder + */ + public function scale($s) + { + $this->mapping['scale'] = $s; + return $this; + } + + /** + * Set field as primary key. + * + * @return FieldBuilder + */ + public function isPrimaryKey() + { + $this->mapping['id'] = true; + return $this; + } + + /** + * @param int $strategy + * @return FieldBuilder + */ + public function generatedValue($strategy = 'AUTO') + { + $this->generatedValue = $strategy; + return $this; + } + + /** + * Set field versioned + * + * @return FieldBuilder + */ + public function isVersionField() + { + $this->version = true; + return $this; + } + + /** + * Set Sequence Generator + * + * @param string $sequenceName + * @param int $allocationSize + * @param int $initialValue + * @return FieldBuilder + */ + public function setSequenceGenerator($sequenceName, $allocationSize = 1, $initialValue = 1) + { + $this->sequenceDef = array( + 'sequenceName' => $sequenceName, + 'allocationSize' => $allocationSize, + 'initialValue' => $initialValue, + ); + return $this; + } + + /** + * Set column definition. + * + * @param string $def + * @return FieldBuilder + */ + public function columnDefinition($def) + { + $this->mapping['columnDefinition'] = $def; + return $this; + } + + /** + * Finalize this field and attach it to the ClassMetadata. + * + * Without this call a FieldBuilder has no effect on the ClassMetadata. + * + * @return ClassMetadataBuilder + */ + public function build() + { + $cm = $this->builder->getClassMetadata(); + if ($this->generatedValue) { + $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); + } + if ($this->version) { + $cm->setVersionMapping($this->mapping); + } + $cm->mapField($this->mapping); + if ($this->sequenceDef) { + $cm->setSequenceGeneratorDefinition($this->sequenceDef); + } + return $this->builder; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php b/src/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php new file mode 100644 index 0000000000..c1dd1e568a --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/Builder/ManyToManyAssociationBuilder.php @@ -0,0 +1,86 @@ +. + */ + + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * ManyToMany Association Builder + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.0 + * @author Benjamin Eberlei + */ +class ManyToManyAssociationBuilder extends OneToManyAssociationBuilder +{ + private $joinTableName; + + private $inverseJoinColumns = array(); + + public function setJoinTable($name) + { + $this->joinTableName = $name; + return $this; + } + + /** + * Add Inverse Join Columns + * + * @param string $columnName + * @param string $referencedColumnName + * @param bool $nullable + * @param bool $unique + * @param string $onDelete + * @param string $columnDef + */ + public function addInverseJoinColumn($columnName, $referencedColumnName, $nullable = true, $unique = false, $onDelete = null, $columnDef = null) + { + $this->inverseJoinColumns[] = array( + 'name' => $columnName, + 'referencedColumnName' => $referencedColumnName, + 'nullable' => $nullable, + 'unique' => $unique, + 'onDelete' => $onDelete, + 'columnDefinition' => $columnDef, + ); + return $this; + } + + /** + * @return ClassMetadataBuilder + */ + public function build() + { + $mapping = $this->mapping; + $mapping['joinTable'] = array(); + if ($this->joinColumns) { + $mapping['joinTable']['joinColumns'] = $this->joinColumns; + } + if ($this->inverseJoinColumns) { + $mapping['joinTable']['inverseJoinColumns'] = $this->inverseJoinColumns; + } + if ($this->joinTableName) { + $mapping['joinTable']['name'] = $this->joinTableName; + } + $cm = $this->builder->getClassMetadata(); + $cm->mapManyToMany($mapping); + return $this->builder; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php b/src/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php new file mode 100644 index 0000000000..be55c2d6b7 --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/Builder/OneToManyAssociationBuilder.php @@ -0,0 +1,62 @@ +. + */ + + +namespace Doctrine\ORM\Mapping\Builder; + +/** + * OneToMany Association Builder + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 2.0 + * @author Benjamin Eberlei + */ +class OneToManyAssociationBuilder extends AssociationBuilder +{ + /** + * @param array $fieldNames + * @return OneToManyAssociationBuilder + */ + public function setOrderBy(array $fieldNames) + { + $this->mapping['orderBy'] = $fieldNames; + return $this; + } + + public function setIndexBy($fieldName) + { + $this->mapping['indexBy'] = $fieldName; + return $this; + } + + /** + * @return ClassMetadataBuilder + */ + public function build() + { + $mapping = $this->mapping; + if ($this->joinColumns) { + $mapping['joinColumns'] = $this->joinColumns; + } + $cm = $this->builder->getClassMetadata(); + $cm->mapOneToMany($mapping); + return $this->builder; + } +} \ No newline at end of file diff --git a/src/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php b/src/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php new file mode 100644 index 0000000000..a9cc3725a6 --- /dev/null +++ b/src/lib/Doctrine/ORM/Mapping/ChangeTrackingPolicy.php @@ -0,0 +1,30 @@ +. + */ + +namespace Doctrine\ORM\Mapping; + +/** + * @Annotation + * @Target("CLASS") + */ +final class ChangeTrackingPolicy implements Annotation +{ + /** @var string */ + public $value; +} diff --git a/src/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/src/lib/Doctrine/ORM/Mapping/ClassMetadata.php index bbabc2fe00..70b8f9e40b 100644 --- a/src/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/src/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -24,7 +24,7 @@ /** * A ClassMetadata instance holds all the object-relational mapping metadata * of an entity and it's associations. - * + * * Once populated, ClassMetadata instances are usually cached in a serialized form. * * IMPORTANT NOTE: @@ -41,306 +41,4 @@ */ class ClassMetadata extends ClassMetadataInfo { - /** - * The ReflectionProperty instances of the mapped class. - * - * @var array - */ - public $reflFields = array(); - - /** - * The prototype from which new instances of the mapped class are created. - * - * @var object - */ - private $_prototype; - - /** - * Initializes a new ClassMetadata instance that will hold the object-relational mapping - * metadata of the class with the given name. - * - * @param string $entityName The name of the entity class the new instance is used for. - */ - public function __construct($entityName) - { - $this->reflClass = new ReflectionClass($entityName); - $this->namespace = $this->reflClass->getNamespaceName(); - $this->table['name'] = $this->reflClass->getShortName(); - parent::__construct($this->reflClass->getName()); // do not use $entityName, possible case-problems - } - - /** - * Gets the ReflectionPropertys of the mapped class. - * - * @return array An array of ReflectionProperty instances. - */ - public function getReflectionProperties() - { - return $this->reflFields; - } - - /** - * Gets a ReflectionProperty for a specific field of the mapped class. - * - * @param string $name - * @return ReflectionProperty - */ - public function getReflectionProperty($name) - { - return $this->reflFields[$name]; - } - - /** - * Gets the ReflectionProperty for the single identifier field. - * - * @return ReflectionProperty - * @throws BadMethodCallException If the class has a composite identifier. - */ - public function getSingleIdReflectionProperty() - { - if ($this->isIdentifierComposite) { - throw new \BadMethodCallException("Class " . $this->name . " has a composite identifier."); - } - return $this->reflFields[$this->identifier[0]]; - } - - /** - * Validates & completes the given field mapping. - * - * @param array $mapping The field mapping to validated & complete. - * @return array The validated and completed field mapping. - * - * @throws MappingException - */ - protected function _validateAndCompleteFieldMapping(array &$mapping) - { - parent::_validateAndCompleteFieldMapping($mapping); - - // Store ReflectionProperty of mapped field - $refProp = $this->reflClass->getProperty($mapping['fieldName']); - $refProp->setAccessible(true); - $this->reflFields[$mapping['fieldName']] = $refProp; - } - - /** - * Extracts the identifier values of an entity of this class. - * - * For composite identifiers, the identifier values are returned as an array - * with the same order as the field order in {@link identifier}. - * - * @param object $entity - * @return array - */ - public function getIdentifierValues($entity) - { - if ($this->isIdentifierComposite) { - $id = array(); - foreach ($this->identifier as $idField) { - $value = $this->reflFields[$idField]->getValue($entity); - if ($value !== null) { - $id[$idField] = $value; - } - } - return $id; - } else { - $value = $this->reflFields[$this->identifier[0]]->getValue($entity); - if ($value !== null) { - return array($this->identifier[0] => $value); - } - return array(); - } - } - - /** - * Populates the entity identifier of an entity. - * - * @param object $entity - * @param mixed $id - * @todo Rename to assignIdentifier() - */ - public function setIdentifierValues($entity, array $id) - { - foreach ($id as $idField => $idValue) { - $this->reflFields[$idField]->setValue($entity, $idValue); - } - } - - /** - * Sets the specified field to the specified value on the given entity. - * - * @param object $entity - * @param string $field - * @param mixed $value - */ - public function setFieldValue($entity, $field, $value) - { - $this->reflFields[$field]->setValue($entity, $value); - } - - /** - * Gets the specified field's value off the given entity. - * - * @param object $entity - * @param string $field - */ - public function getFieldValue($entity, $field) - { - return $this->reflFields[$field]->getValue($entity); - } - - /** - * Stores the association mapping. - * - * @param AssociationMapping $assocMapping - */ - protected function _storeAssociationMapping(array $assocMapping) - { - parent::_storeAssociationMapping($assocMapping); - - // Store ReflectionProperty of mapped field - $sourceFieldName = $assocMapping['fieldName']; - - $refProp = $this->reflClass->getProperty($sourceFieldName); - $refProp->setAccessible(true); - $this->reflFields[$sourceFieldName] = $refProp; - } - - /** - * Creates a string representation of this instance. - * - * @return string The string representation of this instance. - * @todo Construct meaningful string representation. - */ - public function __toString() - { - return __CLASS__ . '@' . spl_object_hash($this); - } - - /** - * Determines which fields get serialized. - * - * It is only serialized what is necessary for best unserialization performance. - * That means any metadata properties that are not set or empty or simply have - * their default value are NOT serialized. - * - * Parts that are also NOT serialized because they can not be properly unserialized: - * - reflClass (ReflectionClass) - * - reflFields (ReflectionProperty array) - * - * @return array The names of all the fields that should be serialized. - */ - public function __sleep() - { - // This metadata is always serialized/cached. - $serialized = array( - 'associationMappings', - 'columnNames', //TODO: Not really needed. Can use fieldMappings[$fieldName]['columnName'] - 'fieldMappings', - 'fieldNames', - 'identifier', - 'isIdentifierComposite', // TODO: REMOVE - 'name', - 'namespace', // TODO: REMOVE - 'table', - 'rootEntityName', - 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. - ); - - // The rest of the metadata is only serialized if necessary. - if ($this->changeTrackingPolicy != self::CHANGETRACKING_DEFERRED_IMPLICIT) { - $serialized[] = 'changeTrackingPolicy'; - } - - if ($this->customRepositoryClassName) { - $serialized[] = 'customRepositoryClassName'; - } - - if ($this->inheritanceType != self::INHERITANCE_TYPE_NONE) { - $serialized[] = 'inheritanceType'; - $serialized[] = 'discriminatorColumn'; - $serialized[] = 'discriminatorValue'; - $serialized[] = 'discriminatorMap'; - $serialized[] = 'parentClasses'; - $serialized[] = 'subClasses'; - } - - if ($this->generatorType != self::GENERATOR_TYPE_NONE) { - $serialized[] = 'generatorType'; - if ($this->generatorType == self::GENERATOR_TYPE_SEQUENCE) { - $serialized[] = 'sequenceGeneratorDefinition'; - } - } - - if ($this->isMappedSuperclass) { - $serialized[] = 'isMappedSuperclass'; - } - - if ($this->containsForeignIdentifier) { - $serialized[] = 'containsForeignIdentifier'; - } - - if ($this->isVersioned) { - $serialized[] = 'isVersioned'; - $serialized[] = 'versionField'; - } - - if ($this->lifecycleCallbacks) { - $serialized[] = 'lifecycleCallbacks'; - } - - if ($this->namedQueries) { - $serialized[] = 'namedQueries'; - } - - if ($this->isReadOnly) { - $serialized[] = 'isReadOnly'; - } - - return $serialized; - } - - /** - * Restores some state that can not be serialized/unserialized. - * - * @return void - */ - public function __wakeup() - { - // Restore ReflectionClass and properties - $this->reflClass = new ReflectionClass($this->name); - - foreach ($this->fieldMappings as $field => $mapping) { - if (isset($mapping['declared'])) { - $reflField = new ReflectionProperty($mapping['declared'], $field); - } else { - $reflField = $this->reflClass->getProperty($field); - } - $reflField->setAccessible(true); - $this->reflFields[$field] = $reflField; - } - - foreach ($this->associationMappings as $field => $mapping) { - if (isset($mapping['declared'])) { - $reflField = new ReflectionProperty($mapping['declared'], $field); - } else { - $reflField = $this->reflClass->getProperty($field); - } - - $reflField->setAccessible(true); - $this->reflFields[$field] = $reflField; - } - } - - /** - * Creates a new instance of the mapped class, without invoking the constructor. - * - * @return object - */ - public function newInstance() - { - if ($this->_prototype === null) { - $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name)); - } - return clone $this->_prototype; - } } diff --git a/src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index 8bfda64502..e2a562168f 100644 --- a/src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -24,6 +24,8 @@ Doctrine\ORM\EntityManager, Doctrine\DBAL\Platforms, Doctrine\ORM\Events, + Doctrine\Common\Persistence\Mapping\RuntimeReflectionService, + Doctrine\Common\Persistence\Mapping\ReflectionService, Doctrine\Common\Persistence\Mapping\ClassMetadataFactory as ClassMetadataFactoryInterface; /** @@ -43,14 +45,14 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface * @var EntityManager */ private $em; - + /** * @var AbstractPlatform */ private $targetPlatform; /** - * @var Driver\Driver + * @var \Doctrine\ORM\Mapping\Driver\Driver */ private $driver; @@ -73,7 +75,12 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface * @var bool */ private $initialized = false; - + + /** + * @var ReflectionService + */ + private $reflectionService; + /** * @param EntityManager $$em */ @@ -85,7 +92,7 @@ public function setEntityManager(EntityManager $em) /** * Sets the cache driver used by the factory to cache ClassMetadata instances. * - * @param Doctrine\Common\Cache\Cache $cacheDriver + * @param \Doctrine\Common\Cache\Cache $cacheDriver */ public function setCacheDriver($cacheDriver) { @@ -95,22 +102,22 @@ public function setCacheDriver($cacheDriver) /** * Gets the cache driver used by the factory to cache ClassMetadata instances. * - * @return Doctrine\Common\Cache\Cache + * @return \Doctrine\Common\Cache\Cache */ public function getCacheDriver() { return $this->cacheDriver; } - + public function getLoadedMetadata() { return $this->loadedMetadata; } - + /** * Forces the factory to load the metadata of all classes known to the underlying * mapping driver. - * + * * @return array The ClassMetadata instances of all mapped classes. */ public function getAllMetadata() @@ -143,7 +150,7 @@ private function initialize() * Gets the class metadata descriptor for a class. * * @param string $className The name of the class. - * @return Doctrine\ORM\Mapping\ClassMetadata + * @return \Doctrine\ORM\Mapping\ClassMetadata */ public function getMetadataFor($className) { @@ -165,6 +172,7 @@ public function getMetadataFor($className) if ($this->cacheDriver) { if (($cached = $this->cacheDriver->fetch("$realClassName\$CLASSMETADATA")) !== false) { + $this->wakeupReflection($cached, $this->getReflectionService()); $this->loadedMetadata[$realClassName] = $cached; } else { foreach ($this->loadMetadata($realClassName) as $loadedClassName) { @@ -188,7 +196,7 @@ public function getMetadataFor($className) /** * Checks whether the factory has the metadata for a class loaded already. - * + * * @param string $className * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise. */ @@ -199,7 +207,7 @@ public function hasMetadataFor($className) /** * Sets the metadata descriptor for a specific class. - * + * * NOTE: This is only useful in very special cases, like when generating proxy classes. * * @param string $className @@ -220,7 +228,7 @@ protected function getParentClasses($name) { // Collect parent classes, ignoring transient (not-mapped) classes. $parentClasses = array(); - foreach (array_reverse(class_parents($name)) as $parentClass) { + foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { if ( ! $this->driver->isTransient($parentClass)) { $parentClasses[] = $parentClass; } @@ -261,6 +269,7 @@ protected function loadMetadata($name) } $class = $this->newClassMetadataInstance($className); + $this->initializeReflection($class, $this->getReflectionService()); if ($parent) { $class->setInheritanceType($parent->inheritanceType); @@ -274,6 +283,9 @@ protected function loadMetadata($name) $class->setDiscriminatorMap($parent->discriminatorMap); $class->setLifecycleCallbacks($parent->lifecycleCallbacks); $class->setChangeTrackingPolicy($parent->changeTrackingPolicy); + if ($parent->isMappedSuperclass) { + $class->setCustomRepositoryClass($parent->customRepositoryClassName); + } } // Invoke driver @@ -306,36 +318,24 @@ protected function loadMetadata($name) $class->setPrimaryTable($parent->table); } + if ($parent && $parent->containsForeignIdentifier) { + $class->containsForeignIdentifier = true; + } + + if ($parent && !empty ($parent->namedQueries)) { + $this->addInheritedNamedQueries($class, $parent); + } + $class->setParentClasses($visited); if ($this->evm->hasListeners(Events::loadClassMetadata)) { $eventArgs = new \Doctrine\ORM\Event\LoadClassMetadataEventArgs($class, $this->em); $this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs); } + $this->wakeupReflection($class, $this->getReflectionService()); - // Verify & complete identifier mapping - if ( ! $class->identifier && ! $class->isMappedSuperclass) { - throw MappingException::identifierRequired($className); - } + $this->validateRuntimeMetadata($class, $parent); - // verify inheritance - if (!$class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { - if (!$parent) { - if (count($class->discriminatorMap) == 0) { - throw MappingException::missingDiscriminatorMap($class->name); - } - if (!$class->discriminatorColumn) { - throw MappingException::missingDiscriminatorColumn($class->name); - } - } else if ($parent && !$class->reflClass->isAbstract() && !in_array($class->name, array_values($class->discriminatorMap))) { - // enforce discriminator map for all entities of an inheritance hierachy, otherwise problems will occur. - throw MappingException::mappedClassNotPartOfDiscriminatorMap($class->name, $class->rootEntityName); - } - } else if ($class->isMappedSuperclass && $class->name == $class->rootEntityName && (count($class->discriminatorMap) || $class->discriminatorColumn)) { - // second condition is necessary for mapped superclasses in the middle of an inheritance hierachy - throw MappingException::noInheritanceOnMappedSuperClass($class->name); - } - $this->loadedMetadata[$className] = $class; $parent = $class; @@ -351,11 +351,47 @@ protected function loadMetadata($name) return $loaded; } + /** + * Validate runtime metadata is correctly defined. + * + * @param ClassMetadata $class + * @param ClassMetadata $parent + */ + protected function validateRuntimeMetadata($class, $parent) + { + if ( ! $class->reflClass ) { + // only validate if there is a reflection class instance + return; + } + + $class->validateIdentifier(); + $class->validateAssocations(); + $class->validateLifecycleCallbacks($this->getReflectionService()); + + // verify inheritance + if (!$class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { + if (!$parent) { + if (count($class->discriminatorMap) == 0) { + throw MappingException::missingDiscriminatorMap($class->name); + } + if (!$class->discriminatorColumn) { + throw MappingException::missingDiscriminatorColumn($class->name); + } + } else if ($parent && !$class->reflClass->isAbstract() && !in_array($class->name, array_values($class->discriminatorMap))) { + // enforce discriminator map for all entities of an inheritance hierachy, otherwise problems will occur. + throw MappingException::mappedClassNotPartOfDiscriminatorMap($class->name, $class->rootEntityName); + } + } else if ($class->isMappedSuperclass && $class->name == $class->rootEntityName && (count($class->discriminatorMap) || $class->discriminatorColumn)) { + // second condition is necessary for mapped superclasses in the middle of an inheritance hierachy + throw MappingException::noInheritanceOnMappedSuperClass($class->name); + } + } + /** * Creates a new ClassMetadata instance for the given class name. * * @param string $className - * @return Doctrine\ORM\Mapping\ClassMetadata + * @return \Doctrine\ORM\Mapping\ClassMetadata */ protected function newClassMetadataInstance($className) { @@ -365,8 +401,8 @@ protected function newClassMetadataInstance($className) /** * Adds inherited fields to the subclass mapping. * - * @param Doctrine\ORM\Mapping\ClassMetadata $subClass - * @param Doctrine\ORM\Mapping\ClassMetadata $parentClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass */ private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $parentClass) { @@ -387,8 +423,8 @@ private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $pare /** * Adds inherited association mappings to the subclass mapping. * - * @param Doctrine\ORM\Mapping\ClassMetadata $subClass - * @param Doctrine\ORM\Mapping\ClassMetadata $parentClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass */ private function addInheritedRelations(ClassMetadata $subClass, ClassMetadata $parentClass) { @@ -411,11 +447,30 @@ private function addInheritedRelations(ClassMetadata $subClass, ClassMetadata $p } } + /** + * Adds inherited named queries to the subclass mapping. + * + * @since 2.2 + * @param \Doctrine\ORM\Mapping\ClassMetadata $subClass + * @param \Doctrine\ORM\Mapping\ClassMetadata $parentClass + */ + private function addInheritedNamedQueries(ClassMetadata $subClass, ClassMetadata $parentClass) + { + foreach ($parentClass->namedQueries as $name => $query) { + if (!isset ($subClass->namedQueries[$name])) { + $subClass->addNamedQuery(array( + 'name' => $query['name'], + 'query' => $query['query'] + )); + } + } + } + /** * Completes the ID generator mapping. If "auto" is specified we choose the generator * most appropriate for the targeted database platform. * - * @param Doctrine\ORM\Mapping\ClassMetadata $class + * @param \Doctrine\ORM\Mapping\ClassMetadata $class */ private function completeIdGeneratorMapping(ClassMetadataInfo $class) { @@ -437,7 +492,7 @@ private function completeIdGeneratorMapping(ClassMetadataInfo $class) // __seq in PostgreSQL for SERIAL columns. // Not pretty but necessary and the simplest solution that currently works. $seqName = $this->targetPlatform instanceof Platforms\PostgreSQLPlatform ? - $class->table['name'] . '_' . $class->columnNames[$class->identifier[0]] . '_seq' : + $class->getTableName() . '_' . $class->columnNames[$class->identifier[0]] . '_seq' : null; $class->setIdGenerator(new \Doctrine\ORM\Id\IdentityGenerator($seqName)); break; @@ -467,4 +522,72 @@ private function completeIdGeneratorMapping(ClassMetadataInfo $class) throw new ORMException("Unknown generator type: " . $class->generatorType); } } + + /** + * Check if this class is mapped by this EntityManager + ClassMetadata configuration + * + * @param $class + * @return bool + */ + public function isTransient($class) + { + if ( ! $this->initialized) { + $this->initialize(); + } + + // Check for namespace alias + if (strpos($class, ':') !== false) { + list($namespaceAlias, $simpleClassName) = explode(':', $class); + $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; + } + + return $this->driver->isTransient($class); + } + + /** + * Get reflectionService. + * + * @return \Doctrine\Common\Persistence\Mapping\ReflectionService + */ + public function getReflectionService() + { + if ($this->reflectionService === null) { + $this->reflectionService = new RuntimeReflectionService(); + } + return $this->reflectionService; + } + + /** + * Set reflectionService. + * + * @param reflectionService the value to set. + */ + public function setReflectionService(ReflectionService $reflectionService) + { + $this->reflectionService = $reflectionService; + } + + /** + * Wakeup reflection after ClassMetadata gets unserialized from cache. + * + * @param ClassMetadataInfo $class + * @param ReflectionService $reflService + * @return void + */ + protected function wakeupReflection(ClassMetadataInfo $class, ReflectionService $reflService) + { + $class->wakeupReflection($reflService); + } + + /** + * Initialize Reflection after ClassMetadata was constructed. + * + * @param ClassMetadataInfo $class + * @param ReflectionService $reflService + * @return void + */ + protected function initializeReflection(ClassMetadataInfo $class, ReflectionService $reflService) + { + $class->initializeReflection($reflService); + } } diff --git a/src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 7c5cf8d261..31e2b754d3 100644 --- a/src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -19,8 +19,9 @@ namespace Doctrine\ORM\Mapping; -use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\DBAL\Types\Type; use ReflectionClass; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; /** * A ClassMetadata instance holds all the object-relational mapping metadata @@ -119,7 +120,7 @@ class ClassMetadataInfo implements ClassMetadata const FETCH_LAZY = 2; /** * Specifies that an association is to be fetched when the owner of the - * association is fetched. + * association is fetched. */ const FETCH_EAGER = 3; /** @@ -136,10 +137,6 @@ class ClassMetadataInfo implements ClassMetadata * Identifies a many-to-one association. */ const MANY_TO_ONE = 2; - /** - * Combined bitmask for to-one (single-valued) associations. - */ - const TO_ONE = 3; /** * Identifies a one-to-many association. */ @@ -148,6 +145,10 @@ class ClassMetadataInfo implements ClassMetadata * Identifies a many-to-many association. */ const MANY_TO_MANY = 8; + /** + * Combined bitmask for to-one (single-valued) associations. + */ + const TO_ONE = 3; /** * Combined bitmask for to-many (collection-valued) associations. */ @@ -206,7 +207,7 @@ class ClassMetadataInfo implements ClassMetadata /** * READ-ONLY: The named queries allowed to be called directly from Repository. - * + * * @var array */ public $namedQueries = array(); @@ -318,7 +319,7 @@ class ClassMetadataInfo implements ClassMetadata public $discriminatorMap = array(); /** - * READ-ONLY: The definition of the descriminator column used in JOINED and SINGLE_TABLE + * READ-ONLY: The definition of the discriminator column used in JOINED and SINGLE_TABLE * inheritance mappings. * * @var array @@ -361,7 +362,7 @@ class ClassMetadataInfo implements ClassMetadata * - mappedBy (string, required for bidirectional associations) * The name of the field that completes the bidirectional association on the owning side. * This key must be specified on the inverse side of a bidirectional association. - * + * * - inversedBy (string, required for bidirectional associations) * The name of the field that completes the bidirectional association on the inverse side. * This key must be specified on the owning side of a bidirectional association. @@ -388,7 +389,7 @@ class ClassMetadataInfo implements ClassMetadata * Specification of a field on target-entity that is used to index the collection by. * This field HAS to be either the primary key or a unique column. Otherwise the collection * does not contain all the entities that are actually related. - * + * * A join table definition has the following structure: *
      * array(
@@ -430,7 +431,7 @@ class ClassMetadataInfo implements ClassMetadata
     /**
      * READ-ONLY: The definition of the sequence generator of this class. Only used for the
      * SEQUENCE generation strategy.
-     * 
+     *
      * The definition has the following structure:
      * 
      * array(
@@ -494,6 +495,20 @@ class ClassMetadataInfo implements ClassMetadata
      */
     public $isReadOnly = false;
 
+    /**
+     * The ReflectionProperty instances of the mapped class.
+     *
+     * @var array
+     */
+    public $reflFields = array();
+
+    /**
+     * The prototype from which new instances of the mapped class are created.
+     *
+     * @var object
+     */
+    private $_prototype;
+
     /**
      * Initializes a new ClassMetadata instance that will hold the object-relational mapping
      * metadata of the class with the given name.
@@ -506,6 +521,308 @@ public function __construct($entityName)
         $this->rootEntityName = $entityName;
     }
 
+    /**
+     * Gets the ReflectionPropertys of the mapped class.
+     *
+     * @return array An array of ReflectionProperty instances.
+     */
+    public function getReflectionProperties()
+    {
+        return $this->reflFields;
+    }
+
+    /**
+     * Gets a ReflectionProperty for a specific field of the mapped class.
+     *
+     * @param string $name
+     * @return ReflectionProperty
+     */
+    public function getReflectionProperty($name)
+    {
+        return $this->reflFields[$name];
+    }
+
+    /**
+     * Gets the ReflectionProperty for the single identifier field.
+     *
+     * @return ReflectionProperty
+     * @throws BadMethodCallException If the class has a composite identifier.
+     */
+    public function getSingleIdReflectionProperty()
+    {
+        if ($this->isIdentifierComposite) {
+            throw new \BadMethodCallException("Class " . $this->name . " has a composite identifier.");
+        }
+        return $this->reflFields[$this->identifier[0]];
+    }
+
+    /**
+     * Extracts the identifier values of an entity of this class.
+     *
+     * For composite identifiers, the identifier values are returned as an array
+     * with the same order as the field order in {@link identifier}.
+     *
+     * @param object $entity
+     * @return array
+     */
+    public function getIdentifierValues($entity)
+    {
+        if ($this->isIdentifierComposite) {
+            $id = array();
+
+            foreach ($this->identifier as $idField) {
+                $value = $this->reflFields[$idField]->getValue($entity);
+
+                if ($value !== null) {
+                    $id[$idField] = $value;
+                }
+            }
+
+            return $id;
+        }
+
+        $value = $this->reflFields[$this->identifier[0]]->getValue($entity);
+
+        if ($value !== null) {
+            return array($this->identifier[0] => $value);
+        }
+
+        return array();
+    }
+
+    /**
+     * Populates the entity identifier of an entity.
+     *
+     * @param object $entity
+     * @param mixed $id
+     * @todo Rename to assignIdentifier()
+     */
+    public function setIdentifierValues($entity, array $id)
+    {
+        foreach ($id as $idField => $idValue) {
+            $this->reflFields[$idField]->setValue($entity, $idValue);
+        }
+    }
+
+    /**
+     * Sets the specified field to the specified value on the given entity.
+     *
+     * @param object $entity
+     * @param string $field
+     * @param mixed $value
+     */
+    public function setFieldValue($entity, $field, $value)
+    {
+        $this->reflFields[$field]->setValue($entity, $value);
+    }
+
+    /**
+     * Gets the specified field's value off the given entity.
+     *
+     * @param object $entity
+     * @param string $field
+     */
+    public function getFieldValue($entity, $field)
+    {
+        return $this->reflFields[$field]->getValue($entity);
+    }
+
+    /**
+     * Creates a string representation of this instance.
+     *
+     * @return string The string representation of this instance.
+     * @todo Construct meaningful string representation.
+     */
+    public function __toString()
+    {
+        return __CLASS__ . '@' . spl_object_hash($this);
+    }
+
+    /**
+     * Determines which fields get serialized.
+     *
+     * It is only serialized what is necessary for best unserialization performance.
+     * That means any metadata properties that are not set or empty or simply have
+     * their default value are NOT serialized.
+     *
+     * Parts that are also NOT serialized because they can not be properly unserialized:
+     *      - reflClass (ReflectionClass)
+     *      - reflFields (ReflectionProperty array)
+     *
+     * @return array The names of all the fields that should be serialized.
+     */
+    public function __sleep()
+    {
+        // This metadata is always serialized/cached.
+        $serialized = array(
+            'associationMappings',
+            'columnNames', //TODO: Not really needed. Can use fieldMappings[$fieldName]['columnName']
+            'fieldMappings',
+            'fieldNames',
+            'identifier',
+            'isIdentifierComposite', // TODO: REMOVE
+            'name',
+            'namespace', // TODO: REMOVE
+            'table',
+            'rootEntityName',
+            'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime.
+        );
+
+        // The rest of the metadata is only serialized if necessary.
+        if ($this->changeTrackingPolicy != self::CHANGETRACKING_DEFERRED_IMPLICIT) {
+            $serialized[] = 'changeTrackingPolicy';
+        }
+
+        if ($this->customRepositoryClassName) {
+            $serialized[] = 'customRepositoryClassName';
+        }
+
+        if ($this->inheritanceType != self::INHERITANCE_TYPE_NONE) {
+            $serialized[] = 'inheritanceType';
+            $serialized[] = 'discriminatorColumn';
+            $serialized[] = 'discriminatorValue';
+            $serialized[] = 'discriminatorMap';
+            $serialized[] = 'parentClasses';
+            $serialized[] = 'subClasses';
+        }
+
+        if ($this->generatorType != self::GENERATOR_TYPE_NONE) {
+            $serialized[] = 'generatorType';
+            if ($this->generatorType == self::GENERATOR_TYPE_SEQUENCE) {
+                $serialized[] = 'sequenceGeneratorDefinition';
+            }
+        }
+
+        if ($this->isMappedSuperclass) {
+            $serialized[] = 'isMappedSuperclass';
+        }
+
+        if ($this->containsForeignIdentifier) {
+            $serialized[] = 'containsForeignIdentifier';
+        }
+
+        if ($this->isVersioned) {
+            $serialized[] = 'isVersioned';
+            $serialized[] = 'versionField';
+        }
+
+        if ($this->lifecycleCallbacks) {
+            $serialized[] = 'lifecycleCallbacks';
+        }
+
+        if ($this->namedQueries) {
+            $serialized[] = 'namedQueries';
+        }
+
+        if ($this->isReadOnly) {
+            $serialized[] = 'isReadOnly';
+        }
+
+        return $serialized;
+    }
+
+    /**
+     * Creates a new instance of the mapped class, without invoking the constructor.
+     *
+     * @return object
+     */
+    public function newInstance()
+    {
+        if ($this->_prototype === null) {
+            $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
+        }
+
+        return clone $this->_prototype;
+    }
+    /**
+     * Restores some state that can not be serialized/unserialized.
+     *
+     * @param ReflectionService $reflService
+     * @return void
+     */
+    public function wakeupReflection($reflService)
+    {
+        // Restore ReflectionClass and properties
+        $this->reflClass = $reflService->getClass($this->name);
+
+        foreach ($this->fieldMappings as $field => $mapping) {
+            $this->reflFields[$field] = isset($mapping['declared'])
+                ? $reflService->getAccessibleProperty($mapping['declared'], $field)
+                : $reflService->getAccessibleProperty($this->name, $field);
+        }
+
+        foreach ($this->associationMappings as $field => $mapping) {
+            $this->reflFields[$field] = isset($mapping['declared'])
+                ? $reflService->getAccessibleProperty($mapping['declared'], $field)
+                : $reflService->getAccessibleProperty($this->name, $field);
+        }
+    }
+
+    /**
+     * Initializes a new ClassMetadata instance that will hold the object-relational mapping
+     * metadata of the class with the given name.
+     *
+     * @param string $entityName The name of the entity class the new instance is used for.
+     */
+    public function initializeReflection($reflService)
+    {
+        $this->reflClass = $reflService->getClass($this->name);
+        $this->namespace = $reflService->getClassNamespace($this->name);
+        $this->table['name'] = $reflService->getClassShortName($this->name);
+
+        if ($this->reflClass) {
+            $this->name = $this->rootEntityName = $this->reflClass->getName();
+        }
+    }
+
+    /**
+     * Validate Identifier
+     *
+     * @return void
+     */
+    public function validateIdentifier()
+    {
+        // Verify & complete identifier mapping
+        if ( ! $this->identifier && ! $this->isMappedSuperclass) {
+            throw MappingException::identifierRequired($this->name);
+        }
+
+        if ($this->usesIdGenerator() && $this->isIdentifierComposite) {
+            throw MappingException::compositeKeyAssignedIdGeneratorRequired($this->name);
+        }
+    }
+
+    /**
+     * Validate association targets actually exist.
+     *
+     * @return void
+     */
+    public function validateAssocations()
+    {
+        foreach ($this->associationMappings as $field => $mapping) {
+            if ( ! \Doctrine\Common\ClassLoader::classExists($mapping['targetEntity']) ) {
+                throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']);
+            }
+        }
+    }
+
+    /**
+     * Validate lifecycle callbacks
+     *
+     * @param ReflectionService $reflService
+     * @return void
+     */
+    public function validateLifecycleCallbacks($reflService)
+    {
+        foreach ($this->lifecycleCallbacks as $event => $callbacks) {
+            foreach ($callbacks as $callbackFuncName) {
+                if ( ! $reflService->hasPublicMethod($this->name, $callbackFuncName)) {
+                    throw MappingException::lifecycleCallbackMethodNotFound($this->name, $callbackFuncName);
+                }
+            }
+        }
+    }
+
     /**
      * Gets the ReflectionClass instance of the mapped class.
      *
@@ -513,9 +830,6 @@ public function __construct($entityName)
      */
     public function getReflectionClass()
     {
-        if ( ! $this->reflClass) {
-            $this->reflClass = new ReflectionClass($this->name);
-        }
         return $this->reflClass;
     }
 
@@ -685,7 +999,7 @@ public function getNamedQuery($queryName)
         if ( ! isset($this->namedQueries[$queryName])) {
             throw MappingException::queryNotFound($this->name, $queryName);
         }
-        return $this->namedQueries[$queryName];
+        return $this->namedQueries[$queryName]['dql'];
     }
 
     /**
@@ -746,6 +1060,14 @@ protected function _validateAndCompleteFieldMapping(array &$mapping)
                 $this->isIdentifierComposite = true;
             }
         }
+
+        if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) {
+            if (isset($mapping['id']) && $mapping['id'] === true) {
+                 throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']);
+            }
+
+            $mapping['requireSQLConversion'] = true;
+        }
     }
 
     /**
@@ -774,9 +1096,20 @@ protected function _validateAndCompleteAssociationMapping(array $mapping)
         // If targetEntity is unqualified, assume it is in the same namespace as
         // the sourceEntity.
         $mapping['sourceEntity'] = $this->name;
-        if (isset($mapping['targetEntity']) && strpos($mapping['targetEntity'], '\\') === false
-                && strlen($this->namespace) > 0) {
-            $mapping['targetEntity'] = $this->namespace . '\\' . $mapping['targetEntity'];
+
+        if (isset($mapping['targetEntity'])) {
+            if (strlen($this->namespace) > 0 && strpos($mapping['targetEntity'], '\\') === false) {
+                $mapping['targetEntity'] = $this->namespace . '\\' . $mapping['targetEntity'];
+            }
+
+            $mapping['targetEntity'] = ltrim($mapping['targetEntity'], '\\');
+        }
+
+        if ( ($mapping['type'] & self::MANY_TO_ONE) > 0 &&
+                isset($mapping['orphanRemoval']) &&
+                $mapping['orphanRemoval'] == true) {
+
+            throw MappingException::illegalOrphanRemoval($this->name, $mapping['fieldName']);
         }
 
         // Complete id mapping
@@ -809,7 +1142,7 @@ protected function _validateAndCompleteAssociationMapping(array $mapping)
         if ( ! isset($mapping['targetEntity'])) {
             throw MappingException::missingTargetEntity($mapping['fieldName']);
         }
-        
+
         // Mandatory and optional attributes for either side
         if ( ! $mapping['mappedBy']) {
             if (isset($mapping['joinTable']) && $mapping['joinTable']) {
@@ -825,7 +1158,7 @@ protected function _validateAndCompleteAssociationMapping(array $mapping)
         if (isset($mapping['id']) && $mapping['id'] === true && $mapping['type'] & self::TO_MANY) {
             throw MappingException::illegalToManyIdentifierAssoaction($this->name, $mapping['fieldName']);
         }
-        
+
         // Fetch mode. Default fetch mode to LAZY, if not set.
         if ( ! isset($mapping['fetch'])) {
             $mapping['fetch'] = self::FETCH_LAZY;
@@ -833,22 +1166,18 @@ protected function _validateAndCompleteAssociationMapping(array $mapping)
 
         // Cascades
         $cascades = isset($mapping['cascade']) ? array_map('strtolower', $mapping['cascade']) : array();
+
         if (in_array('all', $cascades)) {
-            $cascades = array(
-               'remove',
-               'persist',
-               'refresh',
-               'merge',
-               'detach'
-            );
+            $cascades = array('remove', 'persist', 'refresh', 'merge', 'detach');
         }
+
         $mapping['cascade'] = $cascades;
         $mapping['isCascadeRemove'] = in_array('remove',  $cascades);
         $mapping['isCascadePersist'] = in_array('persist',  $cascades);
         $mapping['isCascadeRefresh'] = in_array('refresh',  $cascades);
         $mapping['isCascadeMerge'] = in_array('merge',  $cascades);
         $mapping['isCascadeDetach'] = in_array('detach',  $cascades);
-        
+
         return $mapping;
     }
 
@@ -862,11 +1191,11 @@ protected function _validateAndCompleteAssociationMapping(array $mapping)
     protected function _validateAndCompleteOneToOneMapping(array $mapping)
     {
         $mapping = $this->_validateAndCompleteAssociationMapping($mapping);
-        
+
         if (isset($mapping['joinColumns']) && $mapping['joinColumns']) {
             $mapping['isOwningSide'] = true;
         }
-        
+
         if ($mapping['isOwningSide']) {
             if ( ! isset($mapping['joinColumns']) || ! $mapping['joinColumns']) {
                 // Apply default join column
@@ -878,9 +1207,11 @@ protected function _validateAndCompleteOneToOneMapping(array $mapping)
 
             $uniqueContraintColumns = array();
             foreach ($mapping['joinColumns'] as $key => &$joinColumn) {
-                if ($mapping['type'] === self::ONE_TO_ONE) {
+                if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) {
                     if (count($mapping['joinColumns']) == 1) {
-                        $joinColumn['unique'] = true;
+                        if (! isset($mapping['id']) || ! $mapping['id']) {
+                            $joinColumn['unique'] = true;
+                        }
                     } else {
                         $uniqueContraintColumns[] = $joinColumn['name'];
                     }
@@ -908,9 +1239,8 @@ protected function _validateAndCompleteOneToOneMapping(array $mapping)
             $mapping['targetToSourceKeyColumns'] = array_flip($mapping['sourceToTargetKeyColumns']);
         }
 
-        //TODO: if orphanRemoval, cascade=remove is implicit!
-        $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ?
-                (bool) $mapping['orphanRemoval'] : false;
+        $mapping['orphanRemoval']   = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false;
+        $mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove'];
 
         if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
             throw MappingException::illegalInverseIdentifierAssocation($this->name, $mapping['fieldName']);
@@ -934,17 +1264,16 @@ protected function _validateAndCompleteOneToManyMapping(array $mapping)
         if ( ! isset($mapping['mappedBy'])) {
             throw MappingException::oneToManyRequiresMappedBy($mapping['fieldName']);
         }
-        
-        //TODO: if orphanRemoval, cascade=remove is implicit!
-        $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ?
-                (bool) $mapping['orphanRemoval'] : false;
+
+        $mapping['orphanRemoval']   = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false;
+        $mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove'];
 
         if (isset($mapping['orderBy'])) {
             if ( ! is_array($mapping['orderBy'])) {
                 throw new \InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy']));
             }
         }
-        
+
         return $mapping;
     }
 
@@ -962,7 +1291,7 @@ protected function _validateAndCompleteManyToManyMapping(array $mapping)
             } else {
                 $targetShortName = strtolower($mapping['targetEntity']);
             }
-            
+
             // owning side MUST have a join table
             if ( ! isset($mapping['joinTable']['name'])) {
                 $mapping['joinTable']['name'] = $sourceShortName .'_' . $targetShortName;
@@ -1009,6 +1338,8 @@ protected function _validateAndCompleteManyToManyMapping(array $mapping)
             }
         }
 
+        $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false;
+
         if (isset($mapping['orderBy'])) {
             if ( ! is_array($mapping['orderBy'])) {
                 throw new \InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy']));
@@ -1113,23 +1444,23 @@ public function getColumnNames(array $fieldNames = null)
      */
     public function getIdentifierColumnNames()
     {
-        if ($this->isIdentifierComposite) {
-            $columnNames = array();
-            foreach ($this->identifier as $idField) {
-                if (isset($this->associationMappings[$idField])) {
-                    // no composite pk as fk entity assumption:
-                    $columnNames[] = $this->associationMappings[$idField]['joinColumns'][0]['name'];
-                } else {
-                    $columnNames[] = $this->fieldMappings[$idField]['columnName'];
-                }
+        $columnNames = array();
+
+        foreach ($this->identifier as $idProperty) {
+            if (isset($this->fieldMappings[$idProperty])) {
+                $columnNames[] = $this->fieldMappings[$idProperty]['columnName'];
+
+                continue;
             }
-            return $columnNames;
-        } else if(isset($this->fieldMappings[$this->identifier[0]])) {
-            return array($this->fieldMappings[$this->identifier[0]]['columnName']);
-        } else {
-            // no composite pk as fk entity assumption:
-            return array($this->associationMappings[$this->identifier[0]]['joinColumns'][0]['name']);
+
+            // Association defined as Id field
+            $joinColumns      = $this->associationMappings[$idProperty]['joinColumns'];
+            $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns);
+
+            $columnNames = array_merge($columnNames, $assocColumnNames);
         }
+
+        return $columnNames;
     }
 
     /**
@@ -1236,7 +1567,7 @@ public function isIdentifierNatural()
      * Gets the type of a field.
      *
      * @param string $fieldName
-     * @return Doctrine\DBAL\Types\Type
+     * @return \Doctrine\DBAL\Types\Type
      */
     public function getTypeOfField($fieldName)
     {
@@ -1247,7 +1578,7 @@ public function getTypeOfField($fieldName)
     /**
      * Gets the type of a column.
      *
-     * @return Doctrine\DBAL\Types\Type
+     * @return \Doctrine\DBAL\Types\Type
      */
     public function getTypeOfColumn($columnName)
     {
@@ -1272,7 +1603,7 @@ public function getTableName()
     public function getTemporaryIdTableName()
     {
         // replace dots with underscores because PostgreSQL creates temporary tables in a special schema
-        return str_replace('.', '_', $this->table['name'] . '_id_tmp');
+        return str_replace('.', '_', $this->getTableName() . '_id_tmp');
     }
 
     /**
@@ -1365,15 +1696,17 @@ public function setPrimaryTable(array $table)
     {
         if (isset($table['name'])) {
             if ($table['name'][0] == '`') {
-                $this->table['name'] = trim($table['name'], '`');
+                $this->table['name'] = str_replace("`", "", $table['name']);
                 $this->table['quoted'] = true;
             } else {
                 $this->table['name'] = $table['name'];
             }
         }
+
         if (isset($table['indexes'])) {
             $this->table['indexes'] = $table['indexes'];
         }
+
         if (isset($table['uniqueConstraints'])) {
             $this->table['uniqueConstraints'] = $table['uniqueConstraints'];
         }
@@ -1448,8 +1781,15 @@ public function addNamedQuery(array $queryMapping)
         if (isset($this->namedQueries[$queryMapping['name']])) {
             throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']);
         }
-        $query = str_replace('__CLASS__', $this->name, $queryMapping['query']);
-        $this->namedQueries[$queryMapping['name']] = $query;
+
+        $name   = $queryMapping['name'];
+        $query  = $queryMapping['query'];
+        $dql    = str_replace('__CLASS__', $this->name, $query);
+        $this->namedQueries[$name] = array(
+            'name'  => $name,
+            'query' => $query,
+            'dql'   => $dql
+        );
     }
 
     /**
@@ -1504,14 +1844,16 @@ public function mapManyToMany(array $mapping)
     /**
      * Stores the association mapping.
      *
-     * @param AssociationMapping $assocMapping
+     * @param array $assocMapping
      */
     protected function _storeAssociationMapping(array $assocMapping)
     {
         $sourceFieldName = $assocMapping['fieldName'];
+
         if (isset($this->fieldMappings[$sourceFieldName]) || isset($this->associationMappings[$sourceFieldName])) {
             throw MappingException::duplicateFieldMapping($this->name, $sourceFieldName);
         }
+
         $this->associationMappings[$sourceFieldName] = $assocMapping;
     }
 
@@ -1522,6 +1864,10 @@ protected function _storeAssociationMapping(array $assocMapping)
      */
     public function setCustomRepositoryClass($repositoryClassName)
     {
+        if ($repositoryClassName !== null && strpos($repositoryClassName, '\\') === false
+                && strlen($this->namespace) > 0) {
+            $repositoryClassName = $this->namespace . '\\' . $repositoryClassName;
+        }
         $this->customRepositoryClassName = $repositoryClassName;
     }
 
@@ -1564,9 +1910,6 @@ public function getLifecycleCallbacks($event)
     /**
      * Adds a lifecycle callback for entities of this class.
      *
-     * Note: If the same callback is registered more than once, the old one
-     * will be overridden.
-     *
      * @param string $callback
      * @param string $event
      */
@@ -1625,20 +1968,33 @@ public function setDiscriminatorColumn($columnDef)
     public function setDiscriminatorMap(array $map)
     {
         foreach ($map as $value => $className) {
-            if (strpos($className, '\\') === false && strlen($this->namespace)) {
-                $className = $this->namespace . '\\' . $className;
+            $this->addDiscriminatorMapClass($value, $className);
+        }
+    }
+
+    /**
+     * Add one entry of the discriminator map with a new class and corresponding name.
+     *
+     * @param string $name
+     * @param string $className
+     */
+    public function addDiscriminatorMapClass($name, $className)
+    {
+        if (strlen($this->namespace) > 0 && strpos($className, '\\') === false) {
+            $className = $this->namespace . '\\' . $className;
+        }
+
+        $className = ltrim($className, '\\');
+        $this->discriminatorMap[$name] = $className;
+
+        if ($this->name == $className) {
+            $this->discriminatorValue = $name;
+        } else {
+            if ( ! class_exists($className)) {
+                throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
             }
-            $className = ltrim($className, '\\');
-            $this->discriminatorMap[$value] = $className;
-            if ($this->name == $className) {
-                $this->discriminatorValue = $value;
-            } else {
-                if ( ! class_exists($className)) {
-                    throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
-                }
-                if (is_subclass_of($className, $this->name)) {
-                    $this->subClasses[] = $className;
-                }
+            if (is_subclass_of($className, $this->name) && ! in_array($className, $this->subClasses)) {
+                $this->subClasses[] = $className;
             }
         }
     }
@@ -1708,7 +2064,7 @@ public function isAssociationWithSingleJoinColumn($fieldName)
 
     /**
      * Return the single association join column (if any).
-     * 
+     *
      * @param string $fieldName
      * @return string
      */
@@ -1750,7 +2106,7 @@ public function getFieldForColumn($columnName)
             foreach ($this->associationMappings AS $assocName => $mapping) {
                 if ($this->isAssociationWithSingleJoinColumn($assocName) &&
                     $this->associationMappings[$assocName]['joinColumns'][0]['name'] == $columnName) {
-                    
+
                     return $assocName;
                 }
             }
@@ -1800,7 +2156,7 @@ public function setVersionMapping(array &$mapping)
         $this->versionField = $mapping['fieldName'];
 
         if ( ! isset($mapping['default'])) {
-            if ($mapping['type'] == 'integer') {
+            if (in_array($mapping['type'], array('integer', 'bigint', 'smallint'))) {
                 $mapping['default'] = 1;
             } else if ($mapping['type'] == 'datetime') {
                 $mapping['default'] = 'CURRENT_TIMESTAMP';
@@ -1840,48 +2196,49 @@ public function markReadOnly()
     {
         $this->isReadOnly = true;
     }
-    
+
     /**
      * A numerically indexed list of field names of this persistent class.
-     * 
+     *
      * This array includes identifier fields if present on this class.
-     * 
+     *
      * @return array
      */
     public function getFieldNames()
     {
         return array_keys($this->fieldMappings);
     }
-    
+
     /**
      * A numerically indexed list of association names of this persistent class.
-     * 
+     *
      * This array includes identifier associations if present on this class.
-     * 
+     *
      * @return array
      */
     public function getAssociationNames()
     {
         return array_keys($this->associationMappings);
     }
-    
+
     /**
      * Returns the target class name of the given association.
-     * 
+     *
      * @param string $assocName
      * @return string
      */
     public function getAssociationTargetClass($assocName)
     {
-        if (!isset($this->associationMappings[$assocName])) {
+        if ( ! isset($this->associationMappings[$assocName])) {
             throw new \InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association.");
         }
+
         return $this->associationMappings[$assocName]['targetEntity'];
     }
-    
+
     /**
      * Get fully-qualified class name of this persistent class.
-     * 
+     *
      * @return string
      */
     public function getName()
@@ -1889,33 +2246,67 @@ public function getName()
         return $this->name;
     }
 
+    /**
+     * Gets the (possibly quoted) identifier column names for safe use in an SQL statement.
+     *
+     * @param AbstractPlatform $platform
+     * @return array
+     */
+    public function getQuotedIdentifierColumnNames($platform)
+    {
+        $quotedColumnNames = array();
+
+        foreach ($this->identifier as $idProperty) {
+            if (isset($this->fieldMappings[$idProperty])) {
+                $quotedColumnNames[] = isset($this->fieldMappings[$idProperty]['quoted'])
+                    ? $platform->quoteIdentifier($this->fieldMappings[$idProperty]['columnName'])
+                    : $this->fieldMappings[$idProperty]['columnName'];
+
+                continue;
+            }
+
+            // Association defined as Id field
+            $joinColumns            = $this->associationMappings[$idProperty]['joinColumns'];
+            $assocQuotedColumnNames = array_map(
+                function ($joinColumn) {
+                    return isset($joinColumn['quoted'])
+                        ? $platform->quoteIdentifier($joinColumn['name'])
+                        : $joinColumn['name'];
+                },
+                $joinColumns
+            );
+
+            $quotedColumnNames = array_merge($quotedColumnNames, $assocQuotedColumnNames);
+        }
+
+        return $quotedColumnNames;
+    }
+
     /**
      * Gets the (possibly quoted) column name of a mapped field for safe use
      * in an SQL statement.
-     * 
+     *
      * @param string $field
      * @param AbstractPlatform $platform
      * @return string
      */
     public function getQuotedColumnName($field, $platform)
     {
-        return isset($this->fieldMappings[$field]['quoted']) ?
-                $platform->quoteIdentifier($this->fieldMappings[$field]['columnName']) :
-                $this->fieldMappings[$field]['columnName'];
+        return isset($this->fieldMappings[$field]['quoted'])
+            ? $platform->quoteIdentifier($this->fieldMappings[$field]['columnName'])
+            : $this->fieldMappings[$field]['columnName'];
     }
-    
+
     /**
      * Gets the (possibly quoted) primary table name of this class for safe use
      * in an SQL statement.
-     * 
+     *
      * @param AbstractPlatform $platform
      * @return string
      */
     public function getQuotedTableName($platform)
     {
-        return isset($this->table['quoted']) ?
-                $platform->quoteIdentifier($this->table['name']) :
-                $this->table['name'];
+        return isset($this->table['quoted']) ? $platform->quoteIdentifier($this->table['name']) : $this->table['name'];
     }
 
     /**
@@ -1926,8 +2317,24 @@ public function getQuotedTableName($platform)
      */
     public function getQuotedJoinTableName(array $assoc, $platform)
     {
-        return isset($assoc['joinTable']['quoted'])
-            ? $platform->quoteIdentifier($assoc['joinTable']['name'])
-            : $assoc['joinTable']['name'];
+        return isset($assoc['joinTable']['quoted']) ? $platform->quoteIdentifier($assoc['joinTable']['name']) : $assoc['joinTable']['name'];
+    }
+
+    /**
+     * @param string $fieldName
+     * @return bool
+     */
+    public function isAssociationInverseSide($fieldName)
+    {
+        return isset($this->associationMappings[$fieldName]) && ! $this->associationMappings[$fieldName]['isOwningSide'];
+    }
+
+    /**
+     * @param string $fieldName
+     * @return string
+     */
+    public function getAssociationMappedByTargetField($fieldName)
+    {
+        return $this->associationMappings[$fieldName]['mappedBy'];
     }
 }
diff --git a/src/lib/Doctrine/ORM/Mapping/Column.php b/src/lib/Doctrine/ORM/Mapping/Column.php
new file mode 100644
index 0000000000..5f7dd7f644
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Column.php
@@ -0,0 +1,46 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class Column implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var mixed */
+    public $type = 'string';
+    /** @var integer */
+    public $length;
+    /** @var integer */
+    public $precision = 0; // The precision for a decimal (exact numeric) column (Applies only for decimal column)
+    /** @var integer */
+    public $scale = 0; // The scale for a decimal (exact numeric) column (Applies only for decimal column)
+    /** @var boolean */
+    public $unique = false;
+    /** @var boolean */
+    public $nullable = false;
+    /** @var array */
+    public $options = array();
+    /** @var string */
+    public $columnDefinition;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php b/src/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php
new file mode 100644
index 0000000000..aec011538b
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/DiscriminatorColumn.php
@@ -0,0 +1,36 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class DiscriminatorColumn implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var string */
+    public $type;
+    /** @var integer */
+    public $length;
+    /** @var mixed */
+    public $fieldName; // field name used in non-object hydration (array/scalar)
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php b/src/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php
new file mode 100644
index 0000000000..8505cf92f2
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/DiscriminatorMap.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class DiscriminatorMap implements Annotation
+{
+    /** @var array */
+    public $value;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php
index 457b7cda7c..6953bf2d14 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php
@@ -25,7 +25,7 @@
 
 /**
  * Base driver for file-based metadata drivers.
- * 
+ *
  * A file driver operates in a mode where it loads the mapping files of individual
  * classes on demand. This requires the user to adhere to the convention of 1 mapping
  * file per class and the file names of the mapping files must correspond to the full
@@ -56,16 +56,16 @@ abstract class AbstractFileDriver implements Driver
      */
     protected $_fileExtension;
 
-    /** 
-     * Initializes a new FileDriver that looks in the given path(s) for mapping 
-     * documents and operates in the specified operating mode. 
-     *  
-     * @param string|array $paths One or multiple paths where mapping documents can be found. 
-     */ 
-    public function __construct($paths) 
-    { 
+    /**
+     * Initializes a new FileDriver that looks in the given path(s) for mapping
+     * documents and operates in the specified operating mode.
+     *
+     * @param string|array $paths One or multiple paths where mapping documents can be found.
+     */
+    public function __construct($paths)
+    {
         $this->addPaths((array) $paths);
-    } 
+    }
 
     /**
      * Append lookup paths to metadata driver.
@@ -117,7 +117,10 @@ public function setFileExtension($fileExtension)
     public function getElement($className)
     {
         $result = $this->_loadMappingFile($this->_findMappingFile($className));
-        
+
+        if(!isset($result[$className])){
+            throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->_fileExtension);
+        }
         return $result[$className];
     }
 
@@ -145,7 +148,7 @@ public function isTransient($className)
 
     /**
      * Gets the names of all mapped classes known to this driver.
-     * 
+     *
      * @return array The names of all mapped classes known to this driver.
      */
     public function getAllClassNames()
@@ -157,23 +160,23 @@ public function getAllClassNames()
                 if ( ! is_dir($path)) {
                     throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
                 }
-            
+
                 $iterator = new \RecursiveIteratorIterator(
                     new \RecursiveDirectoryIterator($path),
                     \RecursiveIteratorIterator::LEAVES_ONLY
                 );
-        
+
                 foreach ($iterator as $file) {
                     if (($fileName = $file->getBasename($this->_fileExtension)) == $file->getBasename()) {
                         continue;
                     }
-                    
+
                     // NOTE: All files found here means classes are not transient!
                     $classes[] = str_replace('.', '\\', $fileName);
                 }
             }
         }
-        
+
         return $classes;
     }
 
@@ -188,7 +191,7 @@ public function getAllClassNames()
     protected function _findMappingFile($className)
     {
         $fileName = str_replace('\\', '.', $className) . $this->_fileExtension;
-        
+
         // Check whether file exists
         foreach ((array) $this->_paths as $path) {
             if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
@@ -202,7 +205,7 @@ protected function _findMappingFile($className)
     /**
      * Loads a mapping file with the given name and returns a map
      * from class/entity names to their corresponding elements.
-     * 
+     *
      * @param string $file The mapping file to load.
      * @return array
      */
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
index 23cdb4b91c..ace39c4615 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
@@ -97,6 +97,16 @@ public function getPaths()
         return $this->_paths;
     }
 
+    /**
+     * Retrieve the current annotation reader
+     *
+     * @return AnnotationReader
+     */
+    public function getReader()
+    {
+        return $this->_reader;
+    }
+
     /**
      * Get the file extension used to look for mapping files under
      *
@@ -124,11 +134,15 @@ public function setFileExtension($fileExtension)
     public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
     {
         $class = $metadata->getReflectionClass();
+        if (!$class) {
+            // this happens when running annotation driver in combination with
+            // static reflection services. This is not the nicest fix
+            $class = new \ReflectionClass($metadata->name);
+        }
 
         $classAnnotations = $this->_reader->getClassAnnotations($class);
 
-        // Compatibility with Doctrine Common 3.x
-        if ($classAnnotations && is_int(key($classAnnotations))) {
+        if ($classAnnotations && is_numeric(key($classAnnotations))) {
             foreach ($classAnnotations as $annot) {
                 $classAnnotations[get_class($annot)] = $annot;
             }
@@ -137,12 +151,15 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         // Evaluate Entity annotation
         if (isset($classAnnotations['Doctrine\ORM\Mapping\Entity'])) {
             $entityAnnot = $classAnnotations['Doctrine\ORM\Mapping\Entity'];
-            $metadata->setCustomRepositoryClass($entityAnnot->repositoryClass);
-
+            if ($entityAnnot->repositoryClass !== null) {
+                $metadata->setCustomRepositoryClass($entityAnnot->repositoryClass);
+            }
             if ($entityAnnot->readOnly) {
                 $metadata->markReadOnly();
             }
         } else if (isset($classAnnotations['Doctrine\ORM\Mapping\MappedSuperclass'])) {
+            $mappedSuperclassAnnot = $classAnnotations['Doctrine\ORM\Mapping\MappedSuperclass'];
+            $metadata->setCustomRepositoryClass($mappedSuperclassAnnot->repositoryClass);
             $metadata->isMappedSuperclass = true;
         } else {
             throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className);
@@ -158,17 +175,25 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
 
             if ($tableAnnot->indexes !== null) {
                 foreach ($tableAnnot->indexes as $indexAnnot) {
-                    $primaryTable['indexes'][$indexAnnot->name] = array(
-                        'columns' => $indexAnnot->columns
-                    );
+                    $index = array('columns' => $indexAnnot->columns);
+
+                    if ( ! empty($indexAnnot->name)) {
+                        $primaryTable['indexes'][$indexAnnot->name] = $index;
+                    } else {
+                        $primaryTable['indexes'][] = $index;
+                    }
                 }
             }
 
             if ($tableAnnot->uniqueConstraints !== null) {
-                foreach ($tableAnnot->uniqueConstraints as $uniqueConstraint) {
-                    $primaryTable['uniqueConstraints'][$uniqueConstraint->name] = array(
-                        'columns' => $uniqueConstraint->columns
-                    );
+                foreach ($tableAnnot->uniqueConstraints as $uniqueConstraintAnnot) {
+                    $uniqueConstraint = array('columns' => $uniqueConstraintAnnot->columns);
+
+                    if ( ! empty($uniqueConstraintAnnot->name)) {
+                        $primaryTable['uniqueConstraints'][$uniqueConstraintAnnot->name] = $uniqueConstraint;
+                    } else {
+                        $primaryTable['uniqueConstraints'][] = $uniqueConstraint;
+                    }
                 }
             }
 
@@ -179,7 +204,14 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         if (isset($classAnnotations['Doctrine\ORM\Mapping\NamedQueries'])) {
             $namedQueriesAnnot = $classAnnotations['Doctrine\ORM\Mapping\NamedQueries'];
 
+            if (!is_array($namedQueriesAnnot->value)) {
+                throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations.");
+            }
+
             foreach ($namedQueriesAnnot->value as $namedQuery) {
+                if (!($namedQuery instanceof \Doctrine\ORM\Mapping\NamedQuery)) {
+                    throw new \UnexpectedValueException("@NamedQueries should contain an array of @NamedQuery annotations.");
+                }
                 $metadata->addNamedQuery(array(
                     'name'  => $namedQuery->name,
                     'query' => $namedQuery->query
@@ -243,7 +275,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     'unique' => $joinColumnAnnot->unique,
                     'nullable' => $joinColumnAnnot->nullable,
                     'onDelete' => $joinColumnAnnot->onDelete,
-                    'onUpdate' => $joinColumnAnnot->onUpdate,
                     'columnDefinition' => $joinColumnAnnot->columnDefinition,
                 );
             } else if ($joinColumnsAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinColumns')) {
@@ -254,7 +285,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                         'unique' => $joinColumn->unique,
                         'nullable' => $joinColumn->nullable,
                         'onDelete' => $joinColumn->onDelete,
-                        'onUpdate' => $joinColumn->onUpdate,
                         'columnDefinition' => $joinColumn->columnDefinition,
                     );
                 }
@@ -320,7 +350,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                 $mapping['inversedBy'] = $oneToOneAnnot->inversedBy;
                 $mapping['cascade'] = $oneToOneAnnot->cascade;
                 $mapping['orphanRemoval'] = $oneToOneAnnot->orphanRemoval;
-                $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToOneAnnot->fetch);
+                $mapping['fetch'] = $this->getFetchMode($className, $oneToOneAnnot->fetch);
                 $metadata->mapOneToOne($mapping);
             } else if ($oneToManyAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OneToMany')) {
                 $mapping['mappedBy'] = $oneToManyAnnot->mappedBy;
@@ -328,7 +358,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                 $mapping['cascade'] = $oneToManyAnnot->cascade;
                 $mapping['indexBy'] = $oneToManyAnnot->indexBy;
                 $mapping['orphanRemoval'] = $oneToManyAnnot->orphanRemoval;
-                $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $oneToManyAnnot->fetch);
+                $mapping['fetch'] = $this->getFetchMode($className, $oneToManyAnnot->fetch);
 
                 if ($orderByAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OrderBy')) {
                     $mapping['orderBy'] = $orderByAnnot->value;
@@ -344,7 +374,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                 $mapping['cascade'] = $manyToOneAnnot->cascade;
                 $mapping['inversedBy'] = $manyToOneAnnot->inversedBy;
                 $mapping['targetEntity'] = $manyToOneAnnot->targetEntity;
-                $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToOneAnnot->fetch);
+                $mapping['fetch'] = $this->getFetchMode($className, $manyToOneAnnot->fetch);
                 $metadata->mapManyToOne($mapping);
             } else if ($manyToManyAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\ManyToMany')) {
                 $joinTable = array();
@@ -362,7 +392,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                             'unique' => $joinColumn->unique,
                             'nullable' => $joinColumn->nullable,
                             'onDelete' => $joinColumn->onDelete,
-                            'onUpdate' => $joinColumn->onUpdate,
                             'columnDefinition' => $joinColumn->columnDefinition,
                         );
                     }
@@ -374,7 +403,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                             'unique' => $joinColumn->unique,
                             'nullable' => $joinColumn->nullable,
                             'onDelete' => $joinColumn->onDelete,
-                            'onUpdate' => $joinColumn->onUpdate,
                             'columnDefinition' => $joinColumn->columnDefinition,
                         );
                     }
@@ -386,7 +414,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                 $mapping['inversedBy'] = $manyToManyAnnot->inversedBy;
                 $mapping['cascade'] = $manyToManyAnnot->cascade;
                 $mapping['indexBy'] = $manyToManyAnnot->indexBy;
-                $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $manyToManyAnnot->fetch);
+                $mapping['orphanRemoval'] = $manyToManyAnnot->orphanRemoval;
+                $mapping['fetch'] = $this->getFetchMode($className, $manyToManyAnnot->fetch);
 
                 if ($orderByAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\OrderBy')) {
                     $mapping['orderBy'] = $orderByAnnot->value;
@@ -403,8 +432,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                 if ($method->isPublic() && $method->getDeclaringClass()->getName() == $class->name) {
                     $annotations = $this->_reader->getMethodAnnotations($method);
 
-                    // Compatibility with Doctrine Common 3.x
-                    if ($annotations && is_int(key($annotations))) {
+                    if ($annotations && is_numeric(key($annotations))) {
                         foreach ($annotations as $annot) {
                             $annotations[get_class($annot)] = $annot;
                         }
@@ -437,6 +465,10 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     if (isset($annotations['Doctrine\ORM\Mapping\PostLoad'])) {
                         $metadata->addLifecycleCallback($method->getName(), \Doctrine\ORM\Events::postLoad);
                     }
+
+                    if (isset($annotations['Doctrine\ORM\Mapping\PreFlush'])) {
+                        $metadata->addLifecycleCallback($method->getName(), \Doctrine\ORM\Events::preFlush);
+                    }
                 }
             }
         }
@@ -455,8 +487,7 @@ public function isTransient($className)
     {
         $classAnnotations = $this->_reader->getClassAnnotations(new \ReflectionClass($className));
 
-        // Compatibility with Doctrine Common 3.x
-        if ($classAnnotations && is_int(key($classAnnotations))) {
+        if ($classAnnotations && is_numeric(key($classAnnotations))) {
             foreach ($classAnnotations as $annot) {
                 if ($annot instanceof \Doctrine\ORM\Mapping\Entity) {
                     return false;
@@ -499,15 +530,15 @@ public function getAllClassNames()
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
                     \RecursiveIteratorIterator::LEAVES_ONLY
                 ),
-                '/^.+\\' . $this->_fileExtension . '$/i', 
+                '/^.+' . str_replace('.', '\.', $this->_fileExtension) . '$/i',
                 \RecursiveRegexIterator::GET_MATCH
             );
-            
+
             foreach ($iterator as $file) {
                 $sourceFile = realpath($file[0]);
-                
+
                 require_once $sourceFile;
-                
+
                 $includedFiles[] = $sourceFile;
             }
         }
@@ -527,6 +558,22 @@ public function getAllClassNames()
         return $classes;
     }
 
+    /**
+     * Attempts to resolve the fetch mode.
+     *
+     * @param string $className The class name
+     * @param string $fetchMode The fetch mode
+     * @return integer The fetch mode as defined in ClassMetadata
+     * @throws MappingException If the fetch mode is not valid
+     */
+    private function getFetchMode($className, $fetchMode)
+    {
+        if(!defined('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $fetchMode)) {
+            throw MappingException::invalidFetchMode($className,  $fetchMode);
+        }
+
+        return constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $fetchMode);
+    }
     /**
      * Factory method for the Annotation Driver
      *
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php
index c2d9240a27..bcbdbd500e 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php
@@ -76,7 +76,7 @@ class DatabaseDriver implements Driver
     /**
      * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading
      * docblock annotations.
-     * 
+     *
      * @param AnnotationReader $reader The AnnotationReader to use.
      */
     public function __construct(AbstractSchemaManager $schemaManager)
@@ -111,7 +111,7 @@ private function reverseEngineerMappingFromDatabase()
         }
 
         $tables = array();
-                
+
         foreach ($this->_sm->listTableNames() as $tableName) {
             $tables[$tableName] = $this->_sm->listTableDetails($tableName);
         }
@@ -129,7 +129,14 @@ private function reverseEngineerMappingFromDatabase()
             foreach ($foreignKeys AS $foreignKey) {
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
             }
-            
+
+            if ( ! $table->hasPrimaryKey()) {
+                throw new MappingException(
+                    "Table " . $table->getName() . " has no primary key. Doctrine does not ".
+                    "support reverse engineering from tables that don't have a primary key."
+                );
+            }
+
             $pkColumns = $table->getPrimaryKey()->getColumns();
             sort($pkColumns);
             sort($allForeignKeyColumns);
@@ -145,7 +152,7 @@ private function reverseEngineerMappingFromDatabase()
             }
         }
     }
-    
+
     /**
      * {@inheritdoc}
      */
@@ -169,7 +176,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         } catch(SchemaException $e) {
             $primaryKeyColumns = array();
         }
-        
+
         if ($this->_sm->getDatabasePlatform()->supportsForeignKeyConstraints()) {
             $foreignKeys = $this->tables[$tableName]->getForeignKeys();
         } else {
@@ -185,12 +192,13 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         $fieldMappings = array();
         foreach ($columns as $column) {
             $fieldMapping = array();
-            if ($primaryKeyColumns && in_array($column->getName(), $primaryKeyColumns)) {
-                $fieldMapping['id'] = true;
-            } else if (in_array($column->getName(), $allForeignKeyColumns)) {
+            
+            if (in_array($column->getName(), $allForeignKeyColumns)) {
                 continue;
+            } else if ($primaryKeyColumns && in_array($column->getName(), $primaryKeyColumns)) {
+                $fieldMapping['id'] = true;
             }
-
+            
             $fieldMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $column->getName(), false);
             $fieldMapping['columnName'] = $column->getName();
             $fieldMapping['type'] = strtolower((string) $column->getType());
@@ -291,13 +299,23 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
             $associationMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $localColumn, true);
             $associationMapping['targetEntity'] = $this->getClassNameForTable($foreignTable);
 
+            if ($primaryKeyColumns && in_array($localColumn, $primaryKeyColumns)) {
+                $associationMapping['id'] = true;
+            }
+
             for ($i = 0; $i < count($cols); $i++) {
                 $associationMapping['joinColumns'][] = array(
                     'name' => $cols[$i],
                     'referencedColumnName' => $fkCols[$i],
                 );
             }
-            $metadata->mapManyToOne($associationMapping);
+            
+            //Here we need to check if $cols are the same as $primaryKeyColums
+            if (!array_diff($cols,$primaryKeyColumns)) {
+                $metadata->mapOneToOne($associationMapping);
+            } else {
+                $metadata->mapManyToOne($associationMapping);
+            }
         }
     }
 
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php b/src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php
index 532ee1c771..290fc6529e 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php
@@ -17,190 +17,38 @@
  * .
  */
 
-namespace Doctrine\ORM\Mapping;
-
-use Doctrine\Common\Annotations\Annotation;
-
-/* Annotations */
-
-/** @Annotation */
-final class Entity extends Annotation {
-    public $repositoryClass;
-    public $readOnly = false;
-}
-
-/** @Annotation */
-final class MappedSuperclass extends Annotation {}
-
-/** @Annotation */
-final class InheritanceType extends Annotation {}
-
-/** @Annotation */
-final class DiscriminatorColumn extends Annotation {
-    public $name;
-    public $fieldName; // field name used in non-object hydration (array/scalar)
-    public $type;
-    public $length;
-}
-
-/** @Annotation */
-final class DiscriminatorMap extends Annotation {}
-
-/** @Annotation */
-final class Id extends Annotation {}
-
-/** @Annotation */
-final class GeneratedValue extends Annotation {
-    public $strategy = 'AUTO';
-}
-
-/** @Annotation */
-final class Version extends Annotation {}
-
-/** @Annotation */
-final class JoinColumn extends Annotation {
-    public $name;
-    public $fieldName; // field name used in non-object hydration (array/scalar)
-    public $referencedColumnName = 'id';
-    public $unique = false;
-    public $nullable = true;
-    public $onDelete;
-    public $onUpdate;
-    public $columnDefinition;
-}
-
-/** @Annotation */
-final class JoinColumns extends Annotation {}
-
-/** @Annotation */
-final class Column extends Annotation {
-    public $type = 'string';
-    public $length;
-    // The precision for a decimal (exact numeric) column (Applies only for decimal column)
-    public $precision = 0;
-    // The scale for a decimal (exact numeric) column (Applies only for decimal column)
-    public $scale = 0;
-    public $unique = false;
-    public $nullable = false;
-    public $name;
-    public $options = array();
-    public $columnDefinition;
-}
-
-/** @Annotation */
-final class OneToOne extends Annotation {
-    public $targetEntity;
-    public $mappedBy;
-    public $inversedBy;
-    public $cascade;
-    public $fetch = 'LAZY';
-    public $orphanRemoval = false;
-}
-
-/** @Annotation */
-final class OneToMany extends Annotation {
-    public $mappedBy;
-    public $targetEntity;
-    public $cascade;
-    public $fetch = 'LAZY';
-    public $orphanRemoval = false;
-    public $indexBy;
-}
-
-/** @Annotation */
-final class ManyToOne extends Annotation {
-    public $targetEntity;
-    public $cascade;
-    public $fetch = 'LAZY';
-    public $inversedBy;
-}
-
-/** @Annotation */
-final class ManyToMany extends Annotation {
-    public $targetEntity;
-    public $mappedBy;
-    public $inversedBy;
-    public $cascade;
-    public $fetch = 'LAZY';
-    public $indexBy;
-}
-
-/** @Annotation */
-final class ElementCollection extends Annotation {
-    public $tableName;
-}
-
-/** @Annotation */
-final class Table extends Annotation {
-    public $name;
-    public $schema;
-    public $indexes;
-    public $uniqueConstraints;
-}
-
-/** @Annotation */
-final class UniqueConstraint extends Annotation {
-    public $name;
-    public $columns;
-}
-
-/** @Annotation */
-final class Index extends Annotation {
-    public $name;
-    public $columns;
-}
-
-/** @Annotation */
-final class JoinTable extends Annotation {
-    public $name;
-    public $schema;
-    public $joinColumns = array();
-    public $inverseJoinColumns = array();
-}
-
-/** @Annotation */
-final class SequenceGenerator extends Annotation {
-    public $sequenceName;
-    public $allocationSize = 1;
-    public $initialValue = 1;
-}
-
-/** @Annotation */
-final class ChangeTrackingPolicy extends Annotation {}
-
-/** @Annotation */
-final class OrderBy extends Annotation {}
-
-/** @Annotation */
-final class NamedQueries extends Annotation {}
-
-/** @Annotation */
-final class NamedQuery extends Annotation {
-    public $name;
-    public $query;
-}
-
-/* Annotations for lifecycle callbacks */
-/** @Annotation */
-final class HasLifecycleCallbacks extends Annotation {}
-
-/** @Annotation */
-final class PrePersist extends Annotation {}
-
-/** @Annotation */
-final class PostPersist extends Annotation {}
-
-/** @Annotation */
-final class PreUpdate extends Annotation {}
-
-/** @Annotation */
-final class PostUpdate extends Annotation {}
-
-/** @Annotation */
-final class PreRemove extends Annotation {}
-
-/** @Annotation */
-final class PostRemove extends Annotation {}
-
-/** @Annotation */
-final class PostLoad extends Annotation {}
+require_once __DIR__.'/../Annotation.php';
+require_once __DIR__.'/../Entity.php';
+require_once __DIR__.'/../MappedSuperclass.php';
+require_once __DIR__.'/../InheritanceType.php';
+require_once __DIR__.'/../DiscriminatorColumn.php';
+require_once __DIR__.'/../DiscriminatorMap.php';
+require_once __DIR__.'/../Id.php';
+require_once __DIR__.'/../GeneratedValue.php';
+require_once __DIR__.'/../Version.php';
+require_once __DIR__.'/../JoinColumn.php';
+require_once __DIR__.'/../JoinColumns.php';
+require_once __DIR__.'/../Column.php';
+require_once __DIR__.'/../OneToOne.php';
+require_once __DIR__.'/../OneToMany.php';
+require_once __DIR__.'/../ManyToOne.php';
+require_once __DIR__.'/../ManyToMany.php';
+require_once __DIR__.'/../ElementCollection.php';
+require_once __DIR__.'/../Table.php';
+require_once __DIR__.'/../UniqueConstraint.php';
+require_once __DIR__.'/../Index.php';
+require_once __DIR__.'/../JoinTable.php';
+require_once __DIR__.'/../SequenceGenerator.php';
+require_once __DIR__.'/../ChangeTrackingPolicy.php';
+require_once __DIR__.'/../OrderBy.php';
+require_once __DIR__.'/../NamedQueries.php';
+require_once __DIR__.'/../NamedQuery.php';
+require_once __DIR__.'/../HasLifecycleCallbacks.php';
+require_once __DIR__.'/../PrePersist.php';
+require_once __DIR__.'/../PostPersist.php';
+require_once __DIR__.'/../PreUpdate.php';
+require_once __DIR__.'/../PostUpdate.php';
+require_once __DIR__.'/../PreRemove.php';
+require_once __DIR__.'/../PostRemove.php';
+require_once __DIR__.'/../PostLoad.php';
+require_once __DIR__.'/../PreFlush.php';
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/Driver.php b/src/lib/Doctrine/ORM/Mapping/Driver/Driver.php
index b6cfe36b4a..28654a82bf 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/Driver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/Driver.php
@@ -34,18 +34,18 @@ interface Driver
 {
     /**
      * Loads the metadata for the specified class into the provided container.
-     * 
+     *
      * @param string $className
      * @param ClassMetadataInfo $metadata
      */
     function loadMetadataForClass($className, ClassMetadataInfo $metadata);
-    
+
     /**
      * Gets the names of all mapped classes known to this driver.
-     * 
+     *
      * @return array The names of all mapped classes known to this driver.
      */
-    function getAllClassNames(); 
+    function getAllClassNames();
 
     /**
      * Whether the class with the specified name should have its metadata loaded.
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php b/src/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php
index 77c258a18f..321962d2c1 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php
@@ -88,15 +88,20 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
     public function getAllClassNames()
     {
         $classNames = array();
+        $driverClasses = array();
         foreach ($this->_drivers AS $namespace => $driver) {
-            $driverClasses = $driver->getAllClassNames();
-            foreach ($driverClasses AS $className) {
+            $oid = spl_object_hash($driver);
+            if (!isset($driverClasses[$oid])) {
+                $driverClasses[$oid] = $driver->getAllClassNames();
+            }
+
+            foreach ($driverClasses[$oid] AS $className) {
                 if (strpos($className, $namespace) === 0) {
-                    $classNames[] = $className;
+                    $classNames[$className] = true;
                 }
             }
         }
-        return array_unique($classNames);
+        return array_keys($classNames);
     }
 
     /**
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php
new file mode 100644
index 0000000000..e60eab7791
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php
@@ -0,0 +1,176 @@
+.
+*/
+
+namespace Doctrine\ORM\Mapping\Driver;
+
+use Doctrine\ORM\Mapping\MappingException;
+
+/**
+ * XmlDriver that additionally looks for mapping information in a global file.
+ *
+ * @author Fabien Potencier 
+ * @author Benjamin Eberlei 
+ * @license MIT
+ */
+class SimplifiedXmlDriver extends XmlDriver
+{
+    protected $_prefixes = array();
+    protected $_globalBasename;
+    protected $_classCache;
+    protected $_fileExtension = '.orm.xml';
+
+    public function __construct($prefixes)
+    {
+        $this->addNamespacePrefixes($prefixes);
+    }
+
+    public function setGlobalBasename($file)
+    {
+        $this->_globalBasename = $file;
+    }
+
+    public function getGlobalBasename()
+    {
+        return $this->_globalBasename;
+    }
+
+    public function addNamespacePrefixes($prefixes)
+    {
+        $this->_prefixes = array_merge($this->_prefixes, $prefixes);
+        $this->addPaths(array_flip($prefixes));
+    }
+
+    public function getNamespacePrefixes()
+    {
+        return $this->_prefixes;
+    }
+
+    public function isTransient($className)
+    {
+        if (null === $this->_classCache) {
+            $this->initialize();
+        }
+
+        // The mapping is defined in the global mapping file
+        if (isset($this->_classCache[$className])) {
+            return false;
+        }
+
+        try {
+            $this->_findMappingFile($className);
+
+            return false;
+        } catch (MappingException $e) {
+            return true;
+        }
+    }
+
+    public function getAllClassNames()
+    {
+        if (null === $this->_classCache) {
+            $this->initialize();
+        }
+
+        $classes = array();
+
+        if ($this->_paths) {
+            foreach ((array) $this->_paths as $path) {
+                if (!is_dir($path)) {
+                    throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
+                }
+
+                $iterator = new \RecursiveIteratorIterator(
+                    new \RecursiveDirectoryIterator($path),
+                    \RecursiveIteratorIterator::LEAVES_ONLY
+                );
+
+                foreach ($iterator as $file) {
+                    $fileName = $file->getBasename($this->_fileExtension);
+
+                    if ($fileName == $file->getBasename() || $fileName == $this->_globalBasename) {
+                        continue;
+                    }
+
+                    // NOTE: All files found here means classes are not transient!
+                    if (isset($this->_prefixes[$path])) {
+                        $classes[] = $this->_prefixes[$path].'\\'.str_replace('.', '\\', $fileName);
+                    } else {
+                        $classes[] = str_replace('.', '\\', $fileName);
+                    }
+                }
+            }
+        }
+
+        return array_merge($classes, array_keys($this->_classCache));
+    }
+
+    public function getElement($className)
+    {
+        if (null === $this->_classCache) {
+            $this->initialize();
+        }
+
+        if (!isset($this->_classCache[$className])) {
+            $this->_classCache[$className] = parent::getElement($className);
+        }
+
+        return $this->_classCache[$className];
+    }
+
+    protected function initialize()
+    {
+        $this->_classCache = array();
+        if (null !== $this->_globalBasename) {
+            foreach ($this->_paths as $path) {
+                if (is_file($file = $path.'/'.$this->_globalBasename.$this->_fileExtension)) {
+                    $this->_classCache = array_merge($this->_classCache, $this->_loadMappingFile($file));
+                }
+            }
+        }
+    }
+
+    protected function _findMappingFile($className)
+    {
+        $defaultFileName = str_replace('\\', '.', $className).$this->_fileExtension;
+        foreach ($this->_paths as $path) {
+            if (!isset($this->_prefixes[$path])) {
+                if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
+                    return $path.DIRECTORY_SEPARATOR.$defaultFileName;
+                }
+
+                continue;
+            }
+
+            $prefix = $this->_prefixes[$path];
+
+            if (0 !== strpos($className, $prefix.'\\')) {
+                continue;
+            }
+
+            $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->_fileExtension;
+            if (is_file($filename)) {
+                return $filename;
+            }
+
+            throw MappingException::mappingFileNotFound($className, $filename);
+        }
+
+        throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->_fileExtension);
+    }
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php
new file mode 100644
index 0000000000..b88a769392
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php
@@ -0,0 +1,181 @@
+.
+*/
+
+namespace Doctrine\ORM\Mapping\Driver;
+
+use Doctrine\ORM\Mapping\MappingException;
+
+/**
+ * YamlDriver that additionally looks for mapping information in a global file.
+ *
+ * @author Fabien Potencier 
+ * @author Benjamin Eberlei 
+ * @license MIT
+ */
+class SimplifiedYamlDriver extends YamlDriver
+{
+    protected $_prefixes = array();
+    protected $_globalBasename;
+    protected $_classCache;
+    protected $_fileExtension = '.orm.yml';
+
+    public function __construct($prefixes)
+    {
+        $this->addNamespacePrefixes($prefixes);
+    }
+
+    public function setGlobalBasename($file)
+    {
+        $this->_globalBasename = $file;
+    }
+
+    public function getGlobalBasename()
+    {
+        return $this->_globalBasename;
+    }
+
+    public function addNamespacePrefixes($prefixes)
+    {
+        $this->_prefixes = array_merge($this->_prefixes, $prefixes);
+        $this->addPaths(array_flip($prefixes));
+    }
+
+    public function addNamespacePrefix($prefix, $path)
+    {
+        $this->_prefixes[$path] = $prefix;
+    }
+
+    public function getNamespacePrefixes()
+    {
+        return $this->_prefixes;
+    }
+
+    public function isTransient($className)
+    {
+        if (null === $this->_classCache) {
+            $this->initialize();
+        }
+
+        // The mapping is defined in the global mapping file
+        if (isset($this->_classCache[$className])) {
+            return false;
+        }
+
+        try {
+            $this->_findMappingFile($className);
+
+            return false;
+        } catch (MappingException $e) {
+            return true;
+        }
+    }
+
+    public function getAllClassNames()
+    {
+        if (null === $this->_classCache) {
+            $this->initialize();
+        }
+
+        $classes = array();
+
+        if ($this->_paths) {
+            foreach ((array) $this->_paths as $path) {
+                if (!is_dir($path)) {
+                    throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
+                }
+
+                $iterator = new \RecursiveIteratorIterator(
+                    new \RecursiveDirectoryIterator($path),
+                    \RecursiveIteratorIterator::LEAVES_ONLY
+                );
+
+                foreach ($iterator as $file) {
+                    $fileName = $file->getBasename($this->_fileExtension);
+
+                    if ($fileName == $file->getBasename() || $fileName == $this->_globalBasename) {
+                        continue;
+                    }
+
+                    // NOTE: All files found here means classes are not transient!
+                    if (isset($this->_prefixes[$path])) {
+                        $classes[] = $this->_prefixes[$path].'\\'.str_replace('.', '\\', $fileName);
+                    } else {
+                        $classes[] = str_replace('.', '\\', $fileName);
+                    }
+                }
+            }
+        }
+
+        return array_merge($classes, array_keys($this->_classCache));
+    }
+
+    public function getElement($className)
+    {
+        if (null === $this->_classCache) {
+            $this->initialize();
+        }
+
+        if (!isset($this->_classCache[$className])) {
+            $this->_classCache[$className] = parent::getElement($className);
+        }
+
+        return $this->_classCache[$className];
+    }
+
+    protected function initialize()
+    {
+        $this->_classCache = array();
+        if (null !== $this->_globalBasename) {
+            foreach ($this->_paths as $path) {
+                if (is_file($file = $path.'/'.$this->_globalBasename.$this->_fileExtension)) {
+                    $this->_classCache = array_merge($this->_classCache, $this->_loadMappingFile($file));
+                }
+            }
+        }
+    }
+
+    protected function _findMappingFile($className)
+    {
+        $defaultFileName = str_replace('\\', '.', $className).$this->_fileExtension;
+        foreach ($this->_paths as $path) {
+            if (!isset($this->_prefixes[$path])) {
+                if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
+                    return $path.DIRECTORY_SEPARATOR.$defaultFileName;
+                }
+
+                continue;
+            }
+
+            $prefix = $this->_prefixes[$path];
+
+            if (0 !== strpos($className, $prefix.'\\')) {
+                continue;
+            }
+
+            $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->_fileExtension;
+            if (is_file($filename)) {
+                return $filename;
+            }
+
+            throw MappingException::mappingFileNotFound($className, $filename);
+        }
+
+        throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->_fileExtension);
+    }
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php
index 916113c1d2..4e593ea8c0 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php
@@ -38,21 +38,21 @@ class StaticPHPDriver implements Driver
 {
     /**
      * Paths of entity directories.
-     * 
+     *
      * @var array
      */
     private $_paths = array();
-    
+
     /**
      * Map of all class names.
-     * 
+     *
      * @var array
      */
     private $_classNames;
-    
+
     /**
      * The file extension of mapping documents.
-     * 
+     *
      * @var string
      */
     private $_fileExtension = '.php';
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
index b41710b4b9..31f31916be 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
@@ -52,13 +52,16 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         $xmlRoot = $this->getElement($className);
 
         if ($xmlRoot->getName() == 'entity') {
-            $metadata->setCustomRepositoryClass(
-                isset($xmlRoot['repository-class']) ? (string)$xmlRoot['repository-class'] : null
-            );
+            if (isset($xmlRoot['repository-class'])) {
+                $metadata->setCustomRepositoryClass((string)$xmlRoot['repository-class']);
+            }
             if (isset($xmlRoot['read-only']) && $xmlRoot['read-only'] == "true") {
                 $metadata->markReadOnly();
             }
         } else if ($xmlRoot->getName() == 'mapped-superclass') {
+            $metadata->setCustomRepositoryClass(
+                isset($xmlRoot['repository-class']) ? (string)$xmlRoot['repository-class'] : null
+            );
             $metadata->isMappedSuperclass = true;
         } else {
             throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className);
@@ -86,7 +89,7 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         if (isset($xmlRoot['schema'])) {
             $metadata->table['schema'] = (string)$xmlRoot['schema'];
         }*/
-        
+
         if (isset($xmlRoot['inheritance-type'])) {
             $inheritanceType = (string)$xmlRoot['inheritance-type'];
             $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType));
@@ -163,9 +166,12 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
             foreach ($xmlRoot->field as $fieldMapping) {
                 $mapping = array(
                     'fieldName' => (string)$fieldMapping['name'],
-                    'type' => (string)$fieldMapping['type']
                 );
 
+                if (isset($fieldMapping['type'])) {
+                    $mapping['type'] = (string)$fieldMapping['type'];
+                }
+
                 if (isset($fieldMapping['column'])) {
                     $mapping['columnName'] = (string)$fieldMapping['column'];
                 }
@@ -210,20 +216,27 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         $associationIds = array();
         foreach ($xmlRoot->id as $idElement) {
             if ((bool)$idElement['association-key'] == true) {
-                $associationIds[(string)$idElement['fieldName']] = true;
+                $associationIds[(string)$idElement['name']] = true;
                 continue;
             }
 
             $mapping = array(
                 'id' => true,
-                'fieldName' => (string)$idElement['name'],
-                'type' => (string)$idElement['type']
+                'fieldName' => (string)$idElement['name']
             );
 
+            if (isset($idElement['type'])) {
+                $mapping['type'] = (string)$idElement['type'];
+            }
+
             if (isset($idElement['column'])) {
                 $mapping['columnName'] = (string)$idElement['column'];
             }
 
+            if (isset($idElement['column-definition'])) {
+                $mapping['columnDefinition'] = (string)$idElement['column-definition'];
+            }
+
             $metadata->mapField($mapping);
 
             if (isset($idElement->generator)) {
@@ -285,8 +298,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['cascade'] = $this->_getCascadeMappings($oneToOneElement->cascade);
                 }
 
-                if (isset($oneToOneElement->{'orphan-removal'})) {
-                    $mapping['orphanRemoval'] = (bool)$oneToOneElement->{'orphan-removal'};
+                if (isset($oneToOneElement['orphan-removal'])) {
+                    $mapping['orphanRemoval'] = (bool)$oneToOneElement['orphan-removal'];
                 }
 
                 $metadata->mapOneToOne($mapping);
@@ -310,8 +323,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['cascade'] = $this->_getCascadeMappings($oneToManyElement->cascade);
                 }
 
-                if (isset($oneToManyElement->{'orphan-removal'})) {
-                    $mapping['orphanRemoval'] = (bool)$oneToManyElement->{'orphan-removal'};
+                if (isset($oneToManyElement['orphan-removal'])) {
+                    $mapping['orphanRemoval'] = (bool)$oneToManyElement['orphan-removal'];
                 }
 
                 if (isset($oneToManyElement->{'order-by'})) {
@@ -322,8 +335,10 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['orderBy'] = $orderBy;
                 }
 
-                if (isset($oneToManyElement->{'index-by'})) {
-                    $mapping['indexBy'] = (string)$oneToManyElement->{'index-by'};
+                if (isset($oneToManyElement['index-by'])) {
+                    $mapping['indexBy'] = (string)$oneToManyElement['index-by'];
+                } else if (isset($oneToManyElement->{'index-by'})) {
+                    throw new \InvalidArgumentException(" is not a valid tag");
                 }
 
                 $metadata->mapOneToMany($mapping);
@@ -366,10 +381,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['cascade'] = $this->_getCascadeMappings($manyToOneElement->cascade);
                 }
 
-                if (isset($manyToOneElement->{'orphan-removal'})) {
-                    $mapping['orphanRemoval'] = (bool)$manyToOneElement->{'orphan-removal'};
-                }
-
                 $metadata->mapManyToOne($mapping);
             }
         }
@@ -386,6 +397,10 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$manyToManyElement['fetch']);
                 }
 
+                if (isset($manyToManyElement['orphan-removal'])) {
+                    $mapping['orphanRemoval'] = (bool)$manyToManyElement['orphan-removal'];
+                }
+
                 if (isset($manyToManyElement['mapped-by'])) {
                     $mapping['mappedBy'] = (string)$manyToManyElement['mapped-by'];
                 } else if (isset($manyToManyElement->{'join-table'})) {
@@ -417,10 +432,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['cascade'] = $this->_getCascadeMappings($manyToManyElement->cascade);
                 }
 
-                if (isset($manyToManyElement->{'orphan-removal'})) {
-                    $mapping['orphanRemoval'] = (bool)$manyToManyElement->{'orphan-removal'};
-                }
-
                 if (isset($manyToManyElement->{'order-by'})) {
                     $orderBy = array();
                     foreach ($manyToManyElement->{'order-by'}->{'order-by-field'} AS $orderByField) {
@@ -429,8 +440,10 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['orderBy'] = $orderBy;
                 }
 
-                if (isset($manyToManyElement->{'index-by'})) {
-                    $mapping['indexBy'] = (string)$manyToManyElement->{'index-by'};
+                if (isset($manyToManyElement['index-by'])) {
+                    $mapping['indexBy'] = (string)$manyToManyElement['index-by'];
+                } else if (isset($manyToManyElement->{'index-by'})) {
+                    throw new \InvalidArgumentException(" is not a valid tag");
                 }
 
                 $metadata->mapManyToMany($mapping);
@@ -471,10 +484,6 @@ private function _getJoinColumnMapping(SimpleXMLElement $joinColumnElement)
             $joinColumn['onDelete'] = (string)$joinColumnElement['on-delete'];
         }
 
-        if (isset($joinColumnElement['on-update'])) {
-            $joinColumn['onUpdate'] = (string)$joinColumnElement['on-update'];
-        }
-
         if (isset($joinColumnElement['column-definition'])) {
             $joinColumn['columnDefinition'] = (string)$joinColumnElement['column-definition'];
         }
diff --git a/src/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/src/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
index ae488ce63f..c8baa2fd82 100644
--- a/src/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
+++ b/src/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
@@ -46,13 +46,16 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         $element = $this->getElement($className);
 
         if ($element['type'] == 'entity') {
-            $metadata->setCustomRepositoryClass(
-                isset($element['repositoryClass']) ? $element['repositoryClass'] : null
-            );
+            if (isset($element['repositoryClass'])) {
+                $metadata->setCustomRepositoryClass($element['repositoryClass']);
+            }
             if (isset($element['readOnly']) && $element['readOnly'] == true) {
                 $metadata->markReadOnly();
             }
         } else if ($element['type'] == 'mappedSuperclass') {
+            $metadata->setCustomRepositoryClass(
+                isset($element['repositoryClass']) ? $element['repositoryClass'] : null
+            );
             $metadata->isMappedSuperclass = true;
         } else {
             throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className);
@@ -162,16 +165,15 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     continue;
                 }
 
-                if (!isset($idElement['type'])) {
-                    throw MappingException::propertyTypeIsRequired($className, $name);
-                }
-
                 $mapping = array(
                     'id' => true,
-                    'fieldName' => $name,
-                    'type' => $idElement['type']
+                    'fieldName' => $name
                 );
 
+                if (isset($idElement['type'])) {
+                    $mapping['type'] = $idElement['type'];
+                }
+
                 if (isset($idElement['column'])) {
                     $mapping['columnName'] = $idElement['column'];
                 }
@@ -180,6 +182,10 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['length'] = $idElement['length'];
                 }
 
+                if (isset($idElement['columnDefinition'])) {
+                    $mapping['columnDefinition'] = $idElement['columnDefinition'];
+                }
+
                 $metadata->mapField($mapping);
 
                 if (isset($idElement['generator'])) {
@@ -198,19 +204,21 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
         // Evaluate fields
         if (isset($element['fields'])) {
             foreach ($element['fields'] as $name => $fieldMapping) {
-                if (!isset($fieldMapping['type'])) {
-                    throw MappingException::propertyTypeIsRequired($className, $name);
-                }
 
-                $e = explode('(', $fieldMapping['type']);
-                $fieldMapping['type'] = $e[0];
-                if (isset($e[1])) {
-                    $fieldMapping['length'] = substr($e[1], 0, strlen($e[1]) - 1);
-                }
                 $mapping = array(
-                    'fieldName' => $name,
-                    'type' => $fieldMapping['type']
+                    'fieldName' => $name
                 );
+
+                if (isset($fieldMapping['type'])) {
+                    $e = explode('(', $fieldMapping['type']);
+                    $fieldMapping['type'] = $e[0];
+                    $mapping['type']      = $fieldMapping['type'];
+
+                    if (isset($e[1])) {
+                        $fieldMapping['length'] = substr($e[1], 0, strlen($e[1]) - 1);
+                    }
+                }
+
                 if (isset($fieldMapping['id'])) {
                     $mapping['id'] = true;
                     if (isset($fieldMapping['generator']['strategy'])) {
@@ -375,10 +383,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['cascade'] = $manyToOneElement['cascade'];
                 }
 
-                if (isset($manyToOneElement['orphanRemoval'])) {
-                    $mapping['orphanRemoval'] = (bool)$manyToOneElement['orphanRemoval'];
-                }
-
                 $metadata->mapManyToOne($mapping);
             }
         }
@@ -398,9 +402,6 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                 if (isset($manyToManyElement['mappedBy'])) {
                     $mapping['mappedBy'] = $manyToManyElement['mappedBy'];
                 } else if (isset($manyToManyElement['joinTable'])) {
-                    if (isset($manyToManyElement['inversedBy'])) {
-                        $mapping['inversedBy'] = $manyToManyElement['inversedBy'];
-                    }
 
                     $joinTableElement = $manyToManyElement['joinTable'];
                     $joinTable = array(
@@ -430,12 +431,12 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['joinTable'] = $joinTable;
                 }
 
-                if (isset($manyToManyElement['cascade'])) {
-                    $mapping['cascade'] = $manyToManyElement['cascade'];
+                if (isset($manyToManyElement['inversedBy'])) {
+                    $mapping['inversedBy'] = $manyToManyElement['inversedBy'];
                 }
 
-                if (isset($manyToManyElement['orphanRemoval'])) {
-                    $mapping['orphanRemoval'] = (bool)$manyToManyElement['orphanRemoval'];
+                if (isset($manyToManyElement['cascade'])) {
+                    $mapping['cascade'] = $manyToManyElement['cascade'];
                 }
 
                 if (isset($manyToManyElement['orderBy'])) {
@@ -446,6 +447,10 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
                     $mapping['indexBy'] = $manyToManyElement['indexBy'];
                 }
 
+                if (isset($manyToManyElement['orphanRemoval'])) {
+                    $mapping['orphanRemoval'] = (bool)$manyToManyElement['orphanRemoval'];
+                }
+
                 $metadata->mapManyToMany($mapping);
             }
         }
@@ -490,10 +495,6 @@ private function _getJoinColumnMapping($joinColumnElement)
             $joinColumn['onDelete'] = $joinColumnElement['onDelete'];
         }
 
-        if (isset($joinColumnElement['onUpdate'])) {
-            $joinColumn['onUpdate'] = $joinColumnElement['onUpdate'];
-        }
-
         if (isset($joinColumnElement['columnDefinition'])) {
             $joinColumn['columnDefinition'] = $joinColumnElement['columnDefinition'];
         }
diff --git a/src/lib/Doctrine/ORM/Mapping/ElementCollection.php b/src/lib/Doctrine/ORM/Mapping/ElementCollection.php
new file mode 100644
index 0000000000..f127174191
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/ElementCollection.php
@@ -0,0 +1,31 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("ALL")
+ * @todo check available targets
+ */
+final class ElementCollection implements Annotation
+{
+    /** @var string */
+    public $tableName;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Entity.php b/src/lib/Doctrine/ORM/Mapping/Entity.php
new file mode 100644
index 0000000000..075a5ecec4
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Entity.php
@@ -0,0 +1,32 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class Entity implements Annotation
+{
+    /** @var string */
+    public $repositoryClass;
+    /** @var boolean */
+    public $readOnly = false;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/GeneratedValue.php b/src/lib/Doctrine/ORM/Mapping/GeneratedValue.php
new file mode 100644
index 0000000000..8558d21c38
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/GeneratedValue.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class GeneratedValue implements Annotation
+{
+     /** @var string */
+    public $strategy = 'AUTO';
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php b/src/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php
new file mode 100644
index 0000000000..a65fbb522c
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/HasLifecycleCallbacks.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class HasLifecycleCallbacks implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Id.php b/src/lib/Doctrine/ORM/Mapping/Id.php
new file mode 100644
index 0000000000..a670e3ddba
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Id.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class Id implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Index.php b/src/lib/Doctrine/ORM/Mapping/Index.php
new file mode 100644
index 0000000000..e0a2db36cd
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Index.php
@@ -0,0 +1,32 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("ANNOTATION")
+ */
+final class Index implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var array */
+    public $columns;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/InheritanceType.php b/src/lib/Doctrine/ORM/Mapping/InheritanceType.php
new file mode 100644
index 0000000000..009f3abf3d
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/InheritanceType.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class InheritanceType implements Annotation
+{
+    /** @var string */
+    public $value;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/JoinColumn.php b/src/lib/Doctrine/ORM/Mapping/JoinColumn.php
new file mode 100644
index 0000000000..bf5c51d07b
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/JoinColumn.php
@@ -0,0 +1,42 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target({"PROPERTY","ANNOTATION"})
+ */
+final class JoinColumn implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var string */
+    public $referencedColumnName = 'id';
+    /** @var boolean */
+    public $unique = false;
+    /** @var boolean */
+    public $nullable = true;
+    /** @var mixed */
+    public $onDelete;
+    /** @var string */
+    public $columnDefinition;
+    /** @var string */
+    public $fieldName; // field name used in non-object hydration (array/scalar)
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/JoinColumns.php b/src/lib/Doctrine/ORM/Mapping/JoinColumns.php
new file mode 100644
index 0000000000..525105fabb
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/JoinColumns.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class JoinColumns implements Annotation
+{
+    /** @var array<\Doctrine\ORM\Mapping\JoinColumn> */
+    public $value;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/JoinTable.php b/src/lib/Doctrine/ORM/Mapping/JoinTable.php
new file mode 100644
index 0000000000..9ff9d4511e
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/JoinTable.php
@@ -0,0 +1,36 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class JoinTable implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var string */
+    public $schema;
+    /** @var array<\Doctrine\ORM\Mapping\JoinColumn> */
+    public $joinColumns = array();
+    /** @var array<\Doctrine\ORM\Mapping\JoinColumn> */
+    public $inverseJoinColumns = array();
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/ManyToMany.php b/src/lib/Doctrine/ORM/Mapping/ManyToMany.php
new file mode 100644
index 0000000000..28f41aaffe
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/ManyToMany.php
@@ -0,0 +1,42 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class ManyToMany implements Annotation
+{
+    /** @var string */
+    public $targetEntity;
+    /** @var string */
+    public $mappedBy;
+    /** @var string */
+    public $inversedBy;
+    /** @var array */
+    public $cascade;
+    /** @var string */
+    public $fetch = 'LAZY';
+    /** @var boolean */
+    public $orphanRemoval = false;
+    /** @var string */
+    public $indexBy;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/ManyToOne.php b/src/lib/Doctrine/ORM/Mapping/ManyToOne.php
new file mode 100644
index 0000000000..1bc83769cf
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/ManyToOne.php
@@ -0,0 +1,36 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class ManyToOne implements Annotation
+{
+    /** @var string */
+    public $targetEntity;
+    /** @var array */
+    public $cascade;
+    /** @var string */
+    public $fetch = 'LAZY';
+    /** @var string */
+    public $inversedBy;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/MappedSuperclass.php b/src/lib/Doctrine/ORM/Mapping/MappedSuperclass.php
new file mode 100644
index 0000000000..639d21642a
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/MappedSuperclass.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class MappedSuperclass implements Annotation
+{
+    /** @var string */
+    public $repositoryClass;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/MappingException.php b/src/lib/Doctrine/ORM/Mapping/MappingException.php
index 5bedf3a06d..c71c2e91cf 100644
--- a/src/lib/Doctrine/ORM/Mapping/MappingException.php
+++ b/src/lib/Doctrine/ORM/Mapping/MappingException.php
@@ -68,6 +68,11 @@ public static function mappingFileNotFound($entityName, $fileName)
         return new self("No mapping file found named '$fileName' for class '$entityName'.");
     }
 
+    public static function invalidMappingFile($entityName, $fileName)
+    {
+        return new self("Invalid mapping file '$fileName' for class '$entityName'.");
+    }
+
     public static function mappingNotFound($className, $fieldName)
     {
         return new self("No mapping found for field '$fieldName' on class '$className'.");
@@ -184,7 +189,7 @@ public static function fileMappingDriversRequireConfiguredDirectoryPath($path =
         if ( ! empty($path)) {
             $path = '[' . $path . ']';
         }
-        
+
         return new self(
             'File mapping drivers must have a valid directory path, ' .
             'however the given path ' . $path . ' seems to be incorrect!'
@@ -226,6 +231,11 @@ public static function cannotVersionIdField($className, $fieldName)
         return new self("Setting Id field '$fieldName' as versionale in entity class '$className' is not supported.");
     }
 
+    public static function sqlConversionNotAllowedForIdentifiers($className, $fieldName, $type)
+    {
+        return new self("It is not possible to set id field '$fieldName' to type '$type' in entity class '$className'. The type '$type' requires conversion SQL which is not allowed for identifiers.");
+    }
+
     /**
      * @param  string $className
      * @param  string $columnName
@@ -270,6 +280,12 @@ public static function illegalOrphanRemovalOnIdentifierAssociation($className, $
             "part of the identifier in '$className#$field'.");
     }
 
+    public static function illegalOrphanRemoval($className, $field)
+    {
+        return new self("Orphan removal is only allowed on one-to-one and one-to-many ".
+                "associations, but " . $className."#" .$field . " is not.");
+    }
+
     public static function illegalInverseIdentifierAssocation($className, $field)
     {
         return new self("An inverse association is not allowed to be identifier in '$className#$field'.");
@@ -279,18 +295,38 @@ public static function illegalToManyIdentifierAssoaction($className, $field)
     {
         return new self("Many-to-many or one-to-many associations are not allowed to be identifier in '$className#$field'.");
     }
-    
+
     public static function noInheritanceOnMappedSuperClass($className)
     {
         return new self("Its not supported to define inheritance information on a mapped superclass '" . $className . "'.");
     }
-    
+
     public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName)
     {
         return new self(
-            "Entity '" . $className . "' has to be part of the descriminator map of '" . $rootClassName . "' " .
+            "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
             "to be properly mapped in the inheritance hierachy. Alternatively you can make '".$className."' an abstract class " .
             "to avoid this exception from occuring."
         );
     }
-}
\ No newline at end of file
+
+    public static function lifecycleCallbackMethodNotFound($className, $methodName)
+    {
+        return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback.");
+    }
+
+    public static function invalidFetchMode($className, $annotation)
+    {
+        return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
+    }
+
+    public static function compositeKeyAssignedIdGeneratorRequired($className)
+    {
+        return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported.");
+    }
+
+    public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName)
+    {
+        return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'.");
+    }
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/NamedQueries.php b/src/lib/Doctrine/ORM/Mapping/NamedQueries.php
new file mode 100644
index 0000000000..1ab2bf2334
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/NamedQueries.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class NamedQueries implements Annotation
+{
+    /** @var array<\Doctrine\ORM\Mapping\NamedQuery> */
+    public $value;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/NamedQuery.php b/src/lib/Doctrine/ORM/Mapping/NamedQuery.php
new file mode 100644
index 0000000000..656a4eabf7
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/NamedQuery.php
@@ -0,0 +1,32 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("ANNOTATION")
+ */
+final class NamedQuery implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var string */
+    public $query;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/OneToMany.php b/src/lib/Doctrine/ORM/Mapping/OneToMany.php
new file mode 100644
index 0000000000..b4d8ad3f8f
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/OneToMany.php
@@ -0,0 +1,40 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class OneToMany implements Annotation
+{
+    /** @var string */
+    public $mappedBy;
+    /** @var string */
+    public $targetEntity;
+    /** @var array */
+    public $cascade;
+    /** @var string */
+    public $fetch = 'LAZY';
+    /** @var boolean */
+    public $orphanRemoval = false;
+    /** @var string */
+    public $indexBy;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/OneToOne.php b/src/lib/Doctrine/ORM/Mapping/OneToOne.php
new file mode 100644
index 0000000000..4baa121968
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/OneToOne.php
@@ -0,0 +1,40 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class OneToOne implements Annotation
+{
+    /** @var string */
+    public $targetEntity;
+    /** @var string */
+    public $mappedBy;
+    /** @var string */
+    public $inversedBy;
+    /** @var array */
+    public $cascade;
+    /** @var string */
+    public $fetch = 'LAZY';
+    /** @var boolean */
+    public $orphanRemoval = false;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/OrderBy.php b/src/lib/Doctrine/ORM/Mapping/OrderBy.php
new file mode 100644
index 0000000000..c28f110428
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/OrderBy.php
@@ -0,0 +1,30 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class OrderBy implements Annotation
+{
+    /** @var array */
+    public $value;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PostLoad.php b/src/lib/Doctrine/ORM/Mapping/PostLoad.php
new file mode 100644
index 0000000000..169bb4904a
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PostLoad.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PostLoad implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PostPersist.php b/src/lib/Doctrine/ORM/Mapping/PostPersist.php
new file mode 100644
index 0000000000..5b5baed12c
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PostPersist.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PostPersist implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PostRemove.php b/src/lib/Doctrine/ORM/Mapping/PostRemove.php
new file mode 100644
index 0000000000..4798e26e84
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PostRemove.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PostRemove implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PostUpdate.php b/src/lib/Doctrine/ORM/Mapping/PostUpdate.php
new file mode 100644
index 0000000000..f7e7539734
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PostUpdate.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PostUpdate implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PreFlush.php b/src/lib/Doctrine/ORM/Mapping/PreFlush.php
new file mode 100644
index 0000000000..f5eb086364
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PreFlush.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PreFlush implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PrePersist.php b/src/lib/Doctrine/ORM/Mapping/PrePersist.php
new file mode 100644
index 0000000000..c3827006e1
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PrePersist.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PrePersist implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PreRemove.php b/src/lib/Doctrine/ORM/Mapping/PreRemove.php
new file mode 100644
index 0000000000..adcb837d7a
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PreRemove.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PreRemove implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/PreUpdate.php b/src/lib/Doctrine/ORM/Mapping/PreUpdate.php
new file mode 100644
index 0000000000..2afd38120b
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/PreUpdate.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
+final class PreUpdate implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/SequenceGenerator.php b/src/lib/Doctrine/ORM/Mapping/SequenceGenerator.php
new file mode 100644
index 0000000000..be3d700f9c
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/SequenceGenerator.php
@@ -0,0 +1,34 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class SequenceGenerator implements Annotation
+{
+    /** @var string */
+    public $sequenceName;
+    /** @var integer */
+    public $allocationSize = 1;
+    /** @var integer */
+    public $initialValue = 1;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Table.php b/src/lib/Doctrine/ORM/Mapping/Table.php
new file mode 100644
index 0000000000..41db294de0
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Table.php
@@ -0,0 +1,36 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class Table implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var string */
+    public $schema;
+    /** @var array<\Doctrine\ORM\Mapping\Index> */
+    public $indexes;
+    /** @var array<\Doctrine\ORM\Mapping\UniqueConstraint> */
+    public $uniqueConstraints;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/UniqueConstraint.php b/src/lib/Doctrine/ORM/Mapping/UniqueConstraint.php
new file mode 100644
index 0000000000..db9f8fd41b
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/UniqueConstraint.php
@@ -0,0 +1,32 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("ANNOTATION")
+ */
+final class UniqueConstraint implements Annotation
+{
+    /** @var string */
+    public $name;
+    /** @var array */
+    public $columns;
+}
diff --git a/src/lib/Doctrine/ORM/Mapping/Version.php b/src/lib/Doctrine/ORM/Mapping/Version.php
new file mode 100644
index 0000000000..313e7519c8
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Mapping/Version.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\ORM\Mapping;
+
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
+final class Version implements Annotation
+{
+}
diff --git a/src/lib/Doctrine/ORM/NativeQuery.php b/src/lib/Doctrine/ORM/NativeQuery.php
index 2c0a5ab284..2ab87441a2 100644
--- a/src/lib/Doctrine/ORM/NativeQuery.php
+++ b/src/lib/Doctrine/ORM/NativeQuery.php
@@ -1,4 +1,4 @@
-_sql = $sql;
+
         return $this;
     }
 
@@ -57,17 +58,19 @@ public function getSQL()
      */
     protected function _doExecute()
     {
-        $stmt = $this->_em->getConnection()->prepare($this->_sql);
         $params = $this->_params;
-        foreach ($params as $key => $value) {
-            if (isset($this->_paramTypes[$key])) {
-                $stmt->bindValue($key, $value, $this->_paramTypes[$key]);
-            } else {
-                $stmt->bindValue($key, $value);
-            }
+        $types  = $this->_paramTypes;
+
+        if ($params && is_int(key($params))) {
+            ksort($params);
+            ksort($types);
+
+            $params = array_values($params);
+            $types  = array_values($types);
         }
-        $stmt->execute();
 
-        return $stmt;
+        return $this->_em->getConnection()->executeQuery(
+            $this->_sql, $params, $types, $this->_queryCacheProfile
+        );
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/NoResultException.php b/src/lib/Doctrine/ORM/NoResultException.php
index 80f08bb932..eb31f7cc93 100644
--- a/src/lib/Doctrine/ORM/NoResultException.php
+++ b/src/lib/Doctrine/ORM/NoResultException.php
@@ -21,7 +21,7 @@
 
 /**
  * Exception thrown when an ORM query unexpectedly does not return any results.
- * 
+ *
  * @author robo
  * @since 2.0
  */
diff --git a/src/lib/Doctrine/ORM/NonUniqueResultException.php b/src/lib/Doctrine/ORM/NonUniqueResultException.php
index 811df75c1e..1a3a8b7eb4 100644
--- a/src/lib/Doctrine/ORM/NonUniqueResultException.php
+++ b/src/lib/Doctrine/ORM/NonUniqueResultException.php
@@ -21,7 +21,7 @@
 
 /**
  * Exception thrown when an ORM query unexpectedly returns more than one result.
- * 
+ *
  * @author robo
  * @since 2.0
  */
diff --git a/src/lib/Doctrine/ORM/ORMException.php b/src/lib/Doctrine/ORM/ORMException.php
index 75b91d2e4d..bd16839f3b 100644
--- a/src/lib/Doctrine/ORM/ORMException.php
+++ b/src/lib/Doctrine/ORM/ORMException.php
@@ -34,32 +34,40 @@ public static function missingMappingDriverImpl()
         return new self("It's a requirement to specify a Metadata Driver and pass it ".
             "to Doctrine\ORM\Configuration::setMetadataDriverImpl().");
     }
-    
+
     public static function entityMissingForeignAssignedId($entity, $relatedEntity)
     {
         return new self(
             "Entity of type " . get_class($entity) . " has identity through a foreign entity " . get_class($relatedEntity) . ", " .
-            "however this entity has no ientity itself. You have to call EntityManager#persist() on the related entity " .
-            "and make sure it an identifier was generated before trying to persist '" . get_class($entity) . "'. In case " .
+            "however this entity has no identity itself. You have to call EntityManager#persist() on the related entity " .
+            "and make sure that an identifier was generated before trying to persist '" . get_class($entity) . "'. In case " .
             "of Post Insert ID Generation (such as MySQL Auto-Increment or PostgreSQL SERIAL) this means you have to call " .
             "EntityManager#flush() between both persist operations."
         );
     }
 
-    public static function entityMissingAssignedId($entity)
+    public static function entityMissingAssignedIdForField($entity, $field)
     {
-        return new self("Entity of type " . get_class($entity) . " is missing an assigned ID. " .
+        return new self("Entity of type " . get_class($entity) . " is missing an assigned ID for field  '" . $field . "'. " .
             "The identifier generation strategy for this entity requires the ID field to be populated before ".
-            "EntityManager#persist() is called. If you want automatically generated identifiers instead " . 
+            "EntityManager#persist() is called. If you want automatically generated identifiers instead " .
             "you need to adjust the metadata mapping accordingly."
         );
     }
-
     public static function unrecognizedField($field)
     {
         return new self("Unrecognized field: $field");
     }
 
+    /**
+     * @param string $className
+     * @param string $field
+     */
+    public static function invalidOrientation($className, $field)
+    {
+        return new self("Invalid order by orientation specified for " . $className . "#" . $field);
+    }
+
     public static function invalidFlushMode($mode)
     {
         return new self("'$mode' is an invalid flush mode.");
@@ -130,4 +138,15 @@ public static function unknownEntityNamespace($entityNamespaceAlias)
             "Unknown Entity namespace alias '$entityNamespaceAlias'."
         );
     }
+
+    public static function invalidEntityRepository($className)
+    {
+        return new self("Invalid repository class '".$className."'. ".
+                "it must be a Doctrine\ORM\EntityRepository.");
+    }
+
+    public static function missingIdentifierField($className, $fieldName)
+    {
+        return new self("The identifier $fieldName is missing for a query of " . $className);
+    }
 }
diff --git a/src/lib/Doctrine/ORM/ORMInvalidArgumentException.php b/src/lib/Doctrine/ORM/ORMInvalidArgumentException.php
new file mode 100644
index 0000000000..878ee4b71e
--- /dev/null
+++ b/src/lib/Doctrine/ORM/ORMInvalidArgumentException.php
@@ -0,0 +1,107 @@
+.
+ */
+
+namespace Doctrine\ORM;
+
+/**
+ * Contains exception messages for all invalid lifecycle state exceptions inside UnitOfWork
+ *
+ * @author Benjamin Eberlei 
+ */
+class ORMInvalidArgumentException extends \InvalidArgumentException
+{
+    static public function scheduleInsertForManagedEntity($entity)
+    {
+        return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
+    }
+
+    static public function scheduleInsertForRemovedEntity($entity)
+    {
+        return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
+    }
+
+    static public function scheduleInsertTwice($entity)
+    {
+        return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice.");
+    }
+
+    static public function entityWithoutIdentity($className, $entity)
+    {
+        throw new self(
+            "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " . 
+            "id values set. It cannot be added to the identity map."
+        );
+    }
+
+    static public function readOnlyRequiresManagedEntity($entity)
+    {
+        return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not");
+    }
+
+    static public function newEntityFoundThroughRelationship(array $assoc, $entry)
+    {
+        return new self("A new entity was found through the relationship '"
+                            . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' that was not"
+                            . " configured to cascade persist operations for entity: " . self::objToStr($entry) . "."
+                            . " To solve this issue: Either explicitly call EntityManager#persist()"
+                            . " on this unknown entity or configure cascade persist "
+                            . " this association in the mapping for example @ManyToOne(..,cascade={\"persist\"}). "
+                            . " If you cannot find out which entity causes the problem"
+                            . " implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue.");
+    }
+
+    static public function detachedEntityFoundThroughRelationship(array $assoc, $entry)
+    {
+        throw new self("A detached entity of type " . $assoc['targetEntity'] . " (" . self::objToStr($entry) . ") "
+                        . " was found through the relationship '" . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' "
+                        . "during cascading a persist operation.");
+    }
+
+    static public function entityNotManaged($entity)
+    {
+        throw new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " .
+                "from the database or registered as new through EntityManager#persist");
+    }
+
+    static public function entityHasNoIdentity($entity, $operation)
+    {
+        throw new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
+    }
+
+    static public function entityIsRemoved($entity, $operation)
+    {
+        throw new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
+    }
+
+    static public function detachedEntityCannot($entity, $operation)
+    {
+        throw new self("A detached entity was found during " . $operation . " " . self::objToStr($entity));
+    }
+
+    /**
+     * Helper method to show an object as string.
+     *
+     * @param  object $obj
+     * @return string
+     */
+    private static function objToStr($obj)
+    {
+        return method_exists($obj, '__toString') ? (string)$obj : get_class($obj).'@'.spl_object_hash($obj);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/OptimisticLockException.php b/src/lib/Doctrine/ORM/OptimisticLockException.php
index 028698cd8f..9b5147aaeb 100644
--- a/src/lib/Doctrine/ORM/OptimisticLockException.php
+++ b/src/lib/Doctrine/ORM/OptimisticLockException.php
@@ -33,6 +33,7 @@ class OptimisticLockException extends ORMException
 
     public function __construct($msg, $entity)
     {
+        parent::__construct($msg);
         $this->entity = $entity;
     }
 
diff --git a/src/lib/Doctrine/ORM/PersistentCollection.php b/src/lib/Doctrine/ORM/PersistentCollection.php
index 82d6166860..3bfb0d1ebf 100644
--- a/src/lib/Doctrine/ORM/PersistentCollection.php
+++ b/src/lib/Doctrine/ORM/PersistentCollection.php
@@ -21,6 +21,7 @@
 
 use Doctrine\ORM\Mapping\ClassMetadata,
     Doctrine\Common\Collections\Collection,
+    Doctrine\Common\Collections\ArrayCollection,
     Closure;
 
 /**
@@ -66,7 +67,7 @@ final class PersistentCollection implements Collection
     /**
      * The EntityManager that manages the persistence of the collection.
      *
-     * @var Doctrine\ORM\EntityManager
+     * @var \Doctrine\ORM\EntityManager
      */
     private $em;
 
@@ -93,29 +94,29 @@ final class PersistentCollection implements Collection
 
     /**
      * Whether the collection has already been initialized.
-     * 
+     *
      * @var boolean
      */
     private $initialized = true;
-    
+
     /**
      * The wrapped Collection instance.
-     * 
+     *
      * @var Collection
      */
     private $coll;
 
     /**
      * Creates a new persistent collection.
-     * 
+     *
      * @param EntityManager $em The EntityManager the collection will be associated with.
      * @param ClassMetadata $class The class descriptor of the entity type of this collection.
      * @param array The collection elements.
      */
     public function __construct(EntityManager $em, $class, $coll)
     {
-        $this->coll = $coll;
-        $this->em = $em;
+        $this->coll      = $coll;
+        $this->em        = $em;
         $this->typeClass = $class;
     }
 
@@ -129,8 +130,8 @@ public function __construct(EntityManager $em, $class, $coll)
      */
     public function setOwner($entity, array $assoc)
     {
-        $this->owner = $entity;
-        $this->association = $assoc;
+        $this->owner            = $entity;
+        $this->association      = $assoc;
         $this->backRefFieldName = $assoc['inversedBy'] ?: $assoc['mappedBy'];
     }
 
@@ -144,7 +145,7 @@ public function getOwner()
     {
         return $this->owner;
     }
-    
+
     public function getTypeClass()
     {
         return $this->typeClass;
@@ -154,25 +155,27 @@ public function getTypeClass()
      * INTERNAL:
      * Adds an element to a collection during hydration. This will automatically
      * complete bidirectional associations in the case of a one-to-many association.
-     * 
+     *
      * @param mixed $element The element to add.
      */
     public function hydrateAdd($element)
     {
         $this->coll->add($element);
+
         // If _backRefFieldName is set and its a one-to-many association,
         // we need to set the back reference.
-        if ($this->backRefFieldName && $this->association['type'] == ClassMetadata::ONE_TO_MANY) {
+        if ($this->backRefFieldName && $this->association['type'] === ClassMetadata::ONE_TO_MANY) {
             // Set back reference to owner
-            $this->typeClass->reflFields[$this->backRefFieldName]
-                    ->setValue($element, $this->owner);
+            $this->typeClass->reflFields[$this->backRefFieldName]->setValue(
+                $element, $this->owner
+            );
+
             $this->em->getUnitOfWork()->setOriginalEntityProperty(
-                    spl_object_hash($element),
-                    $this->backRefFieldName,
-                    $this->owner);
+                spl_object_hash($element), $this->backRefFieldName, $this->owner
+            );
         }
     }
-    
+
     /**
      * INTERNAL:
      * Sets a keyed element in the collection during hydration.
@@ -183,12 +186,14 @@ public function hydrateAdd($element)
     public function hydrateSet($key, $element)
     {
         $this->coll->set($key, $element);
+
         // If _backRefFieldName is set, then the association is bidirectional
         // and we need to set the back reference.
-        if ($this->backRefFieldName && $this->association['type'] == ClassMetadata::ONE_TO_MANY) {
+        if ($this->backRefFieldName && $this->association['type'] === ClassMetadata::ONE_TO_MANY) {
             // Set back reference to owner
-            $this->typeClass->reflFields[$this->backRefFieldName]
-                    ->setValue($element, $this->owner);
+            $this->typeClass->reflFields[$this->backRefFieldName]->setValue(
+                $element, $this->owner
+            );
         }
     }
 
@@ -198,23 +203,31 @@ public function hydrateSet($key, $element)
      */
     public function initialize()
     {
-        if ( ! $this->initialized && $this->association) {
-            if ($this->isDirty) {
-                // Has NEW objects added through add(). Remember them.
-                $newObjects = $this->coll->toArray();
-            }
-            $this->coll->clear();
-            $this->em->getUnitOfWork()->loadCollection($this);
-            $this->takeSnapshot();
-            // Reattach NEW objects added through add(), if any.
-            if (isset($newObjects)) {
-                foreach ($newObjects as $obj) {
-                    $this->coll->add($obj);
-                }
-                $this->isDirty = true;
+        if ($this->initialized || ! $this->association) {
+            return;
+        }
+
+        // Has NEW objects added through add(). Remember them.
+        $newObjects = array();
+
+        if ($this->isDirty) {
+            $newObjects = $this->coll->toArray();
+        }
+
+        $this->coll->clear();
+        $this->em->getUnitOfWork()->loadCollection($this);
+        $this->takeSnapshot();
+
+        // Reattach NEW objects added through add(), if any.
+        if ($newObjects) {
+            foreach ($newObjects as $obj) {
+                $this->coll->add($obj);
             }
-            $this->initialized = true;
+
+            $this->isDirty = true;
         }
+
+        $this->initialized = true;
     }
 
     /**
@@ -224,7 +237,7 @@ public function initialize()
     public function takeSnapshot()
     {
         $this->snapshot = $this->coll->toArray();
-        $this->isDirty = false;
+        $this->isDirty  = false;
     }
 
     /**
@@ -246,8 +259,11 @@ public function getSnapshot()
      */
     public function getDeleteDiff()
     {
-        return array_udiff_assoc($this->snapshot, $this->coll->toArray(),
-                function($a, $b) {return $a === $b ? 0 : 1;});
+        return array_udiff_assoc(
+            $this->snapshot,
+            $this->coll->toArray(),
+            function($a, $b) { return $a === $b ? 0 : 1; }
+        );
     }
 
     /**
@@ -258,31 +274,40 @@ function($a, $b) {return $a === $b ? 0 : 1;});
      */
     public function getInsertDiff()
     {
-        return array_udiff_assoc($this->coll->toArray(), $this->snapshot,
-                function($a, $b) {return $a === $b ? 0 : 1;});
+        return array_udiff_assoc(
+            $this->coll->toArray(),
+            $this->snapshot,
+            function($a, $b) { return $a === $b ? 0 : 1; }
+        );
     }
 
     /**
      * INTERNAL: Gets the association mapping of the collection.
      *
-     * @return Doctrine\ORM\Mapping\AssociationMapping
+     * @return \Doctrine\ORM\Mapping\AssociationMapping
      */
     public function getMapping()
     {
         return $this->association;
     }
-   
+
     /**
      * Marks this collection as changed/dirty.
      */
     private function changed()
     {
-        if ( ! $this->isDirty) {
-            $this->isDirty = true;
-            if ($this->association !== null && $this->association['isOwningSide'] && $this->association['type'] == ClassMetadata::MANY_TO_MANY &&
-                    $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingNotify()) {
-                $this->em->getUnitOfWork()->scheduleForDirtyCheck($this->owner);
-            }
+        if ($this->isDirty) {
+            return;
+        }
+
+        $this->isDirty = true;
+
+        if ($this->association !== null &&
+            $this->association['isOwningSide'] &&
+            $this->association['type'] === ClassMetadata::MANY_TO_MANY &&
+            $this->owner &&
+            $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingNotify()) {
+            $this->em->getUnitOfWork()->scheduleForDirtyCheck($this->owner);
         }
     }
 
@@ -306,17 +331,17 @@ public function setDirty($dirty)
     {
         $this->isDirty = $dirty;
     }
-    
+
     /**
      * Sets the initialized flag of the collection, forcing it into that state.
-     * 
+     *
      * @param boolean $bool
      */
     public function setInitialized($bool)
     {
         $this->initialized = $bool;
     }
-    
+
     /**
      * Checks whether this collection has been initialized.
      *
@@ -331,6 +356,7 @@ public function isInitialized()
     public function first()
     {
         $this->initialize();
+
         return $this->coll->first();
     }
 
@@ -338,6 +364,7 @@ public function first()
     public function last()
     {
         $this->initialize();
+
         return $this->coll->last();
     }
 
@@ -351,13 +378,19 @@ public function remove($key)
         //       not used we can issue a straight SQL delete/update on the
         //       association (table). Without initializing the collection.
         $this->initialize();
+
         $removed = $this->coll->remove($key);
-        if ($removed) {
-            $this->changed();
-            if ($this->association !== null && $this->association['type'] == ClassMetadata::ONE_TO_MANY &&
-                    $this->association['orphanRemoval']) {
-                $this->em->getUnitOfWork()->scheduleOrphanRemoval($removed);
-            }
+
+        if ( ! $removed) {
+            return $removed;
+        }
+
+        $this->changed();
+
+        if ($this->association !== null &&
+            $this->association['type'] & ClassMetadata::TO_MANY &&
+            $this->association['orphanRemoval']) {
+            $this->em->getUnitOfWork()->scheduleOrphanRemoval($removed);
         }
 
         return $removed;
@@ -368,25 +401,36 @@ public function remove($key)
      */
     public function removeElement($element)
     {
-        // TODO: Assuming the identity of entities in a collection is always based
-        //       on their primary key (there is no equals/hashCode in PHP),
-        //       if the collection is not initialized, we could issue a straight
-        //       SQL DELETE/UPDATE on the association (table) without initializing
-        //       the collection.
-        /*if ( ! $this->initialized) {
-            $this->em->getUnitOfWork()->getCollectionPersister($this->association)
-                ->deleteRows($this, $element);
-        }*/
-        
+        if ( ! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
+            if ($this->coll->contains($element)) {
+                return $this->coll->removeElement($element);
+            }
+
+            $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
+
+            if ($persister->removeElement($this, $element)) {
+                return $element;
+            }
+
+            return null;
+        }
+
         $this->initialize();
+
         $removed = $this->coll->removeElement($element);
-        if ($removed) {
-            $this->changed();
-            if ($this->association !== null && $this->association['type'] == ClassMetadata::ONE_TO_MANY &&
-                    $this->association['orphanRemoval']) {
-                $this->em->getUnitOfWork()->scheduleOrphanRemoval($element);
-            }
+
+        if ( ! $removed) {
+            return $removed;
         }
+
+        $this->changed();
+
+        if ($this->association !== null &&
+            $this->association['type'] & ClassMetadata::TO_MANY &&
+            $this->association['orphanRemoval']) {
+            $this->em->getUnitOfWork()->scheduleOrphanRemoval($element);
+        }
+
         return $removed;
     }
 
@@ -396,6 +440,7 @@ public function removeElement($element)
     public function containsKey($key)
     {
         $this->initialize();
+
         return $this->coll->containsKey($key);
     }
 
@@ -404,14 +449,14 @@ public function containsKey($key)
      */
     public function contains($element)
     {
-        if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
-            return $this->coll->contains($element) ||
-                   $this->em->getUnitOfWork()
-                            ->getCollectionPersister($this->association)
-                            ->contains($this, $element);
+        if ( ! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
+            $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
+
+            return $this->coll->contains($element) || $persister->contains($this, $element);
         }
-        
+
         $this->initialize();
+
         return $this->coll->contains($element);
     }
 
@@ -421,6 +466,7 @@ public function contains($element)
     public function exists(Closure $p)
     {
         $this->initialize();
+
         return $this->coll->exists($p);
     }
 
@@ -430,6 +476,7 @@ public function exists(Closure $p)
     public function indexOf($element)
     {
         $this->initialize();
+
         return $this->coll->indexOf($element);
     }
 
@@ -439,6 +486,7 @@ public function indexOf($element)
     public function get($key)
     {
         $this->initialize();
+
         return $this->coll->get($key);
     }
 
@@ -448,6 +496,7 @@ public function get($key)
     public function getKeys()
     {
         $this->initialize();
+
         return $this->coll->getKeys();
     }
 
@@ -457,6 +506,7 @@ public function getKeys()
     public function getValues()
     {
         $this->initialize();
+
         return $this->coll->getValues();
     }
 
@@ -465,13 +515,14 @@ public function getValues()
      */
     public function count()
     {
-        if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
-            return $this->em->getUnitOfWork()
-                        ->getCollectionPersister($this->association)
-                        ->count($this) + $this->coll->count();
+        if ( ! $this->initialized && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
+            $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
+
+            return $persister->count($this) + ($this->isDirty ? $this->coll->count() : 0);
         }
 
         $this->initialize();
+
         return $this->coll->count();
     }
 
@@ -481,7 +532,9 @@ public function count()
     public function set($key, $value)
     {
         $this->initialize();
+
         $this->coll->set($key, $value);
+
         $this->changed();
     }
 
@@ -491,7 +544,9 @@ public function set($key, $value)
     public function add($value)
     {
         $this->coll->add($value);
+
         $this->changed();
+
         return true;
     }
 
@@ -501,15 +556,17 @@ public function add($value)
     public function isEmpty()
     {
         $this->initialize();
+
         return $this->coll->isEmpty();
     }
-    
+
     /**
      * {@inheritdoc}
      */
     public function getIterator()
     {
         $this->initialize();
+
         return $this->coll->getIterator();
     }
 
@@ -519,6 +576,7 @@ public function getIterator()
     public function map(Closure $func)
     {
         $this->initialize();
+
         return $this->coll->map($func);
     }
 
@@ -528,15 +586,17 @@ public function map(Closure $func)
     public function filter(Closure $p)
     {
         $this->initialize();
+
         return $this->coll->filter($p);
     }
-    
+
     /**
      * {@inheritdoc}
      */
     public function forAll(Closure $p)
     {
         $this->initialize();
+
         return $this->coll->forAll($p);
     }
 
@@ -546,15 +606,17 @@ public function forAll(Closure $p)
     public function partition(Closure $p)
     {
         $this->initialize();
+
         return $this->coll->partition($p);
     }
-    
+
     /**
      * {@inheritdoc}
      */
     public function toArray()
     {
         $this->initialize();
+
         return $this->coll->toArray();
     }
 
@@ -566,20 +628,32 @@ public function clear()
         if ($this->initialized && $this->isEmpty()) {
             return;
         }
-        if ($this->association['type'] == ClassMetadata::ONE_TO_MANY && $this->association['orphanRemoval']) {
+
+        $uow = $this->em->getUnitOfWork();
+
+        if ($this->association['type'] & ClassMetadata::TO_MANY && $this->association['orphanRemoval']) {
+            // we need to initialize here, as orphan removal acts like implicit cascadeRemove,
+            // hence for event listeners we need the objects in memory.
+            $this->initialize();
+
             foreach ($this->coll as $element) {
-                $this->em->getUnitOfWork()->scheduleOrphanRemoval($element);
+                $uow->scheduleOrphanRemoval($element);
             }
         }
+
         $this->coll->clear();
+
         $this->initialized = true; // direct call, {@link initialize()} is too expensive
+
         if ($this->association['isOwningSide']) {
             $this->changed();
-            $this->em->getUnitOfWork()->scheduleCollectionDeletion($this);
+
+            $uow->scheduleCollectionDeletion($this);
+
             $this->takeSnapshot();
         }
     }
-    
+
     /**
      * Called by PHP when this collection is serialized. Ensures that only the
      * elements are properly serialized.
@@ -591,7 +665,7 @@ public function __sleep()
     {
         return array('coll', 'initialized');
     }
-    
+
     /* ArrayAccess implementation */
 
     /**
@@ -619,6 +693,7 @@ public function offsetSet($offset, $value)
         if ( ! isset($offset)) {
             return $this->add($value);
         }
+
         return $this->set($offset, $value);
     }
 
@@ -629,12 +704,12 @@ public function offsetUnset($offset)
     {
         return $this->remove($offset);
     }
-    
+
     public function key()
     {
         return $this->coll->key();
     }
-    
+
     /**
      * Gets the element of the collection at the current iterator position.
      */
@@ -642,7 +717,7 @@ public function current()
     {
         return $this->coll->current();
     }
-    
+
     /**
      * Moves the internal iterator position to the next element.
      */
@@ -650,9 +725,11 @@ public function next()
     {
         return $this->coll->next();
     }
-    
+
     /**
      * Retrieves the wrapped Collection instance.
+     *
+     * @return \Doctrine\Common\Collections\Collection
      */
     public function unwrap()
     {
@@ -668,17 +745,42 @@ public function unwrap()
      *
      * @param int $offset
      * @param int $length
+     *
      * @return array
      */
     public function slice($offset, $length = null)
     {
-        if (!$this->initialized && $this->association['fetch'] == Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
-            return $this->em->getUnitOfWork()
-                            ->getCollectionPersister($this->association)
-                            ->slice($this, $offset, $length);
+        if ( ! $this->initialized && ! $this->isDirty && $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY) {
+            $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
+
+            return $persister->slice($this, $offset, $length);
         }
 
         $this->initialize();
+
         return $this->coll->slice($offset, $length);
     }
+
+    /**
+     * Cleanup internal state of cloned persistent collection.
+     *
+     * The following problems have to be prevented:
+     * 1. Added entities are added to old PC
+     * 2. New collection is not dirty, if reused on other entity nothing
+     * changes.
+     * 3. Snapshot leads to invalid diffs being generated.
+     * 4. Lazy loading grabs entities from old owner object.
+     * 5. New collection is connected to old owner and leads to duplicate keys.
+     */
+    public function __clone()
+    {
+        $this->initialize();
+        $this->owner = null;
+
+        if (is_object($this->coll)) {
+            $this->coll = clone $this->coll;
+        }
+        $this->snapshot = array();
+        $this->changed();
+    }
 }
diff --git a/src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php b/src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php
index 189809697d..8c129481e7 100644
--- a/src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php
@@ -36,19 +36,19 @@ abstract class AbstractCollectionPersister
     protected $_em;
 
     /**
-     * @var Doctrine\DBAL\Connection
+     * @var \Doctrine\DBAL\Connection
      */
     protected $_conn;
 
     /**
-     * @var Doctrine\ORM\UnitOfWork
+     * @var \Doctrine\ORM\UnitOfWork
      */
     protected $_uow;
 
     /**
      * Initializes a new instance of a class derived from AbstractCollectionPersister.
      *
-     * @param Doctrine\ORM\EntityManager $em
+     * @param \Doctrine\ORM\EntityManager $em
      */
     public function __construct(EntityManager $em)
     {
@@ -65,9 +65,11 @@ public function __construct(EntityManager $em)
     public function delete(PersistentCollection $coll)
     {
         $mapping = $coll->getMapping();
+
         if ( ! $mapping['isOwningSide']) {
             return; // ignore inverse side
         }
+
         $sql = $this->_getDeleteSQL($coll);
         $this->_conn->executeUpdate($sql, $this->_getDeleteSQLParameters($coll));
     }
@@ -96,30 +98,34 @@ abstract protected function _getDeleteSQLParameters(PersistentCollection $coll);
     public function update(PersistentCollection $coll)
     {
         $mapping = $coll->getMapping();
+
         if ( ! $mapping['isOwningSide']) {
             return; // ignore inverse side
         }
+
         $this->deleteRows($coll);
         //$this->updateRows($coll);
         $this->insertRows($coll);
     }
-    
+
     public function deleteRows(PersistentCollection $coll)
-    {        
+    {
         $deleteDiff = $coll->getDeleteDiff();
         $sql = $this->_getDeleteRowSQL($coll);
+
         foreach ($deleteDiff as $element) {
             $this->_conn->executeUpdate($sql, $this->_getDeleteRowSQLParameters($coll, $element));
         }
     }
-    
+
     //public function updateRows(PersistentCollection $coll)
     //{}
-    
+
     public function insertRows(PersistentCollection $coll)
     {
         $insertDiff = $coll->getInsertDiff();
         $sql = $this->_getInsertRowSQL($coll);
+
         foreach ($insertDiff as $element) {
             $this->_conn->executeUpdate($sql, $this->_getInsertRowSQLParameters($coll, $element));
         }
@@ -145,6 +151,16 @@ public function containsKey(PersistentCollection $coll, $key)
         throw new \BadMethodCallException("Checking for existance of a key is not supported by this CollectionPersister.");
     }
 
+    public function removeElement(PersistentCollection $coll, $element)
+    {
+        throw new \BadMethodCallException("Removing an element is not supported by this CollectionPersister.");
+    }
+
+    public function removeKey(PersistentCollection $coll, $key)
+    {
+        throw new \BadMethodCallException("Removing a key is not supported by this CollectionPersister.");
+    }
+
     public function get(PersistentCollection $coll, $index)
     {
         throw new \BadMethodCallException("Selecting a collection by index is not supported by this CollectionPersister.");
@@ -152,7 +168,7 @@ public function get(PersistentCollection $coll, $index)
 
     /**
      * Gets the SQL statement used for deleting a row from the collection.
-     * 
+     *
      * @param PersistentCollection $coll
      */
     abstract protected function _getDeleteRowSQL(PersistentCollection $coll);
@@ -188,4 +204,4 @@ abstract protected function _getInsertRowSQL(PersistentCollection $coll);
      * @param mixed $element
      */
     abstract protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element);
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php b/src/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php
index 425da798a2..191c077989 100644
--- a/src/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php
@@ -26,7 +26,7 @@
  * Base class for entity persisters that implement a certain inheritance mapping strategy.
  * All these persisters are assumed to use a discriminator column to discriminate entity
  * types in the hierarchy.
- * 
+ *
  * @author Roman Borschel 
  * @author Benjamin Eberlei 
  * @since 2.0
@@ -39,16 +39,18 @@ abstract class AbstractEntityInheritancePersister extends BasicEntityPersister
     protected function _prepareInsertData($entity)
     {
         $data = parent::_prepareInsertData($entity);
+
         // Populate the discriminator column
         $discColumn = $this->_class->discriminatorColumn;
         $this->_columnTypes[$discColumn['name']] = $discColumn['type'];
         $data[$this->_getDiscriminatorColumnTableName()][$discColumn['name']] = $this->_class->discriminatorValue;
+
         return $data;
     }
 
     /**
      * Gets the name of the table that contains the discriminator column.
-     * 
+     *
      * @return string The table name.
      */
     abstract protected function _getDiscriminatorColumnTableName();
@@ -60,18 +62,22 @@ protected function _getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r
     {
         $columnName = $class->columnNames[$field];
         $sql = $this->_getSQLTableAlias($class->name, $alias == 'r' ? '' : $alias) . '.' . $class->getQuotedColumnName($field, $this->_platform);
-        $columnAlias = $this->_platform->getSQLResultCasing($columnName . $this->_sqlAliasCounter++);
+        $columnAlias = $this->getSQLColumnAlias($columnName);
         $this->_rsm->addFieldResult($alias, $columnAlias, $field, $class->name);
 
-        return "$sql AS $columnAlias";
+        if (isset($class->fieldMappings[$field]['requireSQLConversion'])) {
+            $type = Type::getType($class->getTypeOfField($field));
+            $sql = $type->convertToPHPValueSQL($sql, $this->_platform);
+        }
+
+        return $sql . ' AS ' . $columnAlias;
     }
 
     protected function getSelectJoinColumnSQL($tableAlias, $joinColumnName, $className)
     {
-        $columnAlias = $joinColumnName . $this->_sqlAliasCounter++;
-        $resultColumnName = $this->_platform->getSQLResultCasing($columnAlias);
-        $this->_rsm->addMetaResult('r', $resultColumnName, $joinColumnName);
-        
-        return $tableAlias . ".$joinColumnName AS $columnAlias";
+        $columnAlias = $this->getSQLColumnAlias($joinColumnName);
+        $this->_rsm->addMetaResult('r', $columnAlias, $joinColumnName);
+
+        return $tableAlias . '.' . $joinColumnName . ' AS ' . $columnAlias;
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
index 2ee3cf4fe0..9c6898383c 100644
--- a/src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
@@ -26,6 +26,7 @@
     Doctrine\ORM\ORMException,
     Doctrine\ORM\OptimisticLockException,
     Doctrine\ORM\EntityManager,
+    Doctrine\ORM\UnitOfWork,
     Doctrine\ORM\Query,
     Doctrine\ORM\PersistentCollection,
     Doctrine\ORM\Mapping\MappingException,
@@ -71,6 +72,7 @@
  * @author Roman Borschel 
  * @author Giorgio Sironi 
  * @author Benjamin Eberlei 
+ * @author Alexander 
  * @since 2.0
  */
 class BasicEntityPersister
@@ -78,28 +80,28 @@ class BasicEntityPersister
     /**
      * Metadata object that describes the mapping of the mapped entity class.
      *
-     * @var Doctrine\ORM\Mapping\ClassMetadata
+     * @var \Doctrine\ORM\Mapping\ClassMetadata
      */
     protected $_class;
 
     /**
      * The underlying DBAL Connection of the used EntityManager.
      *
-     * @var Doctrine\DBAL\Connection $conn
+     * @var \Doctrine\DBAL\Connection $conn
      */
     protected $_conn;
 
     /**
      * The database platform.
-     * 
-     * @var Doctrine\DBAL\Platforms\AbstractPlatform
+     *
+     * @var \Doctrine\DBAL\Platforms\AbstractPlatform
      */
     protected $_platform;
 
     /**
      * The EntityManager instance.
      *
-     * @var Doctrine\ORM\EntityManager
+     * @var \Doctrine\ORM\EntityManager
      */
     protected $_em;
 
@@ -109,12 +111,12 @@ class BasicEntityPersister
      * @var array
      */
     protected $_queuedInserts = array();
-    
+
     /**
      * ResultSetMapping that is used for all queries. Is generated lazily once per request.
-     * 
+     *
      * TODO: Evaluate Caching in combination with the other cached SQL snippets.
-     * 
+     *
      * @var Query\ResultSetMapping
      */
     protected $_rsm;
@@ -122,7 +124,7 @@ class BasicEntityPersister
     /**
      * The map of column names to DBAL mapping types of all prepared columns used
      * when INSERTing or UPDATEing an entity.
-     * 
+     *
      * @var array
      * @see _prepareInsertData($entity)
      * @see _prepareUpdateData($entity)
@@ -132,7 +134,7 @@ class BasicEntityPersister
     /**
      * The INSERT SQL statement used for entities handled by this persister.
      * This SQL is only generated once per request, if at all.
-     * 
+     *
      * @var string
      */
     private $_insertSql;
@@ -140,29 +142,29 @@ class BasicEntityPersister
     /**
      * The SELECT column list SQL fragment used for querying entities by this persister.
      * This SQL fragment is only generated once per request, if at all.
-     * 
+     *
      * @var string
      */
     protected $_selectColumnListSql;
-    
+
     /**
      * The JOIN SQL fragement used to eagerly load all many-to-one and one-to-one
      * associations configured as FETCH_EAGER, aswell as all inverse one-to-one associations.
-     * 
+     *
      * @var string
      */
     protected $_selectJoinSql;
 
     /**
      * Counter for creating unique SQL table and column aliases.
-     * 
+     *
      * @var integer
      */
     protected $_sqlAliasCounter = 0;
 
     /**
      * Map from class names (FQCN) to the corresponding generated SQL table aliases.
-     * 
+     *
      * @var array
      */
     protected $_sqlTableAliases = array();
@@ -170,9 +172,9 @@ class BasicEntityPersister
     /**
      * Initializes a new BasicEntityPersister that uses the given EntityManager
      * and persists instances of the class described by the given ClassMetadata descriptor.
-     * 
-     * @param Doctrine\ORM\EntityManager $em
-     * @param Doctrine\ORM\Mapping\ClassMetadata $class
+     *
+     * @param \Doctrine\ORM\EntityManager $em
+     * @param \Doctrine\ORM\Mapping\ClassMetadata $class
      */
     public function __construct(EntityManager $em, ClassMetadata $class)
     {
@@ -183,7 +185,7 @@ public function __construct(EntityManager $em, ClassMetadata $class)
     }
 
     /**
-     * @return Doctrine\ORM\Mapping\ClassMetadata
+     * @return \Doctrine\ORM\Mapping\ClassMetadata
      */
     public function getClassMetadata()
     {
@@ -204,7 +206,7 @@ public function addInsert($entity)
     /**
      * Executes all queued entity insertions and returns any generated post-insert
      * identifiers that were created as a result of the insertions.
-     * 
+     *
      * If no inserts are queued, invoking this method is a NOOP.
      *
      * @return array An array of any generated post-insert IDs. This will be an empty array
@@ -221,13 +223,14 @@ public function executeInserts()
         $isPostInsertId = $idGen->isPostInsertGenerator();
 
         $stmt = $this->_conn->prepare($this->_getInsertSQL());
-        $tableName = $this->_class->table['name'];
+        $tableName = $this->_class->getTableName();
 
         foreach ($this->_queuedInserts as $entity) {
             $insertData = $this->_prepareInsertData($entity);
 
             if (isset($insertData[$tableName])) {
                 $paramIndex = 1;
+
                 foreach ($insertData[$tableName] as $column => $value) {
                     $stmt->bindValue($paramIndex++, $value, $this->_columnTypes[$column]);
                 }
@@ -255,7 +258,7 @@ public function executeInserts()
 
     /**
      * Retrieves the default version value which was created
-     * by the preceding INSERT statement and assigns it back in to the 
+     * by the preceding INSERT statement and assigns it back in to the
      * entities version field.
      *
      * @param object $entity
@@ -269,19 +272,22 @@ protected function assignDefaultVersionValue($entity, $id)
 
     /**
      * Fetch the current version value of a versioned entity.
-     * 
-     * @param Doctrine\ORM\Mapping\ClassMetadata $versionedClass
+     *
+     * @param \Doctrine\ORM\Mapping\ClassMetadata $versionedClass
      * @param mixed $id
      * @return mixed
      */
     protected function fetchVersionValue($versionedClass, $id)
     {
         $versionField = $versionedClass->versionField;
-        $identifier = $versionedClass->getIdentifierColumnNames();
-        $versionFieldColumnName = $versionedClass->getColumnName($versionField);
+        $identifier   = $versionedClass->getIdentifierColumnNames();
+
+        $versionFieldColumnName = $versionedClass->getQuotedColumnName($versionField, $this->_platform);
+
         //FIXME: Order with composite keys might not be correct
-        $sql = "SELECT " . $versionFieldColumnName . " FROM " . $versionedClass->getQuotedTableName($this->_platform)
-               . " WHERE " . implode(' = ? AND ', $identifier) . " = ?";
+        $sql = 'SELECT ' . $versionFieldColumnName
+             . ' FROM ' . $versionedClass->getQuotedTableName($this->_platform)
+             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
         $value = $this->_conn->fetchColumn($sql, array_values((array)$id));
 
         return Type::getType($versionedClass->fieldMappings[$versionField]['type'])->convertToPHPValue($value, $this->_platform);
@@ -294,7 +300,7 @@ protected function fetchVersionValue($versionedClass, $id)
      * The data to update is retrieved through {@link _prepareUpdateData}.
      * Subclasses that override this method are supposed to obtain the update data
      * in the same way, through {@link _prepareUpdateData}.
-     * 
+     *
      * Subclasses are also supposed to take care of versioning when overriding this method,
      * if necessary. The {@link _updateTable} method can be used to apply the data retrieved
      * from {@_prepareUpdateData} on the target tables, thereby optionally applying versioning.
@@ -304,7 +310,8 @@ protected function fetchVersionValue($versionedClass, $id)
     public function update($entity)
     {
         $updateData = $this->_prepareUpdateData($entity);
-        $tableName = $this->_class->table['name'];
+        $tableName  = $this->_class->getTableName();
+
         if (isset($updateData[$tableName]) && $updateData[$tableName]) {
             $this->_updateTable(
                 $entity, $this->_class->getQuotedTableName($this->_platform),
@@ -332,17 +339,26 @@ protected final function _updateTable($entity, $quotedTableName, array $updateDa
         $set = $params = $types = array();
 
         foreach ($updateData as $columnName => $value) {
+            $column = $columnName;
+            $placeholder = '?';
+
             if (isset($this->_class->fieldNames[$columnName])) {
-                $set[] = $this->_class->getQuotedColumnName($this->_class->fieldNames[$columnName], $this->_platform) . ' = ?';
-            } else {
-                $set[] = $columnName . ' = ?';
+                $column = $this->_class->getQuotedColumnName($this->_class->fieldNames[$columnName], $this->_platform);
+
+                if (isset($this->_class->fieldMappings[$this->_class->fieldNames[$columnName]]['requireSQLConversion'])) {
+                    $type = Type::getType($this->_columnTypes[$columnName]);
+                    $placeholder = $type->convertToDatabaseValueSQL('?', $this->_platform);
+                }
             }
+
+            $set[] = $column . ' = ' . $placeholder;
             $params[] = $value;
             $types[] = $this->_columnTypes[$columnName];
         }
 
         $where = array();
         $id = $this->_em->getUnitOfWork()->getEntityIdentifier($entity);
+
         foreach ($this->_class->identifier as $idField) {
             if (isset($this->_class->associationMappings[$idField])) {
                 $targetMapping = $this->_em->getClassMetadata($this->_class->associationMappings[$idField]['targetEntity']);
@@ -360,18 +376,21 @@ protected final function _updateTable($entity, $quotedTableName, array $updateDa
             $versionField = $this->_class->versionField;
             $versionFieldType = $this->_class->fieldMappings[$versionField]['type'];
             $versionColumn = $this->_class->getQuotedColumnName($versionField, $this->_platform);
+
             if ($versionFieldType == Type::INTEGER) {
                 $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
             } else if ($versionFieldType == Type::DATETIME) {
                 $set[] = $versionColumn . ' = CURRENT_TIMESTAMP';
             }
+
             $where[] = $versionColumn;
             $params[] = $this->_class->reflFields[$versionField]->getValue($entity);
             $types[] = $this->_class->fieldMappings[$versionField]['type'];
         }
 
-        $sql = "UPDATE $quotedTableName SET " . implode(', ', $set)
-            . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
+        $sql = 'UPDATE ' . $quotedTableName
+             . ' SET ' . implode(', ', $set)
+             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
 
         $result = $this->_conn->executeUpdate($sql, $params, $types);
 
@@ -392,26 +411,34 @@ protected function deleteJoinTableRecords($identifier)
                 // @Todo this only covers scenarios with no inheritance or of the same level. Is there something
                 // like self-referential relationship between different levels of an inheritance hierachy? I hope not!
                 $selfReferential = ($mapping['targetEntity'] == $mapping['sourceEntity']);
-                
+
                 if ( ! $mapping['isOwningSide']) {
                     $relatedClass = $this->_em->getClassMetadata($mapping['targetEntity']);
                     $mapping = $relatedClass->associationMappings[$mapping['mappedBy']];
                     $keys = array_keys($mapping['relationToTargetKeyColumns']);
+
                     if ($selfReferential) {
                         $otherKeys = array_keys($mapping['relationToSourceKeyColumns']);
                     }
                 } else {
                     $keys = array_keys($mapping['relationToSourceKeyColumns']);
+
                     if ($selfReferential) {
                         $otherKeys = array_keys($mapping['relationToTargetKeyColumns']);
                     }
                 }
 
                 if ( ! isset($mapping['isOnDeleteCascade'])) {
-                    $this->_conn->delete($mapping['joinTable']['name'], array_combine($keys, $identifier));
+                    $this->_conn->delete(
+                        $this->_class->getQuotedJoinTableName($mapping, $this->_platform),
+                        array_combine($keys, $identifier)
+                    );
 
                     if ($selfReferential) {
-                        $this->_conn->delete($mapping['joinTable']['name'], array_combine($otherKeys, $identifier));
+                        $this->_conn->delete(
+                            $this->_class->getQuotedJoinTableName($mapping, $this->_platform),
+                            array_combine($otherKeys, $identifier)
+                        );
                     }
                 }
             }
@@ -441,7 +468,7 @@ public function delete($entity)
      * Prepares the changeset of an entity for database insertion (UPDATE).
      *
      * The changeset is obtained from the currently running UnitOfWork.
-     * 
+     *
      * During this preparation the array that is passed as the second parameter is filled with
      *  =>  pairs, grouped by table name.
      *
@@ -462,7 +489,7 @@ protected function _prepareUpdateData($entity)
         $result = array();
         $uow = $this->_em->getUnitOfWork();
 
-        if ($versioned = $this->_class->isVersioned) {
+        if (($versioned = $this->_class->isVersioned) != false) {
             $versionField = $this->_class->versionField;
         }
 
@@ -476,6 +503,7 @@ protected function _prepareUpdateData($entity)
 
             if (isset($this->_class->associationMappings[$field])) {
                 $assoc = $this->_class->associationMappings[$field];
+
                 // Only owning side of x-1 associations can have a FK column.
                 if ( ! $assoc['isOwningSide'] || ! ($assoc['type'] & ClassMetadata::TO_ONE)) {
                     continue;
@@ -483,6 +511,7 @@ protected function _prepareUpdateData($entity)
 
                 if ($newVal !== null) {
                     $oid = spl_object_hash($newVal);
+
                     if (isset($this->_queuedInserts[$oid]) || $uow->isScheduledForInsert($newVal)) {
                         // The associated entity $newVal is not yet persisted, so we must
                         // set $newVal = null, in order to insert a null value and schedule an
@@ -509,6 +538,7 @@ protected function _prepareUpdateData($entity)
                     } else {
                         $result[$owningTable][$sourceColumn] = $newValId[$targetClass->fieldNames[$targetColumn]];
                     }
+
                     $this->_columnTypes[$sourceColumn] = $targetClass->getTypeOfColumn($targetColumn);
                 }
             } else {
@@ -517,6 +547,7 @@ protected function _prepareUpdateData($entity)
                 $result[$this->getOwningTable($field)][$columnName] = $newVal;
             }
         }
+
         return $result;
     }
 
@@ -547,7 +578,7 @@ protected function _prepareInsertData($entity)
      */
     public function getOwningTable($fieldName)
     {
-        return $this->_class->table['name'];
+        return $this->_class->getTableName();
     }
 
     /**
@@ -559,25 +590,24 @@ public function getOwningTable($fieldName)
      * @param $assoc The association that connects the entity to load to another entity, if any.
      * @param array $hints Hints for entity creation.
      * @param int $lockMode
+     * @param int $limit Limit number of results
      * @return object The loaded and managed entity instance or NULL if the entity can not be found.
      * @todo Check identity map? loadById method? Try to guess whether $criteria is the id?
      */
-    public function load(array $criteria, $entity = null, $assoc = null, array $hints = array(), $lockMode = 0)
+    public function load(array $criteria, $entity = null, $assoc = null, array $hints = array(), $lockMode = 0, $limit = null)
     {
-        $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, $lockMode);
+        $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, $lockMode, $limit);
         list($params, $types) = $this->expandParameters($criteria);
         $stmt = $this->_conn->executeQuery($sql, $params, $types);
-        
+
         if ($entity !== null) {
             $hints[Query::HINT_REFRESH] = true;
+            $hints[Query::HINT_REFRESH_ENTITY] = $entity;
         }
 
-        if ($this->_selectJoinSql) {
-            $hydrator = $this->_em->newHydrator(Query::HYDRATE_OBJECT);
-        } else {
-            $hydrator = $this->_em->newHydrator(Query::HYDRATE_SIMPLEOBJECT);
-        }
+        $hydrator = $this->_em->newHydrator($this->_selectJoinSql ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
         $entities = $hydrator->hydrateAll($stmt, $this->_rsm, $hints);
+
         return $entities ? $entities[0] : null;
     }
 
@@ -587,15 +617,14 @@ public function load(array $criteria, $entity = null, $assoc = null, array $hint
      *
      * @param array $assoc The association to load.
      * @param object $sourceEntity The entity that owns the association (not necessarily the "owning side").
-     * @param object $targetEntity The existing ghost entity (proxy) to load, if any.
      * @param array $identifier The identifier of the entity to load. Must be provided if
      *                          the association to load represents the owning side, otherwise
      *                          the identifier is derived from the $sourceEntity.
      * @return object The loaded and managed entity instance or NULL if the entity can not be found.
      */
-    public function loadOneToOneEntity(array $assoc, $sourceEntity, $targetEntity, array $identifier = array())
+    public function loadOneToOneEntity(array $assoc, $sourceEntity, array $identifier = array())
     {
-        if ($foundEntity = $this->_em->getUnitOfWork()->tryGetById($identifier, $assoc['targetEntity'])) {
+        if (($foundEntity = $this->_em->getUnitOfWork()->tryGetById($identifier, $assoc['targetEntity'])) != false) {
             return $foundEntity;
         }
 
@@ -607,21 +636,18 @@ public function loadOneToOneEntity(array $assoc, $sourceEntity, $targetEntity, a
             // Mark inverse side as fetched in the hints, otherwise the UoW would
             // try to load it in a separate query (remember: to-one inverse sides can not be lazy).
             $hints = array();
+
             if ($isInverseSingleValued) {
-                $hints['fetched'][$targetClass->name][$assoc['inversedBy']] = true;
-                if ($targetClass->subClasses) {
-                    foreach ($targetClass->subClasses as $targetSubclassName) {
-                        $hints['fetched'][$targetSubclassName][$assoc['inversedBy']] = true;
-                    }
-                }
+                $hints['fetched']["r"][$assoc['inversedBy']] = true;
             }
+
             /* cascade read-only status
             if ($this->_em->getUnitOfWork()->isReadOnly($sourceEntity)) {
                 $hints[Query::HINT_READ_ONLY] = true;
             }
             */
 
-            $targetEntity = $this->load($identifier, $targetEntity, $assoc, $hints);
+            $targetEntity = $this->load($identifier, null, $assoc, $hints);
 
             // Complete bidirectional association, if necessary
             if ($targetEntity !== null && $isInverseSingleValued) {
@@ -630,18 +656,24 @@ public function loadOneToOneEntity(array $assoc, $sourceEntity, $targetEntity, a
         } else {
             $sourceClass = $this->_em->getClassMetadata($assoc['sourceEntity']);
             $owningAssoc = $targetClass->getAssociationMapping($assoc['mappedBy']);
+
             // TRICKY: since the association is specular source and target are flipped
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $sourceKeyColumn => $targetKeyColumn) {
-                if (isset($sourceClass->fieldNames[$sourceKeyColumn])) {
-                    $identifier[$targetKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity);
-                } else {
+                if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) {
                     throw MappingException::joinColumnMustPointToMappedField(
                         $sourceClass->name, $sourceKeyColumn
                     );
                 }
+
+                // unset the old value and set the new sql aliased value here. By definition
+                // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method.
+                $identifier[$this->_getSQLTableAlias($targetClass->name) . "." . $targetKeyColumn] =
+                    $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity);
+
+                unset($identifier[$targetKeyColumn]);
             }
 
-            $targetEntity = $this->load($identifier, $targetEntity, $assoc);
+            $targetEntity = $this->load($identifier, null, $assoc);
 
             if ($targetEntity !== null) {
                 $targetClass->setFieldValue($targetEntity, $assoc['mappedBy'], $sourceEntity);
@@ -653,7 +685,7 @@ public function loadOneToOneEntity(array $assoc, $sourceEntity, $targetEntity, a
 
     /**
      * Refreshes a managed entity.
-     * 
+     *
      * @param array $id The identifier of the entity as an associative array from
      *                  column or field names to values.
      * @param object $entity The entity to refresh.
@@ -663,22 +695,14 @@ public function refresh(array $id, $entity)
         $sql = $this->_getSelectEntitiesSQL($id);
         list($params, $types) = $this->expandParameters($id);
         $stmt = $this->_conn->executeQuery($sql, $params, $types);
-        
+
         $hydrator = $this->_em->newHydrator(Query::HYDRATE_OBJECT);
         $hydrator->hydrateAll($stmt, $this->_rsm, array(Query::HINT_REFRESH => true));
-
-        if (isset($this->_class->lifecycleCallbacks[Events::postLoad])) {
-            $this->_class->invokeLifecycleCallbacks(Events::postLoad, $entity);
-        }
-        $evm = $this->_em->getEventManager();
-        if ($evm->hasListeners(Events::postLoad)) {
-            $evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($entity, $this->_em));
-        }
     }
 
     /**
      * Loads a list of entities by a list of field criteria.
-     * 
+     *
      * @param array $criteria
      * @param array $orderBy
      * @param int $limit
@@ -692,17 +716,14 @@ public function loadAll(array $criteria = array(), array $orderBy = null, $limit
         list($params, $types) = $this->expandParameters($criteria);
         $stmt = $this->_conn->executeQuery($sql, $params, $types);
 
-        if ($this->_selectJoinSql) {
-            $hydrator = $this->_em->newHydrator(Query::HYDRATE_OBJECT);
-        } else {
-            $hydrator = $this->_em->newHydrator(Query::HYDRATE_SIMPLEOBJECT);
-        }
+        $hydrator = $this->_em->newHydrator(($this->_selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
+
         return $hydrator->hydrateAll($stmt, $this->_rsm, array('deferEagerLoads' => true));
     }
 
     /**
      * Get (sliced or full) elements of the given collection.
-     * 
+     *
      * @param array $assoc
      * @param object $sourceEntity
      * @param int|null $offset
@@ -712,14 +733,16 @@ public function loadAll(array $criteria = array(), array $orderBy = null, $limit
     public function getManyToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null)
     {
         $stmt = $this->getManyToManyStatement($assoc, $sourceEntity, $offset, $limit);
+
         return $this->loadArrayFromStatement($assoc, $stmt);
     }
 
     /**
      * Load an array of entities from a given dbal statement.
-     * 
+     *
      * @param array $assoc
-     * @param Doctrine\DBAL\Statement $stmt
+     * @param \Doctrine\DBAL\Statement $stmt
+     *
      * @return array
      */
     private function loadArrayFromStatement($assoc, $stmt)
@@ -734,18 +757,21 @@ private function loadArrayFromStatement($assoc, $stmt)
         }
 
         $hydrator = $this->_em->newHydrator(Query::HYDRATE_OBJECT);
+
         return $hydrator->hydrateAll($stmt, $rsm, $hints);
     }
 
     /**
      * Hydrate a collection from a given dbal statement.
-     * 
+     *
      * @param array $assoc
-     * @param Doctrine\DBAL\Statement $stmt
+     * @param \Doctrine\DBAL\Statement $stmt
      * @param PersistentCollection $coll
+     *
+     * @return array
      */
     private function loadCollectionFromStatement($assoc, $stmt, $coll)
-    {        
+    {
         $hints = array('deferEagerLoads' => true, 'collection' => $coll);
 
         if (isset($assoc['indexBy'])) {
@@ -756,7 +782,8 @@ private function loadCollectionFromStatement($assoc, $stmt, $coll)
         }
 
         $hydrator = $this->_em->newHydrator(Query::HYDRATE_OBJECT);
-        $hydrator->hydrateAll($stmt, $rsm, $hints);
+
+        return $hydrator->hydrateAll($stmt, $rsm, $hints);
     }
 
     /**
@@ -772,6 +799,7 @@ private function loadCollectionFromStatement($assoc, $stmt, $coll)
     public function loadManyToManyCollection(array $assoc, $sourceEntity, PersistentCollection $coll)
     {
         $stmt = $this->getManyToManyStatement($assoc, $sourceEntity);
+
         return $this->loadCollectionFromStatement($assoc, $stmt, $coll);
     }
 
@@ -779,15 +807,18 @@ private function getManyToManyStatement(array $assoc, $sourceEntity, $offset = n
     {
         $criteria = array();
         $sourceClass = $this->_em->getClassMetadata($assoc['sourceEntity']);
+
         if ($assoc['isOwningSide']) {
             $quotedJoinTable = $sourceClass->getQuotedJoinTableName($assoc, $this->_platform);
+
             foreach ($assoc['relationToSourceKeyColumns'] as $relationKeyColumn => $sourceKeyColumn) {
                 if ($sourceClass->containsForeignIdentifier) {
                     $field = $sourceClass->getFieldForColumn($sourceKeyColumn);
                     $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
+
                     if (isset($sourceClass->associationMappings[$field])) {
                         $value = $this->_em->getUnitOfWork()->getEntityIdentifier($value);
-                        $value = $value[$this->_em->getClassMetadata($assoc['targetEntity'])->identifier[0]];
+                        $value = $value[$this->_em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
                     }
 
                     $criteria[$quotedJoinTable . "." . $relationKeyColumn] = $value;
@@ -802,15 +833,18 @@ private function getManyToManyStatement(array $assoc, $sourceEntity, $offset = n
         } else {
             $owningAssoc = $this->_em->getClassMetadata($assoc['targetEntity'])->associationMappings[$assoc['mappedBy']];
             $quotedJoinTable = $sourceClass->getQuotedJoinTableName($owningAssoc, $this->_platform);
+
             // TRICKY: since the association is inverted source and target are flipped
             foreach ($owningAssoc['relationToTargetKeyColumns'] as $relationKeyColumn => $sourceKeyColumn) {
                 if ($sourceClass->containsForeignIdentifier) {
                     $field = $sourceClass->getFieldForColumn($sourceKeyColumn);
                     $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
+
                     if (isset($sourceClass->associationMappings[$field])) {
                         $value = $this->_em->getUnitOfWork()->getEntityIdentifier($value);
-                        $value = $value[$this->_em->getClassMetadata($assoc['targetEntity'])->identifier[0]];
+                        $value = $value[$this->_em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
                     }
+
                     $criteria[$quotedJoinTable . "." . $relationKeyColumn] = $value;
                 } else if (isset($sourceClass->fieldNames[$sourceKeyColumn])) {
                     $criteria[$quotedJoinTable . "." . $relationKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity);
@@ -824,6 +858,7 @@ private function getManyToManyStatement(array $assoc, $sourceEntity, $offset = n
 
         $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, 0, $limit, $offset);
         list($params, $types) = $this->expandParameters($criteria);
+
         return $this->_conn->executeQuery($sql, $params, $types);
     }
 
@@ -842,24 +877,33 @@ private function getManyToManyStatement(array $assoc, $sourceEntity, $offset = n
      */
     protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMode = 0, $limit = null, $offset = null, array $orderBy = null)
     {
-        $joinSql = $assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY ?
-                $this->_getSelectManyToManyJoinSQL($assoc) : '';
-
+        $joinSql      = ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) ? $this->_getSelectManyToManyJoinSQL($assoc) : '';
         $conditionSql = $this->_getSelectConditionSQL($criteria, $assoc);
 
-        $orderBy = ($assoc !== null && isset($assoc['orderBy'])) ? $assoc['orderBy'] : $orderBy;
+        $orderBy    = ($assoc !== null && isset($assoc['orderBy'])) ? $assoc['orderBy'] : $orderBy;
         $orderBySql = $orderBy ? $this->_getOrderBySQL($orderBy, $this->_getSQLTableAlias($this->_class->name)) : '';
 
         $lockSql = '';
+
         if ($lockMode == LockMode::PESSIMISTIC_READ) {
             $lockSql = ' ' . $this->_platform->getReadLockSql();
         } else if ($lockMode == LockMode::PESSIMISTIC_WRITE) {
             $lockSql = ' ' . $this->_platform->getWriteLockSql();
         }
 
+        $alias = $this->_getSQLTableAlias($this->_class->name);
+
+        if ($filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) {
+            if ($conditionSql) {
+                $conditionSql .= ' AND ';
+            }
+
+            $conditionSql .= $filterSql;
+        }
+
         return $this->_platform->modifyLimitQuery('SELECT ' . $this->_getSelectColumnListSQL()
              . $this->_platform->appendLockHint(' FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' '
-             . $this->_getSQLTableAlias($this->_class->name), $lockMode)
+             . $alias, $lockMode)
              . $this->_selectJoinSql . $joinSql
              . ($conditionSql ? ' WHERE ' . $conditionSql : '')
              . $orderBySql, $limit, $offset)
@@ -868,25 +912,31 @@ protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMo
 
     /**
      * Gets the ORDER BY SQL snippet for ordered collections.
-     * 
+     *
      * @param array $orderBy
      * @param string $baseTableAlias
      * @return string
-     * @todo Rename: _getOrderBySQL
      */
     protected final function _getOrderBySQL(array $orderBy, $baseTableAlias)
     {
         $orderBySql = '';
+
         foreach ($orderBy as $fieldName => $orientation) {
             if ( ! isset($this->_class->fieldMappings[$fieldName])) {
                 throw ORMException::unrecognizedField($fieldName);
             }
 
+            $orientation = strtoupper(trim($orientation));
+            if ($orientation != 'ASC' && $orientation != 'DESC') {
+                throw ORMException::invalidOrientation($this->_class->name, $fieldName);
+            }
+
             $tableAlias = isset($this->_class->fieldMappings[$fieldName]['inherited']) ?
                     $this->_getSQLTableAlias($this->_class->fieldMappings[$fieldName]['inherited'])
                     : $baseTableAlias;
 
             $columnName = $this->_class->getQuotedColumnName($fieldName, $this->_platform);
+
             $orderBySql .= $orderBySql ? ', ' : ' ORDER BY ';
             $orderBySql .= $tableAlias . '.' . $columnName . ' ' . $orientation;
         }
@@ -902,7 +952,7 @@ protected final function _getOrderBySQL(array $orderBy, $baseTableAlias)
      * list SQL fragment. Note that in the implementation of BasicEntityPersister
      * the resulting SQL fragment is generated only once and cached in {@link _selectColumnListSql}.
      * Subclasses may or may not do the same.
-     * 
+     *
      * @return string The SQL fragment.
      * @todo Rename: _getSelectColumnsSQL()
      */
@@ -919,64 +969,81 @@ protected function _getSelectColumnListSQL()
         // Add regular columns to select list
         foreach ($this->_class->fieldNames as $field) {
             if ($columnList) $columnList .= ', ';
+
             $columnList .= $this->_getSelectColumnSQL($field, $this->_class);
         }
 
         $this->_selectJoinSql = '';
         $eagerAliasCounter = 0;
+
         foreach ($this->_class->associationMappings as $assocField => $assoc) {
             $assocColumnSQL = $this->_getSelectColumnAssociationSQL($assocField, $assoc, $this->_class);
+
             if ($assocColumnSQL) {
                 if ($columnList) $columnList .= ', ';
+
                 $columnList .= $assocColumnSQL;
             }
-            
+
             if ($assoc['type'] & ClassMetadata::TO_ONE && ($assoc['fetch'] == ClassMetadata::FETCH_EAGER || !$assoc['isOwningSide'])) {
                 $eagerEntity = $this->_em->getClassMetadata($assoc['targetEntity']);
+
                 if ($eagerEntity->inheritanceType != ClassMetadata::INHERITANCE_TYPE_NONE) {
                     continue; // now this is why you shouldn't use inheritance
                 }
-                
+
                 $assocAlias = 'e' . ($eagerAliasCounter++);
                 $this->_rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
-                
+
                 foreach ($eagerEntity->fieldNames AS $field) {
                     if ($columnList) $columnList .= ', ';
+
                     $columnList .= $this->_getSelectColumnSQL($field, $eagerEntity, $assocAlias);
                 }
-                
+
                 foreach ($eagerEntity->associationMappings as $assoc2Field => $assoc2) {
                     $assoc2ColumnSQL = $this->_getSelectColumnAssociationSQL($assoc2Field, $assoc2, $eagerEntity, $assocAlias);
+
                     if ($assoc2ColumnSQL) {
                         if ($columnList) $columnList .= ', ';
                         $columnList .= $assoc2ColumnSQL;
                     }
                 }
-                $this->_selectJoinSql .= ' LEFT JOIN'; // TODO: Inner join when all join columns are NOT nullable.
                 $first = true;
+
                 if ($assoc['isOwningSide']) {
-                    $this->_selectJoinSql .= ' ' . $eagerEntity->table['name'] . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON ';
-                    
+                    $this->_selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($assoc['joinColumns']);
+                    $this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON ';
+
+                    $tableAlias = $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias);
                     foreach ($assoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) {
-                        if (!$first) {
+                        if ( ! $first) {
                             $this->_selectJoinSql .= ' AND ';
                         }
-                        $this->_selectJoinSql .= $this->_getSQLTableAlias($assoc['sourceEntity']) . '.'.$sourceCol.' = ' .
-                                                 $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias) . '.'.$targetCol.' ';
+                        $this->_selectJoinSql .= $this->_getSQLTableAlias($assoc['sourceEntity']) . '.' . $sourceCol . ' = '
+                                               . $tableAlias . '.' . $targetCol;
                         $first = false;
                     }
+
+                    // Add filter SQL
+                    if ($filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) {
+                        $this->_selectJoinSql .= ' AND ' . $filterSql;
+                    }
                 } else {
                     $eagerEntity = $this->_em->getClassMetadata($assoc['targetEntity']);
                     $owningAssoc = $eagerEntity->getAssociationMapping($assoc['mappedBy']);
-                    
-                    $this->_selectJoinSql .= ' ' . $eagerEntity->table['name'] . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON ';
+
+                    $this->_selectJoinSql .= ' LEFT JOIN';
+                    $this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' '
+                                           . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) . ' ON ';
 
                     foreach ($owningAssoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) {
-                        if (!$first) {
+                        if ( ! $first) {
                             $this->_selectJoinSql .= ' AND ';
                         }
-                        $this->_selectJoinSql .= $this->_getSQLTableAlias($owningAssoc['sourceEntity'], $assocAlias) . '.'.$sourceCol.' = ' .
-                                                 $this->_getSQLTableAlias($owningAssoc['targetEntity']) . '.' . $targetCol . ' ';
+
+                        $this->_selectJoinSql .= $this->_getSQLTableAlias($owningAssoc['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = '
+                                               . $this->_getSQLTableAlias($owningAssoc['targetEntity']) . '.' . $targetCol;
                         $first = false;
                     }
                 }
@@ -987,20 +1054,32 @@ protected function _getSelectColumnListSQL()
 
         return $this->_selectColumnListSql;
     }
-    
+
+    /**
+     * Gets the SQL join fragment used when selecting entities from an association.
+     *
+     * @param string $field
+     * @param array $assoc
+     * @param ClassMetadata $class
+     * @param string $alias
+     *
+     * @return string
+     */
     protected function _getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r')
     {
         $columnList = '';
+
         if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
             foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
                 if ($columnList) $columnList .= ', ';
 
-                $columnAlias = $srcColumn . $this->_sqlAliasCounter++;
-                $columnList .= $this->_getSQLTableAlias($class->name, ($alias == 'r' ? '' : $alias) )  . ".$srcColumn AS $columnAlias";
-                $resultColumnName = $this->_platform->getSQLResultCasing($columnAlias);
-                $this->_rsm->addMetaResult($alias, $this->_platform->getSQLResultCasing($columnAlias), $srcColumn, isset($assoc['id']) && $assoc['id'] === true);
+                $resultColumnName = $this->getSQLColumnAlias($srcColumn);
+                $columnList .= $this->_getSQLTableAlias($class->name, ($alias == 'r' ? '' : $alias) )
+                             . '.' . $srcColumn . ' AS ' . $resultColumnName;
+                $this->_rsm->addMetaResult($alias, $resultColumnName, $srcColumn, isset($assoc['id']) && $assoc['id'] === true);
             }
         }
+
         return $columnList;
     }
 
@@ -1020,30 +1099,29 @@ protected function _getSelectManyToManyJoinSQL(array $manyToMany)
             $owningAssoc = $this->_em->getClassMetadata($manyToMany['targetEntity'])->associationMappings[$manyToMany['mappedBy']];
             $joinClauses = $owningAssoc['relationToSourceKeyColumns'];
         }
-        
+
         $joinTableName = $this->_class->getQuotedJoinTableName($owningAssoc, $this->_platform);
-        
         $joinSql = '';
+
         foreach ($joinClauses as $joinTableColumn => $sourceColumn) {
             if ($joinSql != '') $joinSql .= ' AND ';
 
-            if ($this->_class->containsForeignIdentifier && !isset($this->_class->fieldNames[$sourceColumn])) {
+            if ($this->_class->containsForeignIdentifier && ! isset($this->_class->fieldNames[$sourceColumn])) {
                 $quotedColumn = $sourceColumn; // join columns cannot be quoted
             } else {
                 $quotedColumn = $this->_class->getQuotedColumnName($this->_class->fieldNames[$sourceColumn], $this->_platform);
             }
 
-            $joinSql .= $this->_getSQLTableAlias($this->_class->name) .
-                    '.' . $quotedColumn . ' = '
-                    . $joinTableName . '.' . $joinTableColumn;
+            $joinSql .= $this->_getSQLTableAlias($this->_class->name) . '.' . $quotedColumn . ' = '
+                      . $joinTableName . '.' . $joinTableColumn;
         }
 
-        return " INNER JOIN $joinTableName ON $joinSql";
+        return ' INNER JOIN ' . $joinTableName . ' ON ' . $joinSql;
     }
 
     /**
      * Gets the INSERT SQL used by the persister to persist a new entity.
-     * 
+     *
      * @return string
      */
     protected function _getInsertSQL()
@@ -1051,21 +1129,36 @@ protected function _getInsertSQL()
         if ($this->_insertSql === null) {
             $insertSql = '';
             $columns = $this->_getInsertColumnList();
+
             if (empty($columns)) {
                 $insertSql = $this->_platform->getEmptyIdentityInsertSQL(
-                        $this->_class->getQuotedTableName($this->_platform),
-                        $this->_class->getQuotedColumnName($this->_class->identifier[0], $this->_platform)
+                    $this->_class->getQuotedTableName($this->_platform),
+                    $this->_class->getQuotedColumnName($this->_class->identifier[0], $this->_platform)
                 );
             } else {
                 $columns = array_unique($columns);
-                $values = array_fill(0, count($columns), '?');
+
+                $values = array();
+                foreach ($columns AS $column) {
+                    $placeholder = '?';
+
+                    if (isset($this->_columnTypes[$column]) &&
+                        isset($this->_class->fieldNames[$column]) &&
+                        isset($this->_class->fieldMappings[$this->_class->fieldNames[$column]]['requireSQLConversion'])) {
+                        $type = Type::getType($this->_columnTypes[$column]);
+                        $placeholder = $type->convertToDatabaseValueSQL('?', $this->_platform);
+                    }
+
+                    $values[] = $placeholder;
+                }
 
                 $insertSql = 'INSERT INTO ' . $this->_class->getQuotedTableName($this->_platform)
-                        . ' (' . implode(', ', $columns) . ') '
-                        . 'VALUES (' . implode(', ', $values) . ')';
+                        . ' (' . implode(', ', $columns) . ') VALUES (' . implode(', ', $values) . ')';
             }
+
             $this->_insertSql = $insertSql;
         }
+
         return $this->_insertSql;
     }
 
@@ -1080,20 +1173,23 @@ protected function _getInsertSQL()
     protected function _getInsertColumnList()
     {
         $columns = array();
+
         foreach ($this->_class->reflFields as $name => $field) {
             if ($this->_class->isVersioned && $this->_class->versionField == $name) {
                 continue;
             }
+
             if (isset($this->_class->associationMappings[$name])) {
                 $assoc = $this->_class->associationMappings[$name];
+
                 if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
                     foreach ($assoc['targetToSourceKeyColumns'] as $sourceCol) {
                         $columns[] = $sourceCol;
                     }
                 }
-            } else if ($this->_class->generatorType != ClassMetadata::GENERATOR_TYPE_IDENTITY ||
-                    $this->_class->identifier[0] != $name) {
+            } else if ($this->_class->generatorType != ClassMetadata::GENERATOR_TYPE_IDENTITY || $this->_class->identifier[0] != $name) {
                 $columns[] = $this->_class->getQuotedColumnName($name, $this->_platform);
+                $this->_columnTypes[$name] = $this->_class->fieldMappings[$name]['type'];
             }
         }
 
@@ -1110,17 +1206,23 @@ protected function _getInsertColumnList()
      */
     protected function _getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
     {
-        $columnName = $class->columnNames[$field];
-        $sql = $this->_getSQLTableAlias($class->name, $alias == 'r' ? '' : $alias) . '.' . $class->getQuotedColumnName($field, $this->_platform);
-        $columnAlias = $this->_platform->getSQLResultCasing($columnName . $this->_sqlAliasCounter++);
+        $sql = $this->_getSQLTableAlias($class->name, $alias == 'r' ? '' : $alias)
+             . '.' . $class->getQuotedColumnName($field, $this->_platform);
+        $columnAlias = $this->getSQLColumnAlias($class->columnNames[$field]);
+
         $this->_rsm->addFieldResult($alias, $columnAlias, $field);
 
-        return "$sql AS $columnAlias";
+        if (isset($class->fieldMappings[$field]['requireSQLConversion'])) {
+            $type = Type::getType($class->getTypeOfField($field));
+            $sql = $type->convertToPHPValueSQL($sql, $this->_platform);
+        }
+
+        return $sql . ' AS ' . $columnAlias;
     }
 
     /**
      * Gets the SQL table alias for the given class name.
-     * 
+     *
      * @param string $className
      * @return string The SQL table alias.
      * @todo Reconsider. Binding table aliases to class names is not such a good idea.
@@ -1128,15 +1230,17 @@ protected function _getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r
     protected function _getSQLTableAlias($className, $assocName = '')
     {
         if ($assocName) {
-            $className .= '#'.$assocName;
+            $className .= '#' . $assocName;
         }
-        
+
         if (isset($this->_sqlTableAliases[$className])) {
             return $this->_sqlTableAliases[$className];
         }
+
         $tableAlias = 't' . $this->_sqlAliasCounter++;
 
         $this->_sqlTableAliases[$className] = $tableAlias;
+
         return $tableAlias;
     }
 
@@ -1160,7 +1264,9 @@ public function lock(array $criteria, $lockMode)
         $sql = 'SELECT 1 '
              . $this->_platform->appendLockHint($this->getLockTablesSql(), $lockMode)
              . ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ' . $lockSql;
+
         list($params, $types) = $this->expandParameters($criteria);
+
         $stmt = $this->_conn->executeQuery($sql, $params, $types);
     }
 
@@ -1172,7 +1278,7 @@ public function lock(array $criteria, $lockMode)
     protected function getLockTablesSql()
     {
         return 'FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' '
-                . $this->_getSQLTableAlias($this->_class->name);
+             . $this->_getSQLTableAlias($this->_class->name);
     }
 
     /**
@@ -1189,38 +1295,44 @@ protected function getLockTablesSql()
     protected function _getSelectConditionSQL(array $criteria, $assoc = null)
     {
         $conditionSql = '';
+
         foreach ($criteria as $field => $value) {
             $conditionSql .= $conditionSql ? ' AND ' : '';
 
+            $placeholder = '?';
+
             if (isset($this->_class->columnNames[$field])) {
-                if (isset($this->_class->fieldMappings[$field]['inherited'])) {
-                    $conditionSql .= $this->_getSQLTableAlias($this->_class->fieldMappings[$field]['inherited']) . '.';
-                } else {
-                    $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.';
+                $className = (isset($this->_class->fieldMappings[$field]['inherited']))
+                    ? $this->_class->fieldMappings[$field]['inherited']
+                    : $this->_class->name;
+
+                $conditionSql .= $this->_getSQLTableAlias($className) . '.' . $this->_class->getQuotedColumnName($field, $this->_platform);
+
+                if (isset($this->_class->fieldMappings[$field]['requireSQLConversion'])) {
+                    $type = Type::getType($this->_class->getTypeOfField($field));
+                    $placeholder = $type->convertToDatabaseValueSQL($placeholder, $this->_platform);
                 }
-                $conditionSql .= $this->_class->getQuotedColumnName($field, $this->_platform);
             } else if (isset($this->_class->associationMappings[$field])) {
-                if (!$this->_class->associationMappings[$field]['isOwningSide']) {
+                if ( ! $this->_class->associationMappings[$field]['isOwningSide']) {
                     throw ORMException::invalidFindByInverseAssociation($this->_class->name, $field);
                 }
 
-                if (isset($this->_class->associationMappings[$field]['inherited'])) {
-                    $conditionSql .= $this->_getSQLTableAlias($this->_class->associationMappings[$field]['inherited']) . '.';
-                } else {
-                    $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.';
-                }
+                $className = (isset($this->_class->associationMappings[$field]['inherited']))
+                    ? $this->_class->associationMappings[$field]['inherited']
+                    : $this->_class->name;
 
-                $conditionSql .= $this->_class->associationMappings[$field]['joinColumns'][0]['name'];
+                $conditionSql .= $this->_getSQLTableAlias($className) . '.' . $this->_class->associationMappings[$field]['joinColumns'][0]['name'];
             } else if ($assoc !== null && strpos($field, " ") === false && strpos($field, "(") === false) {
                 // very careless developers could potentially open up this normally hidden api for userland attacks,
                 // therefore checking for spaces and function calls which are not allowed.
-                
+
                 // found a join column condition, not really a "field"
                 $conditionSql .= $field;
             } else {
                 throw ORMException::unrecognizedField($field);
             }
-            $conditionSql .= (is_array($value)) ? ' IN (?)' : (($value === null) ? ' IS NULL' : ' = ?');
+
+            $conditionSql .= (is_array($value)) ? ' IN (?)' : (($value === null) ? ' IS NULL' : ' = ' . $placeholder);
         }
         return $conditionSql;
     }
@@ -1237,6 +1349,7 @@ protected function _getSelectConditionSQL(array $criteria, $assoc = null)
     public function getOneToManyCollection(array $assoc, $sourceEntity, $offset = null, $limit = null)
     {
         $stmt = $this->getOneToManyStatement($assoc, $sourceEntity, $offset, $limit);
+
         return $this->loadArrayFromStatement($assoc, $stmt);
     }
 
@@ -1252,7 +1365,8 @@ public function getOneToManyCollection(array $assoc, $sourceEntity, $offset = nu
     public function loadOneToManyCollection(array $assoc, $sourceEntity, PersistentCollection $coll)
     {
         $stmt = $this->getOneToManyStatement($assoc, $sourceEntity);
-        $this->loadCollectionFromStatement($assoc, $stmt, $coll);
+
+        return $this->loadCollectionFromStatement($assoc, $stmt, $coll);
     }
 
     /**
@@ -1262,7 +1376,7 @@ public function loadOneToManyCollection(array $assoc, $sourceEntity, PersistentC
      * @param object $sourceEntity
      * @param int|null $offset
      * @param int|null $limit
-     * @return Doctrine\DBAL\Statement
+     * @return \Doctrine\DBAL\Statement
      */
     private function getOneToManyStatement(array $assoc, $sourceEntity, $offset = null, $limit = null)
     {
@@ -1270,18 +1384,18 @@ private function getOneToManyStatement(array $assoc, $sourceEntity, $offset = nu
         $owningAssoc = $this->_class->associationMappings[$assoc['mappedBy']];
         $sourceClass = $this->_em->getClassMetadata($assoc['sourceEntity']);
 
-        $tableAlias = isset($owningAssoc['inherited']) ?
-                    $this->_getSQLTableAlias($owningAssoc['inherited'])
-                    : $this->_getSQLTableAlias($this->_class->name);
+        $tableAlias = $this->_getSQLTableAlias(isset($owningAssoc['inherited']) ? $owningAssoc['inherited'] : $this->_class->name);
 
         foreach ($owningAssoc['targetToSourceKeyColumns'] as $sourceKeyColumn => $targetKeyColumn) {
             if ($sourceClass->containsForeignIdentifier) {
                 $field = $sourceClass->getFieldForColumn($sourceKeyColumn);
                 $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
+
                 if (isset($sourceClass->associationMappings[$field])) {
                     $value = $this->_em->getUnitOfWork()->getEntityIdentifier($value);
-                    $value = $value[$this->_em->getClassMetadata($assoc['targetEntity'])->identifier[0]];
+                    $value = $value[$this->_em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
                 }
+
                 $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
             } else {
                 $criteria[$tableAlias . "." . $targetKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity);
@@ -1309,18 +1423,96 @@ private function expandParameters($criteria)
                 continue; // skip null values.
             }
 
-            $type = null;
-            if (isset($this->_class->fieldMappings[$field])) {
-                $type = Type::getType($this->_class->fieldMappings[$field]['type'])->getBindingType();
+            $types[]  = $this->getType($field, $value);
+            $params[] = $this->getValue($value);
+        }
+
+        return array($params, $types);
+    }
+
+    /**
+     * Infer field type to be used by parameter type casting.
+     *
+     * @param string $field
+     * @param mixed $value
+     * @return integer
+     */
+    private function getType($field, $value)
+    {
+        switch (true) {
+            case (isset($this->_class->fieldMappings[$field])):
+                $type = $this->_class->fieldMappings[$field]['type'];
+                break;
+
+            case (isset($this->_class->associationMappings[$field])):
+                $assoc = $this->_class->associationMappings[$field];
+
+                if (count($assoc['sourceToTargetKeyColumns']) > 1) {
+                    throw Query\QueryException::associationPathCompositeKeyNotSupported();
+                }
+
+                $targetClass  = $this->_em->getClassMetadata($assoc['targetEntity']);
+                $targetColumn = $assoc['joinColumns'][0]['referencedColumnName'];
+                $type         = null;
+
+                if (isset($targetClass->fieldNames[$targetColumn])) {
+                    $type = $targetClass->fieldMappings[$targetClass->fieldNames[$targetColumn]]['type'];
+                }
+
+                break;
+
+            default:
+                $type = null;
+        }
+        if (is_array($value)) {
+            $type = Type::getType( $type )->getBindingType();
+            $type += Connection::ARRAY_PARAM_OFFSET;
+        }
+
+        return $type;
+    }
+
+    /**
+     * Retrieve parameter value
+     *
+     * @param mixed $value
+     * @return mixed
+     */
+    private function getValue($value)
+    {
+        if (is_array($value)) {
+            $newValue = array();
+
+            foreach ($value as $itemValue) {
+                $newValue[] = $this->getIndividualValue($itemValue);
             }
-            if (is_array($value)) {
-                $type += Connection::ARRAY_PARAM_OFFSET;
+
+            return $newValue;
+        }
+
+        return $this->getIndividualValue($value);
+    }
+
+    /**
+     * Retrieve an invidiual parameter value
+     *
+     * @param mixed $value
+     * @return mixed
+     */
+    private function getIndividualValue($value)
+    {
+        if (is_object($value) && $this->_em->getMetadataFactory()->hasMetadataFor(get_class($value))) {
+            if ($this->_em->getUnitOfWork()->getEntityState($value) === UnitOfWork::STATE_MANAGED) {
+                $idValues = $this->_em->getUnitOfWork()->getEntityIdentifier($value);
+            } else {
+                $class = $this->_em->getClassMetadata(get_class($value));
+                $idValues = $class->getIdentifierValues($value);
             }
-            
-            $params[] = $value;
-            $types[] = $type;
+
+            $value = $idValues[key($idValues)];
         }
-        return array($params, $types);
+
+        return $value;
     }
 
     /**
@@ -1332,14 +1524,78 @@ private function expandParameters($criteria)
     public function exists($entity, array $extraConditions = array())
     {
         $criteria = $this->_class->getIdentifierValues($entity);
+
         if ($extraConditions) {
             $criteria = array_merge($criteria, $extraConditions);
         }
 
-        $sql = 'SELECT 1 FROM ' . $this->_class->getQuotedTableName($this->_platform)
-                . ' ' . $this->_getSQLTableAlias($this->_class->name)
-                . ' WHERE ' . $this->_getSelectConditionSQL($criteria);
+        $alias = $this->_getSQLTableAlias($this->_class->name);
+
+        $sql = 'SELECT 1 '
+             . $this->getLockTablesSql()
+             . ' WHERE ' . $this->_getSelectConditionSQL($criteria);
+
+        if ($filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) {
+            $sql .= ' AND ' . $filterSql;
+        }
+
+        list($params, $types) = $this->expandParameters($criteria);
+
+        return (bool) $this->_conn->fetchColumn($sql, $params);
+    }
+
+    /**
+     * Generates the appropriate join SQL for the given join column.
+     *
+     * @param array $joinColumns The join columns definition of an association.
+     * @return string LEFT JOIN if one of the columns is nullable, INNER JOIN otherwise.
+     */
+    protected function getJoinSQLForJoinColumns($joinColumns)
+    {
+        // if one of the join columns is nullable, return left join
+        foreach ($joinColumns as $joinColumn) {
+             if (!isset($joinColumn['nullable']) || $joinColumn['nullable']) {
+                 return 'LEFT JOIN';
+             }
+        }
+
+        return 'INNER JOIN';
+    }
+
+    /**
+     * Gets an SQL column alias for a column name.
+     *
+     * @param string $columnName
+     * @return string
+     */
+    public function getSQLColumnAlias($columnName)
+    {
+        // Trim the column alias to the maximum identifier length of the platform.
+        // If the alias is to long, characters are cut off from the beginning.
+        return $this->_platform->getSQLResultCasing(
+            substr($columnName . $this->_sqlAliasCounter++, -$this->_platform->getMaxIdentifierLength())
+        );
+    }
+
+    /**
+     * Generates the filter SQL for a given entity and table alias.
+     *
+     * @param ClassMetadata $targetEntity Metadata of the target entity.
+     * @param string $targetTableAlias The table alias of the joined/selected table.
+     *
+     * @return string The SQL query part to add to a query.
+     */
+    protected function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
+    {
+        $filterClauses = array();
+
+        foreach ($this->_em->getFilters()->getEnabledFilters() as $filter) {
+            if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
+                $filterClauses[] = '(' . $filterExpr . ')';
+            }
+        }
 
-        return (bool) $this->_conn->fetchColumn($sql, array_values($criteria));
+        $sql = implode(' AND ', $filterClauses);
+        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
     }
 }
diff --git a/src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
index 715495b01d..350ced98bf 100644
--- a/src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
@@ -22,6 +22,7 @@
 use Doctrine\ORM\ORMException,
     Doctrine\ORM\Mapping\ClassMetadata,
     Doctrine\DBAL\LockMode,
+    Doctrine\DBAL\Types\Type,
     Doctrine\ORM\Query\ResultSetMapping;
 
 /**
@@ -30,6 +31,7 @@
  *
  * @author Roman Borschel 
  * @author Benjamin Eberlei 
+ * @author Alexander 
  * @since 2.0
  * @see http://martinfowler.com/eaaCatalog/classTableInheritance.html
  */
@@ -45,7 +47,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
 
     /**
      * Map of table to quoted table names.
-     * 
+     *
      * @var array
      */
     private $_quotedTableMap = array();
@@ -55,25 +57,27 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
      */
     protected function _getDiscriminatorColumnTableName()
     {
-        if ($this->_class->name == $this->_class->rootEntityName) {
-            return $this->_class->table['name'];
-        } else {
-            return $this->_em->getClassMetadata($this->_class->rootEntityName)->table['name'];
-        }
+        $class = ($this->_class->name !== $this->_class->rootEntityName)
+            ? $this->_em->getClassMetadata($this->_class->rootEntityName)
+            : $this->_class;
+
+        return $class->getTableName();
     }
 
     /**
      * This function finds the ClassMetadata instance in an inheritance hierarchy
      * that is responsible for enabling versioning.
      *
-     * @return Doctrine\ORM\Mapping\ClassMetadata
+     * @return \Doctrine\ORM\Mapping\ClassMetadata
      */
     private function _getVersionedClassMetadata()
     {
         if (isset($this->_class->fieldMappings[$this->_class->versionField]['inherited'])) {
             $definingClassName = $this->_class->fieldMappings[$this->_class->versionField]['inherited'];
+
             return $this->_em->getClassMetadata($definingClassName);
         }
+
         return $this->_class;
     }
 
@@ -86,19 +90,24 @@ private function _getVersionedClassMetadata()
      */
     public function getOwningTable($fieldName)
     {
-        if (!isset($this->_owningTableMap[$fieldName])) {
-            if (isset($this->_class->associationMappings[$fieldName]['inherited'])) {
-                $cm = $this->_em->getClassMetadata($this->_class->associationMappings[$fieldName]['inherited']);
-            } else if (isset($this->_class->fieldMappings[$fieldName]['inherited'])) {
-                $cm = $this->_em->getClassMetadata($this->_class->fieldMappings[$fieldName]['inherited']);
-            } else {
-                $cm = $this->_class;
-            }
-            $this->_owningTableMap[$fieldName] = $cm->table['name'];
-            $this->_quotedTableMap[$cm->table['name']] = $cm->getQuotedTableName($this->_platform);
+        if (isset($this->_owningTableMap[$fieldName])) {
+            return $this->_owningTableMap[$fieldName];
         }
 
-        return $this->_owningTableMap[$fieldName];
+        if (isset($this->_class->associationMappings[$fieldName]['inherited'])) {
+            $cm = $this->_em->getClassMetadata($this->_class->associationMappings[$fieldName]['inherited']);
+        } else if (isset($this->_class->fieldMappings[$fieldName]['inherited'])) {
+            $cm = $this->_em->getClassMetadata($this->_class->fieldMappings[$fieldName]['inherited']);
+        } else {
+            $cm = $this->_class;
+        }
+
+        $tableName = $cm->getTableName();
+
+        $this->_owningTableMap[$fieldName] = $tableName;
+        $this->_quotedTableMap[$tableName] = $cm->getQuotedTableName($this->_platform);
+
+        return $tableName;
     }
 
     /**
@@ -115,20 +124,22 @@ public function executeInserts()
         $isPostInsertId = $idGen->isPostInsertGenerator();
 
         // Prepare statement for the root table
-        $rootClass = $this->_class->name == $this->_class->rootEntityName ?
-                $this->_class : $this->_em->getClassMetadata($this->_class->rootEntityName);
+        $rootClass     = ($this->_class->name !== $this->_class->rootEntityName) ? $this->_em->getClassMetadata($this->_class->rootEntityName) : $this->_class;
         $rootPersister = $this->_em->getUnitOfWork()->getEntityPersister($rootClass->name);
-        $rootTableName = $rootClass->table['name'];
+        $rootTableName = $rootClass->getTableName();
         $rootTableStmt = $this->_conn->prepare($rootPersister->_getInsertSQL());
 
         // Prepare statements for sub tables.
         $subTableStmts = array();
+
         if ($rootClass !== $this->_class) {
-            $subTableStmts[$this->_class->table['name']] = $this->_conn->prepare($this->_getInsertSQL());
+            $subTableStmts[$this->_class->getTableName()] = $this->_conn->prepare($this->_getInsertSQL());
         }
+
         foreach ($this->_class->parentClasses as $parentClassName) {
             $parentClass = $this->_em->getClassMetadata($parentClassName);
-            $parentTableName = $parentClass->table['name'];
+            $parentTableName = $parentClass->getTableName();
+
             if ($parentClass !== $rootClass) {
                 $parentPersister = $this->_em->getUnitOfWork()->getEntityPersister($parentClassName);
                 $subTableStmts[$parentTableName] = $this->_conn->prepare($parentPersister->_getInsertSQL());
@@ -143,9 +154,11 @@ public function executeInserts()
 
             // Execute insert on root table
             $paramIndex = 1;
+
             foreach ($insertData[$rootTableName] as $columnName => $value) {
                 $rootTableStmt->bindValue($paramIndex++, $value, $this->_columnTypes[$columnName]);
             }
+
             $rootTableStmt->execute();
 
             if ($isPostInsertId) {
@@ -160,17 +173,23 @@ public function executeInserts()
             foreach ($subTableStmts as $tableName => $stmt) {
                 $data = isset($insertData[$tableName]) ? $insertData[$tableName] : array();
                 $paramIndex = 1;
-                foreach ((array) $id as $idVal) {
-                    $stmt->bindValue($paramIndex++, $idVal);
+
+                foreach ((array) $id as $idName => $idVal) {
+                    $type = isset($this->_columnTypes[$idName]) ? $this->_columnTypes[$idName] : Type::STRING;
+
+                    $stmt->bindValue($paramIndex++, $idVal, $type);
                 }
+
                 foreach ($data as $columnName => $value) {
                     $stmt->bindValue($paramIndex++, $value, $this->_columnTypes[$columnName]);
                 }
+
                 $stmt->execute();
             }
         }
 
         $rootTableStmt->closeCursor();
+
         foreach ($subTableStmts as $stmt) {
             $stmt->closeCursor();
         }
@@ -191,15 +210,18 @@ public function update($entity)
     {
         $updateData = $this->_prepareUpdateData($entity);
 
-        if ($isVersioned = $this->_class->isVersioned) {
+        if (($isVersioned = $this->_class->isVersioned) != false) {
             $versionedClass = $this->_getVersionedClassMetadata();
-            $versionedTable = $versionedClass->table['name'];
+            $versionedTable = $versionedClass->getTableName();
         }
 
         if ($updateData) {
             foreach ($updateData as $tableName => $data) {
-                $this->_updateTable($entity, $this->_quotedTableMap[$tableName], $data, $isVersioned && $versionedTable == $tableName);
+                $this->_updateTable(
+                    $entity, $this->_quotedTableMap[$tableName], $data, $isVersioned && $versionedTable == $tableName
+                );
             }
+
             // Make sure the table with the version column is updated even if no columns on that
             // table were affected.
             if ($isVersioned && ! isset($updateData[$versionedTable])) {
@@ -224,13 +246,17 @@ public function delete($entity)
         // If the database platform supports FKs, just
         // delete the row from the root table. Cascades do the rest.
         if ($this->_platform->supportsForeignKeyConstraints()) {
-            $this->_conn->delete($this->_em->getClassMetadata($this->_class->rootEntityName)
-                    ->getQuotedTableName($this->_platform), $id);
+            $this->_conn->delete(
+                $this->_em->getClassMetadata($this->_class->rootEntityName)->getQuotedTableName($this->_platform), $id
+            );
         } else {
             // Delete from all tables individually, starting from this class' table up to the root table.
             $this->_conn->delete($this->_class->getQuotedTableName($this->_platform), $id);
+
             foreach ($this->_class->parentClasses as $parentClass) {
-                $this->_conn->delete($this->_em->getClassMetadata($parentClass)->getQuotedTableName($this->_platform), $id);
+                $this->_conn->delete(
+                    $this->_em->getClassMetadata($parentClass)->getQuotedTableName($this->_platform), $id
+                );
             }
         }
     }
@@ -245,29 +271,33 @@ protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMo
 
         // Create the column list fragment only once
         if ($this->_selectColumnListSql === null) {
-            
+
             $this->_rsm = new ResultSetMapping();
             $this->_rsm->addEntityResult($this->_class->name, 'r');
-            
+
             // Add regular columns
             $columnList = '';
+
             foreach ($this->_class->fieldMappings as $fieldName => $mapping) {
                 if ($columnList != '') $columnList .= ', ';
-                $columnList .= $this->_getSelectColumnSQL($fieldName,
-                        isset($mapping['inherited']) ?
-                        $this->_em->getClassMetadata($mapping['inherited']) :
-                        $this->_class);
+
+                $columnList .= $this->_getSelectColumnSQL(
+                    $fieldName,
+                    isset($mapping['inherited']) ? $this->_em->getClassMetadata($mapping['inherited']) : $this->_class
+                );
             }
 
             // Add foreign key columns
             foreach ($this->_class->associationMappings as $assoc2) {
                 if ($assoc2['isOwningSide'] && $assoc2['type'] & ClassMetadata::TO_ONE) {
-                    $tableAlias = isset($assoc2['inherited']) ?
-                            $this->_getSQLTableAlias($assoc2['inherited'])
-                            : $baseTableAlias;
+                    $tableAlias = isset($assoc2['inherited']) ? $this->_getSQLTableAlias($assoc2['inherited']) : $baseTableAlias;
+
                     foreach ($assoc2['targetToSourceKeyColumns'] as $srcColumn) {
                         if ($columnList != '') $columnList .= ', ';
-                        $columnList .= $this->getSelectJoinColumnSQL($tableAlias, $srcColumn,
+
+                        $columnList .= $this->getSelectJoinColumnSQL(
+                            $tableAlias,
+                            $srcColumn,
                             isset($assoc2['inherited']) ? $assoc2['inherited'] : $this->_class->name
                         );
                     }
@@ -276,27 +306,27 @@ protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMo
 
             // Add discriminator column (DO NOT ALIAS, see AbstractEntityInheritancePersister#_processSQLResult).
             $discrColumn = $this->_class->discriminatorColumn['name'];
-            if ($this->_class->rootEntityName == $this->_class->name) {
-                $columnList .= ", $baseTableAlias.$discrColumn";
-            } else {
-                $columnList .= ', ' . $this->_getSQLTableAlias($this->_class->rootEntityName)
-                        . ".$discrColumn";
-            }
+            $tableAlias  = ($this->_class->rootEntityName == $this->_class->name) ? $baseTableAlias : $this->_getSQLTableAlias($this->_class->rootEntityName);
+            $columnList .= ', ' . $tableAlias . '.' . $discrColumn;
 
             $resultColumnName = $this->_platform->getSQLResultCasing($discrColumn);
+
             $this->_rsm->setDiscriminatorColumn('r', $resultColumnName);
             $this->_rsm->addMetaResult('r', $resultColumnName, $discrColumn);
         }
 
         // INNER JOIN parent tables
         $joinSql = '';
+
         foreach ($this->_class->parentClasses as $parentClassName) {
             $parentClass = $this->_em->getClassMetadata($parentClassName);
             $tableAlias = $this->_getSQLTableAlias($parentClassName);
             $joinSql .= ' INNER JOIN ' . $parentClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON ';
             $first = true;
+
             foreach ($idColumns as $idColumn) {
                 if ($first) $first = false; else $joinSql .= ' AND ';
+
                 $joinSql .= $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
             }
         }
@@ -309,19 +339,20 @@ protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMo
             if ($this->_selectColumnListSql === null) {
                 // Add subclass columns
                 foreach ($subClass->fieldMappings as $fieldName => $mapping) {
-                    if (isset($mapping['inherited'])) {
-                        continue;
-                    }
+                    if (isset($mapping['inherited'])) continue;
+
                     $columnList .= ', ' . $this->_getSelectColumnSQL($fieldName, $subClass);
                 }
 
                 // Add join columns (foreign keys)
                 foreach ($subClass->associationMappings as $assoc2) {
-                    if ($assoc2['isOwningSide'] && $assoc2['type'] & ClassMetadata::TO_ONE
-                            && ! isset($assoc2['inherited'])) {
+                    if ($assoc2['isOwningSide'] && $assoc2['type'] & ClassMetadata::TO_ONE && ! isset($assoc2['inherited'])) {
                         foreach ($assoc2['targetToSourceKeyColumns'] as $srcColumn) {
                             if ($columnList != '') $columnList .= ', ';
-                            $columnList .= $this->getSelectJoinColumnSQL($tableAlias, $srcColumn,
+
+                            $columnList .= $this->getSelectJoinColumnSQL(
+                                $tableAlias,
+                                $srcColumn,
                                 isset($assoc2['inherited']) ? $assoc2['inherited'] : $subClass->name
                             );
                         }
@@ -332,17 +363,27 @@ protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMo
             // Add LEFT JOIN
             $joinSql .= ' LEFT JOIN ' . $subClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON ';
             $first = true;
+
             foreach ($idColumns as $idColumn) {
                 if ($first) $first = false; else $joinSql .= ' AND ';
+
                 $joinSql .= $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
             }
         }
 
-        $joinSql .= $assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY ?
-                $this->_getSelectManyToManyJoinSQL($assoc) : '';
+        $joinSql .= ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) ? $this->_getSelectManyToManyJoinSQL($assoc) : '';
 
         $conditionSql = $this->_getSelectConditionSQL($criteria, $assoc);
 
+        // If the current class in the root entity, add the filters
+        if ($filterSql = $this->generateFilterConditionSQL($this->_em->getClassMetadata($this->_class->rootEntityName), $this->_getSQLTableAlias($this->_class->rootEntityName))) {
+            if ($conditionSql) {
+                $conditionSql .= ' AND ';
+            }
+
+            $conditionSql .= $filterSql;
+        }
+
         $orderBy = ($assoc !== null && isset($assoc['orderBy'])) ? $assoc['orderBy'] : $orderBy;
         $orderBySql = $orderBy ? $this->_getOrderBySQL($orderBy, $baseTableAlias) : '';
 
@@ -351,6 +392,7 @@ protected function _getSelectEntitiesSQL(array $criteria, $assoc = null, $lockMo
         }
 
         $lockSql = '';
+
         if ($lockMode == LockMode::PESSIMISTIC_READ) {
             $lockSql = ' ' . $this->_platform->getReadLockSql();
         } else if ($lockMode == LockMode::PESSIMISTIC_WRITE) {
@@ -376,26 +418,29 @@ public function getLockTablesSql()
 
         // INNER JOIN parent tables
         $joinSql = '';
+
         foreach ($this->_class->parentClasses as $parentClassName) {
             $parentClass = $this->_em->getClassMetadata($parentClassName);
             $tableAlias = $this->_getSQLTableAlias($parentClassName);
             $joinSql .= ' INNER JOIN ' . $parentClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON ';
             $first = true;
+
             foreach ($idColumns as $idColumn) {
                 if ($first) $first = false; else $joinSql .= ' AND ';
+
                 $joinSql .= $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
             }
         }
 
         return 'FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' ' . $baseTableAlias . $joinSql;
     }
-    
+
     /* Ensure this method is never called. This persister overrides _getSelectEntitiesSQL directly. */
     protected function _getSelectColumnListSQL()
     {
         throw new \BadMethodCallException("Illegal invocation of ".__METHOD__.".");
     }
-    
+
     /** {@inheritdoc} */
     protected function _getInsertColumnList()
     {
@@ -438,4 +483,5 @@ protected function assignDefaultVersionValue($entity, $id)
         $value = $this->fetchVersionValue($this->_getVersionedClassMetadata(), $id);
         $this->_class->setFieldValue($entity, $this->_class->versionField, $value);
     }
+
 }
diff --git a/src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php b/src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php
index 6ca2b15a54..daef03774a 100644
--- a/src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php
@@ -21,14 +21,17 @@
 
 namespace Doctrine\ORM\Persisters;
 
-use Doctrine\ORM\PersistentCollection,
+use Doctrine\ORM\Mapping\ClassMetadata,
+    Doctrine\ORM\PersistentCollection,
     Doctrine\ORM\UnitOfWork;
 
 /**
  * Persister for many-to-many collections.
  *
- * @author Roman Borschel 
- * @since 2.0
+ * @author  Roman Borschel 
+ * @author  Guilherme Blanco 
+ * @author  Alexander 
+ * @since   2.0
  */
 class ManyToManyPersister extends AbstractCollectionPersister
 {
@@ -40,9 +43,10 @@ class ManyToManyPersister extends AbstractCollectionPersister
     protected function _getDeleteRowSQL(PersistentCollection $coll)
     {
         $mapping = $coll->getMapping();
-        $joinTable = $mapping['joinTable'];
-        $columns = $mapping['joinTableColumns'];
-        return 'DELETE FROM ' . $joinTable['name'] . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
+        $class   = $this->_em->getClassMetadata(get_class($coll->getOwner()));
+
+        return 'DELETE FROM ' . $class->getQuotedJoinTableName($mapping, $this->_conn->getDatabasePlatform())
+             . ' WHERE ' . implode(' = ? AND ', $mapping['joinTableColumns']) . ' = ?';
     }
 
     /**
@@ -75,10 +79,13 @@ protected function _getUpdateRowSQL(PersistentCollection $coll)
     protected function _getInsertRowSQL(PersistentCollection $coll)
     {
         $mapping = $coll->getMapping();
-        $joinTable = $mapping['joinTable'];
         $columns = $mapping['joinTableColumns'];
-        return 'INSERT INTO ' . $joinTable['name'] . ' (' . implode(', ', $columns) . ')'
-                . ' VALUES (' . implode(', ', array_fill(0, count($columns), '?')) . ')';
+        $class   = $this->_em->getClassMetadata(get_class($coll->getOwner()));
+
+        $joinTable = $class->getQuotedJoinTableName($mapping, $this->_conn->getDatabasePlatform());
+
+        return 'INSERT INTO ' . $joinTable . ' (' . implode(', ', $columns) . ')'
+             . ' VALUES (' . implode(', ', array_fill(0, count($columns), '?')) . ')';
     }
 
     /**
@@ -103,8 +110,8 @@ protected function _getInsertRowSQLParameters(PersistentCollection $coll, $eleme
      */
     private function _collectJoinTableColumnParameters(PersistentCollection $coll, $element)
     {
-        $params = array();
-        $mapping = $coll->getMapping();
+        $params      = array();
+        $mapping     = $coll->getMapping();
         $isComposite = count($mapping['joinTableColumns']) > 2;
 
         $identifier1 = $this->_uow->getEntityIdentifier($coll->getOwner());
@@ -116,27 +123,21 @@ private function _collectJoinTableColumnParameters(PersistentCollection $coll, $
         }
 
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
-            if (isset($mapping['relationToSourceKeyColumns'][$joinTableColumn])) {
-                if ($isComposite) {
-                    if ($class1->containsForeignIdentifier) {
-                        $params[] = $identifier1[$class1->getFieldForColumn($mapping['relationToSourceKeyColumns'][$joinTableColumn])];
-                    } else {
-                        $params[] = $identifier1[$class1->fieldNames[$mapping['relationToSourceKeyColumns'][$joinTableColumn]]];
-                    }
-                } else {
-                    $params[] = array_pop($identifier1);
-                }
-            } else {
-                if ($isComposite) {
-                    if ($class2->containsForeignIdentifier) {
-                        $params[] = $identifier2[$class2->getFieldForColumn($mapping['relationToTargetKeyColumns'][$joinTableColumn])];
-                    } else {
-                        $params[] = $identifier2[$class2->fieldNames[$mapping['relationToTargetKeyColumns'][$joinTableColumn]]];
-                    }
-                } else {
-                    $params[] = array_pop($identifier2);
-                }
+            $isRelationToSource = isset($mapping['relationToSourceKeyColumns'][$joinTableColumn]);
+
+            if ( ! $isComposite) {
+                $params[] = $isRelationToSource ? array_pop($identifier1) : array_pop($identifier2);
+
+                continue;
             }
+
+            if ($isRelationToSource) {
+                $params[] = $identifier1[$class1->getFieldForColumn($mapping['relationToSourceKeyColumns'][$joinTableColumn])];
+
+                continue;
+            }
+
+            $params[] = $identifier2[$class2->getFieldForColumn($mapping['relationToTargetKeyColumns'][$joinTableColumn])];
         }
 
         return $params;
@@ -149,14 +150,11 @@ private function _collectJoinTableColumnParameters(PersistentCollection $coll, $
      */
     protected function _getDeleteSQL(PersistentCollection $coll)
     {
+        $class   = $this->_em->getClassMetadata(get_class($coll->getOwner()));
         $mapping = $coll->getMapping();
-        $joinTable = $mapping['joinTable'];
-        $whereClause = '';
-        foreach ($mapping['relationToSourceKeyColumns'] as $relationColumn => $srcColumn) {
-            if ($whereClause !== '') $whereClause .= ' AND ';
-            $whereClause .= "$relationColumn = ?";
-        }
-        return 'DELETE FROM ' . $joinTable['name'] . ' WHERE ' . $whereClause;
+
+        return 'DELETE FROM ' . $class->getQuotedJoinTableName($mapping, $this->_conn->getDatabasePlatform())
+             . ' WHERE ' . implode(' = ? AND ', array_keys($mapping['relationToSourceKeyColumns'])) . ' = ?';
     }
 
     /**
@@ -168,16 +166,22 @@ protected function _getDeleteSQL(PersistentCollection $coll)
      */
     protected function _getDeleteSQLParameters(PersistentCollection $coll)
     {
-        $params = array();
-        $mapping = $coll->getMapping();
         $identifier = $this->_uow->getEntityIdentifier($coll->getOwner());
-        if (count($mapping['relationToSourceKeyColumns']) > 1) {
-            $sourceClass = $this->_em->getClassMetadata(get_class($mapping->getOwner()));
-            foreach ($mapping['relationToSourceKeyColumns'] as $relColumn => $srcColumn) {
-                $params[] = $identifier[$sourceClass->fieldNames[$srcColumn]];
-            }
-        } else {
-           $params[] = array_pop($identifier);
+        $mapping    = $coll->getMapping();
+        $params     = array();
+
+        // Optimization for single column identifier
+        if (count($mapping['relationToSourceKeyColumns']) === 1) {
+            $params[] = array_pop($identifier);
+
+            return $params;
+        }
+
+        // Composite identifier
+        $sourceClass = $this->_em->getClassMetadata(get_class($mapping->getOwner()));
+
+        foreach ($mapping['relationToSourceKeyColumns'] as $relColumn => $srcColumn) {
+            $params[] = $identifier[$sourceClass->fieldNames[$srcColumn]];
         }
 
         return $params;
@@ -188,36 +192,41 @@ protected function _getDeleteSQLParameters(PersistentCollection $coll)
      */
     public function count(PersistentCollection $coll)
     {
-        $params = array();
-        $mapping = $coll->getMapping();
-        $class = $this->_em->getClassMetadata($mapping['sourceEntity']);
-        $id = $this->_em->getUnitOfWork()->getEntityIdentifier($coll->getOwner());
+        $mapping = $filterMapping = $coll->getMapping();
+        $class   = $this->_em->getClassMetadata($mapping['sourceEntity']);
+        $id      = $this->_em->getUnitOfWork()->getEntityIdentifier($coll->getOwner());
 
         if ($mapping['isOwningSide']) {
-            $joinTable = $mapping['joinTable'];
             $joinColumns = $mapping['relationToSourceKeyColumns'];
         } else {
             $mapping = $this->_em->getClassMetadata($mapping['targetEntity'])->associationMappings[$mapping['mappedBy']];
-            $joinTable = $mapping['joinTable'];
             $joinColumns = $mapping['relationToTargetKeyColumns'];
         }
 
-        $whereClause = '';
+        $whereClauses = array();
+        $params  = array();
+
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
-            if (isset($joinColumns[$joinTableColumn])) {
-                if ($whereClause !== '') {
-                    $whereClause .= ' AND ';
-                }
-                $whereClause .= "$joinTableColumn = ?";
-
-                if ($class->containsForeignIdentifier) {
-                    $params[] = $id[$class->getFieldForColumn($joinColumns[$joinTableColumn])];
-                } else {
-                    $params[] = $id[$class->fieldNames[$joinColumns[$joinTableColumn]]];
-                }
+            if ( ! isset($joinColumns[$joinTableColumn])) {
+                continue;
             }
+
+            $whereClauses[] = $joinTableColumn . ' = ?';
+
+            $params[] = ($class->containsForeignIdentifier)
+                ? $id[$class->getFieldForColumn($joinColumns[$joinTableColumn])]
+                : $id[$class->fieldNames[$joinColumns[$joinTableColumn]]];
         }
-        $sql = 'SELECT count(*) FROM ' . $joinTable['name'] . ' WHERE ' . $whereClause;
+
+        list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping);
+        if ($filterSql) {
+            $whereClauses[] = $filterSql;
+        }
+
+        $sql = 'SELECT COUNT(*)'
+            . ' FROM ' . $class->getQuotedJoinTableName($mapping, $this->_conn->getDatabasePlatform()) . ' t'
+            . $joinTargetEntitySQL
+            . ' WHERE ' . implode(' AND ', $whereClauses);
 
         return $this->_conn->fetchColumn($sql, $params);
     }
@@ -231,33 +240,84 @@ public function count(PersistentCollection $coll)
     public function slice(PersistentCollection $coll, $offset, $length = null)
     {
         $mapping = $coll->getMapping();
-        return $this->_em->getUnitOfWork()
-                  ->getEntityPersister($mapping['targetEntity'])
-                  ->getManyToManyCollection($mapping, $coll->getOwner(), $offset, $length);
+
+        return $this->_em->getUnitOfWork()->getEntityPersister($mapping['targetEntity'])->getManyToManyCollection($mapping, $coll->getOwner(), $offset, $length);
     }
 
     /**
      * @param PersistentCollection $coll
      * @param object $element
+     * @return boolean
      */
     public function contains(PersistentCollection $coll, $element)
     {
         $uow = $this->_em->getUnitOfWork();
 
+        // Shortcut for new entities
+        $entityState = $uow->getEntityState($element, UnitOfWork::STATE_NEW);
+
+        if ($entityState === UnitOfWork::STATE_NEW) {
+            return false;
+        }
+
+        // Entity is scheduled for inclusion
+        if ($entityState === UnitOfWork::STATE_MANAGED && $uow->isScheduledForInsert($element)) {
+            return false;
+        }
+
+        list($quotedJoinTable, $whereClauses, $params) = $this->getJoinTableRestrictions($coll, $element, true);
+
+        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
+
+        return (bool) $this->_conn->fetchColumn($sql, $params);
+    }
+
+    /**
+     * @param PersistentCollection $coll
+     * @param object $element
+     * @return boolean
+     */
+    public function removeElement(PersistentCollection $coll, $element)
+    {
+        $uow = $this->_em->getUnitOfWork();
+
         // shortcut for new entities
-        if ($uow->getEntityState($element, UnitOfWork::STATE_NEW) == UnitOfWork::STATE_NEW) {
+        $entityState = $uow->getEntityState($element, UnitOfWork::STATE_NEW);
+
+        if ($entityState === UnitOfWork::STATE_NEW) {
             return false;
         }
 
-        $params = array();
-        $mapping = $coll->getMapping();
+        // If Entity is scheduled for inclusion, it is not in this collection.
+        // We can assure that because it would have return true before on array check
+        if ($entityState === UnitOfWork::STATE_MANAGED && $uow->isScheduledForInsert($element)) {
+            return false;
+        }
+
+        list($quotedJoinTable, $whereClauses, $params) = $this->getJoinTableRestrictions($coll, $element, false);
 
-        if (!$mapping['isOwningSide']) {
+        $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
+
+        return (bool) $this->_conn->executeUpdate($sql, $params);
+    }
+
+    /**
+     * @param \Doctrine\ORM\PersistentCollection $coll
+     * @param object $element
+     * @param boolean $addFilters Whether the filter SQL should be included or not.
+     * @return array
+     */
+    private function getJoinTableRestrictions(PersistentCollection $coll, $element, $addFilters)
+    {
+        $uow     = $this->_em->getUnitOfWork();
+        $mapping = $filterMapping = $coll->getMapping();
+
+        if ( ! $mapping['isOwningSide']) {
             $sourceClass = $this->_em->getClassMetadata($mapping['targetEntity']);
             $targetClass = $this->_em->getClassMetadata($mapping['sourceEntity']);
             $sourceId = $uow->getEntityIdentifier($element);
             $targetId = $uow->getEntityIdentifier($coll->getOwner());
-            
+
             $mapping = $sourceClass->associationMappings[$mapping['mappedBy']];
         } else {
             $sourceClass = $this->_em->getClassMetadata($mapping['sourceEntity']);
@@ -265,36 +325,101 @@ public function contains(PersistentCollection $coll, $element)
             $sourceId = $uow->getEntityIdentifier($coll->getOwner());
             $targetId = $uow->getEntityIdentifier($element);
         }
-        $joinTable = $mapping['joinTable'];
 
-        $whereClause = '';
+        $quotedJoinTable = $sourceClass->getQuotedJoinTableName($mapping, $this->_conn->getDatabasePlatform());
+        $whereClauses    = array();
+        $params          = array();
+
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
+            $whereClauses[] = $joinTableColumn . ' = ?';
+
             if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) {
-                if ($whereClause !== '') {
-                    $whereClause .= ' AND ';
-                }
-                $whereClause .= "$joinTableColumn = ?";
-
-                if ($targetClass->containsForeignIdentifier) {
-                    $params[] = $targetId[$targetClass->getFieldForColumn($mapping['relationToTargetKeyColumns'][$joinTableColumn])];
-                } else {
-                    $params[] = $targetId[$targetClass->fieldNames[$mapping['relationToTargetKeyColumns'][$joinTableColumn]]];
-                }
-            } else if (isset($mapping['relationToSourceKeyColumns'][$joinTableColumn])) {
-                if ($whereClause !== '') {
-                    $whereClause .= ' AND ';
-                }
-                $whereClause .= "$joinTableColumn = ?";
-
-                if ($sourceClass->containsForeignIdentifier) {
-                    $params[] = $sourceId[$sourceClass->getFieldForColumn($mapping['relationToSourceKeyColumns'][$joinTableColumn])];
-                } else {
-                    $params[] = $sourceId[$sourceClass->fieldNames[$mapping['relationToSourceKeyColumns'][$joinTableColumn]]];
-                }
+                $params[] = ($targetClass->containsForeignIdentifier)
+                    ? $targetId[$targetClass->getFieldForColumn($mapping['relationToTargetKeyColumns'][$joinTableColumn])]
+                    : $targetId[$targetClass->fieldNames[$mapping['relationToTargetKeyColumns'][$joinTableColumn]]];
+                continue;
+            }
+
+            // relationToSourceKeyColumns
+            $params[] = ($sourceClass->containsForeignIdentifier)
+                ? $sourceId[$sourceClass->getFieldForColumn($mapping['relationToSourceKeyColumns'][$joinTableColumn])]
+                : $sourceId[$sourceClass->fieldNames[$mapping['relationToSourceKeyColumns'][$joinTableColumn]]];
+        }
+
+        if ($addFilters) {
+            list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping);
+            if ($filterSql) {
+                $quotedJoinTable .= ' t ' . $joinTargetEntitySQL;
+                $whereClauses[] = $filterSql;
+            }
+        }
+
+        return array($quotedJoinTable, $whereClauses, $params);
+    }
+
+    /**
+     * Generates the filter SQL for a given mapping.
+     *
+     * This method is not used for actually grabbing the related entities
+     * but when the extra-lazy collection methods are called on a filtered
+     * association. This is why besides the many to many table we also
+     * have to join in the actual entities table leading to additional
+     * JOIN.
+     *
+     * @param array $mapping Array containing mapping information.
+     *
+     * @return string The SQL query part to add to a query.
+     */
+    public function getFilterSql($mapping)
+    {
+        $targetClass = $this->_em->getClassMetadata($mapping['targetEntity']);
+
+        if ($mapping['isOwningSide']) {
+            $joinColumns = $mapping['relationToTargetKeyColumns'];
+        } else {
+            $mapping = $targetClass->associationMappings[$mapping['mappedBy']];
+            $joinColumns = $mapping['relationToSourceKeyColumns'];
+        }
+
+        $targetClass = $this->_em->getClassMetadata($targetClass->rootEntityName);
+
+        // A join is needed if there is filtering on the target entity
+        $joinTargetEntitySQL = '';
+        if ($filterSql = $this->generateFilterConditionSQL($targetClass, 'te')) {
+            $joinTargetEntitySQL = ' JOIN '
+                . $targetClass->getQuotedTableName($this->_conn->getDatabasePlatform()) . ' te'
+                . ' ON';
+
+            $joinTargetEntitySQLClauses = array();
+            foreach ($joinColumns as $joinTableColumn => $targetTableColumn) {
+                $joinTargetEntitySQLClauses[] = ' t.' . $joinTableColumn . ' = ' . 'te.' . $targetTableColumn;
+            }
+
+            $joinTargetEntitySQL .= implode(' AND ', $joinTargetEntitySQLClauses);
+        }
+
+        return array($joinTargetEntitySQL, $filterSql);
+    }
+
+    /**
+     * Generates the filter SQL for a given entity and table alias.
+     *
+     * @param ClassMetadata $targetEntity Metadata of the target entity.
+     * @param string $targetTableAlias The table alias of the joined/selected table.
+     *
+     * @return string The SQL query part to add to a query.
+     */
+    protected function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
+    {
+        $filterClauses = array();
+
+        foreach ($this->_em->getFilters()->getEnabledFilters() as $filter) {
+            if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
+                $filterClauses[] = '(' . $filterExpr . ')';
             }
         }
-        $sql = 'SELECT 1 FROM ' . $joinTable['name'] . ' WHERE ' . $whereClause;
 
-        return (bool)$this->_conn->fetchColumn($sql, $params);
+        $sql = implode(' AND ', $filterClauses);
+        return $sql ? "(" . $sql . ")" : "";
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php b/src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php
index 5e889ddb98..6f477f08f8 100644
--- a/src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php
@@ -1,7 +1,5 @@
 
- * @todo Remove
+ * @author  Roman Borschel 
+ * @author  Guilherme Blanco 
+ * @author  Alexander 
+ * @since   2.0
  */
 class OneToManyPersister extends AbstractCollectionPersister
 {
@@ -48,24 +43,19 @@ class OneToManyPersister extends AbstractCollectionPersister
     protected function _getDeleteRowSQL(PersistentCollection $coll)
     {
         $mapping = $coll->getMapping();
-        $targetClass = $this->_em->getClassMetadata($mapping->getTargetEntityName());
-        $table = $targetClass->getTableName();
-
-        $ownerMapping = $targetClass->getAssociationMapping($mapping['mappedBy']);
-
-        $setClause = '';
-        foreach ($ownerMapping->sourceToTargetKeyColumns as $sourceCol => $targetCol) {
-            if ($setClause != '') $setClause .= ', ';
-            $setClause .= "$sourceCol = NULL";
-        }
+        $class   = $this->_em->getClassMetadata($mapping['targetEntity']);
 
-        $whereClause = '';
-        foreach ($targetClass->getIdentifierColumnNames() as $idColumn) {
-            if ($whereClause != '') $whereClause .= ' AND ';
-            $whereClause .= "$idColumn = ?";
-        }
+        return 'DELETE FROM ' . $class->getQuotedTableName($this->_conn->getDatabasePlatform())
+             . ' WHERE ' . implode('= ? AND ', $class->getIdentifierColumnNames()) . ' = ?';
+    }
 
-        return array("UPDATE $table SET $setClause WHERE $whereClause", $this->_uow->getEntityIdentifier($element));
+    /**
+     * {@inheritdoc}
+     *
+     */
+    protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
+    {
+        return array_values($this->_uow->getEntityIdentifier($element));
     }
 
     protected function _getInsertRowSQL(PersistentCollection $coll)
@@ -73,6 +63,16 @@ protected function _getInsertRowSQL(PersistentCollection $coll)
         return "UPDATE xxx SET foreign_key = yyy WHERE foreign_key = zzz";
     }
 
+    /**
+     * Gets the SQL parameters for the corresponding SQL statement to insert the given
+     * element of the given collection into the database.
+     *
+     * @param PersistentCollection $coll
+     * @param mixed $element
+     */
+    protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
+    {}
+
     /* Not used for OneToManyPersister */
     protected function _getUpdateRowSQL(PersistentCollection $coll)
     {
@@ -98,50 +98,38 @@ protected function _getDeleteSQL(PersistentCollection $coll)
     protected function _getDeleteSQLParameters(PersistentCollection $coll)
     {}
 
-    /**
-     * Gets the SQL parameters for the corresponding SQL statement to insert the given
-     * element of the given collection into the database.
-     *
-     * @param PersistentCollection $coll
-     * @param mixed $element
-     */
-    protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
-    {}
-
-    /**
-     * Gets the SQL parameters for the corresponding SQL statement to delete the given
-     * element from the given collection.
-     *
-     * @param PersistentCollection $coll
-     * @param mixed $element
-     */
-    protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
-    {}
-
     /**
      * {@inheritdoc}
      */
     public function count(PersistentCollection $coll)
     {
-        $mapping = $coll->getMapping();
-        $class = $this->_em->getClassMetadata($mapping['targetEntity']);
-        $params = array();
-        $id = $this->_em->getUnitOfWork()->getEntityIdentifier($coll->getOwner());
-
-        $where = '';
-        foreach ($class->associationMappings[$mapping['mappedBy']]['joinColumns'] AS $joinColumn) {
-            if ($where != '') {
-                $where .= ' AND ';
-            }
-            $where .= $joinColumn['name'] . " = ?";
-            if ($class->containsForeignIdentifier) {
-                $params[] = $id[$class->getFieldForColumn($joinColumn['referencedColumnName'])];
-            } else {
-                $params[] = $id[$class->fieldNames[$joinColumn['referencedColumnName']]];
+        $mapping     = $coll->getMapping();
+        $targetClass = $this->_em->getClassMetadata($mapping['targetEntity']);
+        $sourceClass = $this->_em->getClassMetadata($mapping['sourceEntity']);
+        $id          = $this->_em->getUnitOfWork()->getEntityIdentifier($coll->getOwner());
+
+        $whereClauses = array();
+        $params       = array();
+
+        foreach ($targetClass->associationMappings[$mapping['mappedBy']]['joinColumns'] AS $joinColumn) {
+            $whereClauses[] = $joinColumn['name'] . ' = ?';
+
+            $params[] = ($targetClass->containsForeignIdentifier)
+                ? $id[$sourceClass->getFieldForColumn($joinColumn['referencedColumnName'])]
+                : $id[$sourceClass->fieldNames[$joinColumn['referencedColumnName']]];
+        }
+
+        $filterTargetClass = $this->_em->getClassMetadata($targetClass->rootEntityName);
+        foreach ($this->_em->getFilters()->getEnabledFilters() as $filter) {
+            if ($filterExpr = $filter->addFilterConstraint($filterTargetClass, 't')) {
+                $whereClauses[] = '(' . $filterExpr . ')';
             }
         }
 
-        $sql = "SELECT count(*) FROM " . $class->getQuotedTableName($this->_conn->getDatabasePlatform()) . " WHERE " . $where;
+        $sql = 'SELECT count(*)'
+             . ' FROM ' . $targetClass->getQuotedTableName($this->_conn->getDatabasePlatform()) . ' t'
+             . ' WHERE ' . implode(' AND ', $whereClauses);
+
         return $this->_conn->fetchColumn($sql, $params);
     }
 
@@ -153,31 +141,72 @@ public function count(PersistentCollection $coll)
      */
     public function slice(PersistentCollection $coll, $offset, $length = null)
     {
-        $mapping = $coll->getMapping();
-        return $this->_em->getUnitOfWork()
-                  ->getEntityPersister($mapping['targetEntity'])
-                  ->getOneToManyCollection($mapping, $coll->getOwner(), $offset, $length);
+        $mapping   = $coll->getMapping();
+        $uow       = $this->_em->getUnitOfWork();
+        $persister = $uow->getEntityPersister($mapping['targetEntity']);
+
+        return $persister->getOneToManyCollection($mapping, $coll->getOwner(), $offset, $length);
     }
 
     /**
      * @param PersistentCollection $coll
      * @param object $element
+     * @return boolean
      */
     public function contains(PersistentCollection $coll, $element)
     {
         $mapping = $coll->getMapping();
+        $uow     = $this->_em->getUnitOfWork();
+
+        // shortcut for new entities
+        $entityState = $uow->getEntityState($element, UnitOfWork::STATE_NEW);
+
+        if ($entityState === UnitOfWork::STATE_NEW) {
+            return false;
+        }
+
+        // Entity is scheduled for inclusion
+        if ($entityState === UnitOfWork::STATE_MANAGED && $uow->isScheduledForInsert($element)) {
+            return false;
+        }
+
+        $persister = $uow->getEntityPersister($mapping['targetEntity']);
+
+        // only works with single id identifier entities. Will throw an
+        // exception in Entity Persisters if that is not the case for the
+        // 'mappedBy' field.
+        $id = current( $uow->getEntityIdentifier($coll->getOwner()));
+
+        return $persister->exists($element, array($mapping['mappedBy'] => $id));
+    }
+
+    /**
+     * @param PersistentCollection $coll
+     * @param object $element
+     * @return boolean
+     */
+    public function removeElement(PersistentCollection $coll, $element)
+    {
         $uow = $this->_em->getUnitOfWork();
-        
+
         // shortcut for new entities
-        if ($uow->getEntityState($element, UnitOfWork::STATE_NEW) == UnitOfWork::STATE_NEW) {
+        $entityState = $uow->getEntityState($element, UnitOfWork::STATE_NEW);
+
+        if ($entityState === UnitOfWork::STATE_NEW) {
             return false;
         }
 
-        // only works with single id identifier entities. Will throw an exception in Entity Persisters
-        // if that is not the case for the 'mappedBy' field.
-        $id = current( $uow->getEntityIdentifier($coll->getOwner()) );
+        // If Entity is scheduled for inclusion, it is not in this collection.
+        // We can assure that because it would have return true before on array check
+        if ($entityState === UnitOfWork::STATE_MANAGED && $uow->isScheduledForInsert($element)) {
+            return false;
+        }
+
+        $mapping = $coll->getMapping();
+        $class   = $this->_em->getClassMetadata($mapping['targetEntity']);
+        $sql     = 'DELETE FROM ' . $class->getQuotedTableName($this->_conn->getDatabasePlatform())
+                 . ' WHERE ' . implode('= ? AND ', $class->getIdentifierColumnNames()) . ' = ?';
 
-        return $uow->getEntityPersister($mapping['targetEntity'])
-                   ->exists($element, array($mapping['mappedBy'] => $id));
+        return (bool) $this->_conn->executeUpdate($sql, $this->_getDeleteRowSQLParameters($coll, $element));
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php
index f910a8e06d..8644e1d6eb 100644
--- a/src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php
@@ -27,6 +27,7 @@
  *
  * @author Roman Borschel 
  * @author Benjamin Eberlei 
+ * @author Alexander 
  * @since 2.0
  * @link http://martinfowler.com/eaaCatalog/singleTableInheritance.html
  */
@@ -35,38 +36,50 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
     /** {@inheritdoc} */
     protected function _getDiscriminatorColumnTableName()
     {
-        return $this->_class->table['name'];
+        return $this->_class->getTableName();
     }
 
     /** {@inheritdoc} */
     protected function _getSelectColumnListSQL()
     {
+        if ($this->_selectColumnListSql !== null) {
+            return $this->_selectColumnListSql;
+        }
+
         $columnList = parent::_getSelectColumnListSQL();
 
-        // Append discriminator column
-        $discrColumn = $this->_class->discriminatorColumn['name'];
-        $columnList .= ", $discrColumn";
-        $rootClass = $this->_em->getClassMetadata($this->_class->rootEntityName);
+        $rootClass  = $this->_em->getClassMetadata($this->_class->rootEntityName);
         $tableAlias = $this->_getSQLTableAlias($rootClass->name);
+
+         // Append discriminator column
+        $discrColumn = $this->_class->discriminatorColumn['name'];
+        $columnList .= ', ' . $tableAlias . '.' . $discrColumn;
+
         $resultColumnName = $this->_platform->getSQLResultCasing($discrColumn);
+
         $this->_rsm->setDiscriminatorColumn('r', $resultColumnName);
         $this->_rsm->addMetaResult('r', $resultColumnName, $discrColumn);
 
         // Append subclass columns
         foreach ($this->_class->subClasses as $subClassName) {
             $subClass = $this->_em->getClassMetadata($subClassName);
+
             // Regular columns
             foreach ($subClass->fieldMappings as $fieldName => $mapping) {
                 if ( ! isset($mapping['inherited'])) {
                     $columnList .= ', ' . $this->_getSelectColumnSQL($fieldName, $subClass);
                 }
             }
+
             // Foreign key columns
             foreach ($subClass->associationMappings as $assoc) {
                 if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE && ! isset($assoc['inherited'])) {
                     foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
                         if ($columnList != '') $columnList .= ', ';
-                        $columnList .= $this->getSelectJoinColumnSQL($tableAlias, $srcColumn,
+
+                        $columnList .= $this->getSelectJoinColumnSQL(
+                            $tableAlias,
+                            $srcColumn,
                             isset($assoc['inherited']) ? $assoc['inherited'] : $this->_class->name
                         );
                     }
@@ -74,13 +87,15 @@ protected function _getSelectColumnListSQL()
             }
         }
 
-        return $columnList;
+        $this->_selectColumnListSql = $columnList;
+        return $this->_selectColumnListSql;
     }
 
     /** {@inheritdoc} */
     protected function _getInsertColumnList()
     {
         $columns = parent::_getInsertColumnList();
+
         // Add discriminator column to the INSERT SQL
         $columns[] = $this->_class->discriminatorColumn['name'];
 
@@ -100,19 +115,32 @@ protected function _getSelectConditionSQL(array $criteria, $assoc = null)
 
         // Append discriminator condition
         if ($conditionSql) $conditionSql .= ' AND ';
+
         $values = array();
+
         if ($this->_class->discriminatorValue !== null) { // discriminators can be 0
             $values[] = $this->_conn->quote($this->_class->discriminatorValue);
         }
 
         $discrValues = array_flip($this->_class->discriminatorMap);
+
         foreach ($this->_class->subClasses as $subclassName) {
             $values[] = $this->_conn->quote($discrValues[$subclassName]);
         }
-        $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.'
-                . $this->_class->discriminatorColumn['name']
-                . ' IN (' . implode(', ', $values) . ')';
+
+        $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.' . $this->_class->discriminatorColumn['name']
+                       . ' IN (' . implode(', ', $values) . ')';
 
         return $conditionSql;
     }
-}
\ No newline at end of file
+
+    /** {@inheritdoc} */
+    protected function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
+    {
+        // Ensure that the filters are applied to the root entity of the inheritance tree
+        $targetEntity = $this->_em->getClassMetadata($targetEntity->rootEntityName);
+        // we dont care about the $targetTableAlias, in a STI there is only one table.
+
+        return parent::generateFilterConditionSQL($targetEntity, $targetTableAlias);
+    }
+}
diff --git a/src/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php b/src/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php
index b2e683a276..ef844a7067 100644
--- a/src/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php
+++ b/src/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php
@@ -4,5 +4,5 @@
 
 class UnionSubclassPersister extends BasicEntityPersister
 {
-    
+
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Proxy/Autoloader.php b/src/lib/Doctrine/ORM/Proxy/Autoloader.php
new file mode 100644
index 0000000000..876b3f2257
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Proxy/Autoloader.php
@@ -0,0 +1,78 @@
+.
+ */
+
+namespace Doctrine\ORM\Proxy;
+
+/**
+ * Special Autoloader for Proxy classes because them not being PSR-0 compatible.
+ *
+ * @author Benjamin Eberlei 
+ */
+class Autoloader
+{
+    /**
+     * Resolve proxy class name to a filename based on the following pattern.
+     *
+     * 1. Remove Proxy namespace from class name
+     * 2. Remove namespace seperators from remaining class name.
+     * 3. Return PHP filename from proxy-dir with the result from 2.
+     *
+     * @param string $proxyDir
+     * @param string $proxyNamespace
+     * @param string $className
+     * @return string
+     */
+    static public function resolveFile($proxyDir, $proxyNamespace, $className)
+    {
+        if (0 !== strpos($className, $proxyNamespace)) {
+            throw ProxyException::notProxyClass($className, $proxyNamespace);
+        }
+
+        $className = str_replace('\\', '', substr($className, strlen($proxyNamespace) +1));
+        return $proxyDir . DIRECTORY_SEPARATOR . $className.'.php';
+    }
+
+    /**
+     * Register and return autoloader callback for the given proxy dir and
+     * namespace.
+     *
+     * @param string $proxyDir
+     * @param string $proxyNamespace
+     * @param Closure $notFoundCallback Invoked when the proxy file is not found.
+     * @return Closure
+     */
+    static public function register($proxyDir, $proxyNamespace, \Closure $notFoundCallback = null)
+    {
+        $proxyNamespace = ltrim($proxyNamespace, "\\");
+        $autoloader = function($className) use ($proxyDir, $proxyNamespace, $notFoundCallback) {
+            if (0 === strpos($className, $proxyNamespace)) {
+                $file = Autoloader::resolveFile($proxyDir, $proxyNamespace, $className);
+
+                if ($notFoundCallback && ! file_exists($file)) {
+                    $notFoundCallback($proxyDir, $proxyNamespace, $className);
+                }
+
+                require $file;
+            }
+        };
+        spl_autoload_register($autoloader);
+        return $autoloader;
+    }
+}
+
diff --git a/src/lib/Doctrine/ORM/Proxy/Proxy.php b/src/lib/Doctrine/ORM/Proxy/Proxy.php
index 853f9c1f04..09e2b33eff 100644
--- a/src/lib/Doctrine/ORM/Proxy/Proxy.php
+++ b/src/lib/Doctrine/ORM/Proxy/Proxy.php
@@ -1,7 +1,5 @@
 
  * @since 2.0
  */
-interface Proxy {}
\ No newline at end of file
+interface Proxy extends BaseProxy {}
diff --git a/src/lib/Doctrine/ORM/Proxy/ProxyException.php b/src/lib/Doctrine/ORM/Proxy/ProxyException.php
index 892dbebbb5..21964125b5 100644
--- a/src/lib/Doctrine/ORM/Proxy/ProxyException.php
+++ b/src/lib/Doctrine/ORM/Proxy/ProxyException.php
@@ -40,4 +40,12 @@ public static function proxyNamespaceRequired() {
         return new self("You must configure a proxy namespace. See docs for details");
     }
 
-}
\ No newline at end of file
+    public static function notProxyClass($className, $proxyNamespace)
+    {
+        return new self(sprintf(
+            "The class %s is not part of the proxy namespace %s",
+            $className, $proxyNamespace
+        ));
+    }
+
+}
diff --git a/src/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/src/lib/Doctrine/ORM/Proxy/ProxyFactory.php
index 52a4791a9d..be94c1dbb1 100644
--- a/src/lib/Doctrine/ORM/Proxy/ProxyFactory.php
+++ b/src/lib/Doctrine/ORM/Proxy/ProxyFactory.php
@@ -21,7 +21,8 @@
 
 use Doctrine\ORM\EntityManager,
     Doctrine\ORM\Mapping\ClassMetadata,
-    Doctrine\ORM\Mapping\AssociationMapping;
+    Doctrine\ORM\Mapping\AssociationMapping,
+    Doctrine\Common\Util\ClassUtils;
 
 /**
  * This factory is used to create proxy objects for entities at runtime.
@@ -41,6 +42,14 @@ class ProxyFactory
     /** The directory that contains all proxy classes. */
     private $_proxyDir;
 
+    /**
+     * Used to match very simple id methods that don't need
+     * to be proxied since the identifier is known.
+     *
+     * @var string
+     */
+    const PATTERN_MATCH_ID_METHOD = '((public\s)?(function\s{1,}%s\s?\(\)\s{1,})\s{0,}{\s{0,}return\s{0,}\$this->%s;\s{0,}})i';
+
     /**
      * Initializes a new instance of the ProxyFactory class that is
      * connected to the given EntityManager.
@@ -74,13 +83,12 @@ public function __construct(EntityManager $em, $proxyDir, $proxyNs, $autoGenerat
      */
     public function getProxy($className, $identifier)
     {
-        $proxyClassName = str_replace('\\', '', $className) . 'Proxy';
-        $fqn = $this->_proxyNamespace . '\\' . $proxyClassName;
+        $fqn = ClassUtils::generateProxyClassName($className, $this->_proxyNamespace);
 
         if (! class_exists($fqn, false)) {
-            $fileName = $this->_proxyDir . DIRECTORY_SEPARATOR . $proxyClassName . '.php';
+            $fileName = $this->getProxyFileName($className);
             if ($this->_autoGenerate) {
-                $this->_generateProxyClass($this->_em->getClassMetadata($className), $proxyClassName, $fileName, self::$_proxyClassTemplate);
+                $this->_generateProxyClass($this->_em->getClassMetadata($className), $fileName, self::$_proxyClassTemplate);
             }
             require $fileName;
         }
@@ -94,6 +102,22 @@ public function getProxy($className, $identifier)
         return new $fqn($entityPersister, $identifier);
     }
 
+    /**
+     * Generate the Proxy file name
+     *
+     * @param string $className
+     * @param string $baseDir Optional base directory for proxy file name generation.
+     *                        If not specified, the directory configured on the Configuration of the
+     *                        EntityManager will be used by this factory.
+     * @return string
+     */
+    private function getProxyFileName($className, $baseDir = null)
+    {
+        $proxyDir = $baseDir ?: $this->_proxyDir;
+
+        return $proxyDir . DIRECTORY_SEPARATOR . '__CG__' . str_replace('\\', '', $className) . '.php';
+    }
+
     /**
      * Generates proxy classes for all given classes.
      *
@@ -101,32 +125,37 @@ public function getProxy($className, $identifier)
      * @param string $toDir The target directory of the proxy classes. If not specified, the
      *                      directory configured on the Configuration of the EntityManager used
      *                      by this factory is used.
+     * @return int Number of generated proxies.
      */
     public function generateProxyClasses(array $classes, $toDir = null)
     {
         $proxyDir = $toDir ?: $this->_proxyDir;
-        $proxyDir = rtrim($proxyDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
+        $proxyDir = rtrim($proxyDir, DIRECTORY_SEPARATOR);
+        $num = 0;
+
         foreach ($classes as $class) {
             /* @var $class ClassMetadata */
-            if ($class->isMappedSuperclass) {
+            if ($class->isMappedSuperclass || $class->reflClass->isAbstract()) {
                 continue;
             }
 
-            $proxyClassName = str_replace('\\', '', $class->name) . 'Proxy';
-            $proxyFileName = $proxyDir . $proxyClassName . '.php';
-            $this->_generateProxyClass($class, $proxyClassName, $proxyFileName, self::$_proxyClassTemplate);
+            $proxyFileName = $this->getProxyFileName($class->name, $proxyDir);
+
+            $this->_generateProxyClass($class, $proxyFileName, self::$_proxyClassTemplate);
+            $num++;
         }
+
+        return $num;
     }
 
     /**
      * Generates a proxy class file.
      *
      * @param $class
-     * @param $originalClassName
      * @param $proxyClassName
      * @param $file The path of the file to write to.
      */
-    private function _generateProxyClass($class, $proxyClassName, $fileName, $file)
+    private function _generateProxyClass($class, $fileName, $file)
     {
         $methods = $this->_generateMethods($class);
         $sleepImpl = $this->_generateSleep($class);
@@ -138,16 +167,19 @@ private function _generateProxyClass($class, $proxyClassName, $fileName, $file)
             '', '', ''
         );
 
-        if(substr($class->name, 0, 1) == "\\") {
-            $className = substr($class->name, 1);
-        } else {
-            $className = $class->name;
-        }
+        $className = ltrim($class->name, '\\');
+        $proxyClassName = ClassUtils::generateProxyClassName($class->name, $this->_proxyNamespace);
+        $parts = explode('\\', strrev($proxyClassName), 2);
+        $proxyClassNamespace = strrev($parts[1]);
+        $proxyClassName = strrev($parts[0]);
 
         $replacements = array(
-            $this->_proxyNamespace,
-            $proxyClassName, $className,
-            $methods, $sleepImpl, $cloneImpl
+            $proxyClassNamespace,
+            $proxyClassName,
+            $className,
+            $methods,
+            $sleepImpl,
+            $cloneImpl
         );
 
         $file = str_replace($placeholders, $replacements, $file);
@@ -165,14 +197,16 @@ private function _generateMethods(ClassMetadata $class)
     {
         $methods = '';
 
+        $methodNames = array();
         foreach ($class->reflClass->getMethods() as $method) {
             /* @var $method ReflectionMethod */
-            if ($method->isConstructor() || in_array(strtolower($method->getName()), array("__sleep", "__clone"))) {
+            if ($method->isConstructor() || in_array(strtolower($method->getName()), array("__sleep", "__clone")) || isset($methodNames[$method->getName()])) {
                 continue;
             }
+            $methodNames[$method->getName()] = true;
 
             if ($method->isPublic() && ! $method->isFinal() && ! $method->isStatic()) {
-                $methods .= PHP_EOL . '    public function ';
+                $methods .= "\n" . '    public function ';
                 if ($method->returnsReference()) {
                     $methods .= '&';
                 }
@@ -208,16 +242,63 @@ private function _generateMethods(ClassMetadata $class)
                 }
 
                 $methods .= $parameterString . ')';
-                $methods .= PHP_EOL . '    {' . PHP_EOL;
-                $methods .= '        $this->__load();' . PHP_EOL;
+                $methods .= "\n" . '    {' . "\n";
+                if ($this->isShortIdentifierGetter($method, $class)) {
+                    $identifier = lcfirst(substr($method->getName(), 3));
+
+                    $cast = in_array($class->fieldMappings[$identifier]['type'], array('integer', 'smallint')) ? '(int) ' : '';
+
+                    $methods .= '        if ($this->__isInitialized__ === false) {' . "\n";
+                    $methods .= '            return ' . $cast . '$this->_identifier["' . $identifier . '"];' . "\n";
+                    $methods .= '        }' . "\n";
+                }
+                $methods .= '        $this->__load();' . "\n";
                 $methods .= '        return parent::' . $method->getName() . '(' . $argumentString . ');';
-                $methods .= PHP_EOL . '    }' . PHP_EOL;
+                $methods .= "\n" . '    }' . "\n";
             }
         }
 
         return $methods;
     }
 
+    /**
+     * Check if the method is a short identifier getter.
+     *
+     * What does this mean? For proxy objects the identifier is already known,
+     * however accessing the getter for this identifier usually triggers the
+     * lazy loading, leading to a query that may not be necessary if only the
+     * ID is interesting for the userland code (for example in views that
+     * generate links to the entity, but do not display anything else).
+     *
+     * @param ReflectionMethod $method
+     * @param ClassMetadata $class
+     * @return bool
+     */
+    private function isShortIdentifierGetter($method, $class)
+    {
+        $identifier = lcfirst(substr($method->getName(), 3));
+        $cheapCheck = (
+            $method->getNumberOfParameters() == 0 &&
+            substr($method->getName(), 0, 3) == "get" &&
+            in_array($identifier, $class->identifier, true) &&
+            $class->hasField($identifier) &&
+            (($method->getEndLine() - $method->getStartLine()) <= 4)
+            && in_array($class->fieldMappings[$identifier]['type'], array('integer', 'bigint', 'smallint', 'string'))
+        );
+
+        if ($cheapCheck) {
+            $code = file($method->getDeclaringClass()->getFileName());
+            $code = trim(implode(" ", array_slice($code, $method->getStartLine() - 1, $method->getEndLine() - $method->getStartLine() + 1)));
+
+            $pattern = sprintf(self::PATTERN_MATCH_ID_METHOD, $method->getName(), $identifier);
+
+            if (preg_match($pattern, $code)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     /**
      * Generates the code for the __sleep method for a proxy class.
      *
@@ -274,13 +355,27 @@ public function __load()
     {
         if (!$this->__isInitialized__ && $this->_entityPersister) {
             $this->__isInitialized__ = true;
+
+            if (method_exists($this, "__wakeup")) {
+                // call this after __isInitialized__to avoid infinite recursion
+                // but before loading to emulate what ClassMetadata::newInstance()
+                // provides.
+                $this->__wakeup();
+            }
+
             if ($this->_entityPersister->load($this->_identifier, $this) === null) {
                 throw new \Doctrine\ORM\EntityNotFoundException();
             }
             unset($this->_entityPersister, $this->_identifier);
         }
     }
-    
+
+    /** @private */
+    public function __isInitialized()
+    {
+        return $this->__isInitialized__;
+    }
+
     
 
     public function __sleep()
diff --git a/src/lib/Doctrine/ORM/Query.php b/src/lib/Doctrine/ORM/Query.php
index fa7fff2e4e..16c6c38039 100644
--- a/src/lib/Doctrine/ORM/Query.php
+++ b/src/lib/Doctrine/ORM/Query.php
@@ -44,19 +44,28 @@ final class Query extends AbstractQuery
      * is called.
      */
     const STATE_DIRTY = 2;
-    
+
     /* Query HINTS */
     /**
      * The refresh hint turns any query into a refresh query with the result that
      * any local changes in entities are overridden with the fetched values.
-     * 
+     *
      * @var string
      */
     const HINT_REFRESH = 'doctrine.refresh';
+
+
+    /**
+     * Internal hint: is set to the proxy entity that is currently triggered for loading
+     *
+     * @var string
+     */
+    const HINT_REFRESH_ENTITY = 'doctrine.refresh.entity';
+
     /**
      * The forcePartialLoad query hint forces a particular query to return
      * partial objects.
-     * 
+     *
      * @var string
      * @todo Rename: HINT_OPTIMIZE
      */
@@ -64,15 +73,15 @@ final class Query extends AbstractQuery
     /**
      * The includeMetaColumns query hint causes meta columns like foreign keys and
      * discriminator columns to be selected and returned as part of the query result.
-     * 
+     *
      * This hint does only apply to non-object queries.
-     * 
+     *
      * @var string
      */
     const HINT_INCLUDE_META_COLUMNS = 'doctrine.includeMetaColumns';
 
     /**
-     * An array of class names that implement Doctrine\ORM\Query\TreeWalker and
+     * An array of class names that implement \Doctrine\ORM\Query\TreeWalker and
      * are iterated and executed after the DQL has been parsed into an AST.
      *
      * @var string
@@ -80,7 +89,7 @@ final class Query extends AbstractQuery
     const HINT_CUSTOM_TREE_WALKERS = 'doctrine.customTreeWalkers';
 
     /**
-     * A string with a class name that implements Doctrine\ORM\Query\TreeWalker
+     * A string with a class name that implements \Doctrine\ORM\Query\TreeWalker
      * and is used for generating the target SQL from any DQL AST tree.
      *
      * @var string
@@ -110,15 +119,15 @@ final class Query extends AbstractQuery
     private $_dql = null;
 
     /**
-     * @var Doctrine\ORM\Query\ParserResult  The parser result that holds DQL => SQL information.
+     * @var \Doctrine\ORM\Query\ParserResult  The parser result that holds DQL => SQL information.
      */
     private $_parserResult;
-    
+
     /**
      * @var integer The first result to return (the "offset").
      */
     private $_firstResult = null;
-    
+
     /**
      * @var integer The maximum number of results to return (the "limit").
      */
@@ -138,7 +147,7 @@ final class Query extends AbstractQuery
      * @var int Query Cache lifetime.
      */
     private $_queryCacheTTL;
-    
+
     /**
      * @var boolean Whether to use a query cache, if available. Defaults to TRUE.
      */
@@ -149,7 +158,7 @@ final class Query extends AbstractQuery
     /**
      * Initializes a new Query instance.
      *
-     * @param Doctrine\ORM\EntityManager $entityManager
+     * @param \Doctrine\ORM\EntityManager $entityManager
      */
     /*public function __construct(EntityManager $entityManager)
     {
@@ -170,9 +179,9 @@ public function getSQL()
     /**
      * Returns the corresponding AST for this DQL query.
      *
-     * @return Doctrine\ORM\Query\AST\SelectStatement |
-     *         Doctrine\ORM\Query\AST\UpdateStatement |
-     *         Doctrine\ORM\Query\AST\DeleteStatement
+     * @return \Doctrine\ORM\Query\AST\SelectStatement |
+     *         \Doctrine\ORM\Query\AST\UpdateStatement |
+     *         \Doctrine\ORM\Query\AST\DeleteStatement
      */
     public function getAST()
     {
@@ -182,36 +191,45 @@ public function getAST()
 
     /**
      * Parses the DQL query, if necessary, and stores the parser result.
-     * 
+     *
      * Note: Populates $this->_parserResult as a side-effect.
      *
-     * @return Doctrine\ORM\Query\ParserResult
+     * @return \Doctrine\ORM\Query\ParserResult
      */
     private function _parse()
     {
-        if ($this->_state === self::STATE_CLEAN) {
+        // Return previous parser result if the query and the filter collection are both clean
+        if ($this->_state === self::STATE_CLEAN
+            && $this->_em->isFiltersStateClean()
+        ) {
             return $this->_parserResult;
         }
-        
+
+        $this->_state = self::STATE_CLEAN;
+
         // Check query cache.
-        if ($this->_useQueryCache && ($queryCache = $this->getQueryCacheDriver())) {
-            $hash = $this->_getQueryCacheId();
-            $cached = $this->_expireQueryCache ? false : $queryCache->fetch($hash);
-            if ($cached === false) {
-                // Cache miss.
-                $parser = new Parser($this);
-                $this->_parserResult = $parser->parse();
-                $queryCache->save($hash, $this->_parserResult, $this->_queryCacheTTL);
-            } else {
-                // Cache hit.
-                $this->_parserResult = $cached;
-            }
-        } else {
+        if ( ! ($this->_useQueryCache && ($queryCache = $this->getQueryCacheDriver()))) {
             $parser = new Parser($this);
             $this->_parserResult = $parser->parse();
+
+            return $this->_parserResult;
         }
-        $this->_state = self::STATE_CLEAN;
-        
+
+        $hash   = $this->_getQueryCacheId();
+        $cached = $this->_expireQueryCache ? false : $queryCache->fetch($hash);
+
+        if ($cached !== false) {
+            // Cache hit.
+            $this->_parserResult = $cached;
+
+            return $this->_parserResult;
+        }
+
+        // Cache miss.
+        $parser = new Parser($this);
+        $this->_parserResult = $parser->parse();
+        $queryCache->save($hash, $this->_parserResult, $this->_queryCacheTTL);
+
         return $this->_parserResult;
     }
 
@@ -222,6 +240,10 @@ protected function _doExecute()
     {
         $executor = $this->_parse()->getSqlExecutor();
 
+        if ($this->_queryCacheProfile) {
+            $executor->setQueryCacheProfile($this->_queryCacheProfile);
+        }
+
         // Prepare parameters
         $paramMappings = $this->_parserResult->getParameterMappings();
 
@@ -229,49 +251,59 @@ protected function _doExecute()
             throw QueryException::invalidParameterNumber();
         }
 
+        list($sqlParams, $types) = $this->processParameterMappings($paramMappings);
+
+        if ($this->_resultSetMapping === null) {
+            $this->_resultSetMapping = $this->_parserResult->getResultSetMapping();
+        }
+
+        return $executor->execute($this->_em->getConnection(), $sqlParams, $types);
+    }
+
+    /**
+     * Processes query parameter mappings
+     *
+     * @param array $paramMappings
+     * @return array
+     */
+    private function processParameterMappings($paramMappings)
+    {
         $sqlParams = $types = array();
 
         foreach ($this->_params as $key => $value) {
             if ( ! isset($paramMappings[$key])) {
                 throw QueryException::unknownParameter($key);
             }
+
             if (isset($this->_paramTypes[$key])) {
                 foreach ($paramMappings[$key] as $position) {
                     $types[$position] = $this->_paramTypes[$key];
                 }
             }
 
-            if (is_object($value) && $this->_em->getMetadataFactory()->hasMetadataFor(get_class($value))) {
-                if ($this->_em->getUnitOfWork()->getEntityState($value) == UnitOfWork::STATE_MANAGED) {
-                    $idValues = $this->_em->getUnitOfWork()->getEntityIdentifier($value);
-                } else {
-                    $class = $this->_em->getClassMetadata(get_class($value));
-                    $idValues = $class->getIdentifierValues($value);
-                }
-                $sqlPositions = $paramMappings[$key];
-                $cSqlPos = count($sqlPositions);
-                $cIdValues = count($idValues);
-                $idValues = array_values($idValues);
-                for ($i = 0; $i < $cSqlPos; $i++) {
-                    $sqlParams[$sqlPositions[$i]] = $idValues[ ($i % $cIdValues) ];
-                }
-            } else {
-                foreach ($paramMappings[$key] as $position) {
-                    $sqlParams[$position] = $value;
-                }
+            $sqlPositions = $paramMappings[$key];
+            // optimized multi value sql positions away for now, they are not allowed in DQL anyways.
+            $value = array($value);
+            $countValue = count($value);
+
+            for ($i = 0, $l = count($sqlPositions); $i < $l; $i++) {
+                $sqlParams[$sqlPositions[$i]] = $value[($i % $countValue)];
             }
         }
 
+        if (count($sqlParams) != count($types)) {
+            throw QueryException::parameterTypeMissmatch();
+        }
+
         if ($sqlParams) {
             ksort($sqlParams);
             $sqlParams = array_values($sqlParams);
-        }
 
-        if ($this->_resultSetMapping === null) {
-            $this->_resultSetMapping = $this->_parserResult->getResultSetMapping();
+            ksort($types);
+            $types = array_values($types);
         }
 
-        return $executor->execute($this->_em->getConnection(), $sqlParams, $types);
+        return array($sqlParams, $types);
     }
 
     /**
@@ -283,18 +315,20 @@ protected function _doExecute()
     public function setQueryCacheDriver($queryCache)
     {
         $this->_queryCache = $queryCache;
+
         return $this;
     }
-    
+
     /**
      * Defines whether the query should make use of a query cache, if available.
-     * 
+     *
      * @param boolean $bool
      * @return @return Query This query instance.
      */
     public function useQueryCache($bool)
     {
         $this->_useQueryCache = $bool;
+
         return $this;
     }
 
@@ -308,9 +342,9 @@ public function getQueryCacheDriver()
     {
         if ($this->_queryCache) {
             return $this->_queryCache;
-        } else {
-            return $this->_em->getConfiguration()->getQueryCacheImpl();
         }
+
+        return $this->_em->getConfiguration()->getQueryCacheImpl();
     }
 
     /**
@@ -324,6 +358,7 @@ public function setQueryCacheLifetime($timeToLive)
         if ($timeToLive !== null) {
             $timeToLive = (int) $timeToLive;
         }
+
         $this->_queryCacheTTL = $timeToLive;
 
         return $this;
@@ -368,6 +403,7 @@ public function getExpireQueryCache()
     public function free()
     {
         parent::free();
+
         $this->_dql = null;
         $this->_state = self::STATE_CLEAN;
     }
@@ -376,7 +412,7 @@ public function free()
      * Sets a DQL query string.
      *
      * @param string $dqlQuery DQL Query
-     * @return Doctrine\ORM\AbstractQuery
+     * @return \Doctrine\ORM\AbstractQuery
      */
     public function setDQL($dqlQuery)
     {
@@ -384,6 +420,7 @@ public function setDQL($dqlQuery)
             $this->_dql = $dqlQuery;
             $this->_state = self::STATE_DIRTY;
         }
+
         return $this;
     }
 
@@ -422,7 +459,7 @@ public function contains($dql)
     {
         return stripos($this->getDQL(), $dql) === false ? false : true;
     }
-    
+
     /**
      * Sets the position of the first result to retrieve (the "offset").
      *
@@ -433,23 +470,24 @@ public function setFirstResult($firstResult)
     {
         $this->_firstResult = $firstResult;
         $this->_state = self::STATE_DIRTY;
+
         return $this;
     }
-    
+
     /**
      * Gets the position of the first result the query object was set to retrieve (the "offset").
      * Returns NULL if {@link setFirstResult} was not applied to this query.
-     * 
+     *
      * @return integer The position of the first result.
      */
     public function getFirstResult()
     {
         return $this->_firstResult;
     }
-    
+
     /**
      * Sets the maximum number of results to retrieve (the "limit").
-     * 
+     *
      * @param integer $maxResults
      * @return Query This query object.
      */
@@ -457,13 +495,14 @@ public function setMaxResults($maxResults)
     {
         $this->_maxResults = $maxResults;
         $this->_state = self::STATE_DIRTY;
+
         return $this;
     }
-    
+
     /**
      * Gets the maximum number of results the query object was set to retrieve (the "limit").
      * Returns NULL if {@link setMaxResults} was not applied to this query.
-     * 
+     *
      * @return integer Maximum number of results.
      */
     public function getMaxResults()
@@ -477,48 +516,52 @@ public function getMaxResults()
      *
      * @param array $params The query parameters.
      * @param integer $hydrationMode The hydration mode to use.
-     * @return IterableResult
+     * @return \Doctrine\ORM\Internal\Hydration\IterableResult
      */
     public function iterate(array $params = array(), $hydrationMode = self::HYDRATE_OBJECT)
     {
         $this->setHint(self::HINT_INTERNAL_ITERATION, true);
+
         return parent::iterate($params, $hydrationMode);
     }
-    
+
     /**
      * {@inheritdoc}
      */
     public function setHint($name, $value)
     {
         $this->_state = self::STATE_DIRTY;
+
         return parent::setHint($name, $value);
     }
-    
+
     /**
      * {@inheritdoc}
      */
     public function setHydrationMode($hydrationMode)
     {
         $this->_state = self::STATE_DIRTY;
+
         return parent::setHydrationMode($hydrationMode);
     }
 
     /**
      * Set the lock mode for this Query.
      *
-     * @see Doctrine\DBAL\LockMode
+     * @see \Doctrine\DBAL\LockMode
      * @param  int $lockMode
      * @return Query
      */
     public function setLockMode($lockMode)
     {
-        if ($lockMode == LockMode::PESSIMISTIC_READ || $lockMode == LockMode::PESSIMISTIC_WRITE) {
-            if (!$this->_em->getConnection()->isTransactionActive()) {
+        if ($lockMode === LockMode::PESSIMISTIC_READ || $lockMode === LockMode::PESSIMISTIC_WRITE) {
+            if ( ! $this->_em->getConnection()->isTransactionActive()) {
                 throw TransactionRequiredException::transactionRequired();
             }
         }
 
         $this->setHint(self::HINT_LOCK_MODE, $lockMode);
+
         return $this;
     }
 
@@ -530,9 +573,11 @@ public function setLockMode($lockMode)
     public function getLockMode()
     {
         $lockMode = $this->getHint(self::HINT_LOCK_MODE);
-        if (!$lockMode) {
+
+        if ( ! $lockMode) {
             return LockMode::NONE;
         }
+
         return $lockMode;
     }
 
@@ -548,7 +593,8 @@ protected function _getQueryCacheId()
         ksort($this->_hints);
 
         return md5(
-            $this->getDql() . var_export($this->_hints, true) . 
+            $this->getDql() . var_export($this->_hints, true) .
+            ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') .
             '&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults .
             '&hydrationMode='.$this->_hydrationMode.'DOCTRINE_QUERY_CACHE_SALT'
         );
@@ -562,6 +608,7 @@ protected function _getQueryCacheId()
     public function __clone()
     {
         parent::__clone();
+
         $this->_state = self::STATE_DIRTY;
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php b/src/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php
index b559e4a306..3ad6abf474 100644
--- a/src/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php
+++ b/src/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php
@@ -38,7 +38,7 @@ class ArithmeticFactor extends Node
      * @var ArithmeticPrimary
      */
     public $arithmeticPrimary;
-    
+
     /**
      * @var null|boolean NULL represents no sign, TRUE means positive and FALSE means negative sign
      */
diff --git a/src/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php b/src/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php
index 338d49fcee..dae0742004 100644
--- a/src/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php
@@ -33,13 +33,13 @@
 class CoalesceExpression extends Node
 {
     public $scalarExpressions = array();
-    
+
 
     public function __construct(array $scalarExpressions)
     {
         $this->scalarExpressions  = $scalarExpressions;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkCoalesceExpression($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php b/src/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php
index ea252de080..62d756b882 100644
--- a/src/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/CollectionMemberExpression.php
@@ -18,7 +18,7 @@
  * and is licensed under the LGPL. For more information, see
  * .
  */
- 
+
 namespace Doctrine\ORM\Query\AST;
 
 /**
diff --git a/src/lib/Doctrine/ORM/Query/AST/DeleteStatement.php b/src/lib/Doctrine/ORM/Query/AST/DeleteStatement.php
index de807abaae..01c6acbe18 100644
--- a/src/lib/Doctrine/ORM/Query/AST/DeleteStatement.php
+++ b/src/lib/Doctrine/ORM/Query/AST/DeleteStatement.php
@@ -41,7 +41,7 @@ public function __construct($deleteClause)
     {
         $this->deleteClause = $deleteClause;
     }
-    
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkDeleteStatement($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php b/src/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php
index 271d304dc9..6bb50e87d1 100644
--- a/src/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php
@@ -18,7 +18,7 @@
  * and is licensed under the LGPL. For more information, see
  * .
  */
- 
+
 namespace Doctrine\ORM\Query\AST;
 
 /**
diff --git a/src/lib/Doctrine/ORM/Query/AST/FromClause.php b/src/lib/Doctrine/ORM/Query/AST/FromClause.php
index 83aa85ccbf..a4dc6282d5 100644
--- a/src/lib/Doctrine/ORM/Query/AST/FromClause.php
+++ b/src/lib/Doctrine/ORM/Query/AST/FromClause.php
@@ -36,8 +36,8 @@ class FromClause extends Node
     public function __construct(array $identificationVariableDeclarations)
     {
         $this->identificationVariableDeclarations = $identificationVariableDeclarations;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkFromClause($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php
index 3fafccd5b1..3ee4360356 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php
@@ -53,9 +53,9 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_IDENTIFIER);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php
new file mode 100644
index 0000000000..1ee8233377
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/BitAndFunction.php
@@ -0,0 +1,63 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST\Functions;
+
+use Doctrine\ORM\Query\Lexer;
+
+/**
+ * "BIT_AND" "(" ArithmeticPrimary "," ArithmeticPrimary ")"
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @since   2.2
+ * @author  Fabio B. Silva 
+ */
+class BitAndFunction extends FunctionNode
+{
+    public $firstArithmetic;
+    public $secondArithmetic;
+
+    /**
+     * @override
+     */
+    public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
+    {
+        $platform = $sqlWalker->getConnection()->getDatabasePlatform();
+        return $platform->getBitAndComparisonExpression(
+            $this->firstArithmetic->dispatch($sqlWalker),
+            $this->secondArithmetic->dispatch($sqlWalker)
+        );
+    }
+
+    /**
+     * @override
+     */
+    public function parse(\Doctrine\ORM\Query\Parser $parser)
+    {
+        $parser->match(Lexer::T_IDENTIFIER);
+        $parser->match(Lexer::T_OPEN_PARENTHESIS);
+
+        $this->firstArithmetic = $parser->ArithmeticPrimary();
+        $parser->match(Lexer::T_COMMA);
+        $this->secondArithmetic = $parser->ArithmeticPrimary();
+
+        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php
new file mode 100644
index 0000000000..ba36e97aaa
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/BitOrFunction.php
@@ -0,0 +1,63 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST\Functions;
+
+use Doctrine\ORM\Query\Lexer;
+
+/**
+ * "BIT_OR" "(" ArithmeticPrimary "," ArithmeticPrimary ")"
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @since   2.2
+ * @author  Fabio B. Silva 
+ */
+class BitOrFunction extends FunctionNode
+{
+    public $firstArithmetic;
+    public $secondArithmetic;
+
+    /**
+     * @override
+     */
+    public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
+    {
+        $platform = $sqlWalker->getConnection()->getDatabasePlatform();
+        return $platform->getBitOrComparisonExpression(
+            $this->firstArithmetic->dispatch($sqlWalker),
+            $this->secondArithmetic->dispatch($sqlWalker)
+        );
+    }
+
+    /**
+     * @override
+     */
+    public function parse(\Doctrine\ORM\Query\Parser $parser)
+    {
+        $parser->match(Lexer::T_IDENTIFIER);
+        $parser->match(Lexer::T_OPEN_PARENTHESIS);
+
+        $this->firstArithmetic = $parser->ArithmeticPrimary();
+        $parser->match(Lexer::T_COMMA);
+        $this->secondArithmetic = $parser->ArithmeticPrimary();
+
+        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php
index 7bf7683ebc..66107cc007 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php
@@ -16,7 +16,7 @@
  * and is licensed under the LGPL. For more information, see
  * .
  */
- 
+
 namespace Doctrine\ORM\Query\AST\Functions;
 
 use Doctrine\ORM\Query\Lexer;
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php
new file mode 100644
index 0000000000..1b75929907
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php
@@ -0,0 +1,68 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST\Functions;
+
+use Doctrine\ORM\Query\Lexer;
+
+/**
+ * "IDENTITY" "(" SingleValuedAssociationPathExpression ")"
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @since   2.2
+ * @author  Guilherme Blanco 
+ * @author  Benjamin Eberlei 
+ */
+class IdentityFunction extends FunctionNode
+{
+    public $pathExpression;
+
+    /**
+     * @override
+     */
+    public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
+    {
+        $platform   = $sqlWalker->getConnection()->getDatabasePlatform();
+        $dqlAlias   = $this->pathExpression->identificationVariable;
+        $assocField = $this->pathExpression->field;
+
+        $qComp = $sqlWalker->getQueryComponent($dqlAlias);
+        $class = $qComp['metadata'];
+        $assoc = $class->associationMappings[$assocField];
+
+        $tableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias);
+
+        return $tableAlias . '.' . reset($assoc['targetToSourceKeyColumns']);;
+    }
+
+    /**
+     * @override
+     */
+    public function parse(\Doctrine\ORM\Query\Parser $parser)
+    {
+        $parser->match(Lexer::T_IDENTIFIER);
+        $parser->match(Lexer::T_OPEN_PARENTHESIS);
+
+        $this->pathExpression = $parser->SingleValuedAssociationPathExpression();
+
+        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
+    }
+}
+
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php
index 36787786d5..82dd4b49dc 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php
@@ -53,9 +53,9 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_IDENTIFIER);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->stringPrimary = $parser->StringPrimary();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php
index a4ea716960..e630b2efe8 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php
@@ -61,20 +61,20 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_IDENTIFIER);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->firstStringPrimary = $parser->StringPrimary();
-        
+
         $parser->match(Lexer::T_COMMA);
-        
+
         $this->secondStringPrimary = $parser->StringPrimary();
-        
+
         $lexer = $parser->getLexer();
         if ($lexer->isNextToken(Lexer::T_COMMA)) {
             $parser->match(Lexer::T_COMMA);
-            
+
             $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();
         }
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php
index 775f51d9a0..7bc092dad9 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php
@@ -53,9 +53,9 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_IDENTIFIER);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->stringPrimary = $parser->StringPrimary();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php
index 4d124fe851..53f064a903 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php
@@ -55,13 +55,13 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_MOD);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
-        
+
         $parser->match(Lexer::T_COMMA);
-        
+
         $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php
index c66df6a8b2..3decb918e4 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php
@@ -45,7 +45,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
         $platform = $sqlWalker->getConnection()->getDatabasePlatform();
         $dqlAlias = $this->collectionPathExpression->identificationVariable;
         $assocField = $this->collectionPathExpression->field;
-        
+
         $qComp = $sqlWalker->getQueryComponent($dqlAlias);
         $class = $qComp['metadata'];
         $assoc = $class->associationMappings[$assocField];
@@ -53,15 +53,15 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 
         if ($assoc['type'] == \Doctrine\ORM\Mapping\ClassMetadata::ONE_TO_MANY) {
             $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']);
-            $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->table['name']);
-            $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->table['name'], $dqlAlias);
+            $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->getTableName());
+            $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias);
 
             $sql .= $targetClass->getQuotedTableName($platform) . ' ' . $targetTableAlias . ' WHERE ';
 
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
 
             $first = true;
-            
+
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
                 if ($first) $first = false; else $sql .= ' AND ';
 
@@ -77,7 +77,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
 
             // SQL table aliases
             $joinTableAlias = $sqlWalker->getSQLTableAlias($joinTable['name']);
-            $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->table['name'], $dqlAlias);
+            $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->getTableName(), $dqlAlias);
 
             // join to target table
             $sql .= $targetClass->getQuotedJoinTableName($owningAssoc, $platform) . ' ' . $joinTableAlias . ' WHERE ';
@@ -100,7 +100,7 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
                       . $sourceTableAlias . '.' . $sourceColumnName;
             }
         }
-        
+
         return '(' . $sql . ')';
     }
 
@@ -110,12 +110,12 @@ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
     public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $lexer = $parser->getLexer();
-        
+
         $parser->match(Lexer::T_SIZE);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->collectionPathExpression = $parser->CollectionValuedPathExpression();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php
index 02ffa26a7d..087b93be10 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php
@@ -52,9 +52,9 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_IDENTIFIER);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php
index bfcbdefb30..c0e6223b26 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php
@@ -64,15 +64,15 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
 
         $this->stringPrimary = $parser->StringPrimary();
-        
+
         $parser->match(Lexer::T_COMMA);
-        
+
         $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
 
         $lexer = $parser->getLexer();
         if ($lexer->isNextToken(Lexer::T_COMMA)) {
             $parser->match(Lexer::T_COMMA);
-        
+
             $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
         }
 
diff --git a/src/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php b/src/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php
index acc8dd8ebd..16a0ed8161 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php
@@ -53,9 +53,9 @@ public function parse(\Doctrine\ORM\Query\Parser $parser)
     {
         $parser->match(Lexer::T_IDENTIFIER);
         $parser->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $this->stringPrimary = $parser->StringPrimary();
-        
+
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php b/src/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php
new file mode 100644
index 0000000000..facacd5fe2
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php
@@ -0,0 +1,48 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST;
+
+/**
+ * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END"
+ *
+ * @since   2.2
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @author  Benjamin Eberlei 
+ * @author  Guilherme Blanco 
+ * @author  Jonathan Wage 
+ * @author  Roman Borschel 
+ */
+class GeneralCaseExpression extends Node
+{
+    public $whenClauses = array();
+    public $elseScalarExpression = null;
+
+    public function __construct(array $whenClauses, $elseScalarExpression)
+    {
+        $this->whenClauses = $whenClauses;
+        $this->elseScalarExpression = $elseScalarExpression;
+    }
+
+    public function dispatch($sqlWalker)
+    {
+        return $sqlWalker->walkGeneralCaseExpression($this);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php b/src/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php
index bf168c34b9..2f590cc80c 100644
--- a/src/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php
+++ b/src/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php
@@ -44,7 +44,7 @@ public function __construct($rangeVariableDecl, $indexBy, array $joinVariableDec
         $this->indexBy = $indexBy;
         $this->joinVariableDeclarations = $joinVariableDecls;
     }
-    
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkIdentificationVariableDeclaration($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/InExpression.php b/src/lib/Doctrine/ORM/Query/AST/InExpression.php
index b1da40156d..15c517dc06 100644
--- a/src/lib/Doctrine/ORM/Query/AST/InExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/InExpression.php
@@ -35,13 +35,13 @@
 class InExpression extends Node
 {
     public $not;
-    public $pathExpression;
+    public $expression;
     public $literals = array();
     public $subselect;
 
-    public function __construct($pathExpression)
+    public function __construct($expression)
     {
-        $this->pathExpression = $pathExpression;
+        $this->expression = $expression;
     }
 
     public function dispatch($sqlWalker)
diff --git a/src/lib/Doctrine/ORM/Query/AST/IndexBy.php b/src/lib/Doctrine/ORM/Query/AST/IndexBy.php
index b657be70fc..16f2206309 100644
--- a/src/lib/Doctrine/ORM/Query/AST/IndexBy.php
+++ b/src/lib/Doctrine/ORM/Query/AST/IndexBy.php
@@ -39,8 +39,8 @@ class IndexBy extends Node
     public function __construct($simpleStateFieldPathExpression)
     {
         $this->simpleStateFieldPathExpression = $simpleStateFieldPathExpression;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkIndexBy($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php b/src/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php
index 3aefd61d92..4f254b578b 100644
--- a/src/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php
@@ -20,7 +20,8 @@
 namespace Doctrine\ORM\Query\AST;
 
 /**
- * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (AbstractSchemaName | InputParameter)
+ * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")")
+ * InstanceOfParameter  ::= AbstractSchemaName | InputParameter
  *
  * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
  * @link    www.doctrine-project.org
@@ -35,7 +36,7 @@ class InstanceOfExpression extends Node
     public $not;
     public $identificationVariable;
     public $value;
-    
+
     public function __construct($identVariable)
     {
         $this->identificationVariable = $identVariable;
diff --git a/src/lib/Doctrine/ORM/Query/AST/Join.php b/src/lib/Doctrine/ORM/Query/AST/Join.php
index 310a418a45..084f7d7376 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Join.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Join.php
@@ -39,7 +39,7 @@ class Join extends Node
     const JOIN_TYPE_LEFTOUTER = 2;
     const JOIN_TYPE_INNER = 3;
 
-    public $joinType = self::JOIN_TYPE_INNER;    
+    public $joinType = self::JOIN_TYPE_INNER;
     public $joinAssociationPathExpression = null;
     public $aliasIdentificationVariable = null;
     public $conditionalExpression = null;
@@ -50,7 +50,7 @@ public function __construct($joinType, $joinAssocPathExpr, $aliasIdentVar)
         $this->joinAssociationPathExpression = $joinAssocPathExpr;
         $this->aliasIdentificationVariable = $aliasIdentVar;
     }
-    
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkJoin($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php b/src/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php
index 7f87e52f89..f9300b2ede 100644
--- a/src/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php
@@ -18,7 +18,7 @@
  * and is licensed under the LGPL. For more information, see
  * .
  */
- 
+
 namespace Doctrine\ORM\Query\AST;
 
 /**
diff --git a/src/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php b/src/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php
index 687eba38d4..7fa9562223 100644
--- a/src/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php
+++ b/src/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php
@@ -42,7 +42,7 @@ public function __construct($join, $indexBy)
         $this->join = $join;
         $this->indexBy = $indexBy;
     }
-    
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkJoinVariableDeclaration($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/Literal.php b/src/lib/Doctrine/ORM/Query/AST/Literal.php
index d3acb96255..426907f6d7 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Literal.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Literal.php
@@ -7,16 +7,16 @@ class Literal extends Node
     const STRING = 1;
     const BOOLEAN = 2;
     const NUMERIC = 3;
-    
+
     public $type;
     public $value;
-    
+
     public function __construct($type, $value)
     {
         $this->type = $type;
         $this->value = $value;
     }
-    
+
     public function dispatch($walker)
     {
         return $walker->walkLiteral($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/Node.php b/src/lib/Doctrine/ORM/Query/AST/Node.php
index adaf06caec..8ef13c0b53 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Node.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Node.php
@@ -36,16 +36,16 @@ abstract class Node
 {
     /**
      * Double-dispatch method, supposed to dispatch back to the walker.
-     * 
+     *
      * Implementation is not mandatory for all nodes.
-     * 
+     *
      * @param $walker
      */
     public function dispatch($walker)
     {
         throw ASTException::noDispatchForNode($this);
     }
-    
+
     /**
      * Dumps the AST Node into a string representation for information purpose only
      *
@@ -55,36 +55,36 @@ public function __toString()
     {
         return $this->dump($this);
     }
-    
+
     public function dump($obj)
     {
         static $ident = 0;
-        
+
         $str = '';
-        
+
         if ($obj instanceof Node) {
             $str .= get_class($obj) . '(' . PHP_EOL;
             $props = get_object_vars($obj);
-                
+
             foreach ($props as $name => $prop) {
                 $ident += 4;
-                $str .= str_repeat(' ', $ident) . '"' . $name . '": ' 
+                $str .= str_repeat(' ', $ident) . '"' . $name . '": '
                       . $this->dump($prop) . ',' . PHP_EOL;
                 $ident -= 4;
             }
-                
+
             $str .= str_repeat(' ', $ident) . ')';
         } else if (is_array($obj)) {
             $ident += 4;
             $str .= 'array(';
             $some = false;
-                
+
             foreach ($obj as $k => $v) {
-                $str .= PHP_EOL . str_repeat(' ', $ident) . '"' 
+                $str .= PHP_EOL . str_repeat(' ', $ident) . '"'
                       . $k . '" => ' . $this->dump($v) . ',';
                 $some = true;
             }
-                
+
             $ident -= 4;
             $str .= ($some ? PHP_EOL . str_repeat(' ', $ident) : '') . ')';
         } else if (is_object($obj)) {
@@ -92,7 +92,7 @@ public function dump($obj)
         } else {
             $str .= var_export($obj, true);
         }
-          
+
         return $str;
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php b/src/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php
index aa205b7126..0e64bd2fbc 100644
--- a/src/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/NullComparisonExpression.php
@@ -36,7 +36,7 @@ class NullComparisonExpression extends Node
 {
     public $not;
     public $expression;
-    
+
     public function __construct($expression)
     {
         $this->expression = $expression;
diff --git a/src/lib/Doctrine/ORM/Query/AST/NullIfExpression.php b/src/lib/Doctrine/ORM/Query/AST/NullIfExpression.php
index c79d23a99e..12c8c140fd 100644
--- a/src/lib/Doctrine/ORM/Query/AST/NullIfExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/NullIfExpression.php
@@ -33,15 +33,15 @@
 class NullIfExpression extends Node
 {
     public $firstExpression;
-    
+
     public $secondExpression;
 
     public function __construct($firstExpression, $secondExpression)
     {
         $this->firstExpression  = $firstExpression;
         $this->secondExpression = $secondExpression;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkNullIfExpression($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/OrderByItem.php b/src/lib/Doctrine/ORM/Query/AST/OrderByItem.php
index a05bac32b0..207cbd3699 100644
--- a/src/lib/Doctrine/ORM/Query/AST/OrderByItem.php
+++ b/src/lib/Doctrine/ORM/Query/AST/OrderByItem.php
@@ -36,7 +36,7 @@ class OrderByItem extends Node
 {
     public $expression;
     public $type;
-    
+
     public function __construct($expression)
     {
         $this->expression = $expression;
diff --git a/src/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php b/src/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php
index 08fd564f2f..d1757d7909 100644
--- a/src/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/PartialObjectExpression.php
@@ -6,7 +6,7 @@ class PartialObjectExpression extends Node
 {
     public $identificationVariable;
     public $partialFieldSet;
-    
+
     public function __construct($identificationVariable, array $partialFieldSet)
     {
         $this->identificationVariable = $identificationVariable;
diff --git a/src/lib/Doctrine/ORM/Query/AST/PathExpression.php b/src/lib/Doctrine/ORM/Query/AST/PathExpression.php
index 45042c2ea2..2f78b9c26b 100644
--- a/src/lib/Doctrine/ORM/Query/AST/PathExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/PathExpression.php
@@ -16,7 +16,7 @@
  * and is licensed under the LGPL. For more information, see
  * .
  */
- 
+
 namespace Doctrine\ORM\Query\AST;
 
 /**
@@ -27,7 +27,7 @@
  * CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField
  * StateField ::= {EmbeddedClassStateField "."}* SimpleStateField
  * SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField
- * 
+ *
  * @since   2.0
  * @author  Guilherme Blanco 
  * @author  Jonathan Wage 
@@ -38,19 +38,19 @@ class PathExpression extends Node
     const TYPE_COLLECTION_VALUED_ASSOCIATION = 2;
     const TYPE_SINGLE_VALUED_ASSOCIATION = 4;
     const TYPE_STATE_FIELD = 8;
-    
+
     public $type;
     public $expectedType;
     public $identificationVariable;
     public $field;
-    
+
     public function __construct($expectedType, $identificationVariable, $field = null)
     {
         $this->expectedType = $expectedType;
         $this->identificationVariable = $identificationVariable;
         $this->field = $field;
     }
-    
+
     public function dispatch($walker)
     {
         return $walker->walkPathExpression($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php b/src/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php
index 7a01bdcbe8..cf8b180206 100644
--- a/src/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php
+++ b/src/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php
@@ -41,8 +41,8 @@ public function __construct($abstractSchemaName, $aliasIdentificationVar)
     {
         $this->abstractSchemaName = $abstractSchemaName;
         $this->aliasIdentificationVariable = $aliasIdentificationVar;
-    }    
-    
+    }
+
     public function dispatch($walker)
     {
         return $walker->walkRangeVariableDeclaration($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SelectClause.php b/src/lib/Doctrine/ORM/Query/AST/SelectClause.php
index ed9fbaa348..cf8e9df301 100644
--- a/src/lib/Doctrine/ORM/Query/AST/SelectClause.php
+++ b/src/lib/Doctrine/ORM/Query/AST/SelectClause.php
@@ -42,7 +42,7 @@ public function __construct(array $selectExpressions, $isDistinct)
         $this->isDistinct = $isDistinct;
         $this->selectExpressions = $selectExpressions;
     }
-    
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSelectClause($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SelectExpression.php b/src/lib/Doctrine/ORM/Query/AST/SelectExpression.php
index f1793f0c46..fd0d49b286 100644
--- a/src/lib/Doctrine/ORM/Query/AST/SelectExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/SelectExpression.php
@@ -23,7 +23,7 @@
 
 /**
  * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression |
- *	                    (AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable]
+ *	                    (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable]
  *
  * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
  * @link    www.doctrine-project.org
@@ -37,13 +37,15 @@ class SelectExpression extends Node
 {
     public $expression;
     public $fieldIdentificationVariable;
+    public $hiddenAliasResultVariable;
 
-    public function __construct($expression, $fieldIdentificationVariable)
+    public function __construct($expression, $fieldIdentificationVariable, $hiddenAliasResultVariable = false)
     {
         $this->expression = $expression;
         $this->fieldIdentificationVariable = $fieldIdentificationVariable;
-    }    
-    
+        $this->hiddenAliasResultVariable = $hiddenAliasResultVariable;
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSelectExpression($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SelectStatement.php b/src/lib/Doctrine/ORM/Query/AST/SelectStatement.php
index 01eed37d02..d65a97befc 100644
--- a/src/lib/Doctrine/ORM/Query/AST/SelectStatement.php
+++ b/src/lib/Doctrine/ORM/Query/AST/SelectStatement.php
@@ -44,8 +44,8 @@ class SelectStatement extends Node
     public function __construct($selectClause, $fromClause) {
         $this->selectClause = $selectClause;
         $this->fromClause = $fromClause;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSelectStatement($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php b/src/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php
new file mode 100644
index 0000000000..586928df3c
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/SimpleCaseExpression.php
@@ -0,0 +1,50 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST;
+
+/**
+ * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END"
+ *
+ * @since   2.2
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @author  Benjamin Eberlei 
+ * @author  Guilherme Blanco 
+ * @author  Jonathan Wage 
+ * @author  Roman Borschel 
+ */
+class SimpleCaseExpression extends Node
+{
+    public $caseOperand = null;
+    public $simpleWhenClauses = array();
+    public $elseScalarExpression = null;
+
+    public function __construct($caseOperand, array $simpleWhenClauses, $elseScalarExpression)
+    {
+        $this->caseOperand = $caseOperand;
+        $this->simpleWhenClauses = $simpleWhenClauses;
+        $this->elseScalarExpression = $elseScalarExpression;
+    }
+
+    public function dispatch($sqlWalker)
+    {
+        return $sqlWalker->walkSimpleCaseExpression($this);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php b/src/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php
index e3b93e7f63..8a4028036c 100644
--- a/src/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php
+++ b/src/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php
@@ -42,7 +42,7 @@ public function __construct($simpleSelectExpression, $isDistinct)
         $this->simpleSelectExpression = $simpleSelectExpression;
         $this->isDistinct = $isDistinct;
     }
-    
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSimpleSelectClause($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php b/src/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php
index e25d38bfc2..1648c4dc57 100644
--- a/src/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php
+++ b/src/lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php
@@ -41,8 +41,8 @@ class SimpleSelectExpression extends Node
     public function __construct($expression)
     {
         $this->expression = $expression;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSimpleSelectExpression($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php b/src/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php
new file mode 100644
index 0000000000..0345328a66
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/SimpleWhenClause.php
@@ -0,0 +1,48 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST;
+
+/**
+ * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression
+ *
+ * @since   2.2
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @author  Benjamin Eberlei 
+ * @author  Guilherme Blanco 
+ * @author  Jonathan Wage 
+ * @author  Roman Borschel 
+ */
+class SimpleWhenClause extends Node
+{
+    public $caseScalarExpression = null;
+    public $thenScalarExpression = null;
+
+    public function __construct($caseScalarExpression, $thenScalarExpression)
+    {
+        $this->caseScalarExpression = $caseScalarExpression;
+        $this->thenScalarExpression = $thenScalarExpression;
+    }
+
+    public function dispatch($sqlWalker)
+    {
+        return $sqlWalker->walkWhenClauseExpression($this);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/Subselect.php b/src/lib/Doctrine/ORM/Query/AST/Subselect.php
index fa5d3356aa..548e42ba74 100644
--- a/src/lib/Doctrine/ORM/Query/AST/Subselect.php
+++ b/src/lib/Doctrine/ORM/Query/AST/Subselect.php
@@ -45,8 +45,8 @@ public function __construct($simpleSelectClause, $subselectFromClause)
     {
         $this->simpleSelectClause = $simpleSelectClause;
         $this->subselectFromClause = $subselectFromClause;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSubselect($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php b/src/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php
index 44d2b59888..c7c2f35f8c 100644
--- a/src/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php
+++ b/src/lib/Doctrine/ORM/Query/AST/SubselectFromClause.php
@@ -39,8 +39,8 @@ class SubselectFromClause extends Node
     public function __construct(array $identificationVariableDeclarations)
     {
         $this->identificationVariableDeclarations = $identificationVariableDeclarations;
-    }    
-    
+    }
+
     public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkSubselectFromClause($this);
diff --git a/src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php b/src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php
index 7bf40bbc64..d1e152ea25 100644
--- a/src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php
+++ b/src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php
@@ -46,4 +46,4 @@ public function dispatch($sqlWalker)
     {
         return $sqlWalker->walkUpdateStatement($this);
     }
-}    
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/AST/WhenClause.php b/src/lib/Doctrine/ORM/Query/AST/WhenClause.php
new file mode 100644
index 0000000000..69556e5be7
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/AST/WhenClause.php
@@ -0,0 +1,48 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\AST;
+
+/**
+ * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression
+ *
+ * @since   2.2
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @author  Benjamin Eberlei 
+ * @author  Guilherme Blanco 
+ * @author  Jonathan Wage 
+ * @author  Roman Borschel 
+ */
+class WhenClause extends Node
+{
+    public $caseConditionExpression = null;
+    public $thenScalarExpression = null;
+
+    public function __construct($caseConditionExpression, $thenScalarExpression)
+    {
+        $this->caseConditionExpression = $caseConditionExpression;
+        $this->thenScalarExpression = $thenScalarExpression;
+    }
+
+    public function dispatch($sqlWalker)
+    {
+        return $sqlWalker->walkWhenClauseExpression($this);
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php b/src/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php
index 7879b0ff29..d639223485 100644
--- a/src/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php
+++ b/src/lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php
@@ -1,7 +1,5 @@
 _sqlStatements;
     }
 
+    public function setQueryCacheProfile(QueryCacheProfile $qcp)
+    {
+        $this->queryCacheProfile = $qcp;
+    }
+
     /**
      * Executes all sql statements.
      *
-     * @param Doctrine\DBAL\Connection $conn The database connection that is used to execute the queries.
+     * @param \Doctrine\DBAL\Connection $conn The database connection that is used to execute the queries.
      * @param array $params  The parameters.
-     * @return Doctrine\DBAL\Driver\Statement
+     * @param array $types The parameter types.
+     * @return \Doctrine\DBAL\Driver\Statement
      */
-    abstract public function execute(Connection $conn, array $params, array $types);    
+    abstract public function execute(Connection $conn, array $params, array $types);
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php b/src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php
index e8bb202121..51f4b8c5b1 100644
--- a/src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php
+++ b/src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php
@@ -1,7 +1,5 @@
 MultiTableDeleteExecutor.
      *
@@ -63,11 +60,11 @@ public function __construct(AST\Node $AST, $sqlWalker)
         $idColumnList = implode(', ', $idColumnNames);
 
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
-        $sqlWalker->setSQLTableAlias($primaryClass->table['name'], 't0', $primaryDqlAlias);
+        $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $primaryDqlAlias);
 
         $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
                 . ' SELECT t0.' . implode(', t0.', $idColumnNames);
-        
+
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias);
         $fromClause = new AST\FromClause(array(new AST\IdentificationVariableDeclaration($rangeDecl, null, array())));
         $this->_insertSql .= $sqlWalker->walkFromClause($fromClause);
@@ -87,7 +84,7 @@ public function __construct(AST\Node $AST, $sqlWalker)
             $this->_sqlStatements[] = 'DELETE FROM ' . $tableName
                     . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
         }
-    
+
         // 4. Store DDL for temporary identifier table.
         $columnDefinitions = array();
         foreach ($idColumnNames as $idColumnName) {
@@ -98,15 +95,11 @@ public function __construct(AST\Node $AST, $sqlWalker)
         }
         $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
                 . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
-        $this->_dropTempTableSql = 'DROP TABLE ' . $tempTable;
+        $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
     }
 
     /**
-     * Executes all SQL statements.
-     *
-     * @param Doctrine\DBAL\Connection $conn The database connection that is used to execute the queries.
-     * @param array $params The parameters.
-     * @override
+     * {@inheritDoc}
      */
     public function execute(Connection $conn, array $params, array $types)
     {
diff --git a/src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php b/src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php
index d5cd9fb81f..8be24e5557 100644
--- a/src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php
+++ b/src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php
@@ -64,7 +64,7 @@ public function __construct(AST\Node $AST, $sqlWalker)
         $idColumnList = implode(', ', $idColumnNames);
 
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
-        $sqlWalker->setSQLTableAlias($primaryClass->table['name'], 't0', $updateClause->aliasIdentificationVariable);
+        $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable);
 
         $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
                 . ' SELECT t0.' . implode(', t0.', $idColumnNames);
@@ -80,7 +80,7 @@ public function __construct(AST\Node $AST, $sqlWalker)
         // 3. Create and store UPDATE statements
         $classNames = array_merge($primaryClass->parentClasses, array($primaryClass->name), $primaryClass->subClasses);
         $i = -1;
-        
+
         foreach (array_reverse($classNames) as $className) {
             $affected = false;
             $class = $em->getClassMetadata($className);
@@ -88,26 +88,27 @@ public function __construct(AST\Node $AST, $sqlWalker)
 
             foreach ($updateItems as $updateItem) {
                 $field = $updateItem->pathExpression->field;
-                
+
                 if (isset($class->fieldMappings[$field]) && ! isset($class->fieldMappings[$field]['inherited']) ||
                     isset($class->associationMappings[$field]) && ! isset($class->associationMappings[$field]['inherited'])) {
                     $newValue = $updateItem->newValue;
-                    
+
                     if ( ! $affected) {
                         $affected = true;
                         ++$i;
                     } else {
                         $updateSql .= ', ';
                     }
-                    
+
                     $updateSql .= $sqlWalker->walkUpdateItem($updateItem);
-                    
+
                     //FIXME: parameters can be more deeply nested. traverse the tree.
                     //FIXME (URGENT): With query cache the parameter is out of date. Move to execute() stage.
                     if ($newValue instanceof AST\InputParameter) {
                         $paramKey = $newValue->name;
-                        $this->_sqlParameters[$i][] = $sqlWalker->getQuery()->getParameter($paramKey);
-                        
+                        $this->_sqlParameters[$i]['parameters'][] = $sqlWalker->getQuery()->getParameter($paramKey);
+                        $this->_sqlParameters[$i]['types'][] = $sqlWalker->getQuery()->getParameterType($paramKey);
+
                         ++$this->_numParametersInUpdateClause;
                     }
                 }
@@ -117,12 +118,12 @@ public function __construct(AST\Node $AST, $sqlWalker)
                 $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
             }
         }
-        
+
         // Append WHERE clause to insertSql, if there is one.
         if ($AST->whereClause) {
             $this->_insertSql .= $sqlWalker->walkWhereClause($AST->whereClause);
         }
-        
+
         // 4. Store DDL for temporary identifier table.
         $columnDefinitions = array();
 
@@ -132,19 +133,15 @@ public function __construct(AST\Node $AST, $sqlWalker)
                 'type' => Type::getType($rootClass->getTypeOfColumn($idColumnName))
             );
         }
-        
+
         $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
                 . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
-        
-        $this->_dropTempTableSql = 'DROP TABLE ' . $tempTable;
+
+        $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
     }
 
     /**
-     * Executes all SQL statements.
-     *
-     * @param Connection $conn The database connection that is used to execute the queries.
-     * @param array $params The parameters.
-     * @override
+     * {@inheritDoc}
      */
     public function execute(Connection $conn, array $params, array $types)
     {
@@ -154,11 +151,23 @@ public function execute(Connection $conn, array $params, array $types)
         $conn->executeUpdate($this->_createTempTableSql);
 
         // Insert identifiers. Parameters from the update clause are cut off.
-        $numUpdated = $conn->executeUpdate($this->_insertSql, array_slice($params, $this->_numParametersInUpdateClause), $types);
+        $numUpdated = $conn->executeUpdate(
+            $this->_insertSql,
+            array_slice($params, $this->_numParametersInUpdateClause),
+            array_slice($types, $this->_numParametersInUpdateClause)
+        );
 
         // Execute UPDATE statements
         for ($i=0, $count=count($this->_sqlStatements); $i<$count; ++$i) {
-            $conn->executeUpdate($this->_sqlStatements[$i], isset($this->_sqlParameters[$i]) ? $this->_sqlParameters[$i] : array());
+            $parameters = array();
+            $types      = array();
+
+            if (isset($this->_sqlParameters[$i])) {
+                $parameters = isset($this->_sqlParameters[$i]['parameters']) ? $this->_sqlParameters[$i]['parameters'] : array();
+                $types = isset($this->_sqlParameters[$i]['types']) ? $this->_sqlParameters[$i]['types'] : array();
+            }
+
+            $conn->executeUpdate($this->_sqlStatements[$i], $parameters, $types);
         }
 
         // Drop temporary table
diff --git a/src/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php b/src/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php
index 4e08e0f9cf..61c42d828e 100644
--- a/src/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php
+++ b/src/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php
@@ -1,7 +1,5 @@
 
- * @version     $Revision$
  * @link        www.doctrine-project.org
  * @since       2.0
  */
@@ -41,8 +38,11 @@ public function __construct(SelectStatement $AST, SqlWalker $sqlWalker)
         $this->_sqlStatements = $sqlWalker->walkSelectStatement($AST);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public function execute(Connection $conn, array $params, array $types)
     {
-        return $conn->executeQuery($this->_sqlStatements, $params, $types);
+        return $conn->executeQuery($this->_sqlStatements, $params, $types, $this->queryCacheProfile);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php b/src/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php
index 94db13b055..467ce54602 100644
--- a/src/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php
+++ b/src/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php
@@ -1,7 +1,5 @@
 
- * @version     $Revision$
  * @link        www.doctrine-project.org
  * @since       2.0
- * @todo This is exactly the same as SingleSelectExecutor. Unify in SingleStatementExecutor. 
+ * @todo This is exactly the same as SingleSelectExecutor. Unify in SingleStatementExecutor.
  */
 class SingleTableDeleteUpdateExecutor extends AbstractSqlExecutor
 {
@@ -45,7 +42,10 @@ public function __construct(AST\Node $AST, $sqlWalker)
             $this->_sqlStatements = $sqlWalker->walkDeleteStatement($AST);
         }
     }
-    
+
+    /**
+     * {@inheritDoc}
+     */
     public function execute(Connection $conn, array $params, array $types)
     {
         return $conn->executeUpdate($this->_sqlStatements, $params, $types);
diff --git a/src/lib/Doctrine/ORM/Query/Expr.php b/src/lib/Doctrine/ORM/Query/Expr.php
index 246f927171..adcd25cda6 100644
--- a/src/lib/Doctrine/ORM/Query/Expr.php
+++ b/src/lib/Doctrine/ORM/Query/Expr.php
@@ -40,10 +40,12 @@ class Expr
      *
      *     [php]
      *     // (u.type = ?1) AND (u.role = ?2)
-     *     $expr->andX('u.type = ?1', 'u.role = ?2'));
+     *     $expr->andX($expr->eq('u.type', ':1'), $expr->eq('u.role', ':2'));
      *
-     * @param mixed $x Optional clause. Defaults = null, but requires
-     *                 at least one defined when converting to string.
+     * @param \Doctrine\ORM\Query\Expr\Comparison |
+     *          \Doctrine\ORM\Query\Expr\Func |
+     *          \Doctrine\ORM\Query\Expr\Orx
+    *               $x Optional clause. Defaults = null, but requires at least one defined when converting to string.
      * @return Expr\Andx
      */
     public function andX($x = null)
@@ -73,7 +75,7 @@ public function orX($x = null)
      * Creates an ASCending order expression.
      *
      * @param $sort
-     * @return OrderBy
+     * @return Expr\OrderBy
      */
     public function asc($expr)
     {
@@ -84,7 +86,7 @@ public function asc($expr)
      * Creates a DESCending order expression.
      *
      * @param $sort
-     * @return OrderBy
+     * @return Expr\OrderBy
      */
     public function desc($expr)
     {
@@ -560,6 +562,8 @@ private function _quoteLiteral($literal)
     {
         if (is_numeric($literal) && !is_string($literal)) {
             return (string) $literal;
+        } else if (is_bool($literal)) {
+            return $literal ? "true" : "false";
         } else {
             return "'" . str_replace("'", "''", $literal) . "'";
         }
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Andx.php b/src/lib/Doctrine/ORM/Query/Expr/Andx.php
index c26055c2af..c5cf1f3ab9 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Andx.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Andx.php
@@ -39,5 +39,6 @@ class Andx extends Composite
         'Doctrine\ORM\Query\Expr\Comparison',
         'Doctrine\ORM\Query\Expr\Func',
         'Doctrine\ORM\Query\Expr\Orx',
+        'Doctrine\ORM\Query\Expr\Andx',
     );
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Base.php b/src/lib/Doctrine/ORM/Query/Expr/Base.php
index abe7e54beb..975d450cd4 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Base.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Base.php
@@ -45,17 +45,19 @@ public function __construct($args = array())
     {
         $this->addMultiple($args);
     }
-    
+
     public function addMultiple($args = array())
     {
         foreach ((array) $args as $arg) {
             $this->add($arg);
         }
+
+        return $this;
     }
 
     public function add($arg)
     {
-        if ( $arg !== null || ($arg instanceof self && $arg->count() > 0)) {
+        if ( $arg !== null || ($arg instanceof self && $arg->count() > 0) ) {
             // If we decide to keep Expr\Base instances, we can use this check
             if ( ! is_string($arg)) {
                 $class = get_class($arg);
@@ -67,6 +69,8 @@ public function add($arg)
 
             $this->_parts[] = $arg;
         }
+
+        return $this;
     }
 
     public function count()
@@ -79,7 +83,7 @@ public function __toString()
         if ($this->count() == 1) {
             return (string) $this->_parts[0];
         }
-        
+
         return $this->_preSeparator . implode($this->_separator, $this->_parts) . $this->_postSeparator;
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Comparison.php b/src/lib/Doctrine/ORM/Query/Expr/Comparison.php
index 7fcd263a27..d42560eb79 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Comparison.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Comparison.php
@@ -40,7 +40,7 @@ class Comparison
     const LTE = '<=';
     const GT  = '>';
     const GTE = '>=';
-    
+
     private $_leftExpr;
     private $_operator;
     private $_rightExpr;
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Composite.php b/src/lib/Doctrine/ORM/Query/Expr/Composite.php
index 0d606a9b05..036b241a5f 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Composite.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Composite.php
@@ -39,30 +39,30 @@ public function __toString()
         if ($this->count() === 1) {
             return (string) $this->_parts[0];
         }
-        
+
         $components = array();
-        
+
         foreach ($this->_parts as $part) {
             $components[] = $this->processQueryPart($part);
         }
-        
+
         return implode($this->_separator, $components);
     }
-    
-    
+
+
     private function processQueryPart($part)
     {
         $queryPart = (string) $part;
-        
+
         if (is_object($part) && $part instanceof self && $part->count() > 1) {
             return $this->_preSeparator . $queryPart . $this->_postSeparator;
         }
-        
+
         // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND")
-        if (mb_stripos($queryPart, ' OR ') !== false || mb_stripos($queryPart, ' AND ') !== false) {
+        if (stripos($queryPart, ' OR ') !== false || stripos($queryPart, ' AND ') !== false) {
             return $this->_preSeparator . $queryPart . $this->_postSeparator;
         }
-        
+
         return $queryPart;
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Expr/From.php b/src/lib/Doctrine/ORM/Query/Expr/From.php
index 6646e1de2b..e5707cce63 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/From.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/From.php
@@ -34,27 +34,55 @@
  */
 class From
 {
+    /**
+     * @var string
+     */
     private $_from;
+
+    /**
+     * @var string
+     */
     private $_alias;
 
-    public function __construct($from, $alias)
+    /**
+     * @var string
+     */
+    private $_indexBy;
+
+    /**
+     * @param string $from      The class name.
+     * @param string $alias     The alias of the class.
+     * @param string $indexBy   The index for the from.
+     */
+    public function __construct($from, $alias, $indexBy = null)
     {
-        $this->_from  = $from;
-        $this->_alias  = $alias;
+        $this->_from    = $from;
+        $this->_alias   = $alias;
+        $this->_indexBy = $indexBy;
     }
 
+    /**
+     * @return string
+     */
     public function getFrom()
     {
         return $this->_from;
     }
 
+    /**
+     * @return string
+     */
     public function getAlias()
     {
         return $this->_alias;
     }
 
+    /**
+     * @return string
+     */
     public function __toString()
     {
-        return $this->_from . ' ' . $this->_alias;
+        return $this->_from . ' ' . $this->_alias .
+                ($this->_indexBy ? ' INDEX BY ' . $this->_indexBy : '');
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Join.php b/src/lib/Doctrine/ORM/Query/Expr/Join.php
index 54ad6ead79..14f5b43cd8 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Join.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Join.php
@@ -36,10 +36,10 @@ class Join
 {
     const INNER_JOIN = 'INNER';
     const LEFT_JOIN  = 'LEFT';
-    
+
     const ON   = 'ON';
     const WITH = 'WITH';
-    
+
     private $_joinType;
     private $_join;
     private $_alias;
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Math.php b/src/lib/Doctrine/ORM/Query/Expr/Math.php
index c6135c8662..e7e8b329c8 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Math.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Math.php
@@ -49,18 +49,18 @@ public function __toString()
     {
         // Adjusting Left Expression
         $leftExpr = (string) $this->_leftExpr;
-        
+
         if ($this->_leftExpr instanceof Math) {
             $leftExpr = '(' . $leftExpr . ')';
         }
-        
+
         // Adjusting Right Expression
         $rightExpr = (string) $this->_rightExpr;
-        
+
         if ($this->_rightExpr instanceof Math) {
             $rightExpr = '(' . $rightExpr . ')';
         }
-    
+
         return $leftExpr . ' ' . $this->_operator . ' ' . $rightExpr;
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Expr/Orx.php b/src/lib/Doctrine/ORM/Query/Expr/Orx.php
index 7eb66535c3..742e499f79 100644
--- a/src/lib/Doctrine/ORM/Query/Expr/Orx.php
+++ b/src/lib/Doctrine/ORM/Query/Expr/Orx.php
@@ -36,8 +36,9 @@ class Orx extends Composite
 {
     protected $_separator = ' OR ';
     protected $_allowedClasses = array(
-        'Doctrine\ORM\Query\Expr\Andx',
         'Doctrine\ORM\Query\Expr\Comparison',
         'Doctrine\ORM\Query\Expr\Func',
+        'Doctrine\ORM\Query\Expr\Andx',
+        'Doctrine\ORM\Query\Expr\Orx',
     );
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/Filter/SQLFilter.php b/src/lib/Doctrine/ORM/Query/Filter/SQLFilter.php
new file mode 100644
index 0000000000..a87dd841eb
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/Filter/SQLFilter.php
@@ -0,0 +1,122 @@
+.
+ */
+
+namespace Doctrine\ORM\Query\Filter;
+
+use Doctrine\ORM\EntityManager,
+    Doctrine\ORM\Mapping\ClassMetaData,
+    Doctrine\ORM\Query\ParameterTypeInferer;
+
+/**
+ * The base class that user defined filters should extend.
+ *
+ * Handles the setting and escaping of parameters.
+ *
+ * @author Alexander 
+ * @author Benjamin Eberlei 
+ * @abstract
+ */
+abstract class SQLFilter
+{
+    /**
+     * The entity manager.
+     * @var EntityManager
+     */
+    private $em;
+
+    /**
+     * Parameters for the filter.
+     * @var array
+     */
+    private $parameters;
+
+    /**
+     * Constructs the SQLFilter object.
+     *
+     * @param EntityManager $em The EM
+     */
+    final public function __construct(EntityManager $em)
+    {
+        $this->em = $em;
+    }
+
+    /**
+     * Sets a parameter that can be used by the filter.
+     *
+     * @param string $name Name of the parameter.
+     * @param string $value Value of the parameter.
+     * @param string $type The parameter type. If specified, the given value will be run through
+     *                     the type conversion of this type. This is usually not needed for
+     *                     strings and numeric types.
+     *
+     * @return SQLFilter The current SQL filter.
+     */
+    final public function setParameter($name, $value, $type = null)
+    {
+        if (null === $type) {
+            $type = ParameterTypeInferer::inferType($value);
+        }
+
+        $this->parameters[$name] = array('value' => $value, 'type' => $type);
+
+        // Keep the parameters sorted for the hash
+        ksort($this->parameters);
+
+        // The filter collection of the EM is now dirty
+        $this->em->getFilters()->setFiltersStateDirty();
+
+        return $this;
+    }
+
+    /**
+     * Gets a parameter to use in a query.
+     *
+     * The function is responsible for the right output escaping to use the
+     * value in a query.
+     *
+     * @param string $name Name of the parameter.
+     *
+     * @return string The SQL escaped parameter to use in a query.
+     */
+    final public function getParameter($name)
+    {
+        if (!isset($this->parameters[$name])) {
+            throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist.");
+        }
+
+        return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
+    }
+
+    /**
+     * Returns as string representation of the SQLFilter parameters (the state).
+     *
+     * @return string String representation of the SQLFilter.
+     */
+    final public function __toString()
+    {
+        return serialize($this->parameters);
+    }
+
+    /**
+     * Gets the SQL query part to add to a query.
+     *
+     * @return string The constraint SQL if there is available, empty string otherwise
+     */
+    abstract public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias);
+}
diff --git a/src/lib/Doctrine/ORM/Query/FilterCollection.php b/src/lib/Doctrine/ORM/Query/FilterCollection.php
new file mode 100644
index 0000000000..35c8d043cc
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Query/FilterCollection.php
@@ -0,0 +1,198 @@
+.
+ */
+
+namespace Doctrine\ORM\Query;
+
+use Doctrine\ORM\Configuration,
+    Doctrine\ORM\EntityManager;
+
+/**
+ * Collection class for all the query filters.
+ *
+ * @author Alexander 
+ */
+class FilterCollection
+{
+    /* Filter STATES */
+    /**
+     * A filter object is in CLEAN state when it has no changed parameters.
+     */
+    const FILTERS_STATE_CLEAN  = 1;
+
+    /**
+     * A filter object is in DIRTY state when it has changed parameters.
+     */
+    const FILTERS_STATE_DIRTY = 2;
+
+    /**
+     * The used Configuration.
+     *
+     * @var Doctrine\ORM\Configuration
+     */
+    private $config;
+
+    /**
+     * The EntityManager that "owns" this FilterCollection instance.
+     *
+     * @var Doctrine\ORM\EntityManager
+     */
+    private $em;
+
+    /**
+     * Instances of enabled filters.
+     *
+     * @var array
+     */
+    private $enabledFilters = array();
+
+    /**
+     * @var string The filter hash from the last time the query was parsed.
+     */
+    private $filterHash;
+
+    /**
+     * @var integer $state The current state of this filter
+     */
+    private $filtersState = self::FILTERS_STATE_CLEAN;
+
+    /**
+     * Constructor.
+     *
+     * @param EntityManager $em
+     */
+    public function __construct(EntityManager $em)
+    {
+        $this->em = $em;
+        $this->config = $em->getConfiguration();
+    }
+
+    /**
+     * Get all the enabled filters.
+     *
+     * @return array The enabled filters.
+     */
+    public function getEnabledFilters()
+    {
+        return $this->enabledFilters;
+    }
+
+    /**
+     * Enables a filter from the collection.
+     *
+     * @param string $name Name of the filter.
+     *
+     * @throws \InvalidArgumentException If the filter does not exist.
+     *
+     * @return SQLFilter The enabled filter.
+     */
+    public function enable($name)
+    {
+        if (null === $filterClass = $this->config->getFilterClassName($name)) {
+            throw new \InvalidArgumentException("Filter '" . $name . "' does not exist.");
+        }
+
+        if (!isset($this->enabledFilters[$name])) {
+            $this->enabledFilters[$name] = new $filterClass($this->em);
+
+            // Keep the enabled filters sorted for the hash
+            ksort($this->enabledFilters);
+
+            // Now the filter collection is dirty
+            $this->filtersState = self::FILTERS_STATE_DIRTY;
+        }
+
+        return $this->enabledFilters[$name];
+    }
+
+    /**
+     * Disables a filter.
+     *
+     * @param string $name Name of the filter.
+     *
+     * @return SQLFilter The disabled filter.
+     *
+     * @throws \InvalidArgumentException If the filter does not exist.
+     */
+    public function disable($name)
+    {
+        // Get the filter to return it
+        $filter = $this->getFilter($name);
+
+        unset($this->enabledFilters[$name]);
+
+        // Now the filter collection is dirty
+        $this->filtersState = self::FILTERS_STATE_DIRTY;
+
+        return $filter;
+    }
+
+    /**
+     * Get an enabled filter from the collection.
+     *
+     * @param string $name Name of the filter.
+     *
+     * @return SQLFilter The filter.
+     *
+     * @throws \InvalidArgumentException If the filter is not enabled.
+     */
+    public function getFilter($name)
+    {
+        if (!isset($this->enabledFilters[$name])) {
+            throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled.");
+        }
+
+        return $this->enabledFilters[$name];
+    }
+
+    /**
+     * @return boolean True, if the filter collection is clean.
+     */
+    public function isClean()
+    {
+        return self::FILTERS_STATE_CLEAN === $this->filtersState;
+    }
+
+    /**
+     * Generates a string of currently enabled filters to use for the cache id.
+     *
+     * @return string
+     */
+    public function getHash()
+    {
+        // If there are only clean filters, the previous hash can be returned
+        if (self::FILTERS_STATE_CLEAN === $this->filtersState) {
+            return $this->filterHash;
+        }
+
+        $filterHash = '';
+        foreach ($this->enabledFilters as $name => $filter) {
+            $filterHash .= $name . $filter;
+        }
+
+        return $filterHash;
+    }
+
+    /**
+     * Set the filter state to dirty.
+     */
+    public function setFiltersStateDirty()
+    {
+        $this->filtersState = self::FILTERS_STATE_DIRTY;
+    }
+}
diff --git a/src/lib/Doctrine/ORM/Query/Lexer.php b/src/lib/Doctrine/ORM/Query/Lexer.php
index 70c8b7db6a..1eef6afebd 100644
--- a/src/lib/Doctrine/ORM/Query/Lexer.php
+++ b/src/lib/Doctrine/ORM/Query/Lexer.php
@@ -49,7 +49,7 @@ class Lexer extends \Doctrine\Common\Lexer
     const T_PLUS                = 17;
     const T_OPEN_CURLY_BRACE    = 18;
     const T_CLOSE_CURLY_BRACE   = 19;
-    
+
     // All tokens that are also identifiers should be >= 100
     const T_IDENTIFIER          = 100;
     const T_ALL                 = 101;
@@ -67,46 +67,50 @@ class Lexer extends \Doctrine\Common\Lexer
     const T_DELETE              = 113;
     const T_DESC                = 114;
     const T_DISTINCT            = 115;
-    const T_EMPTY               = 116;
-    const T_ESCAPE              = 117;
-    const T_EXISTS              = 118;
-    const T_FALSE               = 119;
-    const T_FROM                = 120;
-    const T_GROUP               = 121;
-    const T_HAVING              = 122;
-    const T_IN                  = 123;
-    const T_INDEX               = 124;
-    const T_INNER               = 125;
-    const T_INSTANCE            = 126;
-    const T_IS                  = 127;
-    const T_JOIN                = 128;
-    const T_LEADING             = 129;
-    const T_LEFT                = 130;
-    const T_LIKE                = 131;
-    const T_MAX                 = 132;
-    const T_MEMBER              = 133;
-    const T_MIN                 = 134;
-    const T_NOT                 = 135;
-    const T_NULL                = 136;
-    const T_NULLIF              = 137;
-    const T_OF                  = 138;
-    const T_OR                  = 139;
-    const T_ORDER               = 140;
-    const T_OUTER               = 141;
-    const T_SELECT              = 142;
-    const T_SET                 = 143;
-    const T_SIZE                = 144;
-    const T_SOME                = 145;
-    const T_SUM                 = 146;
-    const T_TRAILING            = 147;
-    const T_TRUE                = 148;
-    const T_UPDATE              = 149;
-    const T_WHEN                = 150;
-    const T_WHERE               = 151;
-    const T_WITH                = 153;
-    const T_PARTIAL             = 154;
-    const T_MOD                 = 155;
-   
+    const T_ELSE                = 116;
+    const T_EMPTY               = 117;
+    const T_END                 = 118;
+    const T_ESCAPE              = 119;
+    const T_EXISTS              = 120;
+    const T_FALSE               = 121;
+    const T_FROM                = 122;
+    const T_GROUP               = 123;
+    const T_HAVING              = 124;
+    const T_HIDDEN              = 125;
+    const T_IN                  = 126;
+    const T_INDEX               = 127;
+    const T_INNER               = 128;
+    const T_INSTANCE            = 129;
+    const T_IS                  = 130;
+    const T_JOIN                = 131;
+    const T_LEADING             = 132;
+    const T_LEFT                = 133;
+    const T_LIKE                = 134;
+    const T_MAX                 = 135;
+    const T_MEMBER              = 136;
+    const T_MIN                 = 137;
+    const T_NOT                 = 138;
+    const T_NULL                = 139;
+    const T_NULLIF              = 140;
+    const T_OF                  = 141;
+    const T_OR                  = 142;
+    const T_ORDER               = 143;
+    const T_OUTER               = 144;
+    const T_SELECT              = 145;
+    const T_SET                 = 146;
+    const T_SIZE                = 147;
+    const T_SOME                = 148;
+    const T_SUM                 = 149;
+    const T_THEN                = 150;
+    const T_TRAILING            = 151;
+    const T_TRUE                = 152;
+    const T_UPDATE              = 153;
+    const T_WHEN                = 154;
+    const T_WHERE               = 155;
+    const T_WITH                = 156;
+    const T_PARTIAL             = 157;
+    const T_MOD                 = 158;
+
     /**
      * Creates a new query scanner object.
      *
@@ -129,7 +133,7 @@ protected function getCatchablePatterns()
             '\?[0-9]*|:[a-z]{1}[a-z0-9_]{0,}'
         );
     }
-    
+
     /**
      * @inheritdoc
      */
@@ -145,50 +149,58 @@ protected function getType(&$value)
     {
         $type = self::T_NONE;
 
-        // Recognizing numeric values
-        if (is_numeric($value)) {
-            return (strpos($value, '.') !== false || stripos($value, 'e') !== false) 
-                    ? self::T_FLOAT : self::T_INTEGER;
-        }
+        switch (true) {
+            // Recognize numeric values
+            case (is_numeric($value)):
+                if (strpos($value, '.') !== false || stripos($value, 'e') !== false) {
+                    return self::T_FLOAT;
+                }
+
+                return self::T_INTEGER;
+
+            // Recognize quoted strings
+            case ($value[0] === "'"):
+                $value = str_replace("''", "'", substr($value, 1, strlen($value) - 2));
 
-        // Differentiate between quoted names, identifiers, input parameters and symbols
-        if ($value[0] === "'") {
-            $value = str_replace("''", "'", substr($value, 1, strlen($value) - 2));
-            return self::T_STRING;
-        } else if (ctype_alpha($value[0]) || $value[0] === '_') {
-            $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value);
-
-            if (defined($name)) {
-                $type = constant($name);
-                
-                if ($type > 100) {
-                    return $type;
+                return self::T_STRING;
+
+            // Recognize identifiers
+            case (ctype_alpha($value[0]) || $value[0] === '_'):
+                $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value);
+
+                if (defined($name)) {
+                    $type = constant($name);
+
+                    if ($type > 100) {
+                        return $type;
+                    }
                 }
-            }
-
-            return self::T_IDENTIFIER;
-        } else if ($value[0] === '?' || $value[0] === ':') {
-            return self::T_INPUT_PARAMETER;
-        } else {
-            switch ($value) {
-                case '.': return self::T_DOT;
-                case ',': return self::T_COMMA;
-                case '(': return self::T_OPEN_PARENTHESIS;
-                case ')': return self::T_CLOSE_PARENTHESIS;
-                case '=': return self::T_EQUALS;
-                case '>': return self::T_GREATER_THAN;
-                case '<': return self::T_LOWER_THAN;
-                case '+': return self::T_PLUS;
-                case '-': return self::T_MINUS;
-                case '*': return self::T_MULTIPLY;
-                case '/': return self::T_DIVIDE;
-                case '!': return self::T_NEGATE;
-                case '{': return self::T_OPEN_CURLY_BRACE;
-                case '}': return self::T_CLOSE_CURLY_BRACE;
-                default:
-                    // Do nothing
-                    break;
-            }
+
+                return self::T_IDENTIFIER;
+
+            // Recognize input parameters
+            case ($value[0] === '?' || $value[0] === ':'):
+                return self::T_INPUT_PARAMETER;
+
+            // Recognize symbols
+            case ($value === '.'): return self::T_DOT;
+            case ($value === ','): return self::T_COMMA;
+            case ($value === '('): return self::T_OPEN_PARENTHESIS;
+            case ($value === ')'): return self::T_CLOSE_PARENTHESIS;
+            case ($value === '='): return self::T_EQUALS;
+            case ($value === '>'): return self::T_GREATER_THAN;
+            case ($value === '<'): return self::T_LOWER_THAN;
+            case ($value === '+'): return self::T_PLUS;
+            case ($value === '-'): return self::T_MINUS;
+            case ($value === '*'): return self::T_MULTIPLY;
+            case ($value === '/'): return self::T_DIVIDE;
+            case ($value === '!'): return self::T_NEGATE;
+            case ($value === '{'): return self::T_OPEN_CURLY_BRACE;
+            case ($value === '}'): return self::T_CLOSE_CURLY_BRACE;
+
+            // Default
+            default:
+                // Do nothing
         }
 
         return $type;
diff --git a/src/lib/Doctrine/ORM/Query/ParameterTypeInferer.php b/src/lib/Doctrine/ORM/Query/ParameterTypeInferer.php
index d0e3e24b5f..39aef2974f 100644
--- a/src/lib/Doctrine/ORM/Query/ParameterTypeInferer.php
+++ b/src/lib/Doctrine/ORM/Query/ParameterTypeInferer.php
@@ -37,11 +37,11 @@ class ParameterTypeInferer
 {
     /**
      * Infer type of a given value, returning a compatible constant:
-     * - Type (Doctrine\DBAL\Types\Type::*) 
-     * - Connection (Doctrine\DBAL\Connection::PARAM_*)
-     * 
+     * - Type (\Doctrine\DBAL\Types\Type::*)
+     * - Connection (\Doctrine\DBAL\Connection::PARAM_*)
+     *
      * @param mixed $value Parameter value
-     * 
+     *
      * @return mixed Parameter type constant
      */
     public static function inferType($value)
diff --git a/src/lib/Doctrine/ORM/Query/Parser.php b/src/lib/Doctrine/ORM/Query/Parser.php
index 20a5122e6c..4200836802 100644
--- a/src/lib/Doctrine/ORM/Query/Parser.php
+++ b/src/lib/Doctrine/ORM/Query/Parser.php
@@ -2,7 +2,7 @@
 /*
  * 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
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHARNTABILITY 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
@@ -40,7 +40,8 @@ class Parser
         'substring' => 'Doctrine\ORM\Query\AST\Functions\SubstringFunction',
         'trim'      => 'Doctrine\ORM\Query\AST\Functions\TrimFunction',
         'lower'     => 'Doctrine\ORM\Query\AST\Functions\LowerFunction',
-        'upper'     => 'Doctrine\ORM\Query\AST\Functions\UpperFunction'
+        'upper'     => 'Doctrine\ORM\Query\AST\Functions\UpperFunction',
+        'identity'  => 'Doctrine\ORM\Query\AST\Functions\IdentityFunction',
     );
 
     /** READ-ONLY: Maps BUILT-IN numeric function names to AST class names. */
@@ -52,6 +53,8 @@ class Parser
         'mod'       => 'Doctrine\ORM\Query\AST\Functions\ModFunction',
         'size'      => 'Doctrine\ORM\Query\AST\Functions\SizeFunction',
         'date_diff' => 'Doctrine\ORM\Query\AST\Functions\DateDiffFunction',
+        'bit_and'   => 'Doctrine\ORM\Query\AST\Functions\BitAndFunction',
+        'bit_or'    => 'Doctrine\ORM\Query\AST\Functions\BitOrFunction',
     );
 
     /** READ-ONLY: Maps BUILT-IN datetime function names to AST class names. */
@@ -75,14 +78,14 @@ class Parser
     /**
      * The lexer.
      *
-     * @var Doctrine\ORM\Query\Lexer
+     * @var \Doctrine\ORM\Query\Lexer
      */
     private $_lexer;
 
     /**
      * The parser result.
      *
-     * @var Doctrine\ORM\Query\ParserResult
+     * @var \Doctrine\ORM\Query\ParserResult
      */
     private $_parserResult;
 
@@ -140,9 +143,9 @@ class Parser
      */
     public function __construct(Query $query)
     {
-        $this->_query = $query;
-        $this->_em = $query->getEntityManager();
-        $this->_lexer = new Lexer($query->getDql());
+        $this->_query        = $query;
+        $this->_em           = $query->getEntityManager();
+        $this->_lexer        = new Lexer($query->getDql());
         $this->_parserResult = new ParserResult();
     }
 
@@ -170,7 +173,7 @@ public function addCustomTreeWalker($className)
     /**
      * Gets the lexer used by the parser.
      *
-     * @return Doctrine\ORM\Query\Lexer
+     * @return \Doctrine\ORM\Query\Lexer
      */
     public function getLexer()
     {
@@ -180,7 +183,7 @@ public function getLexer()
     /**
      * Gets the ParserResult that is being filled with information during parsing.
      *
-     * @return Doctrine\ORM\Query\ParserResult
+     * @return \Doctrine\ORM\Query\ParserResult
      */
     public function getParserResult()
     {
@@ -225,6 +228,11 @@ public function getAST()
             $this->_processDeferredResultVariables();
         }
 
+        $this->_processRootEntityAliasSelected();
+
+        // TODO: Is there a way to remove this? It may impact the mixed hydration resultset a lot!
+        $this->fixIdentificationVariableOrder($AST);
+
         return $AST;
     }
 
@@ -240,11 +248,10 @@ public function getAST()
      */
     public function match($token)
     {
+        $lookaheadType = $this->_lexer->lookahead['type'];
+
         // short-circuit on first condition, usually types match
-        if ($this->_lexer->lookahead['type'] !== $token &&
-                $token !== Lexer::T_IDENTIFIER &&
-                $this->_lexer->lookahead['type'] <= Lexer::T_IDENTIFIER
-         ) {
+        if ($lookaheadType !== $token && $token !== Lexer::T_IDENTIFIER && $lookaheadType <= Lexer::T_IDENTIFIER) {
             $this->syntaxError($this->_lexer->getLiteral($token));
         }
 
@@ -280,9 +287,6 @@ public function parse()
     {
         $AST = $this->getAST();
 
-        $this->fixIdentificationVariableOrder($AST);
-        $this->assertSelectEntityRootAliasRequirement();
-
         if (($customWalkers = $this->_query->getHint(Query::HINT_CUSTOM_TREE_WALKERS)) !== false) {
             $this->_customTreeWalkers = $customWalkers;
         }
@@ -299,68 +303,57 @@ public function parse()
                 $treeWalkerChain->addTreeWalker($walker);
             }
 
-            if ($AST instanceof AST\SelectStatement) {
-                $treeWalkerChain->walkSelectStatement($AST);
-            } else if ($AST instanceof AST\UpdateStatement) {
-                $treeWalkerChain->walkUpdateStatement($AST);
-            } else {
-                $treeWalkerChain->walkDeleteStatement($AST);
+            switch (true) {
+                case ($AST instanceof AST\UpdateStatement):
+                    $treeWalkerChain->walkUpdateStatement($AST);
+                    break;
+
+                case ($AST instanceof AST\DeleteStatement):
+                    $treeWalkerChain->walkDeleteStatement($AST);
+                    break;
+
+                case ($AST instanceof AST\SelectStatement):
+                default:
+                    $treeWalkerChain->walkSelectStatement($AST);
             }
         }
 
-        if ($this->_customOutputWalker) {
-            $outputWalker = new $this->_customOutputWalker(
-                $this->_query, $this->_parserResult, $this->_queryComponents
-            );
-        } else {
-            $outputWalker = new SqlWalker(
-                $this->_query, $this->_parserResult, $this->_queryComponents
-            );
-        }
+        $outputWalkerClass = $this->_customOutputWalker ?: __NAMESPACE__ . '\SqlWalker';
+        $outputWalker      = new $outputWalkerClass($this->_query, $this->_parserResult, $this->_queryComponents);
 
         // Assign an SQL executor to the parser result
         $this->_parserResult->setSqlExecutor($outputWalker->getExecutor($AST));
 
         return $this->_parserResult;
     }
-    
-    private function assertSelectEntityRootAliasRequirement()
-    {
-        if ( count($this->_identVariableExpressions) > 0) {
-            $foundRootEntity = false;
-            foreach ($this->_identVariableExpressions AS $dqlAlias => $expr) {
-                if (isset($this->_queryComponents[$dqlAlias]) && $this->_queryComponents[$dqlAlias]['parent'] === null) {
-                    $foundRootEntity = true;
-                }
-            }
-            
-            if (!$foundRootEntity) {
-                $this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.');
-            }
-        }
-    }
-    
+
     /**
      * Fix order of identification variables.
-     * 
+     *
      * They have to appear in the select clause in the same order as the
      * declarations (from ... x join ... y join ... z ...) appear in the query
      * as the hydration process relies on that order for proper operation.
-     * 
+     *
      * @param AST\SelectStatement|AST\DeleteStatement|AST\UpdateStatement $AST
      * @return void
      */
     private function fixIdentificationVariableOrder($AST)
     {
-        if ( count($this->_identVariableExpressions) > 1) {
-            foreach ($this->_queryComponents as $dqlAlias => $qComp) {
-                if (isset($this->_identVariableExpressions[$dqlAlias])) {
-                    $expr = $this->_identVariableExpressions[$dqlAlias];
-                    $key = array_search($expr, $AST->selectClause->selectExpressions);
-                    unset($AST->selectClause->selectExpressions[$key]);
-                    $AST->selectClause->selectExpressions[] = $expr;
-                }
+        if (count($this->_identVariableExpressions) <= 1) {
+            return;
+        }
+
+        foreach ($this->_queryComponents as $dqlAlias => $qComp) {
+            if ( ! isset($this->_identVariableExpressions[$dqlAlias])) {
+                continue;
             }
+
+            $expr = $this->_identVariableExpressions[$dqlAlias];
+            $key  = array_search($expr, $AST->selectClause->selectExpressions);
+
+            unset($AST->selectClause->selectExpressions[$key]);
+
+            $AST->selectClause->selectExpressions[] = $expr;
         }
     }
 
@@ -379,19 +372,10 @@ public function syntaxError($expected = '', $token = null)
         }
 
         $tokenPos = (isset($token['position'])) ? $token['position'] : '-1';
-        $message  = "line 0, col {$tokenPos}: Error: ";
 
-        if ($expected !== '') {
-            $message .= "Expected {$expected}, got ";
-        } else {
-            $message .= 'Unexpected ';
-        }
-
-        if ($this->_lexer->lookahead === null) {
-            $message .= 'end of string.';
-        } else {
-            $message .= "'{$token['value']}'";
-        }
+        $message  = "line 0, col {$tokenPos}: Error: ";
+        $message .= ($expected !== '') ? "Expected {$expected}, got " : 'Unexpected ';
+        $message .= ($this->_lexer->lookahead === null) ? 'end of string.' : "'{$token['value']}'";
 
         throw QueryException::syntaxError($message);
     }
@@ -414,18 +398,19 @@ public function semanticalError($message = '', $token = null)
         $distance = 12;
 
         // Find a position of a final word to display in error string
-        $dql = $this->_query->getDql();
+        $dql    = $this->_query->getDql();
         $length = strlen($dql);
-        $pos = $token['position'] + $distance;
-        $pos = strpos($dql, ' ', ($length > $pos) ? $pos : $length);
+        $pos    = $token['position'] + $distance;
+        $pos    = strpos($dql, ' ', ($length > $pos) ? $pos : $length);
         $length = ($pos !== false) ? $pos - $token['position'] : $distance;
 
+        $tokenPos = (isset($token['position']) && $token['position'] > 0) ? $token['position'] : '-1';
+        $tokenStr = substr($dql, $token['position'], $length);
+
         // Building informative message
-        $message = 'line 0, col ' . (
-            (isset($token['position']) && $token['position'] > 0) ? $token['position'] : '-1'
-        ) . " near '" . substr($dql, $token['position'], $length) . "': Error: " . $message;
+        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
 
-        throw \Doctrine\ORM\Query\QueryException::semanticalError($message);
+        throw QueryException::semanticalError($message);
     }
 
     /**
@@ -459,15 +444,22 @@ private function _peekBeyondClosingParenthesis()
         $numUnmatched = 1;
 
         while ($numUnmatched > 0 && $token !== null) {
-            if ($token['value'] == ')') {
-                --$numUnmatched;
-            } else if ($token['value'] == '(') {
-                ++$numUnmatched;
+            switch ($token['type']) {
+                case Lexer::T_OPEN_PARENTHESIS:
+                    ++$numUnmatched;
+                    break;
+
+                case Lexer::T_CLOSE_PARENTHESIS:
+                    --$numUnmatched;
+                    break;
+
+                default:
+                    // Do nothing
             }
 
             $token = $this->_lexer->peek();
         }
-        
+
         $this->_lexer->resetPeek();
 
         return $token;
@@ -480,7 +472,7 @@ private function _peekBeyondClosingParenthesis()
      */
     private function _isMathOperator($token)
     {
-        return in_array($token['value'], array("+", "-", "/", "*"));
+        return in_array($token['type'], array(Lexer::T_PLUS, Lexer::T_MINUS, Lexer::T_DIVIDE, Lexer::T_MULTIPLY));
     }
 
     /**
@@ -490,12 +482,13 @@ private function _isMathOperator($token)
      */
     private function _isFunction()
     {
-        $peek = $this->_lexer->peek();
+        $peek     = $this->_lexer->peek();
         $nextpeek = $this->_lexer->peek();
+
         $this->_lexer->resetPeek();
 
         // We deny the COUNT(SELECT * FROM User u) here. COUNT won't be considered a function
-        return ($peek['value'] === '(' && $nextpeek['type'] !== Lexer::T_SELECT);
+        return ($peek['type'] === Lexer::T_OPEN_PARENTHESIS && $nextpeek['type'] !== Lexer::T_SELECT);
     }
 
     /**
@@ -505,35 +498,17 @@ private function _isFunction()
      */
     private function _isAggregateFunction($tokenType)
     {
-        return $tokenType == Lexer::T_AVG || $tokenType == Lexer::T_MIN ||
-               $tokenType == Lexer::T_MAX || $tokenType == Lexer::T_SUM ||
-               $tokenType == Lexer::T_COUNT;
+        return in_array($tokenType, array(Lexer::T_AVG, Lexer::T_MIN, Lexer::T_MAX, Lexer::T_SUM, Lexer::T_COUNT));
     }
 
     /**
-     * Checks whether the current lookahead token of the lexer has the type
-     * T_ALL, T_ANY or T_SOME.
+     * Checks whether the current lookahead token of the lexer has the type T_ALL, T_ANY or T_SOME.
      *
      * @return boolean
      */
     private function _isNextAllAnySome()
     {
-        return $this->_lexer->lookahead['type'] === Lexer::T_ALL ||
-               $this->_lexer->lookahead['type'] === Lexer::T_ANY ||
-               $this->_lexer->lookahead['type'] === Lexer::T_SOME;
-    }
-
-    /**
-     * Checks whether the next 2 tokens start a subselect.
-     *
-     * @return boolean TRUE if the next 2 tokens start a subselect, FALSE otherwise.
-     */
-    private function _isSubselect()
-    {
-        $la = $this->_lexer->lookahead;
-        $next = $this->_lexer->glimpse();
-
-        return ($la['value'] === '(' && $next['type'] === Lexer::T_SELECT);
+        return in_array($this->_lexer->lookahead['type'], array(Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME));
     }
 
     /**
@@ -585,12 +560,13 @@ private function _processDeferredPartialObjectExpressions()
             $class = $this->_queryComponents[$expr->identificationVariable]['metadata'];
 
             foreach ($expr->partialFieldSet as $field) {
-                if ( ! isset($class->fieldMappings[$field])) {
-                    $this->semanticalError(
-                        "There is no mapped field named '$field' on class " . $class->name . ".",
-                        $deferredItem['token']
-                    );
+                if (isset($class->fieldMappings[$field])) {
+                	continue;
                 }
+
+                $this->semanticalError(
+                    "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token']
+                );
             }
 
             if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) {
@@ -661,7 +637,7 @@ private function _processDeferredPathExpressions($AST)
             if (($field = $pathExpression->field) === null) {
                 $field = $pathExpression->field = $class->identifier[0];
             }
-            
+
             // Check if field or association exists
             if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) {
                 $this->semanticalError(
@@ -670,17 +646,14 @@ private function _processDeferredPathExpressions($AST)
                 );
             }
 
-            if (isset($class->fieldMappings[$field])) {
-                $fieldType = AST\PathExpression::TYPE_STATE_FIELD;
-            } else {
+            $fieldType = AST\PathExpression::TYPE_STATE_FIELD;
+
+            if (isset($class->associationMappings[$field])) {
                 $assoc = $class->associationMappings[$field];
-                $class = $this->_em->getClassMetadata($assoc['targetEntity']);
 
-                if ($assoc['type'] & ClassMetadata::TO_ONE) {
-                    $fieldType = AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION;
-                } else {
-                    $fieldType = AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION;
-                }
+                $fieldType = ($assoc['type'] & ClassMetadata::TO_ONE)
+                	? AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION
+                	: AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION;
             }
 
             // Validate if PathExpression is one of the expected types
@@ -706,22 +679,38 @@ private function _processDeferredPathExpressions($AST)
                 }
 
                 // Build the error message
-                $semanticalError = 'Invalid PathExpression. ';
-
-                if (count($expectedStringTypes) == 1) {
-                    $semanticalError .= 'Must be a ' . $expectedStringTypes[0] . '.';
-                } else {
-                    $semanticalError .= implode(' or ', $expectedStringTypes) . ' expected.';
-                }
+                $semanticalError  = 'Invalid PathExpression. ';
+                $semanticalError .= (count($expectedStringTypes) == 1)
+                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
+                    : implode(' or ', $expectedStringTypes) . ' expected.';
 
                 $this->semanticalError($semanticalError, $deferredItem['token']);
             }
-            
+
             // We need to force the type in PathExpression
             $pathExpression->type = $fieldType;
         }
     }
 
+    private function _processRootEntityAliasSelected()
+    {
+        if ( ! count($this->_identVariableExpressions)) {
+            return;
+        }
+
+        $foundRootEntity = false;
+
+        foreach ($this->_identVariableExpressions AS $dqlAlias => $expr) {
+            if (isset($this->_queryComponents[$dqlAlias]) && $this->_queryComponents[$dqlAlias]['parent'] === null) {
+                $foundRootEntity = true;
+            }
+        }
+
+        if ( ! $foundRootEntity) {
+            $this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.');
+        }
+    }
+
     /**
      * QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement
      *
@@ -737,12 +726,15 @@ public function QueryLanguage()
             case Lexer::T_SELECT:
                 $statement = $this->SelectStatement();
                 break;
+
             case Lexer::T_UPDATE:
                 $statement = $this->UpdateStatement();
                 break;
+
             case Lexer::T_DELETE:
                 $statement = $this->DeleteStatement();
                 break;
+
             default:
                 $this->syntaxError('SELECT, UPDATE or DELETE');
                 break;
@@ -765,17 +757,10 @@ public function SelectStatement()
     {
         $selectStatement = new AST\SelectStatement($this->SelectClause(), $this->FromClause());
 
-        $selectStatement->whereClause = $this->_lexer->isNextToken(Lexer::T_WHERE)
-            ? $this->WhereClause() : null;
-
-        $selectStatement->groupByClause = $this->_lexer->isNextToken(Lexer::T_GROUP)
-            ? $this->GroupByClause() : null;
-
-        $selectStatement->havingClause = $this->_lexer->isNextToken(Lexer::T_HAVING)
-            ? $this->HavingClause() : null;
-
-        $selectStatement->orderByClause = $this->_lexer->isNextToken(Lexer::T_ORDER)
-            ? $this->OrderByClause() : null;
+        $selectStatement->whereClause   = $this->_lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
+        $selectStatement->groupByClause = $this->_lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null;
+        $selectStatement->havingClause  = $this->_lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null;
+        $selectStatement->orderByClause = $this->_lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null;
 
         return $selectStatement;
     }
@@ -788,8 +773,8 @@ public function SelectStatement()
     public function UpdateStatement()
     {
         $updateStatement = new AST\UpdateStatement($this->UpdateClause());
-        $updateStatement->whereClause = $this->_lexer->isNextToken(Lexer::T_WHERE)
-                ? $this->WhereClause() : null;
+
+        $updateStatement->whereClause = $this->_lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
 
         return $updateStatement;
     }
@@ -802,8 +787,8 @@ public function UpdateStatement()
     public function DeleteStatement()
     {
         $deleteStatement = new AST\DeleteStatement($this->DeleteClause());
-        $deleteStatement->whereClause = $this->_lexer->isNextToken(Lexer::T_WHERE)
-                ? $this->WhereClause() : null;
+
+        $deleteStatement->whereClause = $this->_lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
 
         return $deleteStatement;
     }
@@ -841,9 +826,7 @@ public function AliasIdentificationVariable()
         $exists = isset($this->_queryComponents[$aliasIdentVariable]);
 
         if ($exists) {
-            $this->semanticalError(
-                "'$aliasIdentVariable' is already defined.", $this->_lexer->token
-            );
+            $this->semanticalError("'$aliasIdentVariable' is already defined.", $this->_lexer->token);
         }
 
         return $aliasIdentVariable;
@@ -862,6 +845,7 @@ public function AbstractSchemaName()
 
         if (strrpos($schemaName, ':') !== false) {
             list($namespaceAlias, $simpleClassName) = explode(':', $schemaName);
+
             $schemaName = $this->_em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
         }
 
@@ -887,9 +871,7 @@ public function AliasResultVariable()
         $exists = isset($this->_queryComponents[$resultVariable]);
 
         if ($exists) {
-            $this->semanticalError(
-                "'$resultVariable' is already defined.", $this->_lexer->token
-            );
+            $this->semanticalError("'$resultVariable' is already defined.", $this->_lexer->token);
         }
 
         return $resultVariable;
@@ -923,11 +905,13 @@ public function ResultVariable()
      */
     public function JoinAssociationPathExpression()
     {
-        $token = $this->_lexer->lookahead;
+        $token         = $this->_lexer->lookahead;
         $identVariable = $this->IdentificationVariable();
 
-        if (!isset($this->_queryComponents[$identVariable])) {
-            $this->semanticalError('Identification Variable ' . $identVariable .' used in join path expression but was not defined before.');
+        if ( ! isset($this->_queryComponents[$identVariable])) {
+            $this->semanticalError(
+                'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.'
+            );
         }
 
         $this->match(Lexer::T_DOT);
@@ -967,7 +951,7 @@ public function PathExpression($expectedTypes)
 
             $field = $this->_lexer->token['value'];
         }
-        
+
         // Creating AST node
         $pathExpr = new AST\PathExpression($expectedTypes, $identVariable, $field);
 
@@ -1050,6 +1034,7 @@ public function SelectClause()
         // Check for DISTINCT
         if ($this->_lexer->isNextToken(Lexer::T_DISTINCT)) {
             $this->match(Lexer::T_DISTINCT);
+
             $isDistinct = true;
         }
 
@@ -1059,6 +1044,7 @@ public function SelectClause()
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $selectExpressions[] = $this->SelectExpression();
         }
 
@@ -1077,6 +1063,7 @@ public function SimpleSelectClause()
 
         if ($this->_lexer->isNextToken(Lexer::T_DISTINCT)) {
             $this->match(Lexer::T_DISTINCT);
+
             $isDistinct = true;
         }
 
@@ -1111,6 +1098,7 @@ public function UpdateClause()
             'nestingLevel' => $this->_nestingLevel,
             'token'        => $token,
         );
+
         $this->_queryComponents[$aliasIdentificationVariable] = $queryComponent;
 
         $this->match(Lexer::T_SET);
@@ -1120,6 +1108,7 @@ public function UpdateClause()
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $updateItems[] = $this->UpdateItem();
         }
 
@@ -1163,6 +1152,7 @@ public function DeleteClause()
             'nestingLevel' => $this->_nestingLevel,
             'token'        => $token,
         );
+
         $this->_queryComponents[$aliasIdentificationVariable] = $queryComponent;
 
         return $deleteClause;
@@ -1176,11 +1166,13 @@ public function DeleteClause()
     public function FromClause()
     {
         $this->match(Lexer::T_FROM);
+
         $identificationVariableDeclarations = array();
         $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration();
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration();
         }
 
@@ -1195,11 +1187,13 @@ public function FromClause()
     public function SubselectFromClause()
     {
         $this->match(Lexer::T_FROM);
+
         $identificationVariables = array();
         $identificationVariables[] = $this->SubselectIdentificationVariableDeclaration();
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $identificationVariables[] = $this->SubselectIdentificationVariableDeclaration();
         }
 
@@ -1244,6 +1238,7 @@ public function GroupByClause()
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $groupByItems[] = $this->GroupByItem();
         }
 
@@ -1265,6 +1260,7 @@ public function OrderByClause()
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $orderByItems[] = $this->OrderByItem();
         }
 
@@ -1283,17 +1279,10 @@ public function Subselect()
 
         $subselect = new AST\Subselect($this->SimpleSelectClause(), $this->SubselectFromClause());
 
-        $subselect->whereClause = $this->_lexer->isNextToken(Lexer::T_WHERE)
-            ? $this->WhereClause() : null;
-
-        $subselect->groupByClause = $this->_lexer->isNextToken(Lexer::T_GROUP)
-            ? $this->GroupByClause() : null;
-
-        $subselect->havingClause = $this->_lexer->isNextToken(Lexer::T_HAVING)
-            ? $this->HavingClause() : null;
-
-        $subselect->orderByClause = $this->_lexer->isNextToken(Lexer::T_ORDER)
-            ? $this->OrderByClause() : null;
+        $subselect->whereClause   = $this->_lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
+        $subselect->groupByClause = $this->_lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null;
+        $subselect->havingClause  = $this->_lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null;
+        $subselect->orderByClause = $this->_lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null;
 
         // Decrease query nesting level
         $this->_nestingLevel--;
@@ -1318,7 +1307,7 @@ public function UpdateItem()
     }
 
     /**
-     * GroupByItem ::= IdentificationVariable | SingleValuedPathExpression
+     * GroupByItem ::= IdentificationVariable | ResultVariable | SingleValuedPathExpression
      *
      * @return string | \Doctrine\ORM\Query\AST\PathExpression
      */
@@ -1327,25 +1316,24 @@ public function GroupByItem()
         // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression
         $glimpse = $this->_lexer->glimpse();
 
-        if ($glimpse['type'] != Lexer::T_DOT) {
-            $token = $this->_lexer->lookahead;
-            $identVariable = $this->IdentificationVariable();
+        if ($glimpse['type'] === Lexer::T_DOT) {
+            return $this->SingleValuedPathExpression();
+        }
 
-            if (!isset($this->_queryComponents[$identVariable])) {
-                $this->semanticalError('Cannot group by undefined identification variable.');
-            }
+        // Still need to decide between IdentificationVariable or ResultVariable
+        $lookaheadValue = $this->_lexer->lookahead['value'];
 
-            return $identVariable;
+        if ( ! isset($this->_queryComponents[$lookaheadValue])) {
+            $this->semanticalError('Cannot group by undefined identification or result variable.');
         }
 
-        return $this->SingleValuedPathExpression();
+        return (isset($this->_queryComponents[$lookaheadValue]['metadata']))
+            ? $this->IdentificationVariable()
+            : $this->ResultVariable();
     }
 
     /**
-     * OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]
-     *
-     * @todo Post 2.0 release. Support general SingleValuedPathExpression instead
-     * of only StateFieldPathExpression.
+     * OrderByItem ::= (ResultVariable | SingleValuedPathExpression) ["ASC" | "DESC"]
      *
      * @return \Doctrine\ORM\Query\AST\OrderByItem
      */
@@ -1355,24 +1343,26 @@ public function OrderByItem()
 
         // We need to check if we are in a ResultVariable or StateFieldPathExpression
         $glimpse = $this->_lexer->glimpse();
-
-        if ($glimpse['type'] != Lexer::T_DOT) {
-            $token = $this->_lexer->lookahead;
-            $expr = $this->ResultVariable();
-        } else {
-            $expr = $this->StateFieldPathExpression();
-        }
+        $expr    = ($glimpse['type'] != Lexer::T_DOT) ? $this->ResultVariable() : $this->SingleValuedPathExpression();
 
         $item = new AST\OrderByItem($expr);
 
-        if ($this->_lexer->isNextToken(Lexer::T_ASC)) {
-            $this->match(Lexer::T_ASC);
-        } else if ($this->_lexer->isNextToken(Lexer::T_DESC)) {
-            $this->match(Lexer::T_DESC);
-            $type = 'DESC';
+        switch (true) {
+            case ($this->_lexer->isNextToken(Lexer::T_DESC)):
+                $this->match(Lexer::T_DESC);
+                $type = 'DESC';
+                break;
+
+            case ($this->_lexer->isNextToken(Lexer::T_ASC)):
+                $this->match(Lexer::T_ASC);
+                break;
+
+            default:
+                // Do nothing
         }
 
         $item->type = $type;
+
         return $item;
     }
 
@@ -1391,9 +1381,13 @@ public function NewValue()
     {
         if ($this->_lexer->isNextToken(Lexer::T_NULL)) {
             $this->match(Lexer::T_NULL);
+
             return null;
-        } else if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
+        }
+
+        if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
             $this->match(Lexer::T_INPUT_PARAMETER);
+
             return new AST\InputParameter($this->_lexer->token['value']);
         }
 
@@ -1456,9 +1450,8 @@ public function SubselectIdentificationVariableDeclaration()
      */
     public function JoinVariableDeclaration()
     {
-        $join = $this->Join();
-        $indexBy = $this->_lexer->isNextToken(Lexer::T_INDEX)
-                ? $this->IndexBy() : null;
+        $join    = $this->Join();
+        $indexBy = $this->_lexer->isNextToken(Lexer::T_INDEX) ? $this->IndexBy() : null;
 
         return new AST\JoinVariableDeclaration($join, $indexBy);
     }
@@ -1466,7 +1459,7 @@ public function JoinVariableDeclaration()
     /**
      * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
      *
-     * @return Doctrine\ORM\Query\AST\RangeVariableDeclaration
+     * @return \Doctrine\ORM\Query\AST\RangeVariableDeclaration
      */
     public function RangeVariableDeclaration()
     {
@@ -1489,6 +1482,7 @@ public function RangeVariableDeclaration()
             'nestingLevel' => $this->_nestingLevel,
             'token'        => $token
         );
+
         $this->_queryComponents[$aliasIdentificationVariable] = $queryComponent;
 
         return new AST\RangeVariableDeclaration($abstractSchemaName, $aliasIdentificationVariable);
@@ -1507,18 +1501,20 @@ public function PartialObjectExpression()
         $partialFieldSet = array();
 
         $identificationVariable = $this->IdentificationVariable();
-        $this->match(Lexer::T_DOT);
 
+        $this->match(Lexer::T_DOT);
         $this->match(Lexer::T_OPEN_CURLY_BRACE);
         $this->match(Lexer::T_IDENTIFIER);
+
         $partialFieldSet[] = $this->_lexer->token['value'];
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
             $this->match(Lexer::T_IDENTIFIER);
+
             $partialFieldSet[] = $this->_lexer->token['value'];
         }
-        
+
         $this->match(Lexer::T_CLOSE_CURLY_BRACE);
 
         $partialObjectExpression = new AST\PartialObjectExpression($identificationVariable, $partialFieldSet);
@@ -1537,25 +1533,33 @@ public function PartialObjectExpression()
      * Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression
      *          ["AS"] AliasIdentificationVariable ["WITH" ConditionalExpression]
      *
-     * @return Doctrine\ORM\Query\AST\Join
+     * @return \Doctrine\ORM\Query\AST\Join
      */
     public function Join()
     {
         // Check Join type
         $joinType = AST\Join::JOIN_TYPE_INNER;
 
-        if ($this->_lexer->isNextToken(Lexer::T_LEFT)) {
-            $this->match(Lexer::T_LEFT);
+        switch (true) {
+            case ($this->_lexer->isNextToken(Lexer::T_LEFT)):
+                $this->match(Lexer::T_LEFT);
 
-            // Possible LEFT OUTER join
-            if ($this->_lexer->isNextToken(Lexer::T_OUTER)) {
-                $this->match(Lexer::T_OUTER);
-                $joinType = AST\Join::JOIN_TYPE_LEFTOUTER;
-            } else {
                 $joinType = AST\Join::JOIN_TYPE_LEFT;
-            }
-        } else if ($this->_lexer->isNextToken(Lexer::T_INNER)) {
-            $this->match(Lexer::T_INNER);
+
+                // Possible LEFT OUTER join
+                if ($this->_lexer->isNextToken(Lexer::T_OUTER)) {
+                    $this->match(Lexer::T_OUTER);
+
+                    $joinType = AST\Join::JOIN_TYPE_LEFTOUTER;
+                }
+                break;
+
+            case ($this->_lexer->isNextToken(Lexer::T_INNER)):
+                $this->match(Lexer::T_INNER);
+                break;
+
+            default:
+                // Do nothing
         }
 
         $this->match(Lexer::T_JOIN);
@@ -1571,7 +1575,7 @@ public function Join()
 
         // Verify that the association exists.
         $parentClass = $this->_queryComponents[$joinPathExpression->identificationVariable]['metadata'];
-        $assocField = $joinPathExpression->associationField;
+        $assocField  = $joinPathExpression->associationField;
 
         if ( ! $parentClass->hasAssociation($assocField)) {
             $this->semanticalError(
@@ -1590,6 +1594,7 @@ public function Join()
             'nestingLevel' => $this->_nestingLevel,
             'token'        => $token
         );
+
         $this->_queryComponents[$aliasIdentificationVariable] = $joinQueryComponent;
 
         // Create AST node
@@ -1598,6 +1603,7 @@ public function Join()
         // Check for ad-hoc Join conditions
         if ($this->_lexer->isNextToken(Lexer::T_WITH)) {
             $this->match(Lexer::T_WITH);
+
             $join->conditionalExpression = $this->ConditionalExpression();
         }
 
@@ -1607,7 +1613,7 @@ public function Join()
     /**
      * IndexBy ::= "INDEX" "BY" StateFieldPathExpression
      *
-     * @return Doctrine\ORM\Query\AST\IndexBy
+     * @return \Doctrine\ORM\Query\AST\IndexBy
      */
     public function IndexBy()
     {
@@ -1624,207 +1630,353 @@ public function IndexBy()
     /**
      * ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary |
      *                      StateFieldPathExpression | BooleanPrimary | CaseExpression |
-     *                      EntityTypeExpression
+     *                      InstanceOfExpression
      *
      * @return mixed One of the possible expressions or subexpressions.
      */
     public function ScalarExpression()
     {
         $lookahead = $this->_lexer->lookahead['type'];
-        if ($lookahead === Lexer::T_IDENTIFIER) {
-            $this->_lexer->peek(); // lookahead => '.'
-            $this->_lexer->peek(); // lookahead => token after '.'
-            $peek = $this->_lexer->peek(); // lookahead => token after the token after the '.'
-            $this->_lexer->resetPeek();
 
-            if ($this->_isMathOperator($peek)) {
-                return $this->SimpleArithmeticExpression();
-            }
+        switch ($lookahead) {
+            case Lexer::T_IDENTIFIER:
+                $this->_lexer->peek(); // lookahead => '.'
+                $this->_lexer->peek(); // lookahead => token after '.'
+                $peek = $this->_lexer->peek(); // lookahead => token after the token after the '.'
+                $this->_lexer->resetPeek();
+
+                if ($this->_isMathOperator($peek)) {
+                    return $this->SimpleArithmeticExpression();
+                }
+
+                return $this->StateFieldPathExpression();
 
-            return $this->StateFieldPathExpression();
-        } else if ($lookahead == Lexer::T_INTEGER || $lookahead == Lexer::T_FLOAT) {
-            return $this->SimpleArithmeticExpression();
-        } else if ($lookahead == Lexer::T_CASE || $lookahead == Lexer::T_COALESCE || $lookahead == Lexer::T_NULLIF) {
-            // Since NULLIF and COALESCE can be identified as a function, 
-            // we need to check if before check for FunctionDeclaration
-            return $this->CaseExpression();
-        } else if ($this->_isFunction() || $this->_isAggregateFunction($this->_lexer->lookahead['type'])) {
-            // We may be in an ArithmeticExpression (find the matching ")" and inspect for Math operator)
-            $this->_lexer->peek(); // "("
-            $peek = $this->_peekBeyondClosingParenthesis();
-
-            if ($this->_isMathOperator($peek)) {
+            case Lexer::T_INTEGER:
+            case Lexer::T_FLOAT:
                 return $this->SimpleArithmeticExpression();
-            }
 
-            if ($this->_isAggregateFunction($this->_lexer->lookahead['type'])) {
-                return $this->AggregateExpression();
-            } else {
+            case Lexer::T_STRING:
+                return $this->StringPrimary();
+
+            case Lexer::T_TRUE:
+            case Lexer::T_FALSE:
+                $this->match($lookahead);
+
+                return new AST\Literal(AST\Literal::BOOLEAN, $this->_lexer->token['value']);
+
+            case Lexer::T_INPUT_PARAMETER:
+                return $this->InputParameter();
+
+            case Lexer::T_CASE:
+            case Lexer::T_COALESCE:
+            case Lexer::T_NULLIF:
+                // Since NULLIF and COALESCE can be identified as a function,
+                // we need to check if before check for FunctionDeclaration
+                return $this->CaseExpression();
+
+            default:
+                if ( ! ($this->_isFunction() || $this->_isAggregateFunction($lookahead))) {
+                    $this->syntaxError();
+                }
+
+                // We may be in an ArithmeticExpression (find the matching ")" and inspect for Math operator)
+                $this->_lexer->peek(); // "("
+                $peek = $this->_peekBeyondClosingParenthesis();
+
+                if ($this->_isMathOperator($peek)) {
+                    return $this->SimpleArithmeticExpression();
+                }
+
+                if ($this->_isAggregateFunction($this->_lexer->lookahead['type'])) {
+                    return $this->AggregateExpression();
+                }
+
                 return $this->FunctionDeclaration();
-            }
-        } else if ($lookahead == Lexer::T_STRING) {
-            return $this->StringPrimary();
-        } else if ($lookahead == Lexer::T_INPUT_PARAMETER) {
-            return $this->InputParameter();
-        } else if ($lookahead == Lexer::T_TRUE || $lookahead == Lexer::T_FALSE) {
-            $this->match($lookahead);
-            return new AST\Literal(AST\Literal::BOOLEAN, $this->_lexer->token['value']);
-        } else {
-            $this->syntaxError();
         }
     }
 
+    /**
+     * CaseExpression ::= GeneralCaseExpression | SimpleCaseExpression | CoalesceExpression | NullifExpression
+     * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END"
+     * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression
+     * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END"
+     * CaseOperand ::= StateFieldPathExpression | TypeDiscriminator
+     * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression
+     * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")"
+     * NullifExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")"
+     *
+     * @return mixed One of the possible expressions or subexpressions.
+     */
     public function CaseExpression()
     {
         $lookahead = $this->_lexer->lookahead['type'];
-        
-        // if "CASE" "WHEN" => GeneralCaseExpression
-        // else if "CASE" => SimpleCaseExpression
-        // [DONE] else if "COALESCE" => CoalesceExpression
-        // [DONE] else if "NULLIF" => NullifExpression
+
         switch ($lookahead) {
             case Lexer::T_NULLIF:
                 return $this->NullIfExpression();
-                
+
             case Lexer::T_COALESCE:
                 return $this->CoalesceExpression();
-                
+
+            case Lexer::T_CASE:
+                $this->_lexer->resetPeek();
+                $peek = $this->_lexer->peek();
+
+                if ($peek['type'] === Lexer::T_WHEN) {
+                    return $this->GeneralCaseExpression();
+                }
+
+                return $this->SimpleCaseExpression();
+
             default:
-                $this->semanticalError('CaseExpression not yet supported.');
-                return null;
+                // Do nothing
+                break;
         }
+
+        $this->syntaxError();
     }
-    
+
     /**
      * CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")"
-     * 
-     * @return Doctrine\ORM\Query\AST\CoalesceExpression 
+     *
+     * @return \Doctrine\ORM\Query\AST\CoalesceExpression
      */
     public function CoalesceExpression()
     {
         $this->match(Lexer::T_COALESCE);
         $this->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         // Process ScalarExpressions (1..N)
         $scalarExpressions = array();
         $scalarExpressions[] = $this->ScalarExpression();
 
         while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
             $this->match(Lexer::T_COMMA);
+
             $scalarExpressions[] = $this->ScalarExpression();
         }
-        
+
         $this->match(Lexer::T_CLOSE_PARENTHESIS);
-        
+
         return new AST\CoalesceExpression($scalarExpressions);
     }
-    
+
     /**
      * NullIfExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")"
-     * 
-     * @return Doctrine\ORM\Query\AST\ExistsExpression 
+     *
+     * @return \Doctrine\ORM\Query\AST\NullIfExpression
      */
     public function NullIfExpression()
     {
         $this->match(Lexer::T_NULLIF);
         $this->match(Lexer::T_OPEN_PARENTHESIS);
-        
+
         $firstExpression = $this->ScalarExpression();
         $this->match(Lexer::T_COMMA);
         $secondExpression = $this->ScalarExpression();
-        
+
         $this->match(Lexer::T_CLOSE_PARENTHESIS);
 
         return new AST\NullIfExpression($firstExpression, $secondExpression);
     }
 
     /**
-     * SelectExpression ::=
-     *      IdentificationVariable | StateFieldPathExpression |
-     *      (AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable]
+     * GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END"
+     *
+     * @return \Doctrine\ORM\Query\AST\GeneralExpression
+     */
+    public function GeneralCaseExpression()
+    {
+        $this->match(Lexer::T_CASE);
+
+        // Process WhenClause (1..N)
+        $whenClauses = array();
+
+        do {
+            $whenClauses[] = $this->WhenClause();
+        } while ($this->_lexer->isNextToken(Lexer::T_WHEN));
+
+        $this->match(Lexer::T_ELSE);
+        $scalarExpression = $this->ScalarExpression();
+        $this->match(Lexer::T_END);
+
+        return new AST\GeneralCaseExpression($whenClauses, $scalarExpression);
+    }
+
+    /**
+     * SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END"
+     * CaseOperand ::= StateFieldPathExpression | TypeDiscriminator
+     */
+    public function SimpleCaseExpression()
+    {
+        $this->match(Lexer::T_CASE);
+        $caseOperand = $this->StateFieldPathExpression();
+
+        // Process SimpleWhenClause (1..N)
+        $simpleWhenClauses = array();
+
+        do {
+            $simpleWhenClauses[] = $this->SimpleWhenClause();
+        } while ($this->_lexer->isNextToken(Lexer::T_WHEN));
+
+        $this->match(Lexer::T_ELSE);
+        $scalarExpression = $this->ScalarExpression();
+        $this->match(Lexer::T_END);
+
+        return new AST\SimpleCaseExpression($caseOperand, $simpleWhenClauses, $scalarExpression);
+    }
+
+    /**
+     * WhenClause ::= "WHEN" ConditionalExpression "THEN" ScalarExpression
+     *
+     * @return \Doctrine\ORM\Query\AST\WhenExpression
+     */
+    public function WhenClause()
+    {
+        $this->match(Lexer::T_WHEN);
+        $conditionalExpression = $this->ConditionalExpression();
+        $this->match(Lexer::T_THEN);
+
+        return new AST\WhenClause($conditionalExpression, $this->ScalarExpression());
+    }
+
+    /**
+     * SimpleWhenClause ::= "WHEN" ScalarExpression "THEN" ScalarExpression
      *
-     * @return Doctrine\ORM\Query\AST\SelectExpression
+     * @return \Doctrine\ORM\Query\AST\SimpleWhenExpression
+     */
+    public function SimpleWhenClause()
+    {
+        $this->match(Lexer::T_WHEN);
+        $conditionalExpression = $this->ScalarExpression();
+        $this->match(Lexer::T_THEN);
+
+        return new AST\SimpleWhenClause($conditionalExpression, $this->ScalarExpression());
+    }
+
+    /**
+     * SelectExpression ::= (
+     *     IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration |
+     *     PartialObjectExpression | "(" Subselect ")" | CaseExpression
+     * ) [["AS"] ["HIDDEN"] AliasResultVariable]
+     *
+     * @return \Doctrine\ORM\Query\AST\SelectExpression
      */
     public function SelectExpression()
     {
-        $expression = null;
+        $expression    = null;
         $identVariable = null;
-        $fieldAliasIdentificationVariable = null;
-        $peek = $this->_lexer->glimpse();
-
-        $supportsAlias = true;
+        $peek          = $this->_lexer->glimpse();
+        $lookaheadType = $this->_lexer->lookahead['type'];
 
-        if ($peek['value'] != '(' && $this->_lexer->lookahead['type'] === Lexer::T_IDENTIFIER) {
-            if ($peek['value'] == '.') {
-                // ScalarExpression
+        switch (true) {
+            // ScalarExpression (u.name)
+            case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] === Lexer::T_DOT):
                 $expression = $this->ScalarExpression();
-            } else {
-                $supportsAlias = false;
+                break;
+
+            // IdentificationVariable (u)
+            case ($lookaheadType === Lexer::T_IDENTIFIER && $peek['type'] !== Lexer::T_OPEN_PARENTHESIS):
                 $expression = $identVariable = $this->IdentificationVariable();
-            }
-        } else if ($this->_lexer->lookahead['value'] == '(') {
-            if ($peek['type'] == Lexer::T_SELECT) {
-                // Subselect
+                break;
+
+            // CaseExpression (CASE ... or NULLIF(...) or COALESCE(...))
+            case ($lookaheadType === Lexer::T_CASE):
+            case ($lookaheadType === Lexer::T_COALESCE):
+            case ($lookaheadType === Lexer::T_NULLIF):
+                $expression = $this->CaseExpression();
+                break;
+
+            // DQL Function (SUM(u.value) or SUM(u.value) + 1)
+            case ($this->_isFunction()):
+                $this->_lexer->peek(); // "("
+
+                switch (true) {
+                    case ($this->_isMathOperator($this->_peekBeyondClosingParenthesis())):
+                        // SUM(u.id) + COUNT(u.id)
+                        $expression = $this->ScalarExpression();
+                        break;
+
+                    case ($this->_isAggregateFunction($lookaheadType)):
+                        // COUNT(u.id)
+                        $expression = $this->AggregateExpression();
+                        break;
+
+                    default:
+                        // IDENTITY(u)
+                        $expression = $this->FunctionDeclaration();
+                        break;
+                }
+
+                break;
+
+            // PartialObjectExpression (PARTIAL u.{id, name})
+            case ($lookaheadType === Lexer::T_PARTIAL):
+                $expression    = $this->PartialObjectExpression();
+                $identVariable = $expression->identificationVariable;
+                break;
+
+            // Subselect
+            case ($lookaheadType === Lexer::T_OPEN_PARENTHESIS && $peek['type'] === Lexer::T_SELECT):
                 $this->match(Lexer::T_OPEN_PARENTHESIS);
                 $expression = $this->Subselect();
                 $this->match(Lexer::T_CLOSE_PARENTHESIS);
-            } else {
-                // Shortcut: ScalarExpression => SimpleArithmeticExpression
-                $expression = $this->SimpleArithmeticExpression();
-            }
-        } else if ($this->_isFunction()) {
-            $this->_lexer->peek(); // "("
-            
-            $lookaheadType = $this->_lexer->lookahead['type'];
-            $beyond        = $this->_peekBeyondClosingParenthesis();
-            
-            if ($this->_isMathOperator($beyond)) {
-                $expression = $this->ScalarExpression();
-            } else if ($this->_isAggregateFunction($this->_lexer->lookahead['type'])) {
-                $expression = $this->AggregateExpression();
-            } else if (in_array ($lookaheadType, array(Lexer::T_CASE, Lexer::T_COALESCE, Lexer::T_NULLIF))) {
-                $expression = $this->CaseExpression();
-            } else {
-                // Shortcut: ScalarExpression => Function
-                $expression = $this->FunctionDeclaration();
-            }
-        } else if ($this->_lexer->lookahead['type'] == Lexer::T_PARTIAL) {
-            $supportsAlias = false;
-            $expression = $this->PartialObjectExpression();
-            $identVariable = $expression->identificationVariable;
-        } else if ($this->_lexer->lookahead['type'] == Lexer::T_INTEGER ||
-                $this->_lexer->lookahead['type'] == Lexer::T_FLOAT ||
-                $this->_lexer->lookahead['type'] == Lexer::T_STRING) {
+                break;
+
             // Shortcut: ScalarExpression => SimpleArithmeticExpression
-            $expression = $this->SimpleArithmeticExpression();
-        } else {
-            $this->syntaxError('IdentificationVariable | StateFieldPathExpression'
-                    . ' | AggregateExpression | "(" Subselect ")" | ScalarExpression',
-                    $this->_lexer->lookahead);
+            case ($lookaheadType === Lexer::T_OPEN_PARENTHESIS):
+            case ($lookaheadType === Lexer::T_INTEGER):
+            case ($lookaheadType === Lexer::T_STRING):
+            case ($lookaheadType === Lexer::T_FLOAT):
+            // SimpleArithmeticExpression : (- u.value ) or ( + u.value )
+            case ($lookaheadType === Lexer::T_MINUS):
+            case ($lookaheadType === Lexer::T_PLUS):
+                $expression = $this->SimpleArithmeticExpression();
+                break;
+
+            default:
+                $this->syntaxError(
+                    'IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression',
+                    $this->_lexer->lookahead
+                );
         }
 
-        if ($supportsAlias) {
-            if ($this->_lexer->isNextToken(Lexer::T_AS)) {
-                $this->match(Lexer::T_AS);
-            }
+        // [["AS"] ["HIDDEN"] AliasResultVariable]
 
-            if ($this->_lexer->isNextToken(Lexer::T_IDENTIFIER)) {
-                $token = $this->_lexer->lookahead;
-                $fieldAliasIdentificationVariable = $this->AliasResultVariable();
+        if ($this->_lexer->isNextToken(Lexer::T_AS)) {
+            $this->match(Lexer::T_AS);
+        }
 
-                // Include AliasResultVariable in query components.
-                $this->_queryComponents[$fieldAliasIdentificationVariable] = array(
-                    'resultVariable' => $expression,
-                    'nestingLevel'   => $this->_nestingLevel,
-                    'token'          => $token,
-                );
-            }
+        $hiddenAliasResultVariable = false;
+
+        if ($this->_lexer->isNextToken(Lexer::T_HIDDEN)) {
+            $this->match(Lexer::T_HIDDEN);
+
+            $hiddenAliasResultVariable = true;
         }
 
-        $expr = new AST\SelectExpression($expression, $fieldAliasIdentificationVariable);
-        if (!$supportsAlias) {
+        $aliasResultVariable = null;
+
+        if ($this->_lexer->isNextToken(Lexer::T_IDENTIFIER)) {
+            $token = $this->_lexer->lookahead;
+            $aliasResultVariable = $this->AliasResultVariable();
+
+            // Include AliasResultVariable in query components.
+            $this->_queryComponents[$aliasResultVariable] = array(
+                'resultVariable' => $expression,
+                'nestingLevel'   => $this->_nestingLevel,
+                'token'          => $token,
+            );
+        }
+
+        // AST
+
+        $expr = new AST\SelectExpression($expression, $aliasResultVariable, $hiddenAliasResultVariable);
+
+        if ($identVariable) {
             $this->_identVariableExpressions[$identVariable] = $expr;
         }
+
         return $expr;
     }
 
@@ -1839,34 +1991,47 @@ public function SimpleSelectExpression()
     {
         $peek = $this->_lexer->glimpse();
 
-        if ($peek['value'] != '(' && $this->_lexer->lookahead['type'] === Lexer::T_IDENTIFIER) {
-            // SingleValuedPathExpression | IdentificationVariable
-            if ($peek['value'] == '.') {
-                $expression = $this->StateFieldPathExpression();
-            } else {
-                $expression = $this->IdentificationVariable();
-            }
+        switch ($this->_lexer->lookahead['type']) {
+            case Lexer::T_IDENTIFIER:
+                switch (true) {
+                    case ($peek['type'] === Lexer::T_DOT):
+                        $expression = $this->StateFieldPathExpression();
+
+                        return new AST\SimpleSelectExpression($expression);
+
+                    case ($peek['type'] !== Lexer::T_OPEN_PARENTHESIS):
+                        $expression = $this->IdentificationVariable();
+
+                        return new AST\SimpleSelectExpression($expression);
+
+                    default:
+                        // Do nothing
+                }
+                break;
+
+            case Lexer::T_OPEN_PARENTHESIS:
+                if ($peek['type'] !== Lexer::T_SELECT) {
+                    // Shortcut: ScalarExpression => SimpleArithmeticExpression
+                    $expression = $this->SimpleArithmeticExpression();
+
+                    return new AST\SimpleSelectExpression($expression);
+                }
 
-            return new AST\SimpleSelectExpression($expression);
-        } else if ($this->_lexer->lookahead['value'] == '(') {
-            if ($peek['type'] == Lexer::T_SELECT) {
                 // Subselect
                 $this->match(Lexer::T_OPEN_PARENTHESIS);
                 $expression = $this->Subselect();
                 $this->match(Lexer::T_CLOSE_PARENTHESIS);
-            } else {
-                // Shortcut: ScalarExpression => SimpleArithmeticExpression
-                $expression = $this->SimpleArithmeticExpression();
-            }
 
-            return new AST\SimpleSelectExpression($expression);
+                return new AST\SimpleSelectExpression($expression);
+
+            default:
+                // Do nothing
         }
 
         $this->_lexer->peek();
 
         $expression = $this->ScalarExpression();
-
-        $expr = new AST\SimpleSelectExpression($expression);
+        $expr       = new AST\SimpleSelectExpression($expression);
 
         if ($this->_lexer->isNextToken(Lexer::T_AS)) {
             $this->match(Lexer::T_AS);
@@ -1900,6 +2065,7 @@ public function ConditionalExpression()
 
         while ($this->_lexer->isNextToken(Lexer::T_OR)) {
             $this->match(Lexer::T_OR);
+
             $conditionalTerms[] = $this->ConditionalTerm();
         }
 
@@ -1924,6 +2090,7 @@ public function ConditionalTerm()
 
         while ($this->_lexer->isNextToken(Lexer::T_AND)) {
             $this->match(Lexer::T_AND);
+
             $conditionalFactors[] = $this->ConditionalFactor();
         }
 
@@ -1947,9 +2114,10 @@ public function ConditionalFactor()
 
         if ($this->_lexer->isNextToken(Lexer::T_NOT)) {
             $this->match(Lexer::T_NOT);
+
             $not = true;
         }
-        
+
         $conditionalPrimary = $this->ConditionalPrimary();
 
         // Phase 1 AST optimization: Prevent AST\ConditionalFactor
@@ -1967,33 +2135,33 @@ public function ConditionalFactor()
     /**
      * ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
      *
-     * @return Doctrine\ORM\Query\AST\ConditionalPrimary
+     * @return \Doctrine\ORM\Query\AST\ConditionalPrimary
      */
     public function ConditionalPrimary()
     {
         $condPrimary = new AST\ConditionalPrimary;
 
-        if ($this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
-            // Peek beyond the matching closing paranthesis ')'
-            $peek = $this->_peekBeyondClosingParenthesis();
-
-            if (in_array($peek['value'], array("=",  "<", "<=", "<>", ">", ">=", "!=")) ||
-                    $peek['type'] === Lexer::T_NOT ||
-                    $peek['type'] === Lexer::T_BETWEEN ||
-                    $peek['type'] === Lexer::T_LIKE ||
-                    $peek['type'] === Lexer::T_IN ||
-                    $peek['type'] === Lexer::T_IS ||
-                    $peek['type'] === Lexer::T_EXISTS) {
-                $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
-            } else {
-                $this->match(Lexer::T_OPEN_PARENTHESIS);
-                $condPrimary->conditionalExpression = $this->ConditionalExpression();
-                $this->match(Lexer::T_CLOSE_PARENTHESIS);
-            }
-        } else {
+        if ( ! $this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
+
+            return $condPrimary;
+        }
+
+        // Peek beyond the matching closing paranthesis ')'
+        $peek = $this->_peekBeyondClosingParenthesis();
+
+        if (in_array($peek['value'], array("=",  "<", "<=", "<>", ">", ">=", "!=")) ||
+            in_array($peek['type'], array(Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS)) ||
+            $this->_isMathOperator($peek)) {
+            $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
+
+            return $condPrimary;
         }
 
+        $this->match(Lexer::T_OPEN_PARENTHESIS);
+        $condPrimary->conditionalExpression = $this->ConditionalExpression();
+        $this->match(Lexer::T_CLOSE_PARENTHESIS);
+
         return $condPrimary;
     }
 
@@ -2006,10 +2174,10 @@ public function ConditionalPrimary()
      */
     public function SimpleConditionalExpression()
     {
+        $token = $this->_lexer->lookahead;
+
         if ($this->_lexer->isNextToken(Lexer::T_NOT)) {
             $token = $this->_lexer->glimpse();
-        } else {
-            $token = $this->_lexer->lookahead;
         }
 
         if ($token['type'] === Lexer::T_EXISTS) {
@@ -2104,13 +2272,13 @@ public function EmptyCollectionComparisonExpression()
      */
     public function CollectionMemberExpression()
     {
-        $not = false;
-
+        $not        = false;
         $entityExpr = $this->EntityExpression();
 
         if ($this->_lexer->isNextToken(Lexer::T_NOT)) {
-            $not = true;
             $this->match(Lexer::T_NOT);
+
+            $not = true;
         }
 
         $this->match(Lexer::T_MEMBER);
@@ -2275,7 +2443,7 @@ public function ArithmeticFactor()
             $this->match(($isPlus) ? Lexer::T_PLUS : Lexer::T_MINUS);
             $sign = $isPlus;
         }
-        
+
         $primary = $this->ArithmeticPrimary();
 
         // Phase 1 AST optimization: Prevent AST\ArithmeticFactor
@@ -2290,7 +2458,7 @@ public function ArithmeticFactor()
     /**
      * ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
      *          | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
-     *          | FunctionsReturningDatetime | IdentificationVariable
+     *          | FunctionsReturningDatetime | IdentificationVariable | ResultVariable | CaseExpression
      */
     public function ArithmeticPrimary()
     {
@@ -2304,6 +2472,11 @@ public function ArithmeticPrimary()
         }
 
         switch ($this->_lexer->lookahead['type']) {
+            case Lexer::T_COALESCE:
+            case Lexer::T_NULLIF:
+            case Lexer::T_CASE:
+                return $this->CaseExpression();
+
             case Lexer::T_IDENTIFIER:
                 $peek = $this->_lexer->glimpse();
 
@@ -2315,6 +2488,10 @@ public function ArithmeticPrimary()
                     return $this->SingleValuedPathExpression();
                 }
 
+                if (isset($this->_queryComponents[$this->_lexer->lookahead['value']]['resultVariable'])) {
+                    return $this->ResultVariable();
+                }
+
                 return $this->StateFieldPathExpression();
 
             case Lexer::T_INPUT_PARAMETER:
@@ -2329,9 +2506,9 @@ public function ArithmeticPrimary()
                     }
 
                     return $this->FunctionDeclaration();
-                } else {
-                    return $this->Literal();
                 }
+
+                return $this->Literal();
         }
     }
 
@@ -2359,32 +2536,50 @@ public function StringExpression()
     }
 
     /**
-     * StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression
+     * StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression | CaseExpression
      */
     public function StringPrimary()
     {
-        if ($this->_lexer->isNextToken(Lexer::T_IDENTIFIER)) {
-            $peek = $this->_lexer->glimpse();
+        $lookaheadType = $this->_lexer->lookahead['type'];
+
+        switch ($lookaheadType) {
+            case Lexer::T_IDENTIFIER:
+                $peek = $this->_lexer->glimpse();
+
+                if ($peek['value'] == '.') {
+                    return $this->StateFieldPathExpression();
+                }
+
+                if ($peek['value'] == '(') {
+                    // do NOT directly go to FunctionsReturningString() because it doesnt check for custom functions.
+                    return $this->FunctionDeclaration();
+                }
 
-            if ($peek['value'] == '.') {
-                return $this->StateFieldPathExpression();
-            } else if ($peek['value'] == '(') {
-                // do NOT directly go to FunctionsReturningString() because it doesnt check for custom functions.
-                return $this->FunctionDeclaration();
-            } else {
                 $this->syntaxError("'.' or '('");
-            }
-        } else if ($this->_lexer->isNextToken(Lexer::T_STRING)) {
-            $this->match(Lexer::T_STRING);
+                break;
 
-            return $this->_lexer->token['value'];
-        } else if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
-            return $this->InputParameter();
-        } else if ($this->_isAggregateFunction($this->_lexer->lookahead['type'])) {
-            return $this->AggregateExpression();
+            case Lexer::T_STRING:
+                $this->match(Lexer::T_STRING);
+
+                return $this->_lexer->token['value'];
+
+            case Lexer::T_INPUT_PARAMETER:
+                return $this->InputParameter();
+
+            case Lexer::T_CASE:
+            case Lexer::T_COALESCE:
+            case Lexer::T_NULLIF:
+                return $this->CaseExpression();
+
+            default:
+                if ($this->_isAggregateFunction($lookaheadType)) {
+                    return $this->AggregateExpression();
+                }
         }
 
-        $this->syntaxError('StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression');
+        $this->syntaxError(
+            'StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression'
+        );
     }
 
     /**
@@ -2415,7 +2610,7 @@ public function SimpleEntityExpression()
             return $this->InputParameter();
         }
 
-        return $this->IdentificationVariable();
+        return $this->StateFieldPathExpression();
     }
 
     /**
@@ -2427,40 +2622,28 @@ public function SimpleEntityExpression()
      */
     public function AggregateExpression()
     {
+        $lookaheadType = $this->_lexer->lookahead['type'];
         $isDistinct = false;
-        $functionName = '';
-
-        if ($this->_lexer->isNextToken(Lexer::T_COUNT)) {
-            $this->match(Lexer::T_COUNT);
-            $functionName = $this->_lexer->token['value'];
-            $this->match(Lexer::T_OPEN_PARENTHESIS);
 
-            if ($this->_lexer->isNextToken(Lexer::T_DISTINCT)) {
-                $this->match(Lexer::T_DISTINCT);
-                $isDistinct = true;
-            }
+        if ( ! in_array($lookaheadType, array(Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM))) {
+            $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT');
+        }
 
-            $pathExp = $this->SingleValuedPathExpression();
-            $this->match(Lexer::T_CLOSE_PARENTHESIS);
-        } else {
-            if ($this->_lexer->isNextToken(Lexer::T_AVG)) {
-                $this->match(Lexer::T_AVG);
-            } else if ($this->_lexer->isNextToken(Lexer::T_MAX)) {
-                $this->match(Lexer::T_MAX);
-            } else if ($this->_lexer->isNextToken(Lexer::T_MIN)) {
-                $this->match(Lexer::T_MIN);
-            } else if ($this->_lexer->isNextToken(Lexer::T_SUM)) {
-                $this->match(Lexer::T_SUM);
-            } else {
-                $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT');
-            }
+        $this->match($lookaheadType);
+        $functionName = $this->_lexer->token['value'];
+        $this->match(Lexer::T_OPEN_PARENTHESIS);
 
-            $functionName = $this->_lexer->token['value'];
-            $this->match(Lexer::T_OPEN_PARENTHESIS);
-            $pathExp = $this->SimpleArithmeticExpression();
-            $this->match(Lexer::T_CLOSE_PARENTHESIS);
+        if ($this->_lexer->isNextToken(Lexer::T_DISTINCT)) {
+            $this->match(Lexer::T_DISTINCT);
+            $isDistinct = true;
         }
 
+        $pathExp = ($lookaheadType === Lexer::T_COUNT)
+            ? $this->SingleValuedPathExpression()
+            : $this->SimpleArithmeticExpression();
+
+	    $this->match(Lexer::T_CLOSE_PARENTHESIS);
+
         return new AST\AggregateExpression($functionName, $pathExp, $isDistinct);
     }
 
@@ -2471,24 +2654,19 @@ public function AggregateExpression()
      */
     public function QuantifiedExpression()
     {
-        $type = '';
-
-        if ($this->_lexer->isNextToken(Lexer::T_ALL)) {
-            $this->match(Lexer::T_ALL);
-            $type = 'ALL';
-        } else if ($this->_lexer->isNextToken(Lexer::T_ANY)) {
-            $this->match(Lexer::T_ANY);
-             $type = 'ANY';
-        } else if ($this->_lexer->isNextToken(Lexer::T_SOME)) {
-            $this->match(Lexer::T_SOME);
-             $type = 'SOME';
-        } else {
+        $lookaheadType = $this->_lexer->lookahead['type'];
+        $value = $this->_lexer->lookahead['value'];
+
+        if ( ! in_array($lookaheadType, array(Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME))) {
             $this->syntaxError('ALL, ANY or SOME');
         }
 
+        $this->match($lookaheadType);
         $this->match(Lexer::T_OPEN_PARENTHESIS);
+
         $qExpr = new AST\QuantifiedExpression($this->Subselect());
-        $qExpr->type = $type;
+        $qExpr->type = $value;
+
         $this->match(Lexer::T_CLOSE_PARENTHESIS);
 
         return $qExpr;
@@ -2529,14 +2707,11 @@ public function ComparisonExpression()
     {
         $peek = $this->_lexer->glimpse();
 
-        $leftExpr = $this->ArithmeticExpression();
-        $operator = $this->ComparisonOperator();
-
-        if ($this->_isNextAllAnySome()) {
-            $rightExpr = $this->QuantifiedExpression();
-        } else {
-            $rightExpr = $this->ArithmeticExpression();
-        }
+        $leftExpr  = $this->ArithmeticExpression();
+        $operator  = $this->ComparisonOperator();
+        $rightExpr = ($this->_isNextAllAnySome())
+            ? $this->QuantifiedExpression()
+            : $this->ArithmeticExpression();
 
         return new AST\ComparisonExpression($leftExpr, $operator, $rightExpr);
     }
@@ -2548,7 +2723,7 @@ public function ComparisonExpression()
      */
     public function InExpression()
     {
-        $inExpression = new AST\InExpression($this->SingleValuedPathExpression());
+        $inExpression = new AST\InExpression($this->ArithmeticExpression());
 
         if ($this->_lexer->isNextToken(Lexer::T_NOT)) {
             $this->match(Lexer::T_NOT);
@@ -2578,7 +2753,7 @@ public function InExpression()
     }
 
     /**
-     * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (AbstractSchemaName | InputParameter)
+     * InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")")
      *
      * @return \Doctrine\ORM\Query\AST\InstanceOfExpression
      */
@@ -2592,21 +2767,49 @@ public function InstanceOfExpression()
         }
 
         $this->match(Lexer::T_INSTANCE);
+        $this->match(Lexer::T_OF);
 
-        if ($this->_lexer->isNextToken(Lexer::T_OF)) {
-            $this->match(Lexer::T_OF);
+        $exprValues = array();
+
+        if ($this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) {
+            $this->match(Lexer::T_OPEN_PARENTHESIS);
+
+            $exprValues[] = $this->InstanceOfParameter();
+
+            while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
+                $this->match(Lexer::T_COMMA);
+
+                $exprValues[] = $this->InstanceOfParameter();
+            }
+
+            $this->match(Lexer::T_CLOSE_PARENTHESIS);
+
+            $instanceOfExpression->value = $exprValues;
+
+            return $instanceOfExpression;
         }
 
+        $exprValues[] = $this->InstanceOfParameter();
+
+        $instanceOfExpression->value = $exprValues;
+
+        return $instanceOfExpression;
+    }
+
+    /**
+     * InstanceOfParameter ::= AbstractSchemaName | InputParameter
+     *
+     * @return mixed
+     */
+    public function InstanceOfParameter()
+    {
         if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
             $this->match(Lexer::T_INPUT_PARAMETER);
-            $exprValue = new AST\InputParameter($this->_lexer->token['value']);
-        } else {
-            $exprValue = $this->AliasIdentificationVariable();
+
+            return new AST\InputParameter($this->_lexer->token['value']);
         }
 
-        $instanceOfExpression->value = $exprValue;
-        
-        return $instanceOfExpression;
+        return $this->AliasIdentificationVariable();
     }
 
     /**
@@ -2691,8 +2894,10 @@ public function ExistsExpression()
 
         $this->match(Lexer::T_EXISTS);
         $this->match(Lexer::T_OPEN_PARENTHESIS);
+
         $existsExpression = new AST\ExistsExpression($this->Subselect());
         $existsExpression->not = $not;
+
         $this->match(Lexer::T_CLOSE_PARENTHESIS);
 
         return $existsExpression;
@@ -2756,26 +2961,45 @@ public function FunctionDeclaration()
         $funcName = strtolower($token['value']);
 
         // Check for built-in functions first!
-        if (isset(self::$_STRING_FUNCTIONS[$funcName])) {
-            return $this->FunctionsReturningStrings();
-        } else if (isset(self::$_NUMERIC_FUNCTIONS[$funcName])) {
-            return $this->FunctionsReturningNumerics();
-        } else if (isset(self::$_DATETIME_FUNCTIONS[$funcName])) {
-            return $this->FunctionsReturningDatetime();
+        switch (true) {
+            case (isset(self::$_STRING_FUNCTIONS[$funcName])):
+                return $this->FunctionsReturningStrings();
+
+            case (isset(self::$_NUMERIC_FUNCTIONS[$funcName])):
+                return $this->FunctionsReturningNumerics();
+
+            case (isset(self::$_DATETIME_FUNCTIONS[$funcName])):
+                return $this->FunctionsReturningDatetime();
+
+            default:
+                return $this->CustomFunctionDeclaration();
         }
+    }
+
+    /**
+     * Helper function for FunctionDeclaration grammar rule
+     */
+    private function CustomFunctionDeclaration()
+    {
+        $token = $this->_lexer->lookahead;
+        $funcName = strtolower($token['value']);
 
         // Check for custom functions afterwards
         $config = $this->_em->getConfiguration();
 
-        if ($config->getCustomStringFunction($funcName) !== null) {
-            return $this->CustomFunctionsReturningStrings();
-        } else if ($config->getCustomNumericFunction($funcName) !== null) {
-            return $this->CustomFunctionsReturningNumerics();
-        } else if ($config->getCustomDatetimeFunction($funcName) !== null) {
-            return $this->CustomFunctionsReturningDatetime();
-        }
+        switch (true) {
+            case ($config->getCustomStringFunction($funcName) !== null):
+                return $this->CustomFunctionsReturningStrings();
 
-        $this->syntaxError('known function', $token);
+            case ($config->getCustomNumericFunction($funcName) !== null):
+                return $this->CustomFunctionsReturningNumerics();
+
+            case ($config->getCustomDatetimeFunction($funcName) !== null):
+                return $this->CustomFunctionsReturningDatetime();
+
+            default:
+                $this->syntaxError('known function', $token);
+        }
     }
 
     /**
@@ -2790,7 +3014,8 @@ public function FunctionDeclaration()
     public function FunctionsReturningNumerics()
     {
         $funcNameLower = strtolower($this->_lexer->lookahead['value']);
-        $funcClass = self::$_NUMERIC_FUNCTIONS[$funcNameLower];
+        $funcClass     = self::$_NUMERIC_FUNCTIONS[$funcNameLower];
+
         $function = new $funcClass($funcNameLower);
         $function->parse($this);
 
@@ -2799,9 +3024,10 @@ public function FunctionsReturningNumerics()
 
     public function CustomFunctionsReturningNumerics()
     {
-        $funcName = strtolower($this->_lexer->lookahead['value']);
         // getCustomNumericFunction is case-insensitive
+        $funcName  = strtolower($this->_lexer->lookahead['value']);
         $funcClass = $this->_em->getConfiguration()->getCustomNumericFunction($funcName);
+
         $function = new $funcClass($funcName);
         $function->parse($this);
 
@@ -2814,7 +3040,8 @@ public function CustomFunctionsReturningNumerics()
     public function FunctionsReturningDatetime()
     {
         $funcNameLower = strtolower($this->_lexer->lookahead['value']);
-        $funcClass = self::$_DATETIME_FUNCTIONS[$funcNameLower];
+        $funcClass     = self::$_DATETIME_FUNCTIONS[$funcNameLower];
+
         $function = new $funcClass($funcNameLower);
         $function->parse($this);
 
@@ -2823,9 +3050,10 @@ public function FunctionsReturningDatetime()
 
     public function CustomFunctionsReturningDatetime()
     {
-        $funcName = $this->_lexer->lookahead['value'];
         // getCustomDatetimeFunction is case-insensitive
+        $funcName  = $this->_lexer->lookahead['value'];
         $funcClass = $this->_em->getConfiguration()->getCustomDatetimeFunction($funcName);
+
         $function = new $funcClass($funcName);
         $function->parse($this);
 
@@ -2843,7 +3071,8 @@ public function CustomFunctionsReturningDatetime()
     public function FunctionsReturningStrings()
     {
         $funcNameLower = strtolower($this->_lexer->lookahead['value']);
-        $funcClass = self::$_STRING_FUNCTIONS[$funcNameLower];
+        $funcClass     = self::$_STRING_FUNCTIONS[$funcNameLower];
+
         $function = new $funcClass($funcNameLower);
         $function->parse($this);
 
@@ -2852,9 +3081,10 @@ public function FunctionsReturningStrings()
 
     public function CustomFunctionsReturningStrings()
     {
-        $funcName = $this->_lexer->lookahead['value'];
         // getCustomStringFunction is case-insensitive
+        $funcName  = $this->_lexer->lookahead['value'];
         $funcClass = $this->_em->getConfiguration()->getCustomStringFunction($funcName);
+
         $function = new $funcClass($funcName);
         $function->parse($this);
 
diff --git a/src/lib/Doctrine/ORM/Query/ParserResult.php b/src/lib/Doctrine/ORM/Query/ParserResult.php
index 42aecc1844..3e938a9c3d 100644
--- a/src/lib/Doctrine/ORM/Query/ParserResult.php
+++ b/src/lib/Doctrine/ORM/Query/ParserResult.php
@@ -37,14 +37,14 @@ class ParserResult
 {
     /**
      * The SQL executor used for executing the SQL.
-     * 
+     *
      * @var \Doctrine\ORM\Query\Exec\AbstractSqlExecutor
      */
     private $_sqlExecutor;
 
     /**
      * The ResultSetMapping that describes how to map the SQL result set.
-     * 
+     *
      * @var \Doctrine\ORM\Query\ResultSetMapping
      */
     private $_resultSetMapping;
@@ -55,7 +55,7 @@ class ParserResult
      * @var array
      */
     private $_parameterMappings = array();
-	
+
     /**
      * Initializes a new instance of the ParserResult class.
      * The new instance is initialized with an empty ResultSetMapping.
@@ -67,7 +67,7 @@ public function __construct()
 
     /**
      * Gets the ResultSetMapping for the parsed query.
-     * 
+     *
      * @return ResultSetMapping The result set mapping of the parsed query or NULL
      *                          if the query is not a SELECT query.
      */
@@ -88,7 +88,7 @@ public function setResultSetMapping(ResultSetMapping $rsm)
 
     /**
      * Sets the SQL executor that should be used for this ParserResult.
-     * 
+     *
      * @param \Doctrine\ORM\Query\Exec\AbstractSqlExecutor $executor
      */
     public function setSqlExecutor($executor)
@@ -98,14 +98,14 @@ public function setSqlExecutor($executor)
 
     /**
      * Gets the SQL executor used by this ParserResult.
-     * 
+     *
      * @return \Doctrine\ORM\Query\Exec\AbstractSqlExecutor
      */
     public function getSqlExecutor()
     {
         return $this->_sqlExecutor;
     }
-    
+
     /**
      * Adds a DQL to SQL parameter mapping. One DQL parameter name/position can map to
      * several SQL parameter positions.
@@ -117,17 +117,17 @@ public function addParameterMapping($dqlPosition, $sqlPosition)
     {
         $this->_parameterMappings[$dqlPosition][] = $sqlPosition;
     }
-    
+
     /**
      * Gets all DQL to SQL parameter mappings.
-     * 
+     *
      * @return array The parameter mappings.
      */
     public function getParameterMappings()
     {
         return $this->_parameterMappings;
     }
-    
+
     /**
      * Gets the SQL parameter positions for a DQL parameter name/position.
      *
diff --git a/src/lib/Doctrine/ORM/Query/QueryException.php b/src/lib/Doctrine/ORM/Query/QueryException.php
index 39dc42505b..cd74f3567c 100644
--- a/src/lib/Doctrine/ORM/Query/QueryException.php
+++ b/src/lib/Doctrine/ORM/Query/QueryException.php
@@ -47,6 +47,11 @@ public static function semanticalError($message)
         return new self('[Semantical Error] ' . $message);
     }
 
+    public static function invalidLockMode()
+    {
+        return new self('Invalid lock mode hint provided.');
+    }
+
     public static function invalidParameterType($expected, $received)
     {
         return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.');
@@ -72,6 +77,11 @@ public static function unknownParameter($key)
         return new self("Invalid parameter: token ".$key." is not defined in the query.");
     }
 
+    public static function parameterTypeMissmatch()
+    {
+        return new self("DQL Query parameter and type numbers missmatch, but have to be exactly equal.");
+    }
+
     public static function invalidPathExpression($pathExpr)
     {
         return new self(
@@ -84,7 +94,7 @@ public static function invalidLiteral($literal) {
     }
 
     /**
-     * @param Doctrine\ORM\Mapping\AssociationMapping $assoc
+     * @param \Doctrine\ORM\Mapping\AssociationMapping $assoc
      */
     public static function iterateWithFetchJoinCollectionNotAllowed($assoc)
     {
@@ -135,7 +145,7 @@ public static function associationPathCompositeKeyNotSupported()
             "in the query."
         );
     }
-    
+
     public static function instanceOfUnrelatedClass($className, $rootClass)
     {
         return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
diff --git a/src/lib/Doctrine/ORM/Query/ResultSetMapping.php b/src/lib/Doctrine/ORM/Query/ResultSetMapping.php
index 3a086e2cd9..32aa298f1f 100644
--- a/src/lib/Doctrine/ORM/Query/ResultSetMapping.php
+++ b/src/lib/Doctrine/ORM/Query/ResultSetMapping.php
@@ -26,7 +26,7 @@
  * The properties of this class are only public for fast internal READ access and to (drastically)
  * reduce the size of serialized instances for more effective caching due to better (un-)serialization
  * performance.
- * 
+ *
  * Users should use the public methods.
  *
  * @author Roman Borschel 
@@ -36,87 +36,85 @@
 class ResultSetMapping
 {
     /**
-     * Whether the result is mixed (contains scalar values together with field values).
-     * 
      * @ignore
-     * @var boolean
+     * @var boolean Whether the result is mixed (contains scalar values together with field values).
      */
     public $isMixed = false;
+
     /**
-     * Maps alias names to class names.
-     *
      * @ignore
-     * @var array
+     * @var array Maps alias names to class names.
      */
     public $aliasMap = array();
+
     /**
-     * Maps alias names to related association field names.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps alias names to related association field names.
      */
     public $relationMap = array();
+
     /**
-     * Maps alias names to parent alias names.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps alias names to parent alias names.
      */
     public $parentAliasMap = array();
+
     /**
-     * Maps column names in the result set to field names for each class.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps column names in the result set to field names for each class.
      */
     public $fieldMappings = array();
+
     /**
-     * Maps column names in the result set to the alias/field name to use in the mapped result.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps column names in the result set to the alias/field name to use in the mapped result.
      */
     public $scalarMappings = array();
+
+    /**
+     * @ignore
+     * @var array Maps column names in the result set to the alias/field type to use in the mapped result.
+     */
+    public $typeMappings = array();
+
+    /**
+     * @ignore
+     * @var array Maps entities in the result set to the alias name to use in the mapped result.
+     */
+    public $entityMappings = array();
+
     /**
-     * Maps column names of meta columns (foreign keys, discriminator columns, ...) to field names.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps column names of meta columns (foreign keys, discriminator columns, ...) to field names.
      */
     public $metaMappings = array();
+
     /**
-     * Maps column names in the result set to the alias they belong to.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps column names in the result set to the alias they belong to.
      */
     public $columnOwnerMap = array();
+
     /**
-     * List of columns in the result set that are used as discriminator columns.
-     * 
      * @ignore
-     * @var array
+     * @var array List of columns in the result set that are used as discriminator columns.
      */
     public $discriminatorColumns = array();
+
     /**
-     * Maps alias names to field names that should be used for indexing.
-     * 
      * @ignore
-     * @var array
+     * @var array Maps alias names to field names that should be used for indexing.
      */
     public $indexByMap = array();
+
     /**
-     * Map from column names to class names that declare the field the column is mapped to.
-     * 
      * @ignore
-     * @var array
+     * @var array Map from column names to class names that declare the field the column is mapped to.
      */
     public $declaringClasses = array();
-    
+
     /**
-     * This is necessary to hydrate derivate foreign keys correctly.
-     * 
-     * @var array
+     * @var array This is necessary to hydrate derivate foreign keys correctly.
      */
     public $isIdentifierColumn = array();
 
@@ -126,11 +124,21 @@ class ResultSetMapping
      * @param string $class The class name of the entity.
      * @param string $alias The alias for the class. The alias must be unique among all entity
      *                      results or joined entity results within this ResultSetMapping.
+     * @param string $resultAlias The result alias with which the entity result should be
+     *                            placed in the result structure.
+     * @return ResultSetMapping This ResultSetMapping instance.
      * @todo Rename: addRootEntity
      */
-    public function addEntityResult($class, $alias)
+    public function addEntityResult($class, $alias, $resultAlias = null)
     {
         $this->aliasMap[$alias] = $class;
+        $this->entityMappings[$alias] = $resultAlias;
+
+        if ($resultAlias !== null) {
+            $this->isMixed = true;
+        }
+
+        return $this;
     }
 
     /**
@@ -141,12 +149,15 @@ public function addEntityResult($class, $alias)
      * @param string $alias The alias of the entity result or joined entity result the discriminator
      *                      column should be used for.
      * @param string $discrColumn The name of the discriminator column in the SQL result set.
+     * @return ResultSetMapping This ResultSetMapping instance.
      * @todo Rename: addDiscriminatorColumn
      */
     public function setDiscriminatorColumn($alias, $discrColumn)
     {
         $this->discriminatorColumns[$alias] = $discrColumn;
         $this->columnOwnerMap[$discrColumn] = $alias;
+
+        return $this;
     }
 
     /**
@@ -154,10 +165,61 @@ public function setDiscriminatorColumn($alias, $discrColumn)
      *
      * @param string $alias The alias of an entity result or joined entity result.
      * @param string $fieldName The name of the field to use for indexing.
+     * @return ResultSetMapping This ResultSetMapping instance.
      */
     public function addIndexBy($alias, $fieldName)
     {
-        $this->indexByMap[$alias] = $fieldName;
+        $found = false;
+
+        foreach ($this->fieldMappings AS $columnName => $columnFieldName) {
+            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue;
+
+            $this->addIndexByColumn($alias, $columnName);
+            $found = true;
+
+            break;
+        }
+
+        /* TODO: check if this exception can be put back, for now it's gone because of assumptions made by some ORM internals
+        if ( ! $found) {
+            $message = sprintf(
+                'Cannot add index by for DQL alias %s and field %s without calling addFieldResult() for them before.',
+                $alias,
+                $fieldName
+            );
+
+            throw new \LogicException($message);
+        }
+        */
+
+        return $this;
+    }
+
+    /**
+     * Set to index by a scalar result column name
+     *
+     * @param $resultColumnName
+     * @return ResultSetMapping This ResultSetMapping instance.
+     */
+    public function addIndexByScalar($resultColumnName)
+    {
+        $this->indexByMap['scalars'] = $resultColumnName;
+
+        return $this;
+    }
+
+    /**
+     * Sets a column to use for indexing an entity or joined entity result by the given alias name.
+     *
+     * @param $alias
+     * @param $resultColumnName
+     * @return ResultSetMapping This ResultSetMapping instance.
+     */
+    public function addIndexByColumn($alias, $resultColumnName)
+    {
+        $this->indexByMap[$alias] = $resultColumnName;
+
+        return $this;
     }
 
     /**
@@ -197,6 +259,7 @@ public function isFieldResult($columnName)
      *                               the field $fieldName is defined on a subclass, specify that here.
      *                               If not specified, the field is assumed to belong to the class
      *                               designated by $alias.
+     * @return ResultSetMapping This ResultSetMapping instance.
      * @todo Rename: addField
      */
     public function addFieldResult($alias, $columnName, $fieldName, $declaringClass = null)
@@ -207,9 +270,12 @@ public function addFieldResult($alias, $columnName, $fieldName, $declaringClass
         $this->columnOwnerMap[$columnName] = $alias;
         // field name => class name of declaring class
         $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias];
+
         if ( ! $this->isMixed && $this->scalarMappings) {
             $this->isMixed = true;
         }
+
+        return $this;
     }
 
     /**
@@ -219,33 +285,44 @@ public function addFieldResult($alias, $columnName, $fieldName, $declaringClass
      * @param string $alias The unique alias to use for the joined entity.
      * @param string $parentAlias The alias of the entity result that is the parent of this joined result.
      * @param object $relation The association field that connects the parent entity result with the joined entity result.
+     * @return ResultSetMapping This ResultSetMapping instance.
      * @todo Rename: addJoinedEntity
      */
     public function addJoinedEntityResult($class, $alias, $parentAlias, $relation)
     {
-        $this->aliasMap[$alias] = $class;
+        $this->aliasMap[$alias]       = $class;
         $this->parentAliasMap[$alias] = $parentAlias;
-        $this->relationMap[$alias] = $relation;
+        $this->relationMap[$alias]    = $relation;
+
+        return $this;
     }
-    
+
     /**
      * Adds a scalar result mapping.
      *
      * @param string $columnName The name of the column in the SQL result set.
      * @param string $alias The result alias with which the scalar result should be placed in the result structure.
+     * @param string $type The column type
+     *
+     * @return ResultSetMapping This ResultSetMapping instance.
+     *
      * @todo Rename: addScalar
      */
-    public function addScalarResult($columnName, $alias)
+    public function addScalarResult($columnName, $alias, $type = null)
     {
         $this->scalarMappings[$columnName] = $alias;
+        $this->typeMappings[$columnName]   = $type ?: 'string';
+
         if ( ! $this->isMixed && $this->fieldMappings) {
             $this->isMixed = true;
         }
+
+        return $this;
     }
 
     /**
      * Checks whether a column with a given name is mapped as a scalar result.
-     * 
+     *
      * @param string $columName The name of the column in the SQL result set.
      * @return boolean
      * @todo Rename: isScalar
@@ -384,21 +461,25 @@ public function isMixedResult()
     {
         return $this->isMixed;
     }
-    
+
     /**
      * Adds a meta column (foreign key or discriminator column) to the result set.
-     * 
+     *
      * @param string $alias
      * @param string $columnName
      * @param string $fieldName
      * @param bool
+     * @return ResultSetMapping This ResultSetMapping instance.
      */
     public function addMetaResult($alias, $columnName, $fieldName, $isIdentifierColumn = false)
     {
         $this->metaMappings[$columnName] = $fieldName;
         $this->columnOwnerMap[$columnName] = $alias;
+
         if ($isIdentifierColumn) {
             $this->isIdentifierColumn[$alias][$columnName] = true;
         }
+
+        return $this;
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php b/src/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php
index ceacc9638b..f84686ad2c 100644
--- a/src/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php
+++ b/src/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php
@@ -20,6 +20,7 @@
 namespace Doctrine\ORM\Query;
 
 use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\Mapping\ClassMetadataInfo;
 
 /**
  * A ResultSetMappingBuilder uses the EntityManager to automatically populate entity fields
@@ -52,21 +53,7 @@ public function __construct(EntityManager $em)
     public function addRootEntityFromClassMetadata($class, $alias, $renamedColumns = array())
     {
         $this->addEntityResult($class, $alias);
-        $classMetadata = $this->em->getClassMetadata($class);
-        if ($classMetadata->isInheritanceTypeSingleTable() || $classMetadata->isInheritanceTypeJoined()) {
-            throw new \InvalidArgumentException('ResultSetMapping builder does not currently support inheritance.');
-        }
-        $platform = $this->em->getConnection()->getDatabasePlatform();
-        foreach ($classMetadata->getColumnNames() AS $columnName) {
-            $propertyName = $classMetadata->getFieldName($columnName);
-            if (isset($renamedColumns[$columnName])) {
-                $columnName = $renamedColumns[$columnName];
-            }
-            if (isset($this->fieldMappings[$columnName])) {
-                throw new \InvalidArgumentException("The column '$columnName' conflicts with another column in the mapper.");
-            }
-            $this->addFieldResult($alias, $platform->getSQLResultCasing($columnName), $propertyName);
-        }
+        $this->addAllClassFields($class, $alias, $renamedColumns);
     }
 
     /**
@@ -81,6 +68,14 @@ public function addRootEntityFromClassMetadata($class, $alias, $renamedColumns =
     public function addJoinedEntityFromClassMetadata($class, $alias, $parentAlias, $relation, $renamedColumns = array())
     {
         $this->addJoinedEntityResult($class, $alias, $parentAlias, $relation);
+        $this->addAllClassFields($class, $alias, $renamedColumns);
+    }
+
+    /**
+     * Adds all fields of the given class to the result set mapping (columns and meta fields)
+     */
+    protected function addAllClassFields($class, $alias, $renamedColumns = array())
+    {
         $classMetadata = $this->em->getClassMetadata($class);
         if ($classMetadata->isInheritanceTypeSingleTable() || $classMetadata->isInheritanceTypeJoined()) {
             throw new \InvalidArgumentException('ResultSetMapping builder does not currently support inheritance.');
@@ -91,10 +86,24 @@ public function addJoinedEntityFromClassMetadata($class, $alias, $parentAlias, $
             if (isset($renamedColumns[$columnName])) {
                 $columnName = $renamedColumns[$columnName];
             }
+            $columnName = $platform->getSQLResultCasing($columnName);
             if (isset($this->fieldMappings[$columnName])) {
                 throw new \InvalidArgumentException("The column '$columnName' conflicts with another column in the mapper.");
             }
-            $this->addFieldResult($alias, $platform->getSQLResultCasing($columnName), $propertyName);
+            $this->addFieldResult($alias, $columnName, $propertyName);
+        }
+        foreach ($classMetadata->associationMappings AS $associationMapping) {
+            if ($associationMapping['isOwningSide'] && $associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
+                foreach ($associationMapping['joinColumns'] AS $joinColumn) {
+                    $columnName = $joinColumn['name'];
+                    $renamedColumnName = isset($renamedColumns[$columnName]) ? $renamedColumns[$columnName] : $columnName;
+                    $renamedColumnName = $platform->getSQLResultCasing($renamedColumnName);
+                    if (isset($this->metaMappings[$renamedColumnName])) {
+                        throw new \InvalidArgumentException("The column '$renamedColumnName' conflicts with another column in the mapper.");
+                    }
+                    $this->addMetaResult($alias, $renamedColumnName, $columnName);
+                }
+            }
         }
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Query/SqlWalker.php b/src/lib/Doctrine/ORM/Query/SqlWalker.php
index 2a9f58faff..d883aea7dc 100644
--- a/src/lib/Doctrine/ORM/Query/SqlWalker.php
+++ b/src/lib/Doctrine/ORM/Query/SqlWalker.php
@@ -20,21 +20,30 @@
 namespace Doctrine\ORM\Query;
 
 use Doctrine\DBAL\LockMode,
+    Doctrine\DBAL\Types\Type,
     Doctrine\ORM\Mapping\ClassMetadata,
     Doctrine\ORM\Query,
-    Doctrine\ORM\Query\QueryException;
+    Doctrine\ORM\Query\QueryException,
+    Doctrine\ORM\Mapping\ClassMetadataInfo;
 
 /**
  * The SqlWalker is a TreeWalker that walks over a DQL AST and constructs
  * the corresponding SQL.
  *
+ * @author Guilherme Blanco 
  * @author Roman Borschel 
  * @author Benjamin Eberlei 
- * @since 2.0
+ * @author Alexander 
+ * @since  2.0
  * @todo Rename: SQLWalker
  */
 class SqlWalker implements TreeWalker
 {
+    /**
+     * @var string
+     */
+    const HINT_DISTINCT = 'doctrine.distinct';
+  
     /**
      * @var ResultSetMapping
      */
@@ -57,7 +66,7 @@ class SqlWalker implements TreeWalker
     private $_em;
 
     /**
-     * @var Doctrine\DBAL\Connection
+     * @var \Doctrine\DBAL\Connection
      */
     private $_conn;
 
@@ -71,6 +80,13 @@ class SqlWalker implements TreeWalker
     /** Map from result variable names to their SQL column alias names. */
     private $_scalarResultAliasMap = array();
 
+    /**
+     * Map from DQL-Alias + Field-Name to SQL Column Alias
+     *
+     * @var array
+     */
+    private $_scalarFields = array();
+
     /** Map of all components/classes that appear in the DQL query. */
     private $_queryComponents;
 
@@ -157,32 +173,24 @@ public function getQueryComponent($dqlAlias)
      */
     public function getExecutor($AST)
     {
-        $isDeleteStatement = $AST instanceof AST\DeleteStatement;
-        $isUpdateStatement = $AST instanceof AST\UpdateStatement;
+        switch (true) {
+            case ($AST instanceof AST\DeleteStatement):
+                $primaryClass = $this->_em->getClassMetadata($AST->deleteClause->abstractSchemaName);
 
-        if ($isDeleteStatement) {
-            $primaryClass = $this->_em->getClassMetadata(
-                $AST->deleteClause->abstractSchemaName
-            );
+                return ($primaryClass->isInheritanceTypeJoined())
+                    ? new Exec\MultiTableDeleteExecutor($AST, $this)
+                    : new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
 
-            if ($primaryClass->isInheritanceTypeJoined()) {
-                return new Exec\MultiTableDeleteExecutor($AST, $this);
-            } else {
-                return new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
-            }
-        } else if ($isUpdateStatement) {
-            $primaryClass = $this->_em->getClassMetadata(
-                $AST->updateClause->abstractSchemaName
-            );
+            case ($AST instanceof AST\UpdateStatement):
+                $primaryClass = $this->_em->getClassMetadata($AST->updateClause->abstractSchemaName);
 
-            if ($primaryClass->isInheritanceTypeJoined()) {
-                return new Exec\MultiTableUpdateExecutor($AST, $this);
-            } else {
-                return new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
-            }
-        }
+                return ($primaryClass->isInheritanceTypeJoined())
+                    ? new Exec\MultiTableUpdateExecutor($AST, $this)
+                    : new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
 
-        return new Exec\SingleSelectExecutor($AST, $this);
+            default:
+                return new Exec\SingleSelectExecutor($AST, $this);
+        }
     }
 
     /**
@@ -229,7 +237,11 @@ public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')
      */
     public function getSQLColumnAlias($columnName)
     {
-        return $columnName . $this->_aliasCounter++;
+        // Trim the column alias to the maximum identifier length of the platform.
+        // If the alias is to long, characters are cut off from the beginning.
+        return $this->_platform->getSQLResultCasing(
+            substr($columnName . $this->_aliasCounter++, -$this->_platform->getMaxIdentifierLength())
+        );
     }
 
     /**
@@ -244,44 +256,50 @@ private function _generateClassTableInheritanceJoins($class, $dqlAlias)
     {
         $sql = '';
 
-        $baseTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
+        $baseTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
 
         // INNER JOIN parent class tables
         foreach ($class->parentClasses as $parentClassName) {
             $parentClass = $this->_em->getClassMetadata($parentClassName);
-            $tableAlias = $this->getSQLTableAlias($parentClass->table['name'], $dqlAlias);
+            $tableAlias  = $this->getSQLTableAlias($parentClass->getTableName(), $dqlAlias);
+
             // If this is a joined association we must use left joins to preserve the correct result.
             $sql .= isset($this->_queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER ';
-            $sql .= 'JOIN ' . $parentClass->getQuotedTableName($this->_platform)
-                  . ' ' . $tableAlias . ' ON ';
-            $first = true;
-            foreach ($class->identifier as $idField) {
-                if ($first) $first = false; else $sql .= ' AND ';
+            $sql .= 'JOIN ' . $parentClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON ';
+
+            $sqlParts = array();
+
+            foreach ($class->getQuotedIdentifierColumnNames($this->_platform) as $columnName) {
+                $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName;
+            }
 
-                $columnName = $class->getQuotedColumnName($idField, $this->_platform);
-                $sql .= $baseTableAlias . '.' . $columnName
-                      . ' = '
-                      . $tableAlias . '.' . $columnName;
+            // Add filters on the root class
+            if ($filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias)) {
+                $sqlParts[] = $filterSql;
             }
+
+            $sql .= implode(' AND ', $sqlParts);
         }
 
-        // LEFT JOIN subclass tables, if partial objects disallowed.
-        if ( ! $this->_query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) {
-            foreach ($class->subClasses as $subClassName) {
-                $subClass = $this->_em->getClassMetadata($subClassName);
-                $tableAlias = $this->getSQLTableAlias($subClass->table['name'], $dqlAlias);
-                $sql .= ' LEFT JOIN ' . $subClass->getQuotedTableName($this->_platform)
-                        . ' ' . $tableAlias . ' ON ';
-                $first = true;
-                foreach ($class->identifier as $idField) {
-                    if ($first) $first = false; else $sql .= ' AND ';
-
-                    $columnName = $class->getQuotedColumnName($idField, $this->_platform);
-                    $sql .= $baseTableAlias . '.' . $columnName
-                            . ' = '
-                            . $tableAlias . '.' . $columnName;
-                }
+        // Ignore subclassing inclusion if partial objects is disallowed
+        if ($this->_query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) {
+            return $sql;
+        }
+
+        // LEFT JOIN child class tables
+        foreach ($class->subClasses as $subClassName) {
+            $subClass   = $this->_em->getClassMetadata($subClassName);
+            $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
+
+            $sql .= ' LEFT JOIN ' . $subClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON ';
+
+            $sqlParts = array();
+
+            foreach ($subClass->getQuotedIdentifierColumnNames($this->_platform) as $columnName) {
+                $sqlParts[] = $baseTableAlias . '.' . $columnName . ' = ' . $tableAlias . '.' . $columnName;
             }
+
+            $sql .= implode(' AND ', $sqlParts);
         }
 
         return $sql;
@@ -289,26 +307,25 @@ private function _generateClassTableInheritanceJoins($class, $dqlAlias)
 
     private function _generateOrderedCollectionOrderByItems()
     {
-        $sql = '';
-        foreach ($this->_selectedClasses AS $dqlAlias => $class) {
-            $qComp = $this->_queryComponents[$dqlAlias];
-            if (isset($qComp['relation']['orderBy'])) {
-                foreach ($qComp['relation']['orderBy'] AS $fieldName => $orientation) {
-                    if ($qComp['metadata']->isInheritanceTypeJoined()) {
-                        $tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName);
-                    } else {
-                        $tableName = $qComp['metadata']->table['name'];
-                    }
+        $sqlParts = array();
 
-                    if ($sql != '') {
-                        $sql .= ', ';
-                    }
-                    $sql .= $this->getSQLTableAlias($tableName, $dqlAlias) . '.' .
-                            $qComp['metadata']->getQuotedColumnName($fieldName, $this->_platform) . " $orientation";
-                }
+        foreach ($this->_selectedClasses AS $selectedClass) {
+            $dqlAlias = $selectedClass['dqlAlias'];
+            $qComp    = $this->_queryComponents[$dqlAlias];
+
+            if ( ! isset($qComp['relation']['orderBy'])) continue;
+
+            foreach ($qComp['relation']['orderBy'] AS $fieldName => $orientation) {
+                $columnName = $qComp['metadata']->getQuotedColumnName($fieldName, $this->_platform);
+                $tableName  = ($qComp['metadata']->isInheritanceTypeJoined())
+                    ? $this->_em->getUnitOfWork()->getEntityPersister($qComp['metadata']->name)->getOwningTable($fieldName)
+                    : $qComp['metadata']->getTableName();
+
+                $sqlParts[] = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName . ' ' . $orientation;
             }
         }
-        return $sql;
+
+        return implode(', ', $sqlParts);
     }
 
     /**
@@ -319,37 +336,77 @@ private function _generateOrderedCollectionOrderByItems()
      */
     private function _generateDiscriminatorColumnConditionSQL(array $dqlAliases)
     {
-        $encapsulate = false;
-        $sql = '';
+        $sqlParts = array();
 
         foreach ($dqlAliases as $dqlAlias) {
             $class = $this->_queryComponents[$dqlAlias]['metadata'];
 
-            if ($class->isInheritanceTypeSingleTable()) {
-                $conn = $this->_em->getConnection();
-                $values = array();
-                if ($class->discriminatorValue !== null) { // discrimnators can be 0
-                    $values[] = $conn->quote($class->discriminatorValue);
-                }
+            if ( ! $class->isInheritanceTypeSingleTable()) continue;
 
-                foreach ($class->subClasses as $subclassName) {
-                    $values[] = $conn->quote($this->_em->getClassMetadata($subclassName)->discriminatorValue);
-                }
+            $conn   = $this->_em->getConnection();
+            $values = array();
 
-                if ($sql != '') {
-                    $sql .= ' AND ';
-                    $encapsulate = true;
-                }
+            if ($class->discriminatorValue !== null) { // discrimnators can be 0
+                $values[] = $conn->quote($class->discriminatorValue);
+            }
 
-                $sql .= ($sql != '' ? ' AND ' : '')
-                      . (($this->_useSqlTableAliases) ? $this->getSQLTableAlias($class->table['name'], $dqlAlias) . '.' : '')
-                      . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')';
+            foreach ($class->subClasses as $subclassName) {
+                $values[] = $conn->quote($this->_em->getClassMetadata($subclassName)->discriminatorValue);
             }
+
+            $sqlParts[] = (($this->_useSqlTableAliases) ? $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.' : '')
+                        . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')';
         }
 
-        return ($encapsulate) ? '(' . $sql . ')' : $sql;
+        $sql = implode(' AND ', $sqlParts);
+
+        return (count($sqlParts) > 1) ? '(' . $sql . ')' : $sql;
     }
 
+    /**
+     * Generates the filter SQL for a given entity and table alias.
+     *
+     * @param ClassMetadata $targetEntity Metadata of the target entity.
+     * @param string $targetTableAlias The table alias of the joined/selected table.
+     *
+     * @return string The SQL query part to add to a query.
+     */
+    private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias)
+    {
+        if (!$this->_em->hasFilters()) {
+            return '';
+        }
+
+        switch($targetEntity->inheritanceType) {
+            case ClassMetadata::INHERITANCE_TYPE_NONE:
+                break;
+            case ClassMetadata::INHERITANCE_TYPE_JOINED:
+                // The classes in the inheritance will be added to the query one by one,
+                // but only the root node is getting filtered
+                if ($targetEntity->name !== $targetEntity->rootEntityName) {
+                    return '';
+                }
+                break;
+            case ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE:
+                // With STI the table will only be queried once, make sure that the filters
+                // are added to the root entity
+                $targetEntity = $this->_em->getClassMetadata($targetEntity->rootEntityName);
+                break;
+            default:
+                //@todo: throw exception?
+                return '';
+            break;
+        }
+
+        $filterClauses = array();
+        foreach ($this->_em->getFilters()->getEnabledFilters() as $filter) {
+            if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
+                $filterClauses[] = '(' . $filterExpr . ')';
+            }
+        }
+
+        return implode(' AND ', $filterClauses);
+    }
     /**
      * Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
      *
@@ -357,40 +414,44 @@ private function _generateDiscriminatorColumnConditionSQL(array $dqlAliases)
      */
     public function walkSelectStatement(AST\SelectStatement $AST)
     {
-        $sql = $this->walkSelectClause($AST->selectClause);
+        $sql  = $this->walkSelectClause($AST->selectClause);
         $sql .= $this->walkFromClause($AST->fromClause);
-
-        if (($whereClause = $AST->whereClause) !== null) {
-            $sql .= $this->walkWhereClause($whereClause);
-        } else if (($discSql = $this->_generateDiscriminatorColumnConditionSQL($this->_rootAliases)) !== '') {
-            $sql .= ' WHERE ' . $discSql;
-        }
-
+        $sql .= $this->walkWhereClause($AST->whereClause);
         $sql .= $AST->groupByClause ? $this->walkGroupByClause($AST->groupByClause) : '';
         $sql .= $AST->havingClause ? $this->walkHavingClause($AST->havingClause) : '';
 
         if (($orderByClause = $AST->orderByClause) !== null) {
             $sql .= $AST->orderByClause ? $this->walkOrderByClause($AST->orderByClause) : '';
         } else if (($orderBySql = $this->_generateOrderedCollectionOrderByItems()) !== '') {
-            $sql .= ' ORDER BY '.$orderBySql;
+            $sql .= ' ORDER BY ' . $orderBySql;
         }
 
-
         $sql = $this->_platform->modifyLimitQuery(
             $sql, $this->_query->getMaxResults(), $this->_query->getFirstResult()
         );
 
         if (($lockMode = $this->_query->getHint(Query::HINT_LOCK_MODE)) !== false) {
-            if ($lockMode == LockMode::PESSIMISTIC_READ) {
-                $sql .= " " . $this->_platform->getReadLockSQL();
-            } else if ($lockMode == LockMode::PESSIMISTIC_WRITE) {
-                $sql .= " " . $this->_platform->getWriteLockSQL();
-            } else if ($lockMode == LockMode::OPTIMISTIC) {
-                foreach ($this->_selectedClasses AS $class) {
-                    if ( ! $class->isVersioned) {
-                        throw \Doctrine\ORM\OptimisticLockException::lockFailed();
+            switch ($lockMode) {
+                case LockMode::PESSIMISTIC_READ:
+                    $sql .= ' ' . $this->_platform->getReadLockSQL();
+                    break;
+
+                case LockMode::PESSIMISTIC_WRITE:
+                    $sql .= ' ' . $this->_platform->getWriteLockSQL();
+                    break;
+
+                case LockMode::OPTIMISTIC:
+                    foreach ($this->_selectedClasses AS $selectedClass) {
+                        if ( ! $selectedClass['class']->isVersioned) {
+                            throw \Doctrine\ORM\OptimisticLockException::lockFailed($selectedClass['class']->name);
+                        }
                     }
-                }
+                    break;
+                case LockMode::NONE:
+                    break;
+
+                default:
+                    throw \Doctrine\ORM\Query\QueryException::invalidLockMode();
             }
         }
 
@@ -406,15 +467,9 @@ public function walkSelectStatement(AST\SelectStatement $AST)
     public function walkUpdateStatement(AST\UpdateStatement $AST)
     {
         $this->_useSqlTableAliases = false;
-        $sql = $this->walkUpdateClause($AST->updateClause);
-
-        if (($whereClause = $AST->whereClause) !== null) {
-            $sql .= $this->walkWhereClause($whereClause);
-        } else if (($discSql = $this->_generateDiscriminatorColumnConditionSQL($this->_rootAliases)) !== '') {
-            $sql .= ' WHERE ' . $discSql;
-        }
 
-        return $sql;
+        return $this->walkUpdateClause($AST->updateClause)
+             . $this->walkWhereClause($AST->whereClause);
     }
 
     /**
@@ -426,18 +481,31 @@ public function walkUpdateStatement(AST\UpdateStatement $AST)
     public function walkDeleteStatement(AST\DeleteStatement $AST)
     {
         $this->_useSqlTableAliases = false;
-        $sql = $this->walkDeleteClause($AST->deleteClause);
 
-        if (($whereClause = $AST->whereClause) !== null) {
-            $sql .= $this->walkWhereClause($whereClause);
-        } else if (($discSql = $this->_generateDiscriminatorColumnConditionSQL($this->_rootAliases)) !== '') {
-            $sql .= ' WHERE ' . $discSql;
+        return $this->walkDeleteClause($AST->deleteClause)
+             . $this->walkWhereClause($AST->whereClause);
+    }
+
+    /**
+     * Walks down an IdentificationVariable AST node, thereby generating the appropriate SQL.
+     * This one differs of ->walkIdentificationVariable() because it generates the entity identifiers.
+     *
+     * @param string $identVariable
+     * @return string
+     */
+    public function walkEntityIdentificationVariable($identVariable)
+    {
+        $class      = $this->_queryComponents[$identVariable]['metadata'];
+        $tableAlias = $this->getSQLTableAlias($class->getTableName(), $identVariable);
+        $sqlParts   = array();
+
+        foreach ($class->getQuotedIdentifierColumnNames($this->_platform) as $columnName) {
+            $sqlParts[] = $tableAlias . '.' . $columnName;
         }
 
-        return $sql;
+        return implode(', ', $sqlParts);
     }
 
-
     /**
      * Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.
      *
@@ -456,7 +524,7 @@ public function walkIdentificationVariable($identificationVariable, $fieldName =
             $class = $this->_em->getClassMetadata($class->fieldMappings[$fieldName]['inherited']);
         }
 
-        return $this->getSQLTableAlias($class->table['name'], $identificationVariable);
+        return $this->getSQLTableAlias($class->getTableName(), $identificationVariable);
     }
 
     /**
@@ -495,22 +563,22 @@ public function walkPathExpression($pathExpr)
 
                 $assoc = $class->associationMappings[$fieldName];
 
-                if ($assoc['isOwningSide']) {
-                    // COMPOSITE KEYS NOT (YET?) SUPPORTED
-                    if (count($assoc['sourceToTargetKeyColumns']) > 1) {
-                        throw QueryException::associationPathCompositeKeyNotSupported();
-                    }
+                if ( ! $assoc['isOwningSide']) {
+                    throw QueryException::associationPathInverseSideNotSupported();
+                }
 
-                    if ($this->_useSqlTableAliases) {
-                        $sql .= $this->getSQLTableAlias($class->table['name'], $dqlAlias) . '.';
-                    }
+                // COMPOSITE KEYS NOT (YET?) SUPPORTED
+                if (count($assoc['sourceToTargetKeyColumns']) > 1) {
+                    throw QueryException::associationPathCompositeKeyNotSupported();
+                }
 
-                    $sql .= reset($assoc['targetToSourceKeyColumns']);
-                } else {
-                    throw QueryException::associationPathInverseSideNotSupported();
+                if ($this->_useSqlTableAliases) {
+                    $sql .= $this->getSQLTableAlias($class->getTableName(), $dqlAlias) . '.';
                 }
+
+                $sql .= reset($assoc['targetToSourceKeyColumns']);
                 break;
-                
+
             default:
                 throw QueryException::invalidPathExpression($pathExpr);
         }
@@ -526,9 +594,12 @@ public function walkPathExpression($pathExpr)
      */
     public function walkSelectClause($selectClause)
     {
-        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '') . implode(
-            ', ', array_map(array($this, 'walkSelectExpression'), $selectClause->selectExpressions)
-        );
+        $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '');
+        $sqlSelectExpressions = array_filter(array_map(array($this, 'walkSelectExpression'), $selectClause->selectExpressions));
+
+        if ($this->_query->getHint(Query::HINT_INTERNAL_ITERATION) == true && $selectClause->isDistinct) {
+            $this->_query->setHint(self::HINT_DISTINCT, true);
+        }
 
         $addMetaColumns = ! $this->_query->getHint(Query::HINT_FORCE_PARTIAL_LOAD) &&
                 $this->_query->getHydrationMode() == Query::HYDRATE_OBJECT
@@ -536,13 +607,18 @@ public function walkSelectClause($selectClause)
                 $this->_query->getHydrationMode() != Query::HYDRATE_OBJECT &&
                 $this->_query->getHint(Query::HINT_INCLUDE_META_COLUMNS);
 
-        foreach ($this->_selectedClasses as $dqlAlias => $class) {
+        foreach ($this->_selectedClasses as $selectedClass) {
+            $class       = $selectedClass['class'];
+            $dqlAlias    = $selectedClass['dqlAlias'];
+            $resultAlias = $selectedClass['resultAlias'];
+
             // Register as entity or joined entity result
             if ($this->_queryComponents[$dqlAlias]['relation'] === null) {
-                $this->_rsm->addEntityResult($class->name, $dqlAlias);
+                $this->_rsm->addEntityResult($class->name, $dqlAlias, $resultAlias);
             } else {
                 $this->_rsm->addJoinedEntityResult(
-                    $class->name, $dqlAlias,
+                    $class->name,
+                    $dqlAlias,
                     $this->_queryComponents[$dqlAlias]['parent'],
                     $this->_queryComponents[$dqlAlias]['relation']['fieldName']
                 );
@@ -550,55 +626,71 @@ public function walkSelectClause($selectClause)
 
             if ($class->isInheritanceTypeSingleTable() || $class->isInheritanceTypeJoined()) {
                 // Add discriminator columns to SQL
-                $rootClass = $this->_em->getClassMetadata($class->rootEntityName);
-                $tblAlias = $this->getSQLTableAlias($rootClass->table['name'], $dqlAlias);
+                $rootClass   = $this->_em->getClassMetadata($class->rootEntityName);
+                $tblAlias    = $this->getSQLTableAlias($rootClass->getTableName(), $dqlAlias);
                 $discrColumn = $rootClass->discriminatorColumn;
                 $columnAlias = $this->getSQLColumnAlias($discrColumn['name']);
-                $sql .= ", $tblAlias." . $discrColumn['name'] . ' AS ' . $columnAlias;
 
-                $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
+                $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias;
+
                 $this->_rsm->setDiscriminatorColumn($dqlAlias, $columnAlias);
                 $this->_rsm->addMetaResult($dqlAlias, $columnAlias, $discrColumn['fieldName']);
+            }
 
-                // Add foreign key columns to SQL, if necessary
-                if ($addMetaColumns) {
-                    //FIXME: Include foreign key columns of child classes also!!??
-                    foreach ($class->associationMappings as $assoc) {
-                        if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
-                            if (isset($assoc['inherited'])) {
-                                $owningClass = $this->_em->getClassMetadata($assoc['inherited']);
-                                $sqlTableAlias = $this->getSQLTableAlias($owningClass->table['name'], $dqlAlias);
-                            } else {
-                                $sqlTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
-                            }
-                            
-                            foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
-                                $columnAlias = $this->getSQLColumnAlias($srcColumn);
-                                $sql .= ", $sqlTableAlias." . $srcColumn . ' AS ' . $columnAlias;
-                                $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-                                $this->_rsm->addMetaResult($dqlAlias, $this->_platform->getSQLResultCasing($columnAlias), $srcColumn, (isset($assoc['id']) && $assoc['id'] === true));
-                            }
-                        }
-                    }
+            // Add foreign key columns to SQL, if necessary
+            if ( ! $addMetaColumns && ! $class->containsForeignIdentifier) {
+                continue;
+            }
+
+            // Add foreign key columns of class and also parent classes
+            foreach ($class->associationMappings as $assoc) {
+                if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
+                    continue;
+                } else if ( !$addMetaColumns && !isset($assoc['id'])) {
+                    continue;
                 }
-            } else {
-                // Add foreign key columns to SQL, if necessary
-                if ($addMetaColumns) {
-                    $sqlTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
-                    foreach ($class->associationMappings as $assoc) {
-                        if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
-                            foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
-                                $columnAlias = $this->getSQLColumnAlias($srcColumn);
-                                $sql .= ', ' . $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias;
-                                $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-                                $this->_rsm->addMetaResult($dqlAlias, $this->_platform->getSQLResultCasing($columnAlias), $srcColumn, (isset($assoc['id']) && $assoc['id'] === true));
-                            }
-                        }
+
+                $owningClass   = (isset($assoc['inherited'])) ? $this->_em->getClassMetadata($assoc['inherited']) : $class;
+                $sqlTableAlias = $this->getSQLTableAlias($owningClass->getTableName(), $dqlAlias);
+
+                foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
+                    $columnAlias = $this->getSQLColumnAlias($srcColumn);
+
+                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias;
+
+                    $this->_rsm->addMetaResult($dqlAlias, $columnAlias, $srcColumn, (isset($assoc['id']) && $assoc['id'] === true));
+                }
+            }
+
+            // Add foreign key columns to SQL, if necessary
+            if ( ! $addMetaColumns) {
+                continue;
+            }
+
+            // Add foreign key columns of subclasses
+            foreach ($class->subClasses as $subClassName) {
+                $subClass      = $this->_em->getClassMetadata($subClassName);
+                $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
+
+                foreach ($subClass->associationMappings as $assoc) {
+                    // Skip if association is inherited
+                    if (isset($assoc['inherited'])) continue;
+
+                    if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) continue;
+
+                    foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
+                        $columnAlias = $this->getSQLColumnAlias($srcColumn);
+
+                        $sqlSelectExpressions[] = $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias;
+
+                        $this->_rsm->addMetaResult($dqlAlias, $columnAlias, $srcColumn);
                     }
                 }
             }
         }
 
+        $sql .= implode(', ', $sqlSelectExpressions);
+
         return $sql;
     }
 
@@ -617,12 +709,12 @@ public function walkFromClause($fromClause)
 
             $rangeDecl = $identificationVariableDecl->rangeVariableDeclaration;
             $dqlAlias = $rangeDecl->aliasIdentificationVariable;
-        
+
             $this->_rootAliases[] = $dqlAlias;
 
             $class = $this->_em->getClassMetadata($rangeDecl->abstractSchemaName);
             $sql .= $class->getQuotedTableName($this->_platform) . ' '
-                  . $this->getSQLTableAlias($class->table['name'], $dqlAlias);
+                  . $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
 
             if ($class->isInheritanceTypeJoined()) {
                 $sql .= $this->_generateClassTableInheritanceJoins($class, $dqlAlias);
@@ -633,10 +725,17 @@ public function walkFromClause($fromClause)
             }
 
             if ($identificationVariableDecl->indexBy) {
-                $this->_rsm->addIndexBy(
-                    $identificationVariableDecl->indexBy->simpleStateFieldPathExpression->identificationVariable,
-                    $identificationVariableDecl->indexBy->simpleStateFieldPathExpression->field
-                );
+                $alias = $identificationVariableDecl->indexBy->simpleStateFieldPathExpression->identificationVariable;
+                $field = $identificationVariableDecl->indexBy->simpleStateFieldPathExpression->field;
+
+                if (isset($this->_scalarFields[$alias][$field])) {
+                    $this->_rsm->addIndexByScalar($this->_scalarFields[$alias][$field]);
+                } else {
+                    $this->_rsm->addIndexBy(
+                        $identificationVariableDecl->indexBy->simpleStateFieldPathExpression->identificationVariable,
+                        $identificationVariableDecl->indexBy->simpleStateFieldPathExpression->field
+                    );
+                }
             }
 
             $sqlParts[] = $this->_platform->appendLockHint($sql, $this->_query->getHint(Query::HINT_LOCK_MODE));
@@ -663,15 +762,13 @@ public function walkFunction($function)
      */
     public function walkOrderByClause($orderByClause)
     {
-        $colSql = $this->_generateOrderedCollectionOrderByItems();
-        if ($colSql != '') {
-            $colSql = ", ".$colSql;
+        $orderByItems = array_map(array($this, 'walkOrderByItem'), $orderByClause->orderByItems);
+
+        if (($collectionOrderByItems = $this->_generateOrderedCollectionOrderByItems()) !== '') {
+            $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems);
         }
 
-        // OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}*
-        return ' ORDER BY ' . implode(
-            ', ', array_map(array($this, 'walkOrderByItem'), $orderByClause->orderByItems)
-        )  . $colSql;
+        return ' ORDER BY ' . implode(', ', $orderByItems);
     }
 
     /**
@@ -682,16 +779,10 @@ public function walkOrderByClause($orderByClause)
      */
     public function walkOrderByItem($orderByItem)
     {
-        $sql = '';
         $expr = $orderByItem->expression;
-
-        if ($expr instanceof AST\PathExpression) {
-            $sql = $this->walkPathExpression($expr);
-        } else {
-            $columnName = $this->_queryComponents[$expr]['token']['value'];
-
-            $sql = $this->_scalarResultAliasMap[$columnName];
-        }
+        $sql  = ($expr instanceof AST\PathExpression)
+            ? $this->walkPathExpression($expr)
+            : $this->walkResultVariable($this->_queryComponents[$expr]['token']['value']);
 
         return $sql . ' ' . strtoupper($orderByItem->type);
     }
@@ -715,8 +806,11 @@ public function walkHavingClause($havingClause)
      */
     public function walkJoinVariableDeclaration($joinVarDecl)
     {
-        $join = $joinVarDecl->join;
+        $join     = $joinVarDecl->join;
         $joinType = $join->joinType;
+        $sql      = ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER)
+            ? ' LEFT JOIN '
+            : ' INNER JOIN ';
 
         if ($joinVarDecl->indexBy) {
             // For Many-To-One or One-To-One associations this obviously makes no sense, but is ignored silently.
@@ -726,25 +820,20 @@ public function walkJoinVariableDeclaration($joinVarDecl)
             );
         }
 
-        if ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) {
-            $sql = ' LEFT JOIN ';
-        } else {
-            $sql = ' INNER JOIN ';
-        }
-
         $joinAssocPathExpr = $join->joinAssociationPathExpression;
-        $joinedDqlAlias = $join->aliasIdentificationVariable;
-        $relation = $this->_queryComponents[$joinedDqlAlias]['relation'];
-        $targetClass = $this->_em->getClassMetadata($relation['targetEntity']);
-        $sourceClass = $this->_em->getClassMetadata($relation['sourceEntity']);
+        $joinedDqlAlias    = $join->aliasIdentificationVariable;
+
+        $relation        = $this->_queryComponents[$joinedDqlAlias]['relation'];
+        $targetClass     = $this->_em->getClassMetadata($relation['targetEntity']);
+        $sourceClass     = $this->_em->getClassMetadata($relation['sourceEntity']);
         $targetTableName = $targetClass->getQuotedTableName($this->_platform);
-        $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name'], $joinedDqlAlias);
-        $sourceTableAlias = $this->getSQLTableAlias($sourceClass->table['name'], $joinAssocPathExpr->identificationVariable);
+
+        $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName(), $joinedDqlAlias);
+        $sourceTableAlias = $this->getSQLTableAlias($sourceClass->getTableName(), $joinAssocPathExpr->identificationVariable);
 
         // Ensure we got the owning side, since it has all mapping info
         $assoc = ( ! $relation['isOwningSide']) ? $targetClass->associationMappings[$relation['mappedBy']] : $relation;
-
-        if ($this->_query->getHint(Query::HINT_INTERNAL_ITERATION) == true) {
+        if ($this->_query->getHint(Query::HINT_INTERNAL_ITERATION) == true && (!$this->_query->getHint(self::HINT_DISTINCT) || isset($this->_selectedClasses[$joinedDqlAlias]))) {
             if ($relation['type'] == ClassMetadata::ONE_TO_MANY || $relation['type'] == ClassMetadata::MANY_TO_MANY) {
                 throw QueryException::iterateWithFetchJoinNotAllowed($assoc);
             }
@@ -764,7 +853,6 @@ public function walkJoinVariableDeclaration($joinVarDecl)
         // be the owning side and previously we ensured that $assoc is always the owning side of the associations.
         // The owning side is necessary at this point because only it contains the JoinColumn information.
         if ($assoc['type'] & ClassMetadata::TO_ONE) {
-
             $sql .= $targetTableName . ' ' . $targetTableAlias . ' ON ';
             $first = true;
 
@@ -787,6 +875,7 @@ public function walkJoinVariableDeclaration($joinVarDecl)
                     $sql .= $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
                 }
             }
+
         } else if ($assoc['type'] == ClassMetadata::MANY_TO_MANY) {
             // Join relation table
             $joinTable = $assoc['joinTable'];
@@ -821,8 +910,7 @@ public function walkJoinVariableDeclaration($joinVarDecl)
             }
 
             // Join target table
-            $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER)
-            	? ' LEFT JOIN ' : ' INNER JOIN ';
+            $sql .= ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN ';
             $sql .= $targetTableName . ' ' . $targetTableAlias . ' ON ';
 
             $first = true;
@@ -853,6 +941,11 @@ public function walkJoinVariableDeclaration($joinVarDecl)
             }
         }
 
+        // Apply the filters
+        if ($filterExpr = $this->generateFilterConditionSQL($targetClass, $targetTableAlias)) {
+            $sql .= ' AND ' . $filterExpr;
+        }
+
         // Handle WITH clause
         if (($condExpr = $join->conditionalExpression) !== null) {
             // Phase 2 AST optimization: Skip processment of ConditionalExpression
@@ -873,7 +966,33 @@ public function walkJoinVariableDeclaration($joinVarDecl)
 
         return $sql;
     }
-    
+
+    /**
+     * Walks down a CaseExpression AST node and generates the corresponding SQL.
+     *
+     * @param CoalesceExpression|NullIfExpression|GeneralCaseExpression|SimpleCaseExpression $expression
+     * @return string The SQL.
+     */
+    public function walkCaseExpression($expression)
+    {
+        switch (true) {
+            case ($expression instanceof AST\CoalesceExpression):
+                return $this->walkCoalesceExpression($expression);
+
+            case ($expression instanceof AST\NullIfExpression):
+                return $this->walkNullIfExpression($expression);
+
+            case ($expression instanceof AST\GeneralCaseExpression):
+                return $this->walkGeneralCaseExpression($expression);
+
+            case ($expression instanceof AST\SimpleCaseExpression):
+                return $this->walkSimpleCaseExpression($expression);
+
+            default:
+                return '';
+        }
+    }
+
     /**
      * Walks down a CoalesceExpression AST node and generates the corresponding SQL.
      *
@@ -883,32 +1002,18 @@ public function walkJoinVariableDeclaration($joinVarDecl)
     public function walkCoalesceExpression($coalesceExpression)
     {
         $sql = 'COALESCE(';
-        
+
         $scalarExpressions = array();
-        
+
         foreach ($coalesceExpression->scalarExpressions as $scalarExpression) {
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
         }
-        
+
         $sql .= implode(', ', $scalarExpressions) . ')';
-        
+
         return $sql;
     }
-    
-    public function walkCaseExpression($expression)
-    {
-        switch (true) {
-            case ($expression instanceof AST\CoalesceExpression):
-                return $this->walkCoalesceExpression($expression);
-                
-            case ($expression instanceof AST\NullIfExpression):
-                return $this->walkNullIfExpression($expression);
-                
-            default:
-                return '';
-        }
-    }
-    
+
     /**
      * Walks down a NullIfExpression AST node and generates the corresponding SQL.
      *
@@ -917,17 +1022,57 @@ public function walkCaseExpression($expression)
      */
     public function walkNullIfExpression($nullIfExpression)
     {
-        $firstExpression = is_string($nullIfExpression->firstExpression) 
+        $firstExpression = is_string($nullIfExpression->firstExpression)
             ? $this->_conn->quote($nullIfExpression->firstExpression)
             : $this->walkSimpleArithmeticExpression($nullIfExpression->firstExpression);
-        
-        $secondExpression = is_string($nullIfExpression->secondExpression) 
+
+        $secondExpression = is_string($nullIfExpression->secondExpression)
             ? $this->_conn->quote($nullIfExpression->secondExpression)
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
-        
+
         return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
     }
 
+    /**
+     * Walks down a GeneralCaseExpression AST node and generates the corresponding SQL.
+     *
+     * @param GeneralCaseExpression $generalCaseExpression
+     * @return string The SQL.
+     */
+    public function walkGeneralCaseExpression(AST\GeneralCaseExpression $generalCaseExpression)
+    {
+        $sql = 'CASE';
+
+        foreach ($generalCaseExpression->whenClauses as $whenClause) {
+            $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression);
+            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression);
+        }
+
+        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END';
+
+        return $sql;
+    }
+
+    /**
+     * Walks down a SimpleCaseExpression AST node and generates the corresponding SQL.
+     *
+     * @param SimpleCaseExpression $simpleCaseExpression
+     * @return string The SQL.
+     */
+    public function walkSimpleCaseExpression($simpleCaseExpression)
+    {
+        $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand);
+
+        foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) {
+            $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression);
+            $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression);
+        }
+
+        $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END';
+
+        return $sql;
+    }
+
     /**
      * Walks down a SelectExpression AST node and generates the corresponding SQL.
      *
@@ -936,202 +1081,173 @@ public function walkNullIfExpression($nullIfExpression)
      */
     public function walkSelectExpression($selectExpression)
     {
-        $sql = '';
-        $expr = $selectExpression->expression;
+        $sql    = '';
+        $expr   = $selectExpression->expression;
+        $hidden = $selectExpression->hiddenAliasResultVariable;
 
-        if ($expr instanceof AST\PathExpression) {
-            if ($expr->type == AST\PathExpression::TYPE_STATE_FIELD) {
-                $fieldName = $expr->field;
-                $dqlAlias = $expr->identificationVariable;
-                $qComp = $this->_queryComponents[$dqlAlias];
-                $class = $qComp['metadata'];
-
-                if ( ! $selectExpression->fieldIdentificationVariable) {
-                    $resultAlias = $fieldName;
-                } else {
-                    $resultAlias = $selectExpression->fieldIdentificationVariable;
+        switch (true) {
+            case ($expr instanceof AST\PathExpression):
+                if ($expr->type !== AST\PathExpression::TYPE_STATE_FIELD) {
+                    throw QueryException::invalidPathExpression($expr->type);
                 }
 
-                if ($class->isInheritanceTypeJoined()) {
-                    $tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName);
-                } else {
-                    $tableName = $class->getTableName();
-                }
+                $fieldName = $expr->field;
+                $dqlAlias  = $expr->identificationVariable;
+                $qComp     = $this->_queryComponents[$dqlAlias];
+                $class     = $qComp['metadata'];
 
-                $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias);
-                $columnName = $class->getQuotedColumnName($fieldName, $this->_platform);
+                $resultAlias = $selectExpression->fieldIdentificationVariable ?: $fieldName;
+                $tableName   = ($class->isInheritanceTypeJoined())
+                    ? $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName)
+                    : $class->getTableName();
 
-                $columnAlias = $this->getSQLColumnAlias($columnName);
-                $sql .= $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
-                $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-                $this->_rsm->addScalarResult($columnAlias, $resultAlias);
-            } else {
-                throw QueryException::invalidPathExpression($expr->type);
-            }
-        }
-        else if ($expr instanceof AST\AggregateExpression) {
-            if ( ! $selectExpression->fieldIdentificationVariable) {
-                $resultAlias = $this->_scalarResultCounter++;
-            } else {
-                $resultAlias = $selectExpression->fieldIdentificationVariable;
-            }
+                $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias);
+                $columnName    = $class->getQuotedColumnName($fieldName, $this->_platform);
+                $columnAlias   = $this->getSQLColumnAlias($class->fieldMappings[$fieldName]['columnName']);
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            $sql .= $this->walkAggregateExpression($expr) . ' AS ' . $columnAlias;
-            $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
+                $col = $sqlTableAlias . '.' . $columnName;
 
-            $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-            $this->_rsm->addScalarResult($columnAlias, $resultAlias);
-        }
-        else if ($expr instanceof AST\Subselect) {
-            if ( ! $selectExpression->fieldIdentificationVariable) {
-                $resultAlias = $this->_scalarResultCounter++;
-            } else {
-                $resultAlias = $selectExpression->fieldIdentificationVariable;
-            }
+                $fieldType = $class->getTypeOfField($fieldName);
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            $sql .= '(' . $this->walkSubselect($expr) . ') AS '.$columnAlias;
-            $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
+                if (isset($class->fieldMappings[$fieldName]['requireSQLConversion'])) {
+                    $type = Type::getType($fieldType);
+                    $col  = $type->convertToPHPValueSQL($col, $this->_conn->getDatabasePlatform());
+                }
 
-            $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-            $this->_rsm->addScalarResult($columnAlias, $resultAlias);
-        }
-        else if ($expr instanceof AST\Functions\FunctionNode) {
-            if ( ! $selectExpression->fieldIdentificationVariable) {
-                $resultAlias = $this->_scalarResultCounter++;
-            } else {
-                $resultAlias = $selectExpression->fieldIdentificationVariable;
-            }
+                $sql .= $col . ' AS ' . $columnAlias;
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            $sql .= $this->walkFunction($expr) . ' AS ' . $columnAlias;
-            $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
-
-            $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-            $this->_rsm->addScalarResult($columnAlias, $resultAlias);
-        } else if (
-            $expr instanceof AST\SimpleArithmeticExpression ||
-            $expr instanceof AST\ArithmeticTerm ||
-            $expr instanceof AST\ArithmeticFactor ||
-            $expr instanceof AST\ArithmeticPrimary ||
-            $expr instanceof AST\Literal
-        ) {
-            if ( ! $selectExpression->fieldIdentificationVariable) {
-                $resultAlias = $this->_scalarResultCounter++;
-            } else {
-                $resultAlias = $selectExpression->fieldIdentificationVariable;
-            }
+                $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            
-            if ($expr instanceof AST\Literal) {
-                $sql .= $this->walkLiteral($expr) . ' AS ' .$columnAlias;
-            } else {
-                $sql .= $this->walkSimpleArithmeticExpression($expr) . ' AS ' . $columnAlias;
-            }
-            
-            $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
-
-            $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-            $this->_rsm->addScalarResult($columnAlias, $resultAlias);
-        } else if (
-            $expr instanceof AST\NullIfExpression ||
-            $expr instanceof AST\CoalesceExpression ||
-            $expr instanceof AST\CaseExpression
-        ) {
-            if ( ! $selectExpression->fieldIdentificationVariable) {
-                $resultAlias = $this->_scalarResultCounter++;
-            } else {
-                $resultAlias = $selectExpression->fieldIdentificationVariable;
-            }
+                if ( ! $hidden) {
+                    $this->_rsm->addScalarResult($columnAlias, $resultAlias, $fieldType);
+                    $this->_scalarFields[$dqlAlias][$fieldName] = $columnAlias;
+                }
+                break;
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            
-            $sql .= $this->walkCaseExpression($expr) . ' AS ' . $columnAlias;
-            
-            $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
+            case ($expr instanceof AST\AggregateExpression):
+            case ($expr instanceof AST\Functions\FunctionNode):
+            case ($expr instanceof AST\SimpleArithmeticExpression):
+            case ($expr instanceof AST\ArithmeticTerm):
+            case ($expr instanceof AST\ArithmeticFactor):
+            case ($expr instanceof AST\ArithmeticPrimary):
+            case ($expr instanceof AST\Literal):
+            case ($expr instanceof AST\NullIfExpression):
+            case ($expr instanceof AST\CoalesceExpression):
+            case ($expr instanceof AST\GeneralCaseExpression):
+            case ($expr instanceof AST\SimpleCaseExpression):
+                $columnAlias = $this->getSQLColumnAlias('sclr');
+                $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
+
+                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
+
+                $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
+
+                if ( ! $hidden) {
+                    // We cannot resolve field type here; assume 'string'.
+                    $this->_rsm->addScalarResult($columnAlias, $resultAlias, 'string');
+                }
+                break;
 
-            $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-            $this->_rsm->addScalarResult($columnAlias, $resultAlias);
-        } else {
-            // IdentificationVariable or PartialObjectExpression
-            if ($expr instanceof AST\PartialObjectExpression) {
-                $dqlAlias = $expr->identificationVariable;
-                $partialFieldSet = $expr->partialFieldSet;
-            } else {
-                $dqlAlias = $expr;
-                $partialFieldSet = array();
-            }
+            case ($expr instanceof AST\Subselect):
+                $columnAlias = $this->getSQLColumnAlias('sclr');
+                $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
 
-            $queryComp = $this->_queryComponents[$dqlAlias];
-            $class = $queryComp['metadata'];
+                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
 
-            if ( ! isset($this->_selectedClasses[$dqlAlias])) {
-                $this->_selectedClasses[$dqlAlias] = $class;
-            }
+                $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
 
-            $beginning = true;
-            // Select all fields from the queried class
-            foreach ($class->fieldMappings as $fieldName => $mapping) {
-                if ($partialFieldSet && !in_array($fieldName, $partialFieldSet)) {
-                    continue;
+                if ( ! $hidden) {
+                    // We cannot resolve field type here; assume 'string'.
+                    $this->_rsm->addScalarResult($columnAlias, $resultAlias, 'string');
                 }
+                break;
 
-                if (isset($mapping['inherited'])) {
-                    $tableName = $this->_em->getClassMetadata($mapping['inherited'])->table['name'];
+            default:
+                // IdentificationVariable or PartialObjectExpression
+                if ($expr instanceof AST\PartialObjectExpression) {
+                    $dqlAlias = $expr->identificationVariable;
+                    $partialFieldSet = $expr->partialFieldSet;
                 } else {
-                    $tableName = $class->table['name'];
+                    $dqlAlias = $expr;
+                    $partialFieldSet = array();
                 }
 
-                if ($beginning) $beginning = false; else $sql .= ', ';
+                $queryComp   = $this->_queryComponents[$dqlAlias];
+                $class       = $queryComp['metadata'];
+                $resultAlias = $selectExpression->fieldIdentificationVariable ?: null;
 
-                $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias);
-                $columnAlias = $this->getSQLColumnAlias($mapping['columnName']);
-                $sql .= $sqlTableAlias . '.' . $class->getQuotedColumnName($fieldName, $this->_platform)
-                      . ' AS ' . $columnAlias;
+                if ( ! isset($this->_selectedClasses[$dqlAlias])) {
+                    $this->_selectedClasses[$dqlAlias] = array(
+                        'class'       => $class,
+                        'dqlAlias'    => $dqlAlias,
+                        'resultAlias' => $resultAlias
+                    );
+                }
 
-                $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-                $this->_rsm->addFieldResult($dqlAlias, $columnAlias, $fieldName, $class->name);
-            }
+                $sqlParts = array();
 
-            // Add any additional fields of subclasses (excluding inherited fields)
-            // 1) on Single Table Inheritance: always, since its marginal overhead
-            // 2) on Class Table Inheritance only if partial objects are disallowed,
-            //    since it requires outer joining subtables.
-            if ($class->isInheritanceTypeSingleTable() || ! $this->_query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) {
-                foreach ($class->subClasses as $subClassName) {
-                    $subClass = $this->_em->getClassMetadata($subClassName);
-                    $sqlTableAlias = $this->getSQLTableAlias($subClass->table['name'], $dqlAlias);
-                    foreach ($subClass->fieldMappings as $fieldName => $mapping) {
-                        if (isset($mapping['inherited']) || $partialFieldSet && !in_array($fieldName, $partialFieldSet)) {
-                            continue;
-                        }
+                // Select all fields from the queried class
+                foreach ($class->fieldMappings as $fieldName => $mapping) {
+                    if ($partialFieldSet && ! in_array($fieldName, $partialFieldSet)) {
+                        continue;
+                    }
 
-                        if ($beginning) $beginning = false; else $sql .= ', ';
+                    $tableName = (isset($mapping['inherited']))
+                        ? $this->_em->getClassMetadata($mapping['inherited'])->getTableName()
+                        : $class->getTableName();
 
-                        $columnAlias = $this->getSQLColumnAlias($mapping['columnName']);
-                        $sql .= $sqlTableAlias . '.' . $subClass->getQuotedColumnName($fieldName, $this->_platform)
-                                . ' AS ' . $columnAlias;
+                    $sqlTableAlias    = $this->getSQLTableAlias($tableName, $dqlAlias);
+                    $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
+                    $quotedColumnName = $class->getQuotedColumnName($fieldName, $this->_platform);
 
-                        $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
-                        $this->_rsm->addFieldResult($dqlAlias, $columnAlias, $fieldName, $subClassName);
+                    $col = $sqlTableAlias . '.' . $quotedColumnName;
+
+                    if (isset($class->fieldMappings[$fieldName]['requireSQLConversion'])) {
+                        $type = Type::getType($class->getTypeOfField($fieldName));
+                        $col = $type->convertToPHPValueSQL($col, $this->_platform);
                     }
 
-                    // Add join columns (foreign keys) of the subclass
-                    //TODO: Probably better do this in walkSelectClause to honor the INCLUDE_META_COLUMNS hint
-                    foreach ($subClass->associationMappings as $fieldName => $assoc) {
-                        if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE && ! isset($assoc['inherited'])) {
-                            foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
-                                if ($beginning) $beginning = false; else $sql .= ', ';
-                                $columnAlias = $this->getSQLColumnAlias($srcColumn);
-                                $sql .= $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias;
-                                $this->_rsm->addMetaResult($dqlAlias, $this->_platform->getSQLResultCasing($columnAlias), $srcColumn);
+                    $sqlParts[] = $col . ' AS '. $columnAlias;
+
+                    $this->_scalarResultAliasMap[$resultAlias][] = $columnAlias;
+
+                    $this->_rsm->addFieldResult($dqlAlias, $columnAlias, $fieldName, $class->name);
+                }
+
+                // Add any additional fields of subclasses (excluding inherited fields)
+                // 1) on Single Table Inheritance: always, since its marginal overhead
+                // 2) on Class Table Inheritance only if partial objects are disallowed,
+                //    since it requires outer joining subtables.
+                if ($class->isInheritanceTypeSingleTable() || ! $this->_query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) {
+                    foreach ($class->subClasses as $subClassName) {
+                        $subClass      = $this->_em->getClassMetadata($subClassName);
+                        $sqlTableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias);
+
+                        foreach ($subClass->fieldMappings as $fieldName => $mapping) {
+                            if (isset($mapping['inherited']) || $partialFieldSet && !in_array($fieldName, $partialFieldSet)) {
+                                continue;
                             }
+
+                            $columnAlias      = $this->getSQLColumnAlias($mapping['columnName']);
+                            $quotedColumnName = $subClass->getQuotedColumnName($fieldName, $this->_platform);
+
+                            $col = $sqlTableAlias . '.' . $quotedColumnName;
+
+                            if (isset($subClass->fieldMappings[$fieldName]['requireSQLConversion'])) {
+                                $type = Type::getType($subClass->getTypeOfField($fieldName));
+                                $col = $type->convertToPHPValueSQL($col, $this->_platform);
+                            }
+
+                            $sqlParts[] = $col . ' AS ' . $columnAlias;
+
+                            $this->_scalarResultAliasMap[$resultAlias][] = $columnAlias;
+
+                            $this->_rsm->addFieldResult($dqlAlias, $columnAlias, $fieldName, $subClassName);
                         }
                     }
                 }
-            }
+
+                $sql .= implode(', ', $sqlParts);
         }
 
         return $sql;
@@ -1145,8 +1261,7 @@ public function walkSelectExpression($selectExpression)
      */
     public function walkQuantifiedExpression($qExpr)
     {
-        return ' ' . strtoupper($qExpr->type)
-             . '(' . $this->walkSubselect($qExpr->subselect) . ')';
+        return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')';
     }
 
     /**
@@ -1157,16 +1272,21 @@ public function walkQuantifiedExpression($qExpr)
      */
     public function walkSubselect($subselect)
     {
-        $useAliasesBefore = $this->_useSqlTableAliases;
+        $useAliasesBefore  = $this->_useSqlTableAliases;
+        $rootAliasesBefore = $this->_rootAliases;
+
+        $this->_rootAliases = array(); // reset the rootAliases for the subselect
         $this->_useSqlTableAliases = true;
 
-        $sql = $this->walkSimpleSelectClause($subselect->simpleSelectClause);
+        $sql  = $this->walkSimpleSelectClause($subselect->simpleSelectClause);
         $sql .= $this->walkSubselectFromClause($subselect->subselectFromClause);
-        $sql .= $subselect->whereClause ? $this->walkWhereClause($subselect->whereClause) : '';
+        $sql .= $this->walkWhereClause($subselect->whereClause);
+
         $sql .= $subselect->groupByClause ? $this->walkGroupByClause($subselect->groupByClause) : '';
         $sql .= $subselect->havingClause ? $this->walkHavingClause($subselect->havingClause) : '';
         $sql .= $subselect->orderByClause ? $this->walkOrderByClause($subselect->orderByClause) : '';
 
+        $this->_rootAliases        = $rootAliasesBefore; // put the main aliases back
         $this->_useSqlTableAliases = $useAliasesBefore;
 
         return $sql;
@@ -1187,11 +1307,13 @@ public function walkSubselectFromClause($subselectFromClause)
             $sql = '';
 
             $rangeDecl = $subselectIdVarDecl->rangeVariableDeclaration;
-            $dqlAlias = $rangeDecl->aliasIdentificationVariable;
+            $dqlAlias  = $rangeDecl->aliasIdentificationVariable;
 
             $class = $this->_em->getClassMetadata($rangeDecl->abstractSchemaName);
             $sql .= $class->getQuotedTableName($this->_platform) . ' '
-                  . $this->getSQLTableAlias($class->table['name'], $dqlAlias);
+                  . $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
+
+            $this->_rootAliases[] = $dqlAlias;
 
             if ($class->isInheritanceTypeJoined()) {
                 $sql .= $this->_generateClassTableInheritanceJoins($class, $dqlAlias);
@@ -1227,67 +1349,53 @@ public function walkSimpleSelectClause($simpleSelectClause)
      */
     public function walkSimpleSelectExpression($simpleSelectExpression)
     {
-        $sql = '';
         $expr = $simpleSelectExpression->expression;
+        $sql  = ' ';
 
-        if ($expr instanceof AST\PathExpression) {
-            $sql .= $this->walkPathExpression($expr);
-        } else if ($expr instanceof AST\AggregateExpression) {
-            if ( ! $simpleSelectExpression->fieldIdentificationVariable) {
-                $alias = $this->_scalarResultCounter++;
-            } else {
-                $alias = $simpleSelectExpression->fieldIdentificationVariable;
-            }
+        switch (true) {
+            case ($expr instanceof AST\PathExpression):
+                $sql .= $this->walkPathExpression($expr);
+                break;
 
-            $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias;
-        } else if ($expr instanceof AST\Subselect) {
-            if ( ! $simpleSelectExpression->fieldIdentificationVariable) {
-                $alias = $this->_scalarResultCounter++;
-            } else {
-                $alias = $simpleSelectExpression->fieldIdentificationVariable;
-            }
+            case ($expr instanceof AST\AggregateExpression):
+                $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
-            $this->_scalarResultAliasMap[$alias] = $columnAlias;
-        } else if ($expr instanceof AST\Functions\FunctionNode) {
-            if ( ! $simpleSelectExpression->fieldIdentificationVariable) {
-                $alias = $this->_scalarResultCounter++;
-            } else {
-                $alias = $simpleSelectExpression->fieldIdentificationVariable;
-            }
+                $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias;
+                break;
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            $sql .= $this->walkFunction($expr) . ' AS ' . $columnAlias;
-            $this->_scalarResultAliasMap[$alias] = $columnAlias;
-        } else if (
-            $expr instanceof AST\SimpleArithmeticExpression ||
-            $expr instanceof AST\ArithmeticTerm ||
-            $expr instanceof AST\ArithmeticFactor ||
-            $expr instanceof AST\ArithmeticPrimary
-        ) {
-            if ( ! $simpleSelectExpression->fieldIdentificationVariable) {
-                $alias = $this->_scalarResultCounter++;
-            } else {
-                $alias = $simpleSelectExpression->fieldIdentificationVariable;
-            }
+            case ($expr instanceof AST\Subselect):
+                $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
 
-            $columnAlias = 'sclr' . $this->_aliasCounter++;
-            $sql .= $this->walkSimpleArithmeticExpression($expr) . ' AS ' . $columnAlias;
-            $this->_scalarResultAliasMap[$alias] = $columnAlias;
-        } else {
-            // IdentificationVariable
-            $class = $this->_queryComponents[$expr]['metadata'];
-            $tableAlias = $this->getSQLTableAlias($class->getTableName(), $expr);
-            $first = true;
+                $columnAlias = 'sclr' . $this->_aliasCounter++;
+                $this->_scalarResultAliasMap[$alias] = $columnAlias;
 
-            foreach ($class->identifier as $identifier) {
-                if ($first) $first = false; else $sql .= ', ';
-                $sql .= $tableAlias . '.' . $class->getQuotedColumnName($identifier, $this->_platform);
-            }
+                $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
+                break;
+
+            case ($expr instanceof AST\Functions\FunctionNode):
+            case ($expr instanceof AST\SimpleArithmeticExpression):
+            case ($expr instanceof AST\ArithmeticTerm):
+            case ($expr instanceof AST\ArithmeticFactor):
+            case ($expr instanceof AST\ArithmeticPrimary):
+            case ($expr instanceof AST\Literal):
+            case ($expr instanceof AST\NullIfExpression):
+            case ($expr instanceof AST\CoalesceExpression):
+            case ($expr instanceof AST\GeneralCaseExpression):
+            case ($expr instanceof AST\SimpleCaseExpression):
+                $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
+
+                $columnAlias = $this->getSQLColumnAlias('sclr');
+                $this->_scalarResultAliasMap[$alias] = $columnAlias;
+
+                $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias;
+                break;
+
+            default: // IdentificationVariable
+                $sql .= $this->walkEntityIdentificationVariable($expr);
+                break;
         }
 
-        return ' ' . $sql;
+        return $sql;
     }
 
     /**
@@ -1310,25 +1418,13 @@ public function walkAggregateExpression($aggExpression)
      */
     public function walkGroupByClause($groupByClause)
     {
-        $sql = '';
+        $sqlParts = array();
+
         foreach ($groupByClause->groupByItems AS $groupByItem) {
-            if (is_string($groupByItem)) {
-                foreach ($this->_queryComponents[$groupByItem]['metadata']->identifier AS $idField) {
-                    if ($sql != '') {
-                        $sql .= ', ';
-                    }
-                    $groupByItem = new AST\PathExpression(AST\PathExpression::TYPE_STATE_FIELD, $groupByItem, $idField);
-                    $groupByItem->type = AST\PathExpression::TYPE_STATE_FIELD;
-                    $sql .= $this->walkGroupByItem($groupByItem);
-                }
-            } else {
-                if ($sql != '') {
-                    $sql .= ', ';
-                }
-                $sql .= $this->walkGroupByItem($groupByItem);
-            }
+            $sqlParts[] = $this->walkGroupByItem($groupByItem);
         }
-        return ' GROUP BY ' . $sql;
+
+        return ' GROUP BY ' . implode(', ', $sqlParts);
     }
 
     /**
@@ -1337,9 +1433,38 @@ public function walkGroupByClause($groupByClause)
      * @param GroupByItem
      * @return string The SQL.
      */
-    public function walkGroupByItem(AST\PathExpression $pathExpr)
+    public function walkGroupByItem($groupByItem)
     {
-        return $this->walkPathExpression($pathExpr);
+        // StateFieldPathExpression
+        if ( ! is_string($groupByItem)) {
+            return $this->walkPathExpression($groupByItem);
+        }
+
+        // ResultVariable
+        if (isset($this->_queryComponents[$groupByItem]['resultVariable'])) {
+            return $this->walkResultVariable($groupByItem);
+        }
+
+        // IdentificationVariable
+        $sqlParts = array();
+
+        foreach ($this->_queryComponents[$groupByItem]['metadata']->fieldNames AS $field) {
+            $item       = new AST\PathExpression(AST\PathExpression::TYPE_STATE_FIELD, $groupByItem, $field);
+            $item->type = AST\PathExpression::TYPE_STATE_FIELD;
+
+            $sqlParts[] = $this->walkPathExpression($item);
+        }
+
+        foreach ($this->_queryComponents[$groupByItem]['metadata']->associationMappings AS $mapping) {
+            if ($mapping['isOwningSide'] && $mapping['type'] & ClassMetadataInfo::TO_ONE) {
+                $item       = new AST\PathExpression(AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $groupByItem, $mapping['fieldName']);
+                $item->type = AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION;
+
+                $sqlParts[] = $this->walkPathExpression($item);
+            }
+        }
+
+        return implode(', ', $sqlParts);
     }
 
     /**
@@ -1350,12 +1475,11 @@ public function walkGroupByItem(AST\PathExpression $pathExpr)
      */
     public function walkDeleteClause(AST\DeleteClause $deleteClause)
     {
-        $sql = 'DELETE FROM ';
-        $class = $this->_em->getClassMetadata($deleteClause->abstractSchemaName);
-        $sql .= $class->getQuotedTableName($this->_platform);
-
-        $this->setSQLTableAlias($class->getTableName(), $class->getTableName(), $deleteClause->aliasIdentificationVariable);
+        $class     = $this->_em->getClassMetadata($deleteClause->abstractSchemaName);
+        $tableName = $class->getTableName();
+        $sql       = 'DELETE FROM ' . $class->getQuotedTableName($this->_platform);
 
+        $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
         $this->_rootAliases[] = $deleteClause->aliasIdentificationVariable;
 
         return $sql;
@@ -1369,17 +1493,14 @@ public function walkDeleteClause(AST\DeleteClause $deleteClause)
      */
     public function walkUpdateClause($updateClause)
     {
-        $sql = 'UPDATE ';
-        $class = $this->_em->getClassMetadata($updateClause->abstractSchemaName);
-        $sql .= $class->getQuotedTableName($this->_platform);
-
-        $this->setSQLTableAlias($class->getTableName(), $class->getTableName(), $updateClause->aliasIdentificationVariable);
+        $class     = $this->_em->getClassMetadata($updateClause->abstractSchemaName);
+        $tableName = $class->getTableName();
+        $sql       = 'UPDATE ' . $class->getQuotedTableName($this->_platform);
 
+        $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
         $this->_rootAliases[] = $updateClause->aliasIdentificationVariable;
 
-        $sql .= ' SET ' . implode(
-            ', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems)
-        );
+        $sql .= ' SET ' . implode(', ', array_map(array($this, 'walkUpdateItem'), $updateClause->updateItems));
 
         return $sql;
     }
@@ -1395,16 +1516,21 @@ public function walkUpdateItem($updateItem)
         $useTableAliasesBefore = $this->_useSqlTableAliases;
         $this->_useSqlTableAliases = false;
 
-        $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
-
+        $sql      = $this->walkPathExpression($updateItem->pathExpression) . ' = ';
         $newValue = $updateItem->newValue;
 
-        if ($newValue === null) {
-            $sql .= 'NULL';
-        } else if ($newValue instanceof AST\Node) {
-            $sql .= $newValue->dispatch($this);
-        } else {
-            $sql .= $this->_conn->quote($newValue);
+        switch (true) {
+            case ($newValue instanceof AST\Node):
+                $sql .= $newValue->dispatch($this);
+                break;
+
+            case ($newValue === null):
+                $sql .= 'NULL';
+                break;
+
+            default:
+                $sql .= $this->_conn->quote($newValue);
+                break;
         }
 
         $this->_useSqlTableAliases = $useTableAliasesBefore;
@@ -1414,16 +1540,45 @@ public function walkUpdateItem($updateItem)
 
     /**
      * Walks down a WhereClause AST node, thereby generating the appropriate SQL.
+     * WhereClause or not, the appropriate discriminator sql is added.
      *
      * @param WhereClause
      * @return string The SQL.
      */
     public function walkWhereClause($whereClause)
     {
+        $condSql  = null !== $whereClause ? $this->walkConditionalExpression($whereClause->conditionalExpression) : '';
         $discrSql = $this->_generateDiscriminatorColumnConditionSql($this->_rootAliases);
-        $condSql = $this->walkConditionalExpression($whereClause->conditionalExpression);
 
-        return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
+        if ($this->_em->hasFilters()) {
+            $filterClauses = array();
+            foreach ($this->_rootAliases as $dqlAlias) {
+                $class = $this->_queryComponents[$dqlAlias]['metadata'];
+                $tableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
+
+                if ($filterExpr = $this->generateFilterConditionSQL($class, $tableAlias)) {
+                    $filterClauses[] = $filterExpr;
+                }
+            }
+
+            if (count($filterClauses)) {
+                if ($condSql) {
+                    $condSql .= ' AND ';
+                }
+
+                $condSql .= implode(' AND ', $filterClauses);
+            }
+        }
+
+        if ($condSql) {
+            return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
+        }
+
+        if ($discrSql) {
+            return ' WHERE ' . $discrSql;
+        }
+
+        return '';
     }
 
     /**
@@ -1436,11 +1591,11 @@ public function walkConditionalExpression($condExpr)
     {
         // Phase 2 AST optimization: Skip processment of ConditionalExpression
         // if only one ConditionalTerm is defined
-        return ( ! ($condExpr instanceof AST\ConditionalExpression))
-            ? $this->walkConditionalTerm($condExpr)
-            : implode(
-                ' OR ', array_map(array($this, 'walkConditionalTerm'), $condExpr->conditionalTerms)
-            );
+        if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
+            return $this->walkConditionalTerm($condExpr);
+        }
+
+        return implode(' OR ', array_map(array($this, 'walkConditionalTerm'), $condExpr->conditionalTerms));
     }
 
     /**
@@ -1453,11 +1608,11 @@ public function walkConditionalTerm($condTerm)
     {
         // Phase 2 AST optimization: Skip processment of ConditionalTerm
         // if only one ConditionalFactor is defined
-        return ( ! ($condTerm instanceof AST\ConditionalTerm))
-            ? $this->walkConditionalFactor($condTerm)
-            : implode(
-                ' AND ', array_map(array($this, 'walkConditionalFactor'), $condTerm->conditionalFactors)
-            );
+        if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
+            return $this->walkConditionalFactor($condTerm);
+        }
+
+        return implode(' AND ', array_map(array($this, 'walkConditionalFactor'), $condTerm->conditionalFactors));
     }
 
     /**
@@ -1485,7 +1640,9 @@ public function walkConditionalPrimary($primary)
     {
         if ($primary->isSimpleConditionalExpression()) {
             return $primary->simpleConditionalExpression->dispatch($this);
-        } else if ($primary->isConditionalExpression()) {
+        }
+
+        if ($primary->isConditionalExpression()) {
             $condExpr = $primary->conditionalExpression;
 
             return '(' . $this->walkConditionalExpression($condExpr) . ')';
@@ -1517,117 +1674,116 @@ public function walkCollectionMemberExpression($collMemberExpr)
     {
         $sql = $collMemberExpr->not ? 'NOT ' : '';
         $sql .= 'EXISTS (SELECT 1 FROM ';
-        $entityExpr = $collMemberExpr->entityExpression;
+
+        $entityExpr   = $collMemberExpr->entityExpression;
         $collPathExpr = $collMemberExpr->collectionValuedPathExpression;
-        
+
         $fieldName = $collPathExpr->field;
-        $dqlAlias = $collPathExpr->identificationVariable;
-        
+        $dqlAlias  = $collPathExpr->identificationVariable;
+
         $class = $this->_queryComponents[$dqlAlias]['metadata'];
-        
-        if ($entityExpr instanceof AST\InputParameter) {
-            $dqlParamKey = $entityExpr->name;
-            $entity = $this->_query->getParameter($dqlParamKey);
-        } else {
-            //TODO
-            throw new \BadMethodCallException("Not implemented");
+
+        switch (true) {
+            // InputParameter
+            case ($entityExpr instanceof AST\InputParameter):
+                $dqlParamKey = $entityExpr->name;
+                $entity      = $this->_query->getParameter($dqlParamKey);
+                $entitySql   = '?';
+                break;
+
+            // SingleValuedAssociationPathExpression | IdentificationVariable
+            case ($entityExpr instanceof AST\PathExpression):
+                $entitySql = $this->walkPathExpression($entityExpr);
+                break;
+
+            default:
+                throw new \BadMethodCallException("Not implemented");
         }
-        
+
         $assoc = $class->associationMappings[$fieldName];
-        
+
         if ($assoc['type'] == ClassMetadata::ONE_TO_MANY) {
-            $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);
-            $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name']);
-            $sourceTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
-            
-            $sql .= $targetClass->getQuotedTableName($this->_platform)
-                  . ' ' . $targetTableAlias . ' WHERE ';
-                    
+            $targetClass      = $this->_em->getClassMetadata($assoc['targetEntity']);
+            $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
+            $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
+
+            $sql .= $targetClass->getQuotedTableName($this->_platform) . ' ' . $targetTableAlias . ' WHERE ';
+
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
-            
-            $first = true;
-            
+            $sqlParts    = array();
+
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
-                if ($first) $first = false; else $sql .= ' AND ';
-                
-                $sql .= $sourceTableAlias . '.' . $class->getQuotedColumnName($class->fieldNames[$targetColumn], $this->_platform) 
-                      . ' = ' 
-                      . $targetTableAlias . '.' . $sourceColumn;
+                $targetColumn = $class->getQuotedColumnName($class->fieldNames[$targetColumn], $this->_platform);
+
+                $sqlParts[] = $sourceTableAlias . '.' . $targetColumn . ' = ' . $targetTableAlias . '.' . $sourceColumn;
             }
-            
-            $sql .= ' AND ';
-            $first = true;
-            
-            foreach ($targetClass->identifier as $idField) {
-                if ($first) $first = false; else $sql .= ' AND ';
-                
-                $this->_parserResult->addParameterMapping($dqlParamKey, $this->_sqlParamIndex++);
-                $sql .= $targetTableAlias . '.' 
-                      . $targetClass->getQuotedColumnName($idField, $this->_platform) . ' = ?';
+
+            foreach ($targetClass->getQuotedIdentifierColumnNames($this->_platform) as $targetColumnName) {
+                if (isset($dqlParamKey)) {
+                    $this->_parserResult->addParameterMapping($dqlParamKey, $this->_sqlParamIndex++);
+                }
+
+                $sqlParts[] = $targetTableAlias . '.'  . $targetColumnName . ' = ' . $entitySql;
             }
+
+            $sql .= implode(' AND ', $sqlParts);
         } else { // many-to-many
             $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);
-            
+
             $owningAssoc = $assoc['isOwningSide'] ? $assoc : $targetClass->associationMappings[$assoc['mappedBy']];
             $joinTable = $owningAssoc['joinTable'];
 
             // SQL table aliases
-            $joinTableAlias = $this->getSQLTableAlias($joinTable['name']);
-            $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name']);
-            $sourceTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
-            
+            $joinTableAlias   = $this->getSQLTableAlias($joinTable['name']);
+            $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName());
+            $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
+
             // join to target table
-            $sql .= $targetClass->getQuotedJoinTableName($owningAssoc, $this->_platform)
-                  . ' ' . $joinTableAlias . ' INNER JOIN '
-                  . $targetClass->getQuotedTableName($this->_platform)
-                  . ' ' . $targetTableAlias . ' ON ';
-            
+            $sql .= $targetClass->getQuotedJoinTableName($owningAssoc, $this->_platform) . ' ' . $joinTableAlias
+                  . ' INNER JOIN ' . $targetClass->getQuotedTableName($this->_platform) . ' ' . $targetTableAlias . ' ON ';
+
             // join conditions
-            $joinColumns = $assoc['isOwningSide']
-                ? $joinTable['inverseJoinColumns']
-                : $joinTable['joinColumns'];
+            $joinColumns  = $assoc['isOwningSide'] ? $joinTable['inverseJoinColumns'] : $joinTable['joinColumns'];
+            $joinSqlParts = array();
 
-            $first = true;
             foreach ($joinColumns as $joinColumn) {
-                if ($first) $first = false; else $sql .= ' AND ';
+                $targetColumn = $targetClass->getQuotedColumnName(
+                    $targetClass->fieldNames[$joinColumn['referencedColumnName']],
+                    $this->_platform
+                );
 
-                $sql .= $joinTableAlias . '.' . $joinColumn['name'] . ' = '
-                        . $targetTableAlias . '.' . $targetClass->getQuotedColumnName(
-                                $targetClass->fieldNames[$joinColumn['referencedColumnName']],
-                                $this->_platform);
+                $joinSqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $targetTableAlias . '.' . $targetColumn;
             }
 
+            $sql .= implode(' AND ', $joinSqlParts);
             $sql .= ' WHERE ';
 
-            $joinColumns = $assoc['isOwningSide']
-                ? $joinTable['joinColumns']
-                : $joinTable['inverseJoinColumns'];
+            $joinColumns = $assoc['isOwningSide'] ? $joinTable['joinColumns'] : $joinTable['inverseJoinColumns'];
+            $sqlParts    = array();
 
-            $first = true;
             foreach ($joinColumns as $joinColumn) {
-                if ($first) $first = false; else $sql .= ' AND ';
+                $targetColumn = $class->getQuotedColumnName(
+                    $class->fieldNames[$joinColumn['referencedColumnName']],
+                    $this->_platform
+                );
 
-                $sql .= $joinTableAlias . '.' . $joinColumn['name'] . ' = ' 
-                      . $sourceTableAlias . '.' . $class->getQuotedColumnName(
-                              $class->fieldNames[$joinColumn['referencedColumnName']],
-                              $this->_platform);
+                $sqlParts[] = $joinTableAlias . '.' . $joinColumn['name'] . ' = ' . $sourceTableAlias . '.' . $targetColumn;
             }
-            
-            $sql .= ' AND ';
-            $first = true;
-            
-            foreach ($targetClass->identifier as $idField) {
-                if ($first) $first = false; else $sql .= ' AND ';
-                
-                $this->_parserResult->addParameterMapping($dqlParamKey, $this->_sqlParamIndex++);
-                $sql .= $targetTableAlias . '.' 
-                      . $targetClass->getQuotedColumnName($idField, $this->_platform) . ' = ?';
+
+            foreach ($targetClass->getQuotedIdentifierColumnNames($this->_platform) as $targetColumnName) {
+                if (isset($dqlParamKey)) {
+                    $this->_parserResult->addParameterMapping($dqlParamKey, $this->_sqlParamIndex++);
+                }
+
+                $sqlParts[] = $targetTableAlias . '.' . $targetColumnName . ' = ' . $entitySql;
             }
+
+            $sql .= implode(' AND ', $sqlParts);
         }
 
         return $sql . ')';
     }
-    
+
     /**
      * Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
      *
@@ -1674,14 +1830,11 @@ public function walkNullComparisonExpression($nullCompExpr)
      */
     public function walkInExpression($inExpr)
     {
-        $sql = $this->walkPathExpression($inExpr->pathExpression)
-             . ($inExpr->not ? ' NOT' : '') . ' IN (';
+        $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN (';
 
-        if ($inExpr->subselect) {
-            $sql .= $this->walkSubselect($inExpr->subselect);
-        } else {
-            $sql .= implode(', ', array_map(array($this, 'walkInParameter'), $inExpr->literals));
-        }
+        $sql .= ($inExpr->subselect)
+            ? $this->walkSubselect($inExpr->subselect)
+            : implode(', ', array_map(array($this, 'walkInParameter'), $inExpr->literals));
 
         $sql .= ')';
 
@@ -1707,37 +1860,44 @@ public function walkInstanceOfExpression($instanceOfExpr)
         }
 
         if ($this->_useSqlTableAliases) {
-            $sql .= $this->getSQLTableAlias($discrClass->table['name'], $dqlAlias) . '.';
+            $sql .= $this->getSQLTableAlias($discrClass->getTableName(), $dqlAlias) . '.';
         }
 
-        $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' <> ' : ' = ');
+        $sql .= $class->discriminatorColumn['name'] . ($instanceOfExpr->not ? ' NOT IN ' : ' IN ');
+
+        $sqlParameterList = array();
+
+        foreach ($instanceOfExpr->value as $parameter) {
+            if ($parameter instanceof AST\InputParameter) {
+                // We need to modify the parameter value to be its correspondent mapped value
+                $dqlParamKey = $parameter->name;
+                $paramValue  = $this->_query->getParameter($dqlParamKey);
+
+                if ( ! ($paramValue instanceof \Doctrine\ORM\Mapping\ClassMetadata)) {
+                    throw QueryException::invalidParameterType('ClassMetadata', get_class($paramValue));
+                }
 
-        if ($instanceOfExpr->value instanceof AST\InputParameter) {
-            // We need to modify the parameter value to be its correspondent mapped value
-            $dqlParamKey = $instanceOfExpr->value->name;
-            $paramValue  = $this->_query->getParameter($dqlParamKey);
-            
-            if ( ! ($paramValue instanceof \Doctrine\ORM\Mapping\ClassMetadata)) {
-                throw QueryException::invalidParameterType('ClassMetadata', get_class($paramValue));
+                $entityClassName = $paramValue->name;
+            } else {
+                // Get name from ClassMetadata to resolve aliases.
+                $entityClassName = $this->_em->getClassMetadata($parameter)->name;
             }
-            
-            $entityClassName = $paramValue->name;
-        } else {
-            // Get name from ClassMetadata to resolve aliases.
-            $entityClassName = $this->_em->getClassMetadata($instanceOfExpr->value)->name;
-        }
 
-        if ($entityClassName == $class->name) {
-            $sql .= $this->_conn->quote($class->discriminatorValue);
-        } else {
-            $discrMap = array_flip($class->discriminatorMap);
-            if (!isset($discrMap[$entityClassName])) {
-                throw QueryException::instanceOfUnrelatedClass($entityClassName, $class->rootEntityName);
+            if ($entityClassName == $class->name) {
+                $sqlParameterList[] = $this->_conn->quote($class->discriminatorValue);
+            } else {
+                $discrMap = array_flip($class->discriminatorMap);
+
+                if (!isset($discrMap[$entityClassName])) {
+                    throw QueryException::instanceOfUnrelatedClass($entityClassName, $class->rootEntityName);
+                }
+
+                $sqlParameterList[] = $this->_conn->quote($discrMap[$entityClassName]);
             }
-            
-            $sql .= $this->_conn->quote($discrMap[$entityClassName]);
         }
 
+        $sql .= '(' . implode(', ', $sqlParameterList) . ')';
+
         return $sql;
     }
 
@@ -1749,9 +1909,9 @@ public function walkInstanceOfExpression($instanceOfExpr)
      */
     public function walkInParameter($inParam)
     {
-        return $inParam instanceof AST\InputParameter ?
-                $this->walkInputParameter($inParam) :
-                $this->walkLiteral($inParam);
+        return $inParam instanceof AST\InputParameter
+            ? $this->walkInputParameter($inParam)
+            : $this->walkLiteral($inParam);
     }
 
     /**
@@ -1765,12 +1925,16 @@ public function walkLiteral($literal)
         switch ($literal->type) {
             case AST\Literal::STRING:
                 return $this->_conn->quote($literal->value);
+
             case AST\Literal::BOOLEAN:
                 $bool = strtolower($literal->value) == 'true' ? true : false;
                 $boolVal = $this->_conn->getDatabasePlatform()->convertBooleans($bool);
-                return is_string($boolVal) ? $this->_conn->quote($boolVal) : $boolVal;
+
+                return $boolVal;
+
             case AST\Literal::NUMERIC:
                 return $literal->value;
+
             default:
                 throw QueryException::invalidLiteral($literal);
         }
@@ -1840,23 +2004,19 @@ public function walkStateFieldPathExpression($stateFieldPathExpression)
      */
     public function walkComparisonExpression($compExpr)
     {
-        $sql = '';
-        $leftExpr = $compExpr->leftExpression;
+        $leftExpr  = $compExpr->leftExpression;
         $rightExpr = $compExpr->rightExpression;
+        $sql       = '';
 
-        if ($leftExpr instanceof AST\Node) {
-            $sql .= $leftExpr->dispatch($this);
-        } else {
-            $sql .= is_numeric($leftExpr) ? $leftExpr : $this->_conn->quote($leftExpr);
-        }
+        $sql .= ($leftExpr instanceof AST\Node)
+            ? $leftExpr->dispatch($this)
+            : (is_numeric($leftExpr) ? $leftExpr : $this->_conn->quote($leftExpr));
 
         $sql .= ' ' . $compExpr->operator . ' ';
 
-        if ($rightExpr instanceof AST\Node) {
-            $sql .= $rightExpr->dispatch($this);
-        } else {
-            $sql .= is_numeric($rightExpr) ? $rightExpr : $this->_conn->quote($rightExpr);
-        }
+        $sql .= ($rightExpr instanceof AST\Node)
+            ? $rightExpr->dispatch($this)
+            : (is_numeric($rightExpr) ? $rightExpr : $this->_conn->quote($rightExpr));
 
         return $sql;
     }
@@ -1895,11 +2055,11 @@ public function walkArithmeticExpression($arithmeticExpr)
      */
     public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
     {
-        return ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression))
-            ? $this->walkArithmeticTerm($simpleArithmeticExpr)
-            : implode(
-                ' ', array_map(array($this, 'walkArithmeticTerm'), $simpleArithmeticExpr->arithmeticTerms)
-            );
+        if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
+            return $this->walkArithmeticTerm($simpleArithmeticExpr);
+        }
+
+        return implode(' ', array_map(array($this, 'walkArithmeticTerm'), $simpleArithmeticExpr->arithmeticTerms));
     }
 
     /**
@@ -1911,16 +2071,18 @@ public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
     public function walkArithmeticTerm($term)
     {
         if (is_string($term)) {
-            return $term;
+            return (isset($this->_queryComponents[$term]))
+                ? $this->walkResultVariable($this->_queryComponents[$term]['token']['value'])
+                : $term;
         }
 
         // Phase 2 AST optimization: Skip processment of ArithmeticTerm
         // if only one ArithmeticFactor is defined
-        return ( ! ($term instanceof AST\ArithmeticTerm))
-            ? $this->walkArithmeticFactor($term)
-            : implode(
-                ' ', array_map(array($this, 'walkArithmeticFactor'), $term->arithmeticFactors)
-            );
+        if ( ! ($term instanceof AST\ArithmeticTerm)) {
+            return $this->walkArithmeticFactor($term);
+        }
+
+        return implode(' ', array_map(array($this, 'walkArithmeticFactor'), $term->arithmeticFactors));
     }
 
     /**
@@ -1934,13 +2096,16 @@ public function walkArithmeticFactor($factor)
         if (is_string($factor)) {
             return $factor;
         }
-        
+
         // Phase 2 AST optimization: Skip processment of ArithmeticFactor
         // if only one ArithmeticPrimary is defined
-        return ( ! ($factor instanceof AST\ArithmeticFactor))
-            ? $this->walkArithmeticPrimary($factor)
-            : ($factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '')) 
-                . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
+        if ( ! ($factor instanceof AST\ArithmeticFactor)) {
+            return $this->walkArithmeticPrimary($factor);
+        }
+
+        $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
+
+        return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
     }
 
     /**
@@ -1953,12 +2118,13 @@ public function walkArithmeticPrimary($primary)
     {
         if ($primary instanceof AST\SimpleArithmeticExpression) {
             return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
-        } else if ($primary instanceof AST\Node) {
+        }
+
+        if ($primary instanceof AST\Node) {
             return $primary->dispatch($this);
         }
 
-        // TODO: We need to deal with IdentificationVariable here
-        return '';
+        return $this->walkEntityIdentificationVariable($primary);
     }
 
     /**
@@ -1973,4 +2139,21 @@ public function walkStringPrimary($stringPrimary)
             ? $this->_conn->quote($stringPrimary)
             : $stringPrimary->dispatch($this);
     }
+
+    /**
+     * Walks down a ResultVriable that represents an AST node, thereby generating the appropriate SQL.
+     *
+     * @param string $resultVariable
+     * @return string The SQL.
+     */
+    public function walkResultVariable($resultVariable)
+    {
+        $resultAlias = $this->_scalarResultAliasMap[$resultVariable];
+
+        if (is_array($resultAlias)) {
+            return implode(', ', $resultAlias);
+        }
+
+        return $resultAlias;
+    }
 }
diff --git a/src/lib/Doctrine/ORM/Query/TreeWalker.php b/src/lib/Doctrine/ORM/Query/TreeWalker.php
index 4bbe963a6a..84628981c5 100644
--- a/src/lib/Doctrine/ORM/Query/TreeWalker.php
+++ b/src/lib/Doctrine/ORM/Query/TreeWalker.php
@@ -168,7 +168,7 @@ function walkGroupByClause($groupByClause);
      * @param GroupByItem
      * @return string The SQL.
      */
-    function walkGroupByItem(AST\PathExpression $pathExpr);
+    function walkGroupByItem($groupByItem);
 
     /**
      * Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
@@ -394,6 +394,14 @@ function walkSimpleArithmeticExpression($simpleArithmeticExpr);
      */
     function walkPathExpression($pathExpr);
 
+    /**
+     * Walks down an ResultVariable AST node, thereby generating the appropriate SQL.
+     *
+     * @param string $resultVariable
+     * @return string The SQL.
+     */
+    function walkResultVariable($resultVariable);
+
     /**
      * Gets an executor that can be used to execute the result of this walker.
      *
diff --git a/src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php b/src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php
index ca2a495208..5907aa94b7 100644
--- a/src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php
+++ b/src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php
@@ -24,7 +24,7 @@
 /**
  * An adapter implementation of the TreeWalker interface. The methods in this class
  * are empty. This class exists as convenience for creating tree walkers.
- * 
+ *
  * @author Roman Borschel 
  * @since 2.0
  */
@@ -33,7 +33,7 @@ abstract class TreeWalkerAdapter implements TreeWalker
     private $_query;
     private $_parserResult;
     private $_queryComponents;
-    
+
     /**
      * {@inheritdoc}
      */
@@ -55,7 +55,7 @@ protected function _getQueryComponents()
     /**
      * Retrieve Query Instance reponsible for the current walkers execution.
      *
-     * @return Doctrine\ORM\Query
+     * @return \Doctrine\ORM\Query
      */
     protected function _getQuery()
     {
@@ -65,13 +65,13 @@ protected function _getQuery()
     /**
      * Retrieve ParserResult
      *
-     * @return Doctrine\ORM\Query\ParserResult
+     * @return \Doctrine\ORM\Query\ParserResult
      */
     protected function _getParserResult()
     {
         return $this->_parserResult;
     }
-    
+
     /**
      * Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
      *
@@ -202,7 +202,7 @@ public function walkGroupByClause($groupByClause) {}
      * @param GroupByItem
      * @return string The SQL.
      */
-    public function walkGroupByItem(AST\PathExpression $pathExpr) {}
+    public function walkGroupByItem($groupByItem) {}
 
     /**
      * Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
@@ -291,7 +291,7 @@ public function walkConditionalPrimary($primary) {}
      * @return string The SQL.
      */
     public function walkExistsExpression($existsExpr) {}
-    
+
     /**
      * Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
      *
@@ -427,10 +427,18 @@ public function walkSimpleArithmeticExpression($simpleArithmeticExpr) {}
      * @return string The SQL.
      */
     public function walkPathExpression($pathExpr) {}
-    
+
+    /**
+     * Walks down an ResultVariable AST node, thereby generating the appropriate SQL.
+     *
+     * @param string $resultVariable
+     * @return string The SQL.
+     */
+    public function walkResultVariable($resultVariable) {}
+
     /**
      * Gets an executor that can be used to execute the result of this walker.
-     * 
+     *
      * @return AbstractExecutor
      */
     public function getExecutor($AST) {}
diff --git a/src/lib/Doctrine/ORM/Query/TreeWalkerChain.php b/src/lib/Doctrine/ORM/Query/TreeWalkerChain.php
index 1fc1977835..d3891a1144 100644
--- a/src/lib/Doctrine/ORM/Query/TreeWalkerChain.php
+++ b/src/lib/Doctrine/ORM/Query/TreeWalkerChain.php
@@ -25,7 +25,7 @@
  * Represents a chain of tree walkers that modify an AST and finally emit output.
  * Only the last walker in the chain can emit output. Any previous walkers can modify
  * the AST to influence the final output produced by the last walker.
- * 
+ *
  * @author Roman Borschel 
  * @since 2.0
  */
@@ -39,7 +39,7 @@ class TreeWalkerChain implements TreeWalker
     private $_parserResult;
     /** The query components of the original query (the "symbol table") that was produced by the Parser. */
     private $_queryComponents;
-    
+
     /**
      * @inheritdoc
      */
@@ -49,17 +49,17 @@ public function __construct($query, $parserResult, array $queryComponents)
         $this->_parserResult = $parserResult;
         $this->_queryComponents = $queryComponents;
     }
-    
+
     /**
      * Adds a tree walker to the chain.
-     * 
+     *
      * @param string $walkerClass The class of the walker to instantiate.
      */
     public function addTreeWalker($walkerClass)
     {
         $this->_walkers[] = new $walkerClass($this->_query, $this->_parserResult, $this->_queryComponents);
     }
-    
+
     /**
      * Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
      *
@@ -270,10 +270,10 @@ public function walkGroupByClause($groupByClause)
      * @param GroupByItem
      * @return string The SQL.
      */
-    public function walkGroupByItem(AST\PathExpression $pathExpr)
+    public function walkGroupByItem($groupByItem)
     {
         foreach ($this->_walkers as $walker) {
-            $walker->walkGroupByItem($pathExpr);
+            $walker->walkGroupByItem($groupByItem);
         }
     }
 
@@ -419,7 +419,7 @@ public function walkExistsExpression($existsExpr)
             $walker->walkExistsExpression($existsExpr);
         }
     }
-    
+
     /**
      * Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
      *
@@ -640,10 +640,23 @@ public function walkPathExpression($pathExpr)
             $walker->walkPathExpression($pathExpr);
         }
     }
-    
+
+    /**
+     * Walks down an ResultVariable AST node, thereby generating the appropriate SQL.
+     *
+     * @param string $resultVariable
+     * @return string The SQL.
+     */
+    public function walkResultVariable($resultVariable)
+    {
+        foreach ($this->_walkers as $walker) {
+            $walker->walkResultVariable($resultVariable);
+        }
+    }
+
     /**
      * Gets an executor that can be used to execute the result of this walker.
-     * 
+     *
      * @return AbstractExecutor
      */
     public function getExecutor($AST)
diff --git a/src/lib/Doctrine/ORM/QueryBuilder.php b/src/lib/Doctrine/ORM/QueryBuilder.php
index 4facce77f2..521263495c 100644
--- a/src/lib/Doctrine/ORM/QueryBuilder.php
+++ b/src/lib/Doctrine/ORM/QueryBuilder.php
@@ -50,6 +50,7 @@ class QueryBuilder
      * @var array The array of DQL parts collected.
      */
     private $_dqlParts = array(
+        'distinct' => false,
         'select'  => array(),
         'from'    => array(),
         'join'    => array(),
@@ -74,7 +75,7 @@ class QueryBuilder
      * @var string The complete DQL string for this query.
      */
     private $_dql;
-    
+
     /**
      * @var array The query parameters.
      */
@@ -84,12 +85,12 @@ class QueryBuilder
      * @var array The parameter type map of this query.
      */
     private $_paramTypes = array();
-    
+
     /**
      * @var integer The index of the first result to retrieve.
      */
     private $_firstResult = null;
-    
+
     /**
      * @var integer The maximum number of results to retrieve.
      */
@@ -97,7 +98,7 @@ class QueryBuilder
 
     /**
      * Initializes a new QueryBuilder that uses the given EntityManager.
-     * 
+     *
      * @param EntityManager $em The EntityManager to use.
      */
     public function __construct(EntityManager $em)
@@ -119,7 +120,7 @@ public function __construct(EntityManager $em)
      * For more complex expression construction, consider storing the expression
      * builder object in a local variable.
      *
-     * @return Expr
+     * @return Query\Expr
      */
     public function expr()
     {
@@ -217,7 +218,7 @@ public function getQuery()
                 ->setFirstResult($this->_firstResult)
                 ->setMaxResults($this->_maxResults);
     }
-    
+
     /**
      * Gets the FIRST root alias of the query. This is the first entity alias involved
      * in the construction of the query.
@@ -256,7 +257,7 @@ public function getRootAlias()
     public function getRootAliases()
     {
         $aliases = array();
-        
+
         foreach ($this->_dqlParts['from'] as &$fromClause) {
             if (is_string($fromClause)) {
                 $spacePos = strrpos($fromClause, ' ');
@@ -265,10 +266,10 @@ public function getRootAliases()
 
                 $fromClause = new Query\Expr\From($from, $alias);
             }
-            
+
             $aliases[] = $fromClause->getAlias();
         }
-        
+
         return $aliases;
     }
 
@@ -289,7 +290,7 @@ public function getRootAliases()
     public function getRootEntities()
     {
         $entities = array();
-        
+
         foreach ($this->_dqlParts['from'] as &$fromClause) {
             if (is_string($fromClause)) {
                 $spacePos = strrpos($fromClause, ' ');
@@ -298,10 +299,10 @@ public function getRootEntities()
 
                 $fromClause = new Query\Expr\From($from, $alias);
             }
-            
+
             $entities[] = $fromClause->getFrom();
         }
-        
+
         return $entities;
     }
 
@@ -313,7 +314,7 @@ public function getRootEntities()
      *         ->select('u')
      *         ->from('User', 'u')
      *         ->where('u.id = :user_id')
-     *         ->setParameter(':user_id', 1);
+     *         ->setParameter('user_id', 1);
      * 
      *
      * @param string|integer $key The parameter position or name.
@@ -323,16 +324,18 @@ public function getRootEntities()
      */
     public function setParameter($key, $value, $type = null)
     {
+        $key = trim($key, ':');
+
         if ($type === null) {
             $type = Query\ParameterTypeInferer::inferType($value);
         }
-        
+
         $this->_paramTypes[$key] = $type;
         $this->_params[$key] = $value;
-        
+
         return $this;
     }
-    
+
     /**
      * Sets a collection of query parameters for the query being constructed.
      *
@@ -342,9 +345,9 @@ public function setParameter($key, $value, $type = null)
      *         ->from('User', 'u')
      *         ->where('u.id = :user_id1 OR u.id = :user_id2')
      *         ->setParameters(array(
-     *             ':user_id1' => 1,
-     *             ':user_id2' => 2
-     *         ));
+     *             'user_id1' => 1,
+     *             'user_id2' => 2
+              ));
      * 
      *
      * @param array $params The query parameters to set.
@@ -353,12 +356,9 @@ public function setParameter($key, $value, $type = null)
     public function setParameters(array $params, array $types = array())
     {
         foreach ($params as $key => $value) {
-            if (isset($types[$key])) {
-                $this->setParameter($key, $value, $types[$key]);
-            } else {
-                $this->setParameter($key, $value);
-            }
+            $this->setParameter($key, $value, isset($types[$key]) ? $types[$key] : null);
         }
+
         return $this;
     }
 
@@ -374,7 +374,7 @@ public function getParameters()
 
     /**
      * Gets a (previously set) query parameter of the query being constructed.
-     * 
+     *
      * @param mixed $key The key (index or name) of the bound parameter.
      * @return mixed The value of the bound parameter.
      */
@@ -392,36 +392,38 @@ public function getParameter($key)
     public function setFirstResult($firstResult)
     {
         $this->_firstResult = $firstResult;
+
         return $this;
     }
 
     /**
      * Gets the position of the first result the query object was set to retrieve (the "offset").
      * Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder.
-     * 
+     *
      * @return integer The position of the first result.
      */
     public function getFirstResult()
     {
         return $this->_firstResult;
     }
-    
+
     /**
      * Sets the maximum number of results to retrieve (the "limit").
-     * 
+     *
      * @param integer $maxResults The maximum number of results to retrieve.
      * @return QueryBuilder This QueryBuilder instance.
      */
     public function setMaxResults($maxResults)
     {
         $this->_maxResults = $maxResults;
+
         return $this;
     }
-    
+
     /**
      * Gets the maximum number of results the query object was set to retrieve (the "limit").
      * Returns NULL if {@link setMaxResults} was not applied to this query builder.
-     * 
+     *
      * @return integer Maximum number of results.
      */
     public function getMaxResults()
@@ -435,15 +437,15 @@ public function getMaxResults()
      * The available parts are: 'select', 'from', 'join', 'set', 'where',
      * 'groupBy', 'having' and 'orderBy'.
      *
-     * @param string $dqlPartName 
-     * @param string $dqlPart 
-     * @param string $append 
+     * @param string $dqlPartName
+     * @param string $dqlPart
+     * @param string $append
      * @return QueryBuilder This QueryBuilder instance.
      */
     public function add($dqlPartName, $dqlPart, $append = false)
     {
         $isMultiple = is_array($this->_dqlParts[$dqlPartName]);
-        
+
         // This is introduced for backwards compatibility reasons.
         // TODO: Remove for 3.0
         if ($dqlPartName == 'join') {
@@ -457,11 +459,11 @@ public function add($dqlPartName, $dqlPart, $append = false)
             }
             $dqlPart = $newDqlPart;
         }
-    
+
         if ($append && $isMultiple) {
             if (is_array($dqlPart)) {
                 $key = key($dqlPart);
-                
+
                 $this->_dqlParts[$dqlPartName][$key][] = $dqlPart[$key];
             } else {
                 $this->_dqlParts[$dqlPartName][] = $dqlPart;
@@ -492,16 +494,35 @@ public function add($dqlPartName, $dqlPart, $append = false)
     public function select($select = null)
     {
         $this->_type = self::SELECT;
-        
+
         if (empty($select)) {
             return $this;
         }
-        
+
         $selects = is_array($select) ? $select : func_get_args();
 
         return $this->add('select', new Expr\Select($selects), false);
     }
 
+    /**
+     * Add a DISTINCT flag to this query.
+     *
+     * 
+     *     $qb = $em->createQueryBuilder()
+     *         ->select('u')
+     *         ->distinct()
+     *         ->from('User', 'u');
+     * 
+     *
+     * @param bool
+     * @return QueryBuilder
+     */
+    public function distinct($flag = true)
+    {
+        $this->_dqlParts['distinct'] = (bool) $flag;
+        return $this;
+    }
+
     /**
      * Adds an item that is to be returned in the query result.
      *
@@ -519,11 +540,11 @@ public function select($select = null)
     public function addSelect($select = null)
     {
         $this->_type = self::SELECT;
-        
+
         if (empty($select)) {
             return $this;
         }
-        
+
         $selects = is_array($select) ? $select : func_get_args();
 
         return $this->add('select', new Expr\Select($selects), true);
@@ -537,7 +558,7 @@ public function addSelect($select = null)
      *     $qb = $em->createQueryBuilder()
      *         ->delete('User', 'u')
      *         ->where('u.id = :user_id');
-     *         ->setParameter(':user_id', 1);
+     *         ->setParameter('user_id', 1);
      * 
      *
      * @param string $delete The class/type whose instances are subject to the deletion.
@@ -593,11 +614,12 @@ public function update($update = null, $alias = null)
      *
      * @param string $from   The class name.
      * @param string $alias  The alias of the class.
+     * @param string $indexBy The index for the from.
      * @return QueryBuilder This QueryBuilder instance.
      */
-    public function from($from, $alias)
+    public function from($from, $alias, $indexBy = null)
     {
-        return $this->add('from', new Expr\From($from, $alias), true);
+        return $this->add('from', new Expr\From($from, $alias, $indexBy), true);
     }
 
     /**
@@ -628,7 +650,7 @@ public function join($join, $alias, $conditionType = null, $condition = null, $i
 
     /**
      * Creates and adds a join over an entity association to the query.
-     * 
+     *
      * The entities in the joined association will be fetched as part of the query
      * result if the alias used for the joined association is placed in the select
      * expressions.
@@ -649,13 +671,16 @@ public function join($join, $alias, $conditionType = null, $condition = null, $i
     public function innerJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null)
     {
         $rootAlias = substr($join, 0, strpos($join, '.'));
-        if (!in_array($rootAlias, $this->getRootAliases())) {
+
+        if ( ! in_array($rootAlias, $this->getRootAliases())) {
             $rootAlias = $this->getRootAlias();
         }
-        
-        return $this->add('join', array(
-            $rootAlias => new Expr\Join(Expr\Join::INNER_JOIN, $join, $alias, $conditionType, $condition, $indexBy)
-        ), true);
+
+        $join = new Expr\Join(
+            Expr\Join::INNER_JOIN, $join, $alias, $conditionType, $condition, $indexBy
+        );
+
+        return $this->add('join', array($rootAlias => $join), true);
     }
 
     /**
@@ -682,13 +707,16 @@ public function innerJoin($join, $alias, $conditionType = null, $condition = nul
     public function leftJoin($join, $alias, $conditionType = null, $condition = null, $indexBy = null)
     {
         $rootAlias = substr($join, 0, strpos($join, '.'));
-        if (!in_array($rootAlias, $this->getRootAliases())) {
+
+        if ( ! in_array($rootAlias, $this->getRootAliases())) {
             $rootAlias = $this->getRootAlias();
         }
-        
-        return $this->add('join', array(
-            $rootAlias => new Expr\Join(Expr\Join::LEFT_JOIN, $join, $alias, $conditionType, $condition, $indexBy)
-        ), true);
+
+        $join = new Expr\Join(
+            Expr\Join::LEFT_JOIN, $join, $alias, $conditionType, $condition, $indexBy
+        );
+
+        return $this->add('join', array($rootAlias => $join), true);
     }
 
     /**
@@ -740,7 +768,7 @@ public function where($predicates)
         if ( ! (func_num_args() == 1 && $predicates instanceof Expr\Composite)) {
             $predicates = new Expr\Andx(func_get_args());
         }
-        
+
         return $this->add('where', $predicates);
     }
 
@@ -764,14 +792,14 @@ public function andWhere($where)
     {
         $where = $this->getDQLPart('where');
         $args = func_get_args();
-        
+
         if ($where instanceof Expr\Andx) {
             $where->addMultiple($args);
-        } else { 
+        } else {
             array_unshift($args, $where);
             $where = new Expr\Andx($args);
         }
-        
+
         return $this->add('where', $where, true);
     }
 
@@ -795,14 +823,14 @@ public function orWhere($where)
     {
         $where = $this->getDqlPart('where');
         $args = func_get_args();
-        
+
         if ($where instanceof Expr\Orx) {
             $where->addMultiple($args);
-        } else {            
+        } else {
             array_unshift($args, $where);
             $where = new Expr\Orx($args);
         }
-        
+
         return $this->add('where', $where, true);
     }
 
@@ -857,7 +885,7 @@ public function having($having)
         if ( ! (func_num_args() == 1 && ($having instanceof Expr\Andx || $having instanceof Expr\Orx))) {
             $having = new Expr\Andx(func_get_args());
         }
-        
+
         return $this->add('having', $having);
     }
 
@@ -872,14 +900,14 @@ public function andHaving($having)
     {
         $having = $this->getDqlPart('having');
         $args = func_get_args();
-        
+
         if ($having instanceof Expr\Andx) {
             $having->addMultiple($args);
-        } else { 
+        } else {
             array_unshift($args, $having);
             $having = new Expr\Andx($args);
         }
-        
+
         return $this->add('having', $having);
     }
 
@@ -894,10 +922,10 @@ public function orHaving($having)
     {
         $having = $this->getDqlPart('having');
         $args = func_get_args();
-        
+
         if ($having instanceof Expr\Orx) {
             $having->addMultiple($args);
-        } else { 
+        } else {
             array_unshift($args, $having);
             $having = new Expr\Orx($args);
         }
@@ -973,16 +1001,18 @@ private function _getDQLForUpdate()
 
     private function _getDQLForSelect()
     {
-        $dql = 'SELECT' . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', '));
-        
+        $dql = 'SELECT'
+              . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '')
+              . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', '));
+
         $fromParts   = $this->getDQLPart('from');
         $joinParts   = $this->getDQLPart('join');
         $fromClauses = array();
-        
+
         // Loop through all FROM clauses
         if ( ! empty($fromParts)) {
             $dql .= ' FROM ';
-            
+
             foreach ($fromParts as $from) {
                 $fromClause = (string) $from;
 
@@ -995,24 +1025,24 @@ private function _getDQLForSelect()
                 $fromClauses[] = $fromClause;
             }
         }
-        
-        $dql .= implode(', ', $fromClauses) 
+
+        $dql .= implode(', ', $fromClauses)
               . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE '))
               . $this->_getReducedDQLQueryPart('groupBy', array('pre' => ' GROUP BY ', 'separator' => ', '))
               . $this->_getReducedDQLQueryPart('having', array('pre' => ' HAVING '))
               . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', '));
-        
+
         return $dql;
     }
 
     private function _getReducedDQLQueryPart($queryPartName, $options = array())
     {
         $queryPart = $this->getDQLPart($queryPartName);
-        
+
         if (empty($queryPart)) {
             return (isset($options['empty']) ? $options['empty'] : '');
         }
-        
+
         return (isset($options['pre']) ? $options['pre'] : '')
              . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart)
              . (isset($options['post']) ? $options['post'] : '');
@@ -1082,4 +1112,4 @@ public function __clone()
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php
index 0bb3189952..afff8db638 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php
@@ -1,7 +1,5 @@
 
  * @author  Guilherme Blanco 
  * @author  Jonathan Wage 
@@ -47,9 +45,30 @@ protected function configure()
         $this
         ->setName('orm:clear-cache:metadata')
         ->setDescription('Clear all metadata cache of the various cache drivers.')
-        ->setDefinition(array())
-        ->setHelp(<<setDefinition(array(
+            new InputOption(
+                'flush', null, InputOption::VALUE_NONE,
+                'If defined, cache entries will be flushed instead of deleted/invalidated.'
+            )
+        ));
+
+        $fullName = $this->getName();
+        $this->setHelp(<<$fullName command is meant to clear the metadata cache of associated Entity Manager.
+It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
+instance completely.
+
+The execution type differ on how you execute the command.
+If you want to invalidate the entries (and not delete from cache instance), this command would do the work:
+
+$fullName
+
+Alternatively, if you want to flush the cache provider using this command:
+
+$fullName --flush
+
+Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries,
+because of a limitation of its execution nature.
 EOT
         );
     }
@@ -66,20 +85,20 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
             throw new \InvalidArgumentException('No Metadata cache driver is configured on given EntityManager.');
         }
 
-        if ($cacheDriver instanceof \Doctrine\Common\Cache\ApcCache) {
+        if ($cacheDriver instanceof Cache\ApcCache) {
             throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.");
         }
 
         $output->write('Clearing ALL Metadata cache entries' . PHP_EOL);
 
-        $cacheIds = $cacheDriver->deleteAll();
+        $result  = $cacheDriver->deleteAll();
+        $message = ($result) ? 'Successfully deleted cache entries.' : 'No cache entries were deleted.';
 
-        if ($cacheIds) {
-            foreach ($cacheIds as $cacheId) {
-                $output->write(' - ' . $cacheId . PHP_EOL);
-            }
-        } else {
-            $output->write('No entries to be deleted.' . PHP_EOL);
+        if (true === $input->getOption('flush')) {
+            $result  = $cacheDriver->flushAll();
+            $message = ($result) ? 'Successfully flushed cache entries.' : $message;
         }
+
+        $output->write($message . PHP_EOL);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php
index 9b71292085..6ad75cdcb3 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php
@@ -1,7 +1,5 @@
 
  * @author  Guilherme Blanco 
  * @author  Jonathan Wage 
@@ -47,9 +45,30 @@ protected function configure()
         $this
         ->setName('orm:clear-cache:query')
         ->setDescription('Clear all query cache of the various cache drivers.')
-        ->setDefinition(array())
-        ->setHelp(<<setDefinition(array(
+            new InputOption(
+                'flush', null, InputOption::VALUE_NONE,
+                'If defined, cache entries will be flushed instead of deleted/invalidated.'
+            )
+        ));
+
+        $fullName = $this->getName();
+        $this->setHelp(<<$fullName command is meant to clear the query cache of associated Entity Manager.
+It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
+instance completely.
+
+The execution type differ on how you execute the command.
+If you want to invalidate the entries (and not delete from cache instance), this command would do the work:
+
+$fullName
+
+Alternatively, if you want to flush the cache provider using this command:
+
+$fullName --flush
+
+Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries,
+because of a limitation of its execution nature.
 EOT
         );
     }
@@ -66,20 +85,20 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
             throw new \InvalidArgumentException('No Query cache driver is configured on given EntityManager.');
         }
 
-        if ($cacheDriver instanceof \Doctrine\Common\Cache\ApcCache) {
+        if ($cacheDriver instanceof Cache\ApcCache) {
             throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.");
         }
 
         $output->write('Clearing ALL Query cache entries' . PHP_EOL);
 
-        $cacheIds = $cacheDriver->deleteAll();
+        $result  = $cacheDriver->deleteAll();
+        $message = ($result) ? 'Successfully deleted cache entries.' : 'No cache entries were deleted.';
 
-        if ($cacheIds) {
-            foreach ($cacheIds as $cacheId) {
-                $output->write(' - ' . $cacheId . PHP_EOL);
-            }
-        } else {
-            $output->write('No entries to be deleted.' . PHP_EOL);
+        if (true === $input->getOption('flush')) {
+            $result  = $cacheDriver->flushAll();
+            $message = ($result) ? 'Successfully flushed cache entries.' : $message;
         }
+
+        $output->write($message . PHP_EOL);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php
index f1506809bf..5bb000c721 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php
@@ -1,7 +1,5 @@
 
  * @author  Guilherme Blanco 
  * @author  Jonathan Wage 
@@ -46,28 +44,31 @@ protected function configure()
     {
         $this
         ->setName('orm:clear-cache:result')
-        ->setDescription('Clear result cache of the various cache drivers.')
+        ->setDescription('Clear all result cache of the various cache drivers.')
         ->setDefinition(array(
             new InputOption(
-                'id', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
-                'ID(s) of the cache entry to delete (accepts * wildcards).', array()
-            ),
-            new InputOption(
-                'regex', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
-                'Delete cache entries that match the given regular expression(s).', array()
-            ),
-            new InputOption(
-                'prefix', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
-                'Delete cache entries that have the given prefix(es).', array()
-            ),
-            new InputOption(
-                'suffix', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
-                'Delete cache entries that have the given suffix(es).', array()
-            ),
-        ))
-        ->setHelp(<<getName();
+        $this->setHelp(<<$fullName command is meant to clear the result cache of associated Entity Manager.
+It is possible to invalidate all cache entries at once - called delete -, or flushes the cache provider
+instance completely.
+
+The execution type differ on how you execute the command.
+If you want to invalidate the entries (and not delete from cache instance), this command would do the work:
+
+$fullName
+
+Alternatively, if you want to flush the cache provider using this command:
+
+$fullName --flush
+
+Finally, be aware that if --flush option is passed, not all cache providers are able to flush entries,
+because of a limitation of its execution nature.
 EOT
         );
     }
@@ -84,85 +85,20 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
             throw new \InvalidArgumentException('No Result cache driver is configured on given EntityManager.');
         }
 
-        if ($cacheDriver instanceof \Doctrine\Common\Cache\ApcCache) {
+        if ($cacheDriver instanceof Cache\ApcCache) {
             throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.");
         }
 
-        $outputed = false;
-
-        // Removing based on --id
-        if (($ids = $input->getOption('id')) !== null && $ids) {
-            foreach ($ids as $id) {
-                $output->write($outputed ? PHP_EOL : '');
-                $output->write(sprintf('Clearing Result cache entries that match the id "%s"', $id) . PHP_EOL);
-
-                $deleted = $cacheDriver->delete($id);
-
-                if (is_array($deleted)) {
-                    $this->_printDeleted($output, $deleted);
-                } else if (is_bool($deleted) && $deleted) {
-                    $this->_printDeleted($output, array($id));
-                }
-
-                $outputed = true;
-            }
-        }
-
-        // Removing based on --regex
-        if (($regexps = $input->getOption('regex')) !== null && $regexps) {
-            foreach($regexps as $regex) {
-                $output->write($outputed ? PHP_EOL : '');
-                $output->write(sprintf('Clearing Result cache entries that match the regular expression "%s"', $regex) . PHP_EOL);
+        $output->write('Clearing ALL Result cache entries' . PHP_EOL);
 
-                $this->_printDeleted($output, $cacheDriver->deleteByRegex('/' . $regex. '/'));
+        $result  = $cacheDriver->deleteAll();
+        $message = ($result) ? 'Successfully deleted cache entries.' : 'No cache entries were deleted.';
 
-                $outputed = true;
-            }
+        if (true === $input->getOption('flush')) {
+            $result  = $cacheDriver->flushAll();
+            $message = ($result) ? 'Successfully flushed cache entries.' : $message;
         }
 
-        // Removing based on --prefix
-        if (($prefixes = $input->getOption('prefix')) !== null & $prefixes) {
-            foreach ($prefixes as $prefix) {
-                $output->write($outputed ? PHP_EOL : '');
-                $output->write(sprintf('Clearing Result cache entries that have the prefix "%s"', $prefix) . PHP_EOL);
-
-                $this->_printDeleted($output, $cacheDriver->deleteByPrefix($prefix));
-
-                $outputed = true;
-            }
-        }
-
-        // Removing based on --suffix
-        if (($suffixes = $input->getOption('suffix')) !== null && $suffixes) {
-            foreach ($suffixes as $suffix) {
-                $output->write($outputed ? PHP_EOL : '');
-                $output->write(sprintf('Clearing Result cache entries that have the suffix "%s"', $suffix) . PHP_EOL);
-
-                $this->_printDeleted($output, $cacheDriver->deleteBySuffix($suffix));
-
-                $outputed = true;
-            }
-        }
-
-        // Removing ALL entries
-        if ( ! $ids && ! $regexps && ! $prefixes && ! $suffixes) {
-            $output->write($outputed ? PHP_EOL : '');
-            $output->write('Clearing ALL Result cache entries' . PHP_EOL);
-
-            $this->_printDeleted($output, $cacheDriver->deleteAll());
-
-            $outputed = true;
-        }
-    }
-
-    private function _printDeleted(Console\Output\OutputInterface $output, array $items)
-    {
-        if ($items) {
-            foreach ($items as $item) {
-                $output->write(' - ' . $item . PHP_EOL);
-            }
-        } else {
-            $output->write('No entries to be deleted.' . PHP_EOL);
-        }
+        $output->write($message . PHP_EOL);
     }
-}
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php
index 1a1328aac0..c78920bcc3 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php
@@ -80,7 +80,7 @@ public function getMetadataExporter()
         if ($this->metadataExporter == null) {
             $this->metadataExporter = new ClassMetadataExporter();
         }
-        
+
         return $this->metadataExporter;
     }
 
@@ -91,7 +91,7 @@ public function setMetadataExporter(ClassMetadataExporter $metadataExporter)
     {
         $this->metadataExporter = $metadataExporter;
     }
-    
+
     /**
      * @see Console\Command\Command
      */
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
index 9a79031279..03af43ac44 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
@@ -137,7 +137,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
 
         if ( ! file_exists($destPath)) {
             throw new \InvalidArgumentException(
-                sprintf("Mapping destination directory '%s' does not exist.", $destPath)
+                sprintf("Mapping destination directory '%s' does not exist.", $input->getArgument('dest-path'))
             );
         } else if ( ! is_writable($destPath)) {
             throw new \InvalidArgumentException(
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php
index 198db0d6cc..f00e6d2c4a 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php
@@ -112,18 +112,18 @@ class is supposed to extend which. You have to adjust the entity
     protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
     {
         $em = $this->getHelper('em')->getEntityManager();
-        
+
         $cmf = new DisconnectedClassMetadataFactory();
         $cmf->setEntityManager($em);
         $metadatas = $cmf->getAllMetadata();
         $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter'));
-        
+
         // Process destination directory
         $destPath = realpath($input->getArgument('dest-path'));
 
         if ( ! file_exists($destPath)) {
             throw new \InvalidArgumentException(
-                sprintf("Entities destination directory '%s' does not exist.", $destPath)
+                sprintf("Entities destination directory '%s' does not exist.", $input->getArgument('dest-path'))
             );
         } else if ( ! is_writable($destPath)) {
             throw new \InvalidArgumentException(
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php
index 9876289563..7028d99e27 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php
@@ -70,7 +70,7 @@ protected function configure()
     protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
     {
         $em = $this->getHelper('em')->getEntityManager();
-        
+
         $metadatas = $em->getMetadataFactory()->getAllMetadata();
         $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter'));
 
@@ -87,7 +87,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
 
         if ( ! file_exists($destPath)) {
             throw new \InvalidArgumentException(
-                sprintf("Proxies destination directory '%s' does not exist.", $destPath)
+                sprintf("Proxies destination directory '%s' does not exist.", $em->getConfiguration()->getProxyDir())
             );
         } else if ( ! is_writable($destPath)) {
             throw new \InvalidArgumentException(
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php
index 30d36eb448..bb6fc9d8b2 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php
@@ -70,7 +70,7 @@ protected function configure()
     protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
     {
         $em = $this->getHelper('em')->getEntityManager();
-        
+
         $metadatas = $em->getMetadataFactory()->getAllMetadata();
         $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter'));
 
@@ -79,7 +79,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
 
         if ( ! file_exists($destPath)) {
             throw new \InvalidArgumentException(
-                sprintf("Entities destination directory '%s' does not exist.", $destPath)
+                sprintf("Entities destination directory '%s' does not exist.", $input->getArgument('dest-path'))
             );
         } else if ( ! is_writable($destPath)) {
             throw new \InvalidArgumentException(
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php
index 74d5ee2b4e..77458cf132 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php
@@ -50,7 +50,7 @@ protected function configure()
 
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        /* @var $entityManager Doctrine\ORM\EntityManager */
+        /* @var $entityManager \Doctrine\ORM\EntityManager */
         $entityManager = $this->getHelper('em')->getEntityManager();
 
         $entityClassNames = $entityManager->getConfiguration()
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php
index a39995e0fe..2b0fc0dd02 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php
@@ -127,7 +127,7 @@ protected function executeSchemaCommand(InputInterface $input, OutputInterface $
 
             $output->writeln(sprintf('The Schema-Tool would execute "%s" queries to update the database.', count($sqls)));
             $output->writeln('Please run the operation by passing one of the following options:');
-            
+
             $output->writeln(sprintf('    %s --force to execute the command', $this->getName()));
             $output->writeln(sprintf('    %s --dump-sql to dump the SQL statements to the screen', $this->getName()));
         }
diff --git a/src/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php b/src/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php
index 994b89578b..fc8f55638c 100644
--- a/src/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php
+++ b/src/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php
@@ -46,7 +46,7 @@ protected function configure()
     {
         $this
         ->setName('orm:validate-schema')
-        ->setDescription('Validate that the mapping files.')
+        ->setDescription('Validate the mapping files.')
         ->setHelp(<< 1) {
                 $metadata->table['schema'] = $e[0];
                 $metadata->table['name'] = $e[1];
@@ -248,7 +249,6 @@ private function _convertRelations($className, array $model, ClassMetadataInfo $
                             'name' => $relation['local'],
                             'referencedColumnName' => $relation['foreign'],
                             'onDelete' => isset($relation['onDelete']) ? $relation['onDelete'] : null,
-                            'onUpdate' => isset($relation['onUpdate']) ? $relation['onUpdate'] : null,
                         )
                     );
                 }
diff --git a/src/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php b/src/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php
new file mode 100644
index 0000000000..0548b96447
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php
@@ -0,0 +1,151 @@
+.
+ */
+
+namespace Doctrine\ORM\Tools;
+
+use Doctrine\ORM\Event\OnFlushEventArgs;
+use Doctrine\ORM\Mapping\ClassMetadata;
+use Doctrine\ORM\PersistentCollection;
+use Doctrine\ORM\UnitOfWork;
+
+/**
+ * Use this logger to dump the identity map during the onFlush event. This is useful for debugging
+ * weird UnitOfWork behavior with complex operations.
+ */
+class DebugUnitOfWorkListener
+{
+    private $file;
+    private $context;
+
+    /**
+     * Pass a stream and contet information for the debugging session.
+     *
+     * The stream can be php://output to print to the screen.
+     *
+     * @param string $file
+     * @param string $context
+     */
+    public function __construct($file = 'php://output', $context = '')
+    {
+        $this->file = $file;
+        $this->context = $context;
+    }
+
+    public function onFlush(OnFlushEventArgs $args)
+    {
+        $this->dumpIdentityMap($args->getEntityManager());
+    }
+
+    /**
+     * Dump the contents of the identity map into a stream.
+     *
+     * @param EntityManager $em
+     * @return void
+     */
+    public function dumpIdentityMap(EntityManager $em)
+    {
+        $uow = $em->getUnitOfWork();
+        $identityMap = $uow->getIdentityMap();
+
+        $fh = fopen($this->file, "x+");
+        if (count($identityMap) == 0) {
+            fwrite($fh, "Flush Operation [".$this->context."] - Empty identity map.\n");
+            return;
+        }
+
+        fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n");
+        foreach ($identityMap AS $className => $map) {
+            fwrite($fh, "Class: ". $className . "\n");
+            foreach ($map AS $idHash => $entity) {
+                fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n");
+                fwrite($fh, "  Associations:\n");
+
+                $cm = $em->getClassMetadata($className);
+                foreach ($cm->associationMappings AS $field => $assoc) {
+                    fwrite($fh, "   " . $field . " ");
+                    $value = $cm->reflFields[$field]->getValue($entity);
+
+                    if ($assoc['type'] & ClassMetadata::TO_ONE) {
+                        if ($value === null) {
+                            fwrite($fh, " NULL\n");
+                        } else {
+                            if ($value instanceof Proxy && !$value->__isInitialized__) {
+                                fwrite($fh, "[PROXY] ");
+                            }
+
+                            fwrite($fh, $this->getIdString($value, $uow) . " " . spl_object_hash($value) . "\n");
+                        }
+                    } else {
+                        $initialized = !($value instanceof PersistentCollection) || $value->isInitialized();
+                        if ($value === null) {
+                            fwrite($fh, " NULL\n");
+                        } else if ($initialized) {
+                            fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n");
+                            foreach ($value AS $obj) {
+                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
+                            }
+                        } else {
+                            fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n");
+                            foreach ($value->unwrap() AS $obj) {
+                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        fclose($fh);
+    }
+
+    private function getType($var)
+    {
+        if (is_object($var)) {
+            $refl = new \ReflectionObject($var);
+            return $refl->getShortname();
+        } else {
+            return gettype($var);
+        }
+    }
+
+    private function getIdString($entity, $uow)
+    {
+        if ($uow->isInIdentityMap($entity)) {
+            $ids = $uow->getEntityIdentifier($entity);
+            $idstring = "";
+            foreach ($ids AS $k => $v) {
+                $idstring .= $k."=".$v;
+            }
+        } else {
+            $idstring = "NEWOBJECT ";
+        }
+
+        $state = $uow->getEntityState($entity);
+        if ($state == UnitOfWork::STATE_NEW) {
+            $idstring .= " [NEW]";
+        } else if ($state == UnitOfWork::STATE_REMOVED) {
+            $idstring .= " [REMOVED]";
+        } else if ($state == UnitOfWork::STATE_MANAGED) {
+            $idstring .= " [MANAGED]";
+        } else if ($state == UnitOfwork::STATE_DETACHED) {
+            $idstring .= " [DETACHED]";
+        }
+
+        return $idstring;
+    }
+}
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php b/src/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php
index 55503d400c..2603c22f97 100644
--- a/src/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php
+++ b/src/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php
@@ -24,7 +24,7 @@
 
 /**
  * The DisconnectedClassMetadataFactory is used to create ClassMetadataInfo objects
- * that do not require the entity class actually exist. This allows us to 
+ * that do not require the entity class actually exist. This allows us to
  * load some mapping information and use it to do things like generate code
  * from the mapping information.
  *
@@ -38,25 +38,8 @@
  */
 class DisconnectedClassMetadataFactory extends ClassMetadataFactory
 {
-    /**
-     * @override
-     */
-    protected function newClassMetadataInstance($className)
+    public function getReflectionService()
     {
-        $metadata = new ClassMetadataInfo($className);
-        if (strpos($className, "\\") !== false) {
-            $metadata->namespace = strrev(substr( strrev($className), strpos(strrev($className), "\\")+1 ));
-        } else {
-            $metadata->namespace = "";
-        }
-        return $metadata;
+        return new \Doctrine\Common\Persistence\Mapping\StaticReflectionService;
     }
-
-    /**
-     * @override
-     */
-    protected function getParentClasses($name)
-    {
-        return array();
-    }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Tools/EntityGenerator.php b/src/lib/Doctrine/ORM/Tools/EntityGenerator.php
index 50b0f18eda..5bf1bdf6c4 100644
--- a/src/lib/Doctrine/ORM/Tools/EntityGenerator.php
+++ b/src/lib/Doctrine/ORM/Tools/EntityGenerator.php
@@ -115,10 +115,12 @@ public function ()
  * 
  *
  * @param $
+ * @return 
  */
-public function ($)
+public function ($)
 {
 $this-> = $;
+return $this;
 }';
 
     private static $_addMethodTemplate =
@@ -126,10 +128,12 @@ public function ($)
  * 
  *
  * @param $
+ * @return 
  */
 public function ($)
 {
 $this->[] = $;
+return $this;
 }';
 
     private static $_lifecycleCallbackMethodTemplate =
@@ -150,7 +154,7 @@ public function ()
 
     public function __construct()
     {
-        if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) {
+        if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
             $this->_annotationsPrefix = 'ORM\\';
         }
     }
@@ -189,12 +193,14 @@ public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
 
         if ( ! $this->_isNew) {
             $this->_parseTokensInEntityFile(file_get_contents($path));
+        } else {
+            $this->_staticReflection[$metadata->name] = array('properties' => array(), 'methods' => array());
         }
 
         if ($this->_backupExisting && file_exists($path)) {
             $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
             if (!copy($path, $backupPath)) {
-                throw new \RuntimeException("Attempt to backup overwritten entitiy file but copy operation failed.");
+                throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
             }
         }
 
@@ -302,9 +308,6 @@ public function setGenerateAnnotations($bool)
      */
     public function setAnnotationPrefix($prefix)
     {
-        if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) {
-            return;
-        }
         $this->_annotationsPrefix = $prefix;
     }
 
@@ -399,14 +402,17 @@ private function _generateEntityConstructor(ClassMetadataInfo $metadata)
         }
 
         $collections = array();
+
         foreach ($metadata->associationMappings AS $mapping) {
             if ($mapping['type'] & ClassMetadataInfo::TO_MANY) {
                 $collections[] = '$this->'.$mapping['fieldName'].' = new \Doctrine\Common\Collections\ArrayCollection();';
             }
         }
+
         if ($collections) {
-            return $this->_prefixCodeWithSpaces(str_replace("", implode("\n", $collections), self::$_constructorMethodTemplate));
+            return $this->_prefixCodeWithSpaces(str_replace("", implode("\n".$this->_spaces, $collections), self::$_constructorMethodTemplate));
         }
+
         return '';
     }
 
@@ -438,7 +444,7 @@ private function _parseTokensInEntityFile($src)
 
             if ($inClass) {
                 $inClass = false;
-                $lastSeenClass = $lastSeenNamespace . '\\' . $token[1];
+                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
                 $this->_staticReflection[$lastSeenClass]['properties'] = array();
                 $this->_staticReflection[$lastSeenClass]['methods'] = array();
             }
@@ -451,7 +457,7 @@ private function _parseTokensInEntityFile($src)
             } else if ($token[0] == T_FUNCTION) {
                 if ($tokens[$i+2][0] == T_STRING) {
                     $this->_staticReflection[$lastSeenClass]['methods'][] = $tokens[$i+2][1];
-                } else if ($tokens[$i+2][0] == T_AMPERSAND && $tokens[$i+3][0] == T_STRING) {
+                } else if ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) {
                     $this->_staticReflection[$lastSeenClass]['methods'][] = $tokens[$i+3][1];
                 }
             } else if (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) {
@@ -462,6 +468,14 @@ private function _parseTokensInEntityFile($src)
 
     private function _hasProperty($property, ClassMetadataInfo $metadata)
     {
+        if ($this->_extendsClass()) {
+            // don't generate property if its already on the base class.
+            $reflClass = new \ReflectionClass($this->_getClassToExtend());
+            if ($reflClass->hasProperty($property)) {
+                return true;
+            }
+        }
+
         return (
             isset($this->_staticReflection[$metadata->name]) &&
             in_array($property, $this->_staticReflection[$metadata->name]['properties'])
@@ -470,6 +484,14 @@ private function _hasProperty($property, ClassMetadataInfo $metadata)
 
     private function _hasMethod($method, ClassMetadataInfo $metadata)
     {
+        if ($this->_extendsClass()) {
+            // don't generate method if its already on the base class.
+            $reflClass = new \ReflectionClass($this->_getClassToExtend());
+            if ($reflClass->hasMethod($method)) {
+                return true;
+            }
+        }
+
         return (
             isset($this->_staticReflection[$metadata->name]) &&
             in_array($method, $this->_staticReflection[$metadata->name]['methods'])
@@ -554,13 +576,41 @@ private function _generateEntityDocBlock(ClassMetadataInfo $metadata)
     private function _generateTableAnnotation($metadata)
     {
         $table = array();
-        if ($metadata->table['name']) {
+
+        if (isset($metadata->table['schema'])) {
+            $table[] = 'schema="' . $metadata->table['schema'] . '"';
+        }
+
+        if (isset($metadata->table['name'])) {
             $table[] = 'name="' . $metadata->table['name'] . '"';
         }
 
+        if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
+            $constraints = $this->_generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
+            $table[] = 'uniqueConstraints={' . $constraints . '}';
+        }
+
+        if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
+            $constraints = $this->_generateTableConstraints('Index', $metadata->table['indexes']);
+            $table[] = 'indexes={' . $constraints . '}';
+        }
+
         return '@' . $this->_annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
     }
 
+    private function _generateTableConstraints($constraintName, $constraints)
+    {
+        $annotations = array();
+        foreach ($constraints as $name => $constraint) {
+            $columns = array();
+            foreach ($constraint['columns'] as $column) {
+                $columns[] = '"' . $column . '"';
+            }
+            $annotations[] = '@' . $this->_annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
+        }
+        return implode(', ', $annotations);
+    }
+
     private function _generateInheritanceAnnotation($metadata)
     {
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
@@ -611,7 +661,8 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
 
         foreach ($metadata->associationMappings as $associationMapping) {
             if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
-                if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
+                $nullable = $this->_isAssociationIsNullable($associationMapping) ? 'null' : null;
+                if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'], $nullable)) {
                     $methods[] = $code;
                 }
                 if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
@@ -630,6 +681,25 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
         return implode("\n\n", $methods);
     }
 
+    private function _isAssociationIsNullable($associationMapping)
+    {
+        if (isset($associationMapping['id']) && $associationMapping['id']) {
+            return false;
+        }
+        if (isset($associationMapping['joinColumns'])) {
+            $joinColumns = $associationMapping['joinColumns'];
+        } else {
+            //@todo thereis no way to retreive targetEntity metadata
+            $joinColumns = array();
+        }
+        foreach ($joinColumns as $joinColumn) {
+            if(isset($joinColumn['nullable']) && !$joinColumn['nullable']) {
+                return false;
+            }
+        }
+        return true;
+    }
+
     private function _generateEntityLifecycleCallbackMethods(ClassMetadataInfo $metadata)
     {
         if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
@@ -684,13 +754,20 @@ private function _generateEntityFieldMappingProperties(ClassMetadataInfo $metada
         return implode("\n", $lines);
     }
 
-    private function _generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null)
+    private function _generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null,  $defaultValue = null)
     {
-        $methodName = $type . Inflector::classify($fieldName);
+        if ($type == "add") {
+            $addMethod = explode("\\", $typeHint);
+            $addMethod = end($addMethod);
+            $methodName = $type . $addMethod;
+        } else {
+            $methodName = $type . Inflector::classify($fieldName);
+        }
 
         if ($this->_hasMethod($methodName, $metadata)) {
             return;
         }
+        $this->_staticReflection[$metadata->name]['methods'][] = $methodName;
 
         $var = sprintf('_%sMethodTemplate', $type);
         $template = self::$$var;
@@ -706,7 +783,9 @@ private function _generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $
           ''      => $variableType,
           ''      => Inflector::camelize($fieldName),
           ''        => $methodName,
-          ''         => $fieldName
+          ''         => $fieldName,
+          ''   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
+          ''            => $this->_getClassName($metadata)
         );
 
         $method = str_replace(
@@ -723,6 +802,7 @@ private function _generateLifecycleCallbackMethod($name, $methodName, $metadata)
         if ($this->_hasMethod($methodName, $metadata)) {
             return;
         }
+        $this->_staticReflection[$metadata->name]['methods'][] = $methodName;
 
         $replacements = array(
             ''        => $this->_annotationsPrefix . $name,
@@ -759,11 +839,7 @@ private function _generateJoinColumnAnnotation(array $joinColumn)
         }
 
         if (isset($joinColumn['onDelete'])) {
-            $joinColumnAnnot[] = 'onDelete=' . ($joinColumn['onDelete'] ? 'true' : 'false');
-        }
-
-        if (isset($joinColumn['onUpdate'])) {
-            $joinColumnAnnot[] = 'onUpdate=' . ($joinColumn['onUpdate'] ? 'true' : 'false');
+            $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"');
         }
 
         if (isset($joinColumn['columnDefinition'])) {
@@ -777,10 +853,23 @@ private function _generateAssociationMappingPropertyDocBlock(array $associationM
     {
         $lines = array();
         $lines[] = $this->_spaces . '/**';
-        $lines[] = $this->_spaces . ' * @var ' . $associationMapping['targetEntity'];
+
+        if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
+            $lines[] = $this->_spaces . ' * @var \Doctrine\Common\Collections\ArrayCollection';
+        } else {
+            $lines[] = $this->_spaces . ' * @var ' . $associationMapping['targetEntity'];
+        }
 
         if ($this->_generateAnnotations) {
             $lines[] = $this->_spaces . ' *';
+            
+            if (isset($associationMapping['id']) && $associationMapping['id']) {
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'Id';
+            
+                if ($generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
+                    $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
+                }
+            }
 
             $type = null;
             switch ($associationMapping['type']) {
@@ -1037,4 +1126,4 @@ private function _getIdGeneratorTypeString($type)
                 throw new \InvalidArgumentException('Invalid provided IdGeneratorType: ' . $type);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php b/src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php
index 467332b64b..41ec6fdf6e 100644
--- a/src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php
+++ b/src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php
@@ -27,7 +27,7 @@
 
 /**
  * Abstract base class which is to be used for the Exporter drivers
- * which can be found in Doctrine\ORM\Tools\Export\Driver
+ * which can be found in \Doctrine\ORM\Tools\Export\Driver
  *
  * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
  * @link    www.doctrine-project.org
@@ -56,7 +56,7 @@ public function setOverwriteExistingFiles($overwrite)
      * Converts a single ClassMetadata instance to the exported format
      * and returns it
      *
-     * @param ClassMetadataInfo $metadata 
+     * @param ClassMetadataInfo $metadata
      * @return mixed $exported
      */
     abstract public function exportClassMetadata(ClassMetadataInfo $metadata);
@@ -64,7 +64,7 @@ abstract public function exportClassMetadata(ClassMetadataInfo $metadata);
     /**
      * Set the array of ClassMetadataInfo instances to export
      *
-     * @param array $metadata 
+     * @param array $metadata
      * @return void
      */
     public function setMetadata(array $metadata)
@@ -90,7 +90,7 @@ public function getExtension()
      *     $exporter->setOutputDir(__DIR__ . '/yaml');
      *     $exporter->export();
      *
-     * @param string $dir 
+     * @param string $dir
      * @return void
      */
     public function setOutputDir($dir)
@@ -111,23 +111,25 @@ public function export()
         }
 
         foreach ($this->_metadata as $metadata) {
-            $output = $this->exportClassMetadata($metadata);
-            $path = $this->_generateOutputPath($metadata);
-            $dir = dirname($path);
-            if ( ! is_dir($dir)) {
-                mkdir($dir, 0777, true);
+            //In case output is returned, write it to a file, skip otherwise
+            if($output = $this->exportClassMetadata($metadata)){
+                $path = $this->_generateOutputPath($metadata);
+                $dir = dirname($path);
+                if ( ! is_dir($dir)) {
+                    mkdir($dir, 0777, true);
+                }
+                if (file_exists($path) && !$this->_overwriteExistingFiles) {
+                    throw ExportException::attemptOverwriteExistingFile($path);
+                }
+                file_put_contents($path, $output);
             }
-            if (file_exists($path) && !$this->_overwriteExistingFiles) {
-                throw ExportException::attemptOverwriteExistingFile($path);
-            }
-            file_put_contents($path, $output);
         }
     }
 
     /**
      * Generate the path to write the class for the given ClassMetadataInfo instance
      *
-     * @param ClassMetadataInfo $metadata 
+     * @param ClassMetadataInfo $metadata
      * @return string $path
      */
     protected function _generateOutputPath(ClassMetadataInfo $metadata)
@@ -162,11 +164,11 @@ protected function _getInheritanceTypeString($type)
             case ClassMetadataInfo::INHERITANCE_TYPE_JOINED:
                 return 'JOINED';
             break;
-            
+
             case ClassMetadataInfo::INHERITANCE_TYPE_SINGLE_TABLE:
                 return 'SINGLE_TABLE';
             break;
-            
+
             case ClassMetadataInfo::INHERITANCE_TYPE_TABLE_PER_CLASS:
                 return 'PER_CLASS';
             break;
@@ -180,11 +182,11 @@ protected function _getChangeTrackingPolicyString($policy)
             case ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT:
                 return 'DEFERRED_IMPLICIT';
             break;
-            
+
             case ClassMetadataInfo::CHANGETRACKING_DEFERRED_EXPLICIT:
                 return 'DEFERRED_EXPLICIT';
             break;
-            
+
             case ClassMetadataInfo::CHANGETRACKING_NOTIFY:
                 return 'NOTIFY';
             break;
@@ -198,15 +200,15 @@ protected function _getIdGeneratorTypeString($type)
             case ClassMetadataInfo::GENERATOR_TYPE_AUTO:
                 return 'AUTO';
             break;
-            
+
             case ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE:
                 return 'SEQUENCE';
             break;
-            
+
             case ClassMetadataInfo::GENERATOR_TYPE_TABLE:
                 return 'TABLE';
             break;
-            
+
             case ClassMetadataInfo::GENERATOR_TYPE_IDENTITY:
                 return 'IDENTITY';
             break;
diff --git a/src/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php b/src/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php
index 254905eec9..5053290d8b 100644
--- a/src/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php
+++ b/src/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php
@@ -44,7 +44,7 @@ class AnnotationExporter extends AbstractExporter
      * Converts a single ClassMetadata instance to the exported format
      * and returns it
      *
-     * @param ClassMetadataInfo $metadata 
+     * @param ClassMetadataInfo $metadata
      * @return string $exported
      */
     public function exportClassMetadata(ClassMetadataInfo $metadata)
diff --git a/src/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php b/src/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php
index 900fb5bda8..fc561c9082 100644
--- a/src/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php
+++ b/src/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php
@@ -41,7 +41,7 @@ class PhpExporter extends AbstractExporter
      * Converts a single ClassMetadata instance to the exported format
      * and returns it
      *
-     * @param ClassMetadataInfo $metadata 
+     * @param ClassMetadataInfo $metadata
      * @return mixed $exported
      */
     public function exportClassMetadata(ClassMetadataInfo $metadata)
@@ -108,7 +108,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                 'targetEntity' => $associationMapping['targetEntity'],
                 'cascade'     => $cascade,
             );
-            
+
             if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
                 $method = 'mapOneToOne';
                 $oneToOneMappingArray = array(
@@ -117,10 +117,10 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                     'joinColumns'   => $associationMapping['joinColumns'],
                     'orphanRemoval' => $associationMapping['orphanRemoval'],
                 );
-                
+
                 $associationMappingArray = array_merge($associationMappingArray, $oneToOneMappingArray);
             } else if ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_MANY) {
-                $method = 'mapOneToMany';                
+                $method = 'mapOneToMany';
                 $potentialAssociationMappingIndexes = array(
                     'mappedBy',
                     'orphanRemoval',
@@ -133,7 +133,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                 }
                 $associationMappingArray = array_merge($associationMappingArray, $oneToManyMappingArray);
             } else if ($associationMapping['type'] == ClassMetadataInfo::MANY_TO_MANY) {
-                $method = 'mapManyToMany';                
+                $method = 'mapManyToMany';
                 $potentialAssociationMappingIndexes = array(
                     'mappedBy',
                     'joinTable',
@@ -146,7 +146,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                 }
                 $associationMappingArray = array_merge($associationMappingArray, $manyToManyMappingArray);
             }
-            
+
             $lines[] = '$metadata->' . $method . '(' . $this->_varExport($associationMappingArray) . ');';
         }
 
diff --git a/src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
index fc27ea911b..bda29810fd 100644
--- a/src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
+++ b/src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
@@ -41,7 +41,7 @@ class XmlExporter extends AbstractExporter
      * Converts a single ClassMetadata instance to the exported format
      * and returns it
      *
-     * @param ClassMetadataInfo $metadata 
+     * @param ClassMetadataInfo $metadata
      * @return mixed $exported
      */
     public function exportClassMetadata(ClassMetadataInfo $metadata)
@@ -99,7 +99,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
 
         if (isset($metadata->table['indexes'])) {
             $indexesXml = $root->addChild('indexes');
-            
+
             foreach ($metadata->table['indexes'] as $name => $index) {
                 $indexXml = $indexesXml->addChild('index');
                 $indexXml->addAttribute('name', $name);
@@ -109,7 +109,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
 
         if (isset($metadata->table['uniqueConstraints'])) {
             $uniqueConstraintsXml = $root->addChild('unique-constraints');
-            
+
             foreach ($metadata->table['uniqueConstraints'] as $unique) {
                 $uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint');
                 $uniqueConstraintXml->addAttribute('name', $unique['name']);
@@ -118,7 +118,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
         }
 
         $fields = $metadata->fieldMappings;
-        
+
         $id = array();
         foreach ($fields as $name => $field) {
             if (isset($field['id']) && $field['id']) {
@@ -139,6 +139,9 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                 if (isset($field['columnName'])) {
                     $idXml->addAttribute('column', $field['columnName']);
                 }
+                if (isset($field['associationKey']) && $field['associationKey']) {
+                    $idXml->addAttribute('association-key', 'true');
+                }
                 if ($idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
                     $generatorXml = $idXml->addChild('generator');
                     $generatorXml->addAttribute('strategy', $idGeneratorType);
@@ -215,9 +218,6 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                     if (isset($joinColumn['onDelete'])) {
                         $joinColumnXml->addAttribute('on-delete', $joinColumn['onDelete']);
                     }
-                    if (isset($joinColumn['onUpdate'])) {
-                        $joinColumnXml->addAttribute('on-update', $joinColumn['onUpdate']);
-                    }
                 }
                 $inverseJoinColumnsXml = $joinTableXml->addChild('inverse-join-columns');
                 foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $inverseJoinColumn) {
@@ -227,9 +227,6 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                     if (isset($inverseJoinColumn['onDelete'])) {
                         $inverseJoinColumnXml->addAttribute('on-delete', $inverseJoinColumn['onDelete']);
                     }
-                    if (isset($inverseJoinColumn['onUpdate'])) {
-                        $inverseJoinColumnXml->addAttribute('on-update', $inverseJoinColumn['onUpdate']);
-                    }
                     if (isset($inverseJoinColumn['columnDefinition'])) {
                         $inverseJoinColumnXml->addAttribute('column-definition', $inverseJoinColumn['columnDefinition']);
                     }
@@ -250,9 +247,6 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                     if (isset($joinColumn['onDelete'])) {
                         $joinColumnXml->addAttribute('on-delete', $joinColumn['onDelete']);
                     }
-                    if (isset($joinColumn['onUpdate'])) {
-                        $joinColumnXml->addAttribute('on-update', $joinColumn['onUpdate']);
-                    }
                     if (isset($joinColumn['columnDefinition'])) {
                         $joinColumnXml->addAttribute('column-definition', $joinColumn['columnDefinition']);
                     }
@@ -285,6 +279,9 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
             if ($associationMapping['isCascadeDetach']) {
                 $cascade[] = 'cascade-detach';
             }
+            if (count($cascade) === 5) {
+                $cascade  = array('cascade-all');
+            }
             if ($cascade) {
                 $cascadeXml = $associationMappingXml->addChild('cascade');
                 foreach ($cascade as $type) {
diff --git a/src/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php b/src/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
index 669e76ce47..2d16792b1d 100644
--- a/src/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
+++ b/src/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
@@ -49,11 +49,13 @@ class YamlExporter extends AbstractExporter
     public function exportClassMetadata(ClassMetadataInfo $metadata)
     {
         $array = array();
+
         if ($metadata->isMappedSuperclass) {
             $array['type'] = 'mappedSuperclass';
         } else {
             $array['type'] = 'entity';
         }
+
         $array['table'] = $metadata->table['name'];
 
         if (isset($metadata->table['schema'])) {
@@ -81,6 +83,10 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
             $array['indexes'] = $metadata->table['indexes'];
         }
 
+        if ($metadata->customRepositoryClassName) {
+            $array['repositoryClass'] = $metadata->customRepositoryClassName;
+        }
+
         if (isset($metadata->table['uniqueConstraints'])) {
             $array['uniqueConstraints'] = $metadata->table['uniqueConstraints'];
         }
@@ -141,6 +147,9 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
             if ($associationMapping['isCascadeDetach']) {
                 $cascade[] = 'detach';
             }
+            if (count($cascade) === 5) {
+                $cascade = array('all');
+            }
             $associationMappingArray = array(
                 'targetEntity' => $associationMapping['targetEntity'],
                 'cascade'     => $cascade,
@@ -154,9 +163,6 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
                     if (isset($joinColumn['onDelete'])) {
                         $newJoinColumns[$joinColumn['name']]['onDelete'] = $joinColumn['onDelete'];
                     }
-                    if (isset($joinColumn['onUpdate'])) {
-                        $newJoinColumns[$joinColumn['name']]['onUpdate'] = $joinColumn['onUpdate'];
-                    }
                 }
                 $oneToOneMappingArray = array(
                     'mappedBy'      => $associationMapping['mappedBy'],
diff --git a/src/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php b/src/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php
new file mode 100644
index 0000000000..10df1c3e14
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Tools/Pagination/CountWalker.php
@@ -0,0 +1,80 @@
+
+ * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
+ * @license     http://hobodave.com/license.txt New BSD License
+ */
+class CountWalker extends TreeWalkerAdapter
+{
+    /**
+     * Distinct mode hint name
+     */
+    const HINT_DISTINCT = 'doctrine_paginator.distinct';
+
+    /**
+     * Walks down a SelectStatement AST node, modifying it to retrieve a COUNT
+     *
+     * @param SelectStatement $AST
+     * @return void
+     */
+    public function walkSelectStatement(SelectStatement $AST)
+    {
+        $rootComponents = array();
+        foreach ($this->_getQueryComponents() AS $dqlAlias => $qComp) {
+            $isParent = array_key_exists('parent', $qComp)
+                && $qComp['parent'] === null
+                && $qComp['nestingLevel'] == 0
+            ;
+            if ($isParent) {
+                $rootComponents[] = array($dqlAlias => $qComp);
+            }
+        }
+        if (count($rootComponents) > 1) {
+            throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction");
+        }
+        $root = reset($rootComponents);
+        $parentName = key($root);
+        $parent = current($root);
+
+        $pathExpression = new PathExpression(
+            PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $parentName,
+            $parent['metadata']->getSingleIdentifierFieldName()
+        );
+        $pathExpression->type = PathExpression::TYPE_STATE_FIELD;
+
+        $distinct = $this->_getQuery()->getHint(self::HINT_DISTINCT);
+        $AST->selectClause->selectExpressions = array(
+            new SelectExpression(
+                new AggregateExpression('count', $pathExpression, $distinct), null
+            )
+        );
+
+        // ORDER BY is not needed, only increases query execution through unnecessary sorting.
+        $AST->orderByClause = null;
+    }
+}
+
diff --git a/src/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php b/src/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php
new file mode 100644
index 0000000000..97ed5ba814
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php
@@ -0,0 +1,115 @@
+
+ * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
+ * @license     http://hobodave.com/license.txt New BSD License
+ */
+
+namespace Doctrine\ORM\Tools\Pagination;
+
+use Doctrine\DBAL\Types\Type,
+    Doctrine\ORM\Query\TreeWalkerAdapter,
+    Doctrine\ORM\Query\AST\SelectStatement,
+    Doctrine\ORM\Query\AST\SelectExpression,
+    Doctrine\ORM\Query\AST\PathExpression,
+    Doctrine\ORM\Query\AST\AggregateExpression;
+
+/**
+ * Replaces the selectClause of the AST with a SELECT DISTINCT root.id equivalent
+ *
+ * @category    DoctrineExtensions
+ * @package     DoctrineExtensions\Paginate
+ * @author      David Abdemoulaie 
+ * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
+ * @license     http://hobodave.com/license.txt New BSD License
+ */
+class LimitSubqueryWalker extends TreeWalkerAdapter
+{
+    /**
+     * ID type hint
+     */
+    const IDENTIFIER_TYPE = 'doctrine_paginator.id.type';
+
+    /**
+     * @var int Counter for generating unique order column aliases
+     */
+    private $_aliasCounter = 0;
+
+    /**
+     * Walks down a SelectStatement AST node, modifying it to retrieve DISTINCT ids
+     * of the root Entity
+     *
+     * @param SelectStatement $AST
+     * @return void
+     */
+    public function walkSelectStatement(SelectStatement $AST)
+    {
+        $parent = null;
+        $parentName = null;
+        $selectExpressions = array();
+
+        foreach ($this->_getQueryComponents() AS $dqlAlias => $qComp) {
+            // preserve mixed data in query for ordering
+            if (isset($qComp['resultVariable'])) {
+                $selectExpressions[] = new SelectExpression($qComp['resultVariable'], $dqlAlias);
+                continue;
+            }
+
+            if ($qComp['parent'] === null && $qComp['nestingLevel'] == 0) {
+                $parent = $qComp;
+                $parentName = $dqlAlias;
+                continue;
+            }
+        }
+
+        $identifier = $parent['metadata']->getSingleIdentifierFieldName();
+        $this->_getQuery()->setHint(
+            self::IDENTIFIER_TYPE,
+            Type::getType($parent['metadata']->getTypeOfField($identifier))
+        );
+
+        $pathExpression = new PathExpression(
+            PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION,
+            $parentName,
+            $identifier
+        );
+        $pathExpression->type = PathExpression::TYPE_STATE_FIELD;
+
+        array_unshift($selectExpressions, new SelectExpression($pathExpression, '_dctrn_id'));
+        $AST->selectClause->selectExpressions = $selectExpressions;
+
+        if (isset($AST->orderByClause)) {
+            foreach ($AST->orderByClause->orderByItems as $item) {
+                if ($item->expression instanceof PathExpression) {
+                    $pathExpression = new PathExpression(
+                        PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION,
+                        $item->expression->identificationVariable,
+                        $item->expression->field
+                    );
+                    $pathExpression->type = PathExpression::TYPE_STATE_FIELD;
+                    $AST->selectClause->selectExpressions[] = new SelectExpression(
+                        $pathExpression,
+                    	'_dctrn_ord' . $this->_aliasCounter++
+                    );
+                }
+            }
+        }
+
+        $AST->selectClause->isDistinct = true;
+    }
+
+}
+
+
+
diff --git a/src/lib/Doctrine/ORM/Tools/Pagination/Paginator.php b/src/lib/Doctrine/ORM/Tools/Pagination/Paginator.php
new file mode 100644
index 0000000000..760d7de131
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Tools/Pagination/Paginator.php
@@ -0,0 +1,180 @@
+.
+ */
+
+namespace Doctrine\ORM\Tools\Pagination;
+
+use Doctrine\ORM\QueryBuilder;
+use Doctrine\ORM\Query;
+use Doctrine\ORM\NoResultException;
+use Doctrine\ORM\Tools\Pagination\WhereInWalker;
+use Doctrine\ORM\Tools\Pagination\CountWalker;
+use Countable;
+use IteratorAggregate;
+use ArrayIterator;
+
+/**
+ * Paginator
+ *
+ * The paginator can handle various complex scenarios with DQL.
+ *
+ * @author Pablo Díez 
+ * @author Benjamin Eberlei 
+ * @license New BSD
+ */
+class Paginator implements \Countable, \IteratorAggregate
+{
+    /**
+     * @var Query
+     */
+    private $query;
+
+    /**
+     * @var bool
+     */
+    private $fetchJoinCollection;
+
+    /**
+     * @var int
+     */
+    private $count;
+
+    /**
+     * Constructor.
+     *
+     * @param Query|QueryBuilder $query A Doctrine ORM query or query builder.
+     * @param Boolean $fetchJoinCollection Whether the query joins a collection (true by default).
+     */
+    public function __construct($query, $fetchJoinCollection = true)
+    {
+        if ($query instanceof QueryBuilder) {
+            $query = $query->getQuery();
+        }
+
+        $this->query = $query;
+        $this->fetchJoinCollection = (Boolean) $fetchJoinCollection;
+    }
+
+    /**
+     * Returns the query
+     *
+     * @return Query
+     */
+    public function getQuery()
+    {
+        return $this->query;
+    }
+
+    /**
+     * Returns whether the query joins a collection.
+     *
+     * @return Boolean Whether the query joins a collection.
+     */
+    public function getFetchJoinCollection()
+    {
+        return $this->fetchJoinCollection;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function count()
+    {
+        if ($this->count === null) {
+            /* @var $countQuery Query */
+            $countQuery = $this->cloneQuery($this->query);
+
+            if ( ! $countQuery->getHint(CountWalker::HINT_DISTINCT)) {
+                $countQuery->setHint(CountWalker::HINT_DISTINCT, true);
+            }
+
+            $countQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('Doctrine\ORM\Tools\Pagination\CountWalker'));
+            $countQuery->setFirstResult(null)->setMaxResults(null);
+
+            try {
+                $data =  $countQuery->getScalarResult();
+                $data = array_map('current', $data);
+                $this->count = array_sum($data);
+            } catch(NoResultException $e) {
+                $this->count = 0;
+            }
+        }
+        return $this->count;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getIterator()
+    {
+        $offset = $this->query->getFirstResult();
+        $length = $this->query->getMaxResults();
+
+        if ($this->fetchJoinCollection) {
+            $subQuery = $this->cloneQuery($this->query);
+            $subQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('Doctrine\ORM\Tools\Pagination\LimitSubqueryWalker'))
+                ->setFirstResult($offset)
+                ->setMaxResults($length);
+
+            $ids = array_map('current', $subQuery->getScalarResult());
+
+            $whereInQuery = $this->cloneQuery($this->query);
+            // don't do this for an empty id array
+            if (count($ids) > 0) {
+                $namespace = WhereInWalker::PAGINATOR_ID_ALIAS;
+
+                $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('Doctrine\ORM\Tools\Pagination\WhereInWalker'));
+                $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, count($ids));
+                $whereInQuery->setFirstResult(null)->setMaxResults(null);
+                foreach ($ids as $i => $id) {
+                    $i++;
+                    $whereInQuery->setParameter("{$namespace}_{$i}", $id);
+                }
+            }
+
+            $result = $whereInQuery->getResult($this->query->getHydrationMode());
+        } else {
+            $result = $this->cloneQuery($this->query)
+                ->setMaxResults($length)
+                ->setFirstResult($offset)
+                ->getResult($this->query->getHydrationMode())
+            ;
+        }
+        return new \ArrayIterator($result);
+    }
+
+    /**
+     * Clones a query.
+     *
+     * @param Query $query The query.
+     *
+     * @return Query The cloned query.
+     */
+    private function cloneQuery(Query $query)
+    {
+        /* @var $cloneQuery Query */
+        $cloneQuery = clone $query;
+        $cloneQuery->setParameters($query->getParameters());
+        foreach ($query->getHints() as $name => $value) {
+            $cloneQuery->setHint($name, $value);
+        }
+
+        return $cloneQuery;
+    }
+}
+
diff --git a/src/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php b/src/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php
new file mode 100644
index 0000000000..5400ef2472
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php
@@ -0,0 +1,142 @@
+
+ * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
+ * @license     http://hobodave.com/license.txt New BSD License
+ */
+
+namespace Doctrine\ORM\Tools\Pagination;
+
+use Doctrine\ORM\Query\AST\ArithmeticExpression,
+    Doctrine\ORM\Query\AST\SimpleArithmeticExpression,
+    Doctrine\ORM\Query\TreeWalkerAdapter,
+    Doctrine\ORM\Query\AST\SelectStatement,
+    Doctrine\ORM\Query\AST\PathExpression,
+    Doctrine\ORM\Query\AST\InExpression,
+    Doctrine\ORM\Query\AST\NullComparisonExpression,
+    Doctrine\ORM\Query\AST\InputParameter,
+    Doctrine\ORM\Query\AST\ConditionalPrimary,
+    Doctrine\ORM\Query\AST\ConditionalTerm,
+    Doctrine\ORM\Query\AST\ConditionalExpression,
+    Doctrine\ORM\Query\AST\ConditionalFactor,
+    Doctrine\ORM\Query\AST\WhereClause;
+
+/**
+ * Replaces the whereClause of the AST with a WHERE id IN (:foo_1, :foo_2) equivalent
+ *
+ * @category    DoctrineExtensions
+ * @package     DoctrineExtensions\Paginate
+ * @author      David Abdemoulaie 
+ * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
+ * @license     http://hobodave.com/license.txt New BSD License
+ */
+class WhereInWalker extends TreeWalkerAdapter
+{
+    /**
+     * ID Count hint name
+     */
+    const HINT_PAGINATOR_ID_COUNT = 'doctrine.id.count';
+
+    /**
+     * Primary key alias for query
+     */
+    const PAGINATOR_ID_ALIAS = 'dpid';
+
+    /**
+     * Replaces the whereClause in the AST
+     *
+     * Generates a clause equivalent to WHERE IN (:dpid_1, :dpid_2, ...)
+     *
+     * The parameter namespace (dpid) is defined by
+     * the PAGINATOR_ID_ALIAS
+     *
+     * The total number of parameters is retrieved from
+     * the HINT_PAGINATOR_ID_COUNT query hint
+     *
+     * @param  SelectStatement $AST
+     * @return void
+     */
+    public function walkSelectStatement(SelectStatement $AST)
+    {
+        $rootComponents = array();
+        foreach ($this->_getQueryComponents() AS $dqlAlias => $qComp) {
+            $isParent = array_key_exists('parent', $qComp)
+                && $qComp['parent'] === null
+                && $qComp['nestingLevel'] == 0
+            ;
+            if ($isParent) {
+                $rootComponents[] = array($dqlAlias => $qComp);
+            }
+        }
+        if (count($rootComponents) > 1) {
+            throw new \RuntimeException("Cannot count query which selects two FROM components, cannot make distinction");
+        }
+        $root = reset($rootComponents);
+        $parentName = key($root);
+        $parent = current($root);
+
+        $pathExpression = new PathExpression(
+            PathExpression::TYPE_STATE_FIELD, $parentName, $parent['metadata']->getSingleIdentifierFieldName()
+        );
+        $pathExpression->type = PathExpression::TYPE_STATE_FIELD;
+
+        $count = $this->_getQuery()->getHint(self::HINT_PAGINATOR_ID_COUNT);
+
+        if ($count > 0) {
+            $arithmeticExpression = new ArithmeticExpression();
+            $arithmeticExpression->simpleArithmeticExpression = new SimpleArithmeticExpression(
+                array($pathExpression)
+            );
+            $expression = new InExpression($arithmeticExpression);
+            $ns = self::PAGINATOR_ID_ALIAS;
+
+            for ($i = 1; $i <= $count; $i++) {
+                $expression->literals[] = new InputParameter(":{$ns}_$i");
+            }
+        } else {
+            $expression = new NullComparisonExpression($pathExpression);
+            $expression->not = false;
+        }
+
+        $conditionalPrimary = new ConditionalPrimary;
+        $conditionalPrimary->simpleConditionalExpression = $expression;
+        if ($AST->whereClause) {
+            if ($AST->whereClause->conditionalExpression instanceof ConditionalTerm) {
+                $AST->whereClause->conditionalExpression->conditionalFactors[] = $conditionalPrimary;
+            } elseif ($AST->whereClause->conditionalExpression instanceof ConditionalPrimary) {
+                $AST->whereClause->conditionalExpression = new ConditionalExpression(array(
+                    new ConditionalTerm(array(
+                        $AST->whereClause->conditionalExpression,
+                        $conditionalPrimary
+                    ))
+                ));
+            } elseif ($AST->whereClause->conditionalExpression instanceof ConditionalExpression) {
+                $tmpPrimary = new ConditionalPrimary;
+                $tmpPrimary->conditionalExpression = $AST->whereClause->conditionalExpression;
+                $AST->whereClause->conditionalExpression = new ConditionalTerm(array(
+                    $tmpPrimary,
+                    $conditionalPrimary
+                ));
+            }
+        } else {
+            $AST->whereClause = new WhereClause(
+                new ConditionalExpression(array(
+                    new ConditionalTerm(array(
+                        $conditionalPrimary
+                    ))
+                ))
+            );
+        }
+    }
+}
+
diff --git a/src/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php b/src/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php
new file mode 100644
index 0000000000..621214fddf
--- /dev/null
+++ b/src/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php
@@ -0,0 +1,94 @@
+.
+ */
+
+namespace Doctrine\ORM\Tools;
+
+use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
+use Doctrine\ORM\Mapping\ClassMetadata;
+
+/**
+ * ResolveTargetEntityListener
+ *
+ * Mechanism to overwrite interfaces or classes specified as association
+ * targets.
+ *
+ * @author Benjamin Eberlei 
+ * @since 2.2
+ */
+class ResolveTargetEntityListener
+{
+    /**
+     * @var array
+     */
+    private $resolveTargetEntities = array();
+
+    /**
+     * Add a target-entity class name to resolve to a new class name.
+     *
+     * @param string $originalEntity
+     * @param string $newEntity
+     * @param array $mapping
+     * @return void
+     */
+    public function addResolveTargetEntity($originalEntity, $newEntity, array $mapping)
+    {
+        $mapping['targetEntity'] = ltrim($newEntity, "\\");
+        $this->resolveTargetEntities[ltrim($originalEntity, "\\")] = $mapping;
+    }
+
+    /**
+     * Process event and resolve new target entity names.
+     *
+     * @param LoadClassMetadataEventArgs $args
+     * @return void
+     */
+    public function loadClassMetadata(LoadClassMetadataEventArgs $args)
+    {
+        $cm = $args->getClassMetadata();
+        foreach ($cm->associationMappings as $assocName => $mapping) {
+            if (isset($this->resolveTargetEntities[$mapping['targetEntity']])) {
+                $this->remapAssociation($cm, $mapping);
+            }
+        }
+    }
+
+    private function remapAssociation($classMetadata, $mapping)
+    {
+        $newMapping = $this->resolveTargetEntities[$mapping['targetEntity']];
+        $newMapping = array_replace_recursive($mapping, $newMapping);
+        $newMapping['fieldName'] = $mapping['fieldName'];
+        unset($classMetadata->associationMappings[$mapping['fieldName']]);
+
+        switch ($mapping['type']) {
+            case ClassMetadata::MANY_TO_MANY:
+                $classMetadata->mapManyToMany($newMapping);
+                break;
+            case ClassMetadata::MANY_TO_ONE:
+                $classMetadata->mapManyToOne($newMapping);
+                break;
+            case ClassMetadata::ONE_TO_MANY:
+                $classMetadata->mapOneToMany($newMapping);
+                break;
+            case ClassMetadata::ONE_TO_ONE:
+                $classMetadata->mapOneToOne($newMapping);
+                break;
+        }
+    }
+}
+
diff --git a/src/lib/Doctrine/ORM/Tools/SchemaTool.php b/src/lib/Doctrine/ORM/Tools/SchemaTool.php
index d38f5d159a..efe7f7b7cc 100644
--- a/src/lib/Doctrine/ORM/Tools/SchemaTool.php
+++ b/src/lib/Doctrine/ORM/Tools/SchemaTool.php
@@ -21,6 +21,8 @@
 
 use Doctrine\ORM\ORMException,
     Doctrine\DBAL\Types\Type,
+    Doctrine\DBAL\Schema\Schema,
+    Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets,
     Doctrine\ORM\EntityManager,
     Doctrine\ORM\Mapping\ClassMetadata,
     Doctrine\ORM\Internal\CommitOrderCalculator,
@@ -56,7 +58,7 @@ class SchemaTool
      * Initializes a new SchemaTool instance that uses the connection of the
      * provided EntityManager.
      *
-     * @param Doctrine\ORM\EntityManager $em
+     * @param \Doctrine\ORM\EntityManager $em
      */
     public function __construct(EntityManager $em)
     {
@@ -67,7 +69,9 @@ public function __construct(EntityManager $em)
     /**
      * Creates the database schema for the given array of ClassMetadata instances.
      *
+     * @throws ToolsException
      * @param array $classes
+     * @return void
      */
     public function createSchema(array $classes)
     {
@@ -75,7 +79,11 @@ public function createSchema(array $classes)
         $conn = $this->_em->getConnection();
 
         foreach ($createSchemaSql as $sql) {
-            $conn->executeQuery($sql);
+            try {
+                $conn->executeQuery($sql);
+            } catch(\Exception $e) {
+                throw ToolsException::schemaToolFailure($sql, $e);
+            }
         }
     }
 
@@ -94,7 +102,7 @@ public function getCreateSchemaSql(array $classes)
 
     /**
      * Some instances of ClassMetadata don't need to be processed in the SchemaTool context. This method detects them.
-     * 
+     *
      * @param ClassMetadata $class
      * @param array $processedClasses
      * @return bool
@@ -121,7 +129,7 @@ public function getSchemaFromMetadata(array $classes)
         $sm = $this->_em->getConnection()->getSchemaManager();
         $metadataSchemaConfig = $sm->createSchemaConfig();
         $metadataSchemaConfig->setExplicitForeignKeyIndexes(false);
-        $schema = new \Doctrine\DBAL\Schema\Schema(array(), array(), $metadataSchemaConfig);
+        $schema = new Schema(array(), array(), $metadataSchemaConfig);
 
         $evm = $this->_em->getEventManager();
 
@@ -139,7 +147,7 @@ public function getSchemaFromMetadata(array $classes)
                 $this->_gatherRelationsSql($class, $table, $schema);
 
                 // Add the discriminator column
-                $discrColumnDef = $this->_getDiscriminatorColumnDefinition($class, $table);
+                $this->addDiscriminatorColumnDefinition($class, $table);
 
                 // Aggregate all the information from all classes in the hierarchy
                 foreach ($class->parentClasses as $parentClassName) {
@@ -171,10 +179,10 @@ public function getSchemaFromMetadata(array $classes)
 
                 // Add the discriminator column only to the root table
                 if ($class->name == $class->rootEntityName) {
-                    $discrColumnDef = $this->_getDiscriminatorColumnDefinition($class, $table);
+                    $this->addDiscriminatorColumnDefinition($class, $table);
                 } else {
                     // Add an ID FK column to child tables
-                    /* @var Doctrine\ORM\Mapping\ClassMetadata $class */
+                    /* @var \Doctrine\ORM\Mapping\ClassMetadata $class */
                     $idMapping = $class->fieldMappings[$class->identifier[0]];
                     $this->_gatherColumn($class, $idMapping, $table);
                     $columnName = $class->getQuotedColumnName($class->identifier[0], $this->_platform);
@@ -217,13 +225,13 @@ public function getSchemaFromMetadata(array $classes)
 
             if (isset($class->table['indexes'])) {
                 foreach ($class->table['indexes'] AS $indexName => $indexData) {
-                    $table->addIndex($indexData['columns'], $indexName);
+                    $table->addIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName);
                 }
             }
 
             if (isset($class->table['uniqueConstraints'])) {
                 foreach ($class->table['uniqueConstraints'] AS $indexName => $indexData) {
-                    $table->addUniqueIndex($indexData['columns'], $indexName);
+                    $table->addUniqueIndex($indexData['columns'], is_numeric($indexName) ? null : $indexName);
                 }
             }
 
@@ -246,6 +254,10 @@ public function getSchemaFromMetadata(array $classes)
             }
         }
 
+        if ( ! $this->_platform->supportsSchemas() && ! $this->_platform->canEmulateSchemas() ) {
+            $schema->visit(new RemoveNamespacedAssets());
+        }
+
         if ($evm->hasListeners(ToolEvents::postGenerateSchema)) {
             $evm->dispatchEvent(ToolEvents::postGenerateSchema, new GenerateSchemaEventArgs($this->_em, $schema));
         }
@@ -261,7 +273,7 @@ public function getSchemaFromMetadata(array $classes)
      * @return array The portable column definition of the discriminator column as required by
      *              the DBAL.
      */
-    private function _getDiscriminatorColumnDefinition($class, $table)
+    private function addDiscriminatorColumnDefinition($class, $table)
     {
         $discrColumn = $class->discriminatorColumn;
 
@@ -354,6 +366,10 @@ private function _gatherColumn($class, array $mapping, $table)
             $options['columnDefinition'] = $mapping['columnDefinition'];
         }
 
+        if (isset($mapping['options'])) {
+            $options['customSchemaOptions'] = $mapping['options'];
+        }
+
         if ($class->isIdGeneratorIdentity() && $class->getIdentifierFieldNames() == array($mapping['fieldName'])) {
             $options['autoincrement'] = true;
         }
@@ -523,10 +539,6 @@ private function _gatherRelationJoinColumns($joinColumns, $theJoinTable, $class,
                 $uniqueConstraints[] = array('columns' => array($columnName));
             }
 
-            if (isset($joinColumn['onUpdate'])) {
-                $fkOptions['onUpdate'] = $joinColumn['onUpdate'];
-            }
-
             if (isset($joinColumn['onDelete'])) {
                 $fkOptions['onDelete'] = $joinColumn['onDelete'];
             }
@@ -555,7 +567,7 @@ public function dropSchema(array $classes)
             try {
                 $conn->executeQuery($sql);
             } catch(\Exception $e) {
-                
+
             }
         }
     }
@@ -593,7 +605,7 @@ public function getDropDatabaseSQL()
 
     /**
      * Get SQL to drop the tables defined by the passed classes.
-     * 
+     *
      * @param array $classes
      * @return array
      */
@@ -619,7 +631,7 @@ public function getDropSchemaSQL(array $classes)
                 }
             }
         }
-        
+
         if ($this->_platform->supportsSequences()) {
             foreach ($schema->getSequences() AS $sequence) {
                 $visitor->acceptSequence($sequence);
@@ -663,7 +675,7 @@ public function updateSchema(array $classes, $saveMode=false)
     /**
      * Gets the sequence of SQL statements that need to be performed in order
      * to bring the given class mappings in-synch with the relational schema.
-     * If $saveMode is set to true the command is executed in the Database, 
+     * If $saveMode is set to true the command is executed in the Database,
      * else SQL is returned.
      *
      * @param array $classes The classes to consider.
diff --git a/src/lib/Doctrine/ORM/Tools/SchemaValidator.php b/src/lib/Doctrine/ORM/Tools/SchemaValidator.php
index 8acaa0b54c..453679df15 100644
--- a/src/lib/Doctrine/ORM/Tools/SchemaValidator.php
+++ b/src/lib/Doctrine/ORM/Tools/SchemaValidator.php
@@ -21,6 +21,7 @@
 
 use Doctrine\ORM\EntityManager;
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
+use Doctrine\DBAL\Types\Type;
 
 /**
  * Performs strict validation of the mapping schema
@@ -28,7 +29,6 @@
  * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
  * @link        www.doctrine-project.com
  * @since       1.0
- * @version     $Revision$
  * @author      Benjamin Eberlei 
  * @author      Guilherme Blanco 
  * @author      Jonathan Wage 
@@ -50,7 +50,7 @@ public function __construct(EntityManager $em)
     }
 
     /**
-     * Checks the internal consistency of mapping files.
+     * Checks the internal consistency of all mapping files.
      *
      * There are several checks that can't be done at runtime or are too expensive, which can be verified
      * with this command. For example:
@@ -69,139 +69,185 @@ public function validateMapping()
         $classes = $cmf->getAllMetadata();
 
         foreach ($classes AS $class) {
-            $ce = array();
-            /* @var $class ClassMetadata */
-            foreach ($class->associationMappings AS $fieldName => $assoc) {
-                if (!$cmf->hasMetadataFor($assoc['targetEntity'])) {
-                    $ce[] = "The target entity '" . $assoc['targetEntity'] . "' specified on " . $class->name . '#' . $fieldName . ' is unknown.';
+            if ($ce = $this->validateClass($class)) {
+                $errors[$class->name] = $ce;
+            }
+        }
+
+        return $errors;
+    }
+
+    /**
+     * Validate a single class of the current
+     *
+     * @param ClassMetadataInfo $class
+     * @return array
+     */
+    public function validateClass(ClassMetadataInfo $class)
+    {
+        $ce = array();
+        $cmf = $this->em->getMetadataFactory();
+
+        foreach ($class->fieldMappings as $fieldName => $mapping) {
+            if (!Type::hasType($mapping['type'])) {
+                $ce[] = "The field '" . $class->name . "#" . $fieldName."' uses a non-existant type '" . $mapping['type'] . "'.";
+            }
+        }
+
+        foreach ($class->associationMappings AS $fieldName => $assoc) {
+            if (!class_exists($assoc['targetEntity']) || $cmf->isTransient($assoc['targetEntity'])) {
+                $ce[] = "The target entity '" . $assoc['targetEntity'] . "' specified on " . $class->name . '#' . $fieldName . ' is unknown or not an entity.';
+                return $ce;
+            }
+
+            if ($assoc['mappedBy'] && $assoc['inversedBy']) {
+                $ce[] = "The association " . $class . "#" . $fieldName . " cannot be defined as both inverse and owning.";
+            }
+
+            $targetMetadata = $cmf->getMetadataFor($assoc['targetEntity']);
+
+            if (isset($assoc['id']) && $targetMetadata->containsForeignIdentifier) {
+                $ce[] = "Cannot map association '" . $class->name. "#". $fieldName ." as identifier, because " .
+                        "the target entity '". $targetMetadata->name . "' also maps an association as identifier.";
+            }
+
+            /* @var $assoc AssociationMapping */
+            if ($assoc['mappedBy']) {
+                if ($targetMetadata->hasField($assoc['mappedBy'])) {
+                    $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ".
+                            "field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which is not defined as association.";
                 }
+                if (!$targetMetadata->hasAssociation($assoc['mappedBy'])) {
+                    $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ".
+                            "field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which does not exist.";
+                } else if ($targetMetadata->associationMappings[$assoc['mappedBy']]['inversedBy'] == null) {
+                    $ce[] = "The field " . $class->name . "#" . $fieldName . " is on the inverse side of a ".
+                            "bi-directional relationship, but the specified mappedBy association on the target-entity ".
+                            $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " does not contain the required ".
+                            "'inversedBy=".$fieldName."' attribute.";
+                } else  if ($targetMetadata->associationMappings[$assoc['mappedBy']]['inversedBy'] != $fieldName) {
+                    $ce[] = "The mappings " . $class->name . "#" . $fieldName . " and " .
+                            $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " are ".
+                            "incosistent with each other.";
+                }
+            }
 
-                if ($assoc['mappedBy'] && $assoc['inversedBy']) {
-                    $ce[] = "The association " . $class . "#" . $fieldName . " cannot be defined as both inverse and owning.";
+            if ($assoc['inversedBy']) {
+                if ($targetMetadata->hasField($assoc['inversedBy'])) {
+                    $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the inverse side ".
+                            "field " . $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " which is not defined as association.";
+                }
+                if (!$targetMetadata->hasAssociation($assoc['inversedBy'])) {
+                    $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the inverse side ".
+                            "field " . $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " which does not exist.";
+                } else if ($targetMetadata->associationMappings[$assoc['inversedBy']]['mappedBy'] == null) {
+                    $ce[] = "The field " . $class->name . "#" . $fieldName . " is on the owning side of a ".
+                            "bi-directional relationship, but the specified mappedBy association on the target-entity ".
+                            $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " does not contain the required ".
+                            "'inversedBy' attribute.";
+                } else  if ($targetMetadata->associationMappings[$assoc['inversedBy']]['mappedBy'] != $fieldName) {
+                    $ce[] = "The mappings " . $class->name . "#" . $fieldName . " and " .
+                            $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " are ".
+                            "incosistent with each other.";
                 }
 
-                $targetMetadata = $cmf->getMetadataFor($assoc['targetEntity']);
+                // Verify inverse side/owning side match each other
+                $targetAssoc = $targetMetadata->associationMappings[$assoc['inversedBy']];
+                if ($assoc['type'] == ClassMetadataInfo::ONE_TO_ONE && $targetAssoc['type'] !== ClassMetadataInfo::ONE_TO_ONE){
+                    $ce[] = "If association " . $class->name . "#" . $fieldName . " is one-to-one, then the inversed " .
+                            "side " . $targetMetadata->name . "#" . $assoc['inversedBy'] . " has to be one-to-one as well.";
+                } else if ($assoc['type'] == ClassMetadataInfo::MANY_TO_ONE && $targetAssoc['type'] !== ClassMetadataInfo::ONE_TO_MANY){
+                    $ce[] = "If association " . $class->name . "#" . $fieldName . " is many-to-one, then the inversed " .
+                            "side " . $targetMetadata->name . "#" . $assoc['inversedBy'] . " has to be one-to-many.";
+                } else if ($assoc['type'] == ClassMetadataInfo::MANY_TO_MANY && $targetAssoc['type'] !== ClassMetadataInfo::MANY_TO_MANY){
+                    $ce[] = "If association " . $class->name . "#" . $fieldName . " is many-to-many, then the inversed " .
+                            "side " . $targetMetadata->name . "#" . $assoc['inversedBy'] . " has to be many-to-many as well.";
+                }
+            }
 
-                /* @var $assoc AssociationMapping */
-                if ($assoc['mappedBy']) {
-                    if ($targetMetadata->hasField($assoc['mappedBy'])) {
-                        $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ".
-                                "field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which is not defined as association.";
+            if ($assoc['isOwningSide']) {
+                if ($assoc['type'] == ClassMetadataInfo::MANY_TO_MANY) {
+                    $identifierColumns = $class->getIdentifierColumnNames();
+                    foreach ($assoc['joinTable']['joinColumns'] AS $joinColumn) {
+                        if (!in_array($joinColumn['referencedColumnName'], $identifierColumns)) {
+                            $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " .
+                                "has to be a primary key column on the target entity class '".$class->name."'.";
+                            break;
+                        }
                     }
-                    if (!$targetMetadata->hasAssociation($assoc['mappedBy'])) {
-                        $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ".
-                                "field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which does not exist.";
-                    } else if ($targetMetadata->associationMappings[$assoc['mappedBy']]['inversedBy'] == null) {
-                        $ce[] = "The field " . $class->name . "#" . $fieldName . " is on the inverse side of a ".
-                                "bi-directional relationship, but the specified mappedBy association on the target-entity ".
-                                $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " does not contain the required ".
-                                "'inversedBy' attribute.";
-                    } else  if ($targetMetadata->associationMappings[$assoc['mappedBy']]['inversedBy'] != $fieldName) {
-                        $ce[] = "The mappings " . $class->name . "#" . $fieldName . " and " .
-                                $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " are ".
-                                "incosistent with each other.";
+
+                    $identifierColumns = $targetMetadata->getIdentifierColumnNames();
+                    foreach ($assoc['joinTable']['inverseJoinColumns'] AS $inverseJoinColumn) {
+                        if (!in_array($inverseJoinColumn['referencedColumnName'], $identifierColumns)) {
+                            $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " .
+                                "has to be a primary key column on the target entity class '".$targetMetadata->name."'.";
+                            break;
+                        }
                     }
-                }
 
-                if ($assoc['inversedBy']) {
-                    if ($targetMetadata->hasField($assoc['inversedBy'])) {
-                        $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the inverse side ".
-                                "field " . $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " which is not defined as association.";
+                    if (count($targetMetadata->getIdentifierColumnNames()) != count($assoc['joinTable']['inverseJoinColumns'])) {
+                        $ce[] = "The inverse join columns of the many-to-many table '" . $assoc['joinTable']['name'] . "' " .
+                                "have to contain to ALL identifier columns of the target entity '". $targetMetadata->name . "', " .
+                                "however '" . implode(", ", array_diff($targetMetadata->getIdentifierColumnNames(), array_values($assoc['relationToTargetKeyColumns']))) .
+                                "' are missing.";
                     }
-                    if (!$targetMetadata->hasAssociation($assoc['inversedBy'])) {
-                        $ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the inverse side ".
-                                "field " . $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " which does not exist.";
-                    } else if ($targetMetadata->associationMappings[$assoc['inversedBy']]['mappedBy'] == null) {
-                        $ce[] = "The field " . $class->name . "#" . $fieldName . " is on the owning side of a ".
-                                "bi-directional relationship, but the specified mappedBy association on the target-entity ".
-                                $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " does not contain the required ".
-                                "'inversedBy' attribute.";
-                    } else  if ($targetMetadata->associationMappings[$assoc['inversedBy']]['mappedBy'] != $fieldName) {
-                        $ce[] = "The mappings " . $class->name . "#" . $fieldName . " and " .
-                                $assoc['targetEntity'] . "#" . $assoc['inversedBy'] . " are ".
-                                "incosistent with each other.";
+
+                    if (count($class->getIdentifierColumnNames()) != count($assoc['joinTable']['joinColumns'])) {
+                        $ce[] = "The join columns of the many-to-many table '" . $assoc['joinTable']['name'] . "' " .
+                                "have to contain to ALL identifier columns of the source entity '". $class->name . "', " .
+                                "however '" . implode(", ", array_diff($class->getIdentifierColumnNames(), array_values($assoc['relationToSourceKeyColumns']))) .
+                                "' are missing.";
                     }
-                }
 
-                if ($assoc['isOwningSide']) {
-                    if ($assoc['type'] == ClassMetadataInfo::MANY_TO_MANY) {
-                        foreach ($assoc['joinTable']['joinColumns'] AS $joinColumn) {
-                            if (!isset($class->fieldNames[$joinColumn['referencedColumnName']])) {
-                                $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' does not " .
-                                        "have a corresponding field with this column name on the class '" . $class->name . "'.";
-                                break;
-                            }
-
-                            $fieldName = $class->fieldNames[$joinColumn['referencedColumnName']];
-                            if (!in_array($fieldName, $class->identifier)) {
-                                $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " .
-                                        "has to be a primary key column.";
-                            }
-                        }
-                        foreach ($assoc['joinTable']['inverseJoinColumns'] AS $inverseJoinColumn) {
-                            $targetClass = $cmf->getMetadataFor($assoc['targetEntity']);
-                            if (!isset($targetClass->fieldNames[$inverseJoinColumn['referencedColumnName']])) {
-                                $ce[] = "The inverse referenced column name '" . $inverseJoinColumn['referencedColumnName'] . "' does not " .
-                                        "have a corresponding field with this column name on the class '" . $targetClass->name . "'.";
-                                break;
-                            }
-
-                            $fieldName = $targetClass->fieldNames[$inverseJoinColumn['referencedColumnName']];
-                            if (!in_array($fieldName, $targetClass->identifier)) {
-                                $ce[] = "The referenced column name '" . $inverseJoinColumn['referencedColumnName'] . "' " .
-                                        "has to be a primary key column.";
-                            }
-                        }
-                    } else if ($assoc['type'] & ClassMetadataInfo::TO_ONE) {
-                        foreach ($assoc['joinColumns'] AS $joinColumn) {
-                            $targetClass = $cmf->getMetadataFor($assoc['targetEntity']);
-                            if (!isset($targetClass->fieldNames[$joinColumn['referencedColumnName']])) {
-                                $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' does not " .
-                                        "have a corresponding field with this column name on the class '" . $targetClass->name . "'.";
-                                break;
-                            }
-
-                            $fieldName = $targetClass->fieldNames[$joinColumn['referencedColumnName']];
-                            if (!in_array($fieldName, $targetClass->identifier)) {
-                                $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " .
-                                        "has to be a primary key column.";
-                            }
+                } else if ($assoc['type'] & ClassMetadataInfo::TO_ONE) {
+                    $identifierColumns = $targetMetadata->getIdentifierColumnNames();
+                    foreach ($assoc['joinColumns'] AS $joinColumn) {
+                        if (!in_array($joinColumn['referencedColumnName'], $identifierColumns)) {
+                            $ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " .
+                                    "has to be a primary key column on the target entity class '".$targetMetadata->name."'.";
                         }
                     }
-                }
 
-                if (isset($assoc['orderBy']) && $assoc['orderBy'] !== null) {
-                    $targetClass = $cmf->getMetadataFor($assoc['targetEntity']);
-                    foreach ($assoc['orderBy'] AS $orderField => $orientation) {
-                        if (!$targetClass->hasField($orderField)) {
-                            $ce[] = "The association " . $class->name."#".$fieldName." is ordered by a foreign field " .
-                                    $orderField . " that is not a field on the target entity " . $targetClass->name;
+                    if (count($identifierColumns) != count($assoc['joinColumns'])) {
+                        $ids = array();
+                        foreach ($assoc['joinColumns'] AS $joinColumn) {
+                            $ids[] = $joinColumn['name'];
                         }
+
+                        $ce[] = "The join columns of the association '" . $assoc['fieldName'] . "' " .
+                                "have to match to ALL identifier columns of the target entity '". $class->name . "', " .
+                                "however '" . implode(", ", array_diff($targetMetadata->getIdentifierColumnNames(), $ids)) .
+                                "' are missing.";
                     }
                 }
             }
 
-            foreach ($class->reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $publicAttr) {
-                if ($publicAttr->isStatic()) {
-                    continue;
+            if (isset($assoc['orderBy']) && $assoc['orderBy'] !== null) {
+                foreach ($assoc['orderBy'] AS $orderField => $orientation) {
+                    if (!$targetMetadata->hasField($orderField)) {
+                        $ce[] = "The association " . $class->name."#".$fieldName." is ordered by a foreign field " .
+                                $orderField . " that is not a field on the target entity " . $targetMetadata->name;
+                    }
                 }
-                $ce[] = "Field '".$publicAttr->getName()."' in class '".$class->name."' must be private ".
-                        "or protected. Public fields may break lazy-loading.";
             }
+        }
 
-            foreach ($class->subClasses AS $subClass) {
-                if (!in_array($class->name, class_parents($subClass))) {
-                    $ce[] = "According to the discriminator map class '" . $subClass . "' has to be a child ".
-                            "of '" . $class->name . "' but these entities are not related through inheritance.";
-                }
+        foreach ($class->reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $publicAttr) {
+            if ($publicAttr->isStatic()) {
+                continue;
             }
+            $ce[] = "Field '".$publicAttr->getName()."' in class '".$class->name."' must be private ".
+                    "or protected. Public fields may break lazy-loading.";
+        }
 
-            if ($ce) {
-                $errors[$class->name] = $ce;
+        foreach ($class->subClasses AS $subClass) {
+            if (!in_array($class->name, class_parents($subClass))) {
+                $ce[] = "According to the discriminator map class '" . $subClass . "' has to be a child ".
+                        "of '" . $class->name . "' but these entities are not related through inheritance.";
             }
         }
 
-        return $errors;
+        return $ce;
     }
 
     /**
@@ -214,6 +260,6 @@ public function schemaInSyncWithMetadata()
         $schemaTool = new SchemaTool($this->em);
 
         $allMetadata = $this->em->getMetadataFactory()->getAllMetadata();
-        return (count($schemaTool->getUpdateSchemaSql($allMetadata, false)) == 0);
+        return (count($schemaTool->getUpdateSchemaSql($allMetadata, true)) == 0);
     }
 }
diff --git a/src/lib/Doctrine/ORM/Tools/Setup.php b/src/lib/Doctrine/ORM/Tools/Setup.php
index 33bdbf53a9..c2550e2c78 100644
--- a/src/lib/Doctrine/ORM/Tools/Setup.php
+++ b/src/lib/Doctrine/ORM/Tools/Setup.php
@@ -28,7 +28,7 @@
 
 /**
  * Convenience class for setting up Doctrine from different installations and configurations.
- * 
+ *
  * @author Benjamin Eberlei 
  */
 class Setup
@@ -36,8 +36,8 @@ class Setup
     /**
      * Use this method to register all autoloaders for a setup where Doctrine is checked out from
      * its github repository at {@link http://github.com/doctrine/doctrine2}
-     * 
-     * @param string $gitCheckoutRootPath 
+     *
+     * @param string $gitCheckoutRootPath
      * @return void
      */
     static public function registerAutoloadGit($gitCheckoutRootPath)
@@ -45,24 +45,24 @@ static public function registerAutoloadGit($gitCheckoutRootPath)
         if (!class_exists('Doctrine\Common\ClassLoader', false)) {
             require_once $gitCheckoutRootPath . "/lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php";
         }
-        
+
         $loader = new ClassLoader("Doctrine\Common", $gitCheckoutRootPath . "/lib/vendor/doctrine-common/lib");
         $loader->register();
-        
+
         $loader = new ClassLoader("Doctrine\DBAL", $gitCheckoutRootPath . "/lib/vendor/doctrine-dbal/lib");
         $loader->register();
-        
+
         $loader = new ClassLoader("Doctrine\ORM", $gitCheckoutRootPath . "/lib");
         $loader->register();
-        
+
         $loader = new ClassLoader("Symfony\Component", $gitCheckoutRootPath . "/lib/vendor");
         $loader->register();
     }
-    
+
     /**
      * Use this method to register all autoloaders for a setup where Doctrine is installed
      * though {@link http://pear.doctrine-project.org}.
-     * 
+     *
      * @return void
      */
     static public function registerAutoloadPEAR()
@@ -70,12 +70,12 @@ static public function registerAutoloadPEAR()
         if (!class_exists('Doctrine\Common\ClassLoader', false)) {
             require_once "Doctrine/Common/ClassLoader.php";
         }
-        
+
         $loader = new ClassLoader("Doctrine");
         $loader->register();
-        
+
         $parts = explode(PATH_SEPARATOR, get_include_path());
-        
+
         foreach ($parts AS $includePath) {
             if ($includePath != "." && file_exists($includePath . "/Doctrine")) {
                 $loader = new ClassLoader("Symfony\Component", $includePath . "/Doctrine");
@@ -84,29 +84,29 @@ static public function registerAutoloadPEAR()
             }
         }
     }
-    
+
     /**
      * Use this method to register all autoloads for a downloaded Doctrine library.
      * Pick the directory the library was uncompressed into.
-     * 
-     * @param string $directory 
+     *
+     * @param string $directory
      */
     static public function registerAutoloadDirectory($directory)
     {
         if (!class_exists('Doctrine\Common\ClassLoader', false)) {
             require_once $directory . "/Doctrine/Common/ClassLoader.php";
         }
-        
-        $loader = new ClassLoader("Doctrine");
+
+        $loader = new ClassLoader("Doctrine", $directory);
         $loader->register();
-        
+
         $loader = new ClassLoader("Symfony\Component", $directory . "/Doctrine");
         $loader->register();
     }
-    
+
     /**
      * Create a configuration with an annotation metadata driver.
-     * 
+     *
      * @param array $paths
      * @param boolean $isDevMode
      * @param string $proxyDir
@@ -115,14 +115,14 @@ static public function registerAutoloadDirectory($directory)
      */
     static public function createAnnotationMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null)
     {
-        $config = self::createConfiguration($isDevMode, $cache, $proxyDir);
+        $config = self::createConfiguration($isDevMode, $proxyDir, $cache);
         $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver($paths));
         return $config;
     }
-    
+
     /**
-     * Create a configuration with an annotation metadata driver.
-     * 
+     * Create a configuration with a xml metadata driver.
+     *
      * @param array $paths
      * @param boolean $isDevMode
      * @param string $proxyDir
@@ -131,14 +131,14 @@ static public function createAnnotationMetadataConfiguration(array $paths, $isDe
      */
     static public function createXMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null)
     {
-        $config = self::createConfiguration($isDevMode, $cache, $proxyDir);
+        $config = self::createConfiguration($isDevMode, $proxyDir, $cache);
         $config->setMetadataDriverImpl(new XmlDriver($paths));
         return $config;
     }
-    
+
     /**
-     * Create a configuration with an annotation metadata driver.
-     * 
+     * Create a configuration with a yaml metadata driver.
+     *
      * @param array $paths
      * @param boolean $isDevMode
      * @param string $proxyDir
@@ -147,21 +147,22 @@ static public function createXMLMetadataConfiguration(array $paths, $isDevMode =
      */
     static public function createYAMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache $cache = null)
     {
-        $config = self::createConfiguration($isDevMode, $cache, $proxyDir);
+        $config = self::createConfiguration($isDevMode, $proxyDir, $cache);
         $config->setMetadataDriverImpl(new YamlDriver($paths));
         return $config;
     }
-    
+
     /**
      * Create a configuration without a metadata driver.
-     * 
+     *
      * @param bool $isDevMode
      * @param string $proxyDir
      * @param Cache $cache
-     * @return Configuration 
+     * @return Configuration
      */
     static public function createConfiguration($isDevMode = false, $proxyDir = null, Cache $cache = null)
     {
+        $proxyDir = $proxyDir ?: sys_get_temp_dir();
         if ($isDevMode === false && $cache === null) {
             if (extension_loaded('apc')) {
                 $cache = new \Doctrine\Common\Cache\ApcCache;
@@ -175,19 +176,19 @@ static public function createConfiguration($isDevMode = false, $proxyDir = null,
             } else {
                 $cache = new ArrayCache;
             }
-            $cache->setNamespace("dc2_"); // to avoid collisions
         } else if ($cache === null) {
             $cache = new ArrayCache;
         }
-        
+        $cache->setNamespace("dc2_" . md5($proxyDir) . "_"); // to avoid collisions
+
         $config = new Configuration();
         $config->setMetadataCacheImpl($cache);
         $config->setQueryCacheImpl($cache);
         $config->setResultCacheImpl($cache);
-        $config->setProxyDir( $proxyDir ?: sys_get_temp_dir() );
+        $config->setProxyDir( $proxyDir );
         $config->setProxyNamespace('DoctrineProxies');
         $config->setAutoGenerateProxyClasses($isDevMode);
-        
+
         return $config;
     }
 }
\ No newline at end of file
diff --git a/src/lib/Doctrine/ORM/Tools/ToolsException.php b/src/lib/Doctrine/ORM/Tools/ToolsException.php
index f7ed87105b..4551d87da5 100644
--- a/src/lib/Doctrine/ORM/Tools/ToolsException.php
+++ b/src/lib/Doctrine/ORM/Tools/ToolsException.php
@@ -1,11 +1,38 @@
 .
+ */
 
 namespace Doctrine\ORM\Tools;
 
 use Doctrine\ORM\ORMException;
 
+/**
+ * Tools related Exceptions
+ *
+ * @author Benjamin Eberlei 
+ */
 class ToolsException extends ORMException
 {
+    public static function schemaToolFailure($sql, \Exception $e)
+    {
+        return new self("Schema-Tool failed with Error '" . $e->getMessage() . "' while executing DDL: " . $sql, "0", $e);
+    }
+
     public static function couldNotMapDoctrine1Type($type)
     {
         return new self("Could not map doctrine 1 type '$type'!");
diff --git a/src/lib/Doctrine/ORM/UnitOfWork.php b/src/lib/Doctrine/ORM/UnitOfWork.php
index 2a2ec68c64..965c7d52e6 100644
--- a/src/lib/Doctrine/ORM/UnitOfWork.php
+++ b/src/lib/Doctrine/ORM/UnitOfWork.php
@@ -24,6 +24,7 @@
     Doctrine\Common\Collections\Collection,
     Doctrine\Common\NotifyPropertyChanged,
     Doctrine\Common\PropertyChangedListener,
+    Doctrine\Common\Persistence\ObjectManagerAware,
     Doctrine\ORM\Event\LifecycleEventArgs,
     Doctrine\ORM\Mapping\ClassMetadata,
     Doctrine\ORM\Proxy\Proxy;
@@ -116,7 +117,7 @@ class UnitOfWork implements PropertyChangedListener
      * Map of entities that are scheduled for dirty checking at commit time.
      * This is only used for entities with a change tracking policy of DEFERRED_EXPLICIT.
      * Keys are object ids (spl_object_hash).
-     * 
+     *
      * @var array
      * @todo rename: scheduledForSynchronization
      */
@@ -135,10 +136,10 @@ class UnitOfWork implements PropertyChangedListener
      * @var array
      */
     private $entityUpdates = array();
-    
+
     /**
      * Any pending extra updates that have been scheduled by persisters.
-     * 
+     *
      * @var array
      */
     private $extraUpdates = array();
@@ -176,7 +177,7 @@ class UnitOfWork implements PropertyChangedListener
     /**
      * The EntityManager that "owns" this UnitOfWork instance.
      *
-     * @var Doctrine\ORM\EntityManager
+     * @var \Doctrine\ORM\EntityManager
      */
     private $em;
 
@@ -184,7 +185,7 @@ class UnitOfWork implements PropertyChangedListener
      * The calculator used to calculate the order in which changes to
      * entities need to be written to the database.
      *
-     * @var Doctrine\ORM\Internal\CommitOrderCalculator
+     * @var \Doctrine\ORM\Internal\CommitOrderCalculator
      */
     private $commitOrderCalculator;
 
@@ -201,26 +202,31 @@ class UnitOfWork implements PropertyChangedListener
      * @var array
      */
     private $collectionPersisters = array();
-    
+
     /**
      * The EventManager used for dispatching events.
-     * 
+     *
      * @var EventManager
      */
     private $evm;
-    
+
     /**
      * Orphaned entities that are scheduled for removal.
-     * 
+     *
      * @var array
      */
     private $orphanRemovals = array();
-    
-    //private $_readOnlyObjects = array();
+
+    /**
+     * Read-Only objects are never evaluated
+     *
+     * @var array
+     */
+    private $readOnlyObjects = array();
 
     /**
      * Map of Entity Class-Names and corresponding IDs that should eager loaded when requested.
-     * 
+     *
      * @var array
      */
     private $eagerLoadingEntities = array();
@@ -228,7 +234,7 @@ class UnitOfWork implements PropertyChangedListener
     /**
      * Initializes a new UnitOfWork instance, bound to the given EntityManager.
      *
-     * @param Doctrine\ORM\EntityManager $em
+     * @param \Doctrine\ORM\EntityManager $em
      */
     public function __construct(EntityManager $em)
     {
@@ -240,20 +246,31 @@ public function __construct(EntityManager $em)
      * Commits the UnitOfWork, executing all operations that have been postponed
      * up to this point. The state of all managed entities will be synchronized with
      * the database.
-     * 
+     *
      * The operations are executed in the following order:
-     * 
+     *
      * 1) All entity insertions
      * 2) All entity updates
      * 3) All collection deletions
      * 4) All collection updates
      * 5) All entity deletions
-     * 
+     *
+     * @param object $entity
+     * @return void
      */
-    public function commit()
+    public function commit($entity = null)
     {
+        // Raise preFlush
+        if ($this->evm->hasListeners(Events::preFlush)) {
+            $this->evm->dispatchEvent(Events::preFlush, new Event\PreFlushEventArgs($this->em));
+        }
+
         // Compute changes done since last commit.
-        $this->computeChangeSets();
+        if ($entity === null) {
+            $this->computeChangeSets();
+        } else {
+            $this->computeSingleEntityChangeSet($entity);
+        }
 
         if ( ! ($this->entityInsertions ||
                 $this->entityDeletions ||
@@ -269,18 +286,18 @@ public function commit()
                 $this->remove($orphan);
             }
         }
-        
+
         // Raise onFlush
         if ($this->evm->hasListeners(Events::onFlush)) {
             $this->evm->dispatchEvent(Events::onFlush, new Event\OnFlushEventArgs($this->em));
         }
-        
+
         // Now we need a commit order to maintain referential integrity
         $commitOrder = $this->getCommitOrder();
 
         $conn = $this->em->getConnection();
-
         $conn->beginTransaction();
+
         try {
             if ($this->entityInsertions) {
                 foreach ($commitOrder as $class) {
@@ -301,13 +318,11 @@ public function commit()
 
             // Collection deletions (deletions of complete collections)
             foreach ($this->collectionDeletions as $collectionToDelete) {
-                $this->getCollectionPersister($collectionToDelete->getMapping())
-                        ->delete($collectionToDelete);
+                $this->getCollectionPersister($collectionToDelete->getMapping())->delete($collectionToDelete);
             }
             // Collection updates (deleteRows, updateRows, insertRows)
             foreach ($this->collectionUpdates as $collectionToUpdate) {
-                $this->getCollectionPersister($collectionToUpdate->getMapping())
-                        ->update($collectionToUpdate);
+                $this->getCollectionPersister($collectionToUpdate->getMapping())->update($collectionToUpdate);
             }
 
             // Entity deletions come last and need to be in reverse commit order
@@ -321,6 +336,7 @@ public function commit()
         } catch (Exception $e) {
             $this->em->close();
             $conn->rollback();
+
             throw $e;
         }
 
@@ -329,6 +345,11 @@ public function commit()
             $coll->takeSnapshot();
         }
 
+        // Raise postFlush
+        if ($this->evm->hasListeners(Events::postFlush)) {
+            $this->evm->dispatchEvent(Events::postFlush, new Event\PostFlushEventArgs($this->em));
+        }
+
         // Clear up
         $this->entityInsertions =
         $this->entityUpdates =
@@ -341,7 +362,64 @@ public function commit()
         $this->scheduledForDirtyCheck =
         $this->orphanRemovals = array();
     }
-    
+
+    /**
+     * Compute the changesets of all entities scheduled for insertion
+     *
+     * @return void
+     */
+    private function computeScheduleInsertsChangeSets()
+    {
+        foreach ($this->entityInsertions as $entity) {
+            $class = $this->em->getClassMetadata(get_class($entity));
+
+            $this->computeChangeSet($class, $entity);
+        }
+    }
+
+    /**
+     * Only flush the given entity according to a ruleset that keeps the UoW consistent.
+     *
+     * 1. All entities scheduled for insertion, (orphan) removals and changes in collections are processed as well!
+     * 2. Read Only entities are skipped.
+     * 3. Proxies are skipped.
+     * 4. Only if entity is properly managed.
+     *
+     * @param  object $entity
+     * @return void
+     */
+    private function computeSingleEntityChangeSet($entity)
+    {
+        if ( $this->getEntityState($entity) !== self::STATE_MANAGED) {
+            throw new \InvalidArgumentException("Entity has to be managed for single computation " . self::objToStr($entity));
+        }
+
+        $class = $this->em->getClassMetadata(get_class($entity));
+
+        if ($class->isChangeTrackingDeferredImplicit()) {
+            $this->persist($entity);
+        }
+
+        // Compute changes for INSERTed entities first. This must always happen even in this case.
+        $this->computeScheduleInsertsChangeSets();
+
+        if ($class->isReadOnly) {
+            return;
+        }
+
+        // Ignore uninitialized proxy objects
+        if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
+            return;
+        }
+
+        // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION are processed here.
+        $oid = spl_object_hash($entity);
+
+        if ( ! isset($this->entityInsertions[$oid]) && isset($this->entityStates[$oid])) {
+            $this->computeChangeSet($class, $entity);
+        }
+    }
+
     /**
      * Executes any extra updates that have been scheduled.
      */
@@ -349,6 +427,7 @@ private function executeExtraUpdates()
     {
         foreach ($this->extraUpdates as $oid => $update) {
             list ($entity, $changeset) = $update;
+
             $this->entityChangeSets[$oid] = $changeset;
             $this->getEntityPersister(get_class($entity))->update($entity);
         }
@@ -362,9 +441,11 @@ private function executeExtraUpdates()
     public function getEntityChangeSet($entity)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($this->entityChangeSets[$oid])) {
             return $this->entityChangeSets[$oid];
         }
+
         return array();
     }
 
@@ -393,43 +474,56 @@ public function getEntityChangeSet($entity)
      * If a PersistentCollection has been de-referenced in a fully MANAGED entity,
      * then this collection is marked for deletion.
      *
+     * @ignore
+     * @internal Don't call from the outside.
      * @param ClassMetadata $class The class descriptor of the entity.
      * @param object $entity The entity for which to compute the changes.
      */
     public function computeChangeSet(ClassMetadata $class, $entity)
     {
+        $oid = spl_object_hash($entity);
+
+        if (isset($this->readOnlyObjects[$oid])) {
+            return;
+        }
+
         if ( ! $class->isInheritanceTypeNone()) {
             $class = $this->em->getClassMetadata(get_class($entity));
         }
-        
-        $oid = spl_object_hash($entity);
+
+        // Fire PreFlush lifecycle callbacks
+        if (isset($class->lifecycleCallbacks[Events::preFlush])) {
+            $class->invokeLifecycleCallbacks(Events::preFlush, $entity);
+        }
+
         $actualData = array();
+
         foreach ($class->reflFields as $name => $refProp) {
             $value = $refProp->getValue($entity);
-            if (isset($class->associationMappings[$name])
-                    && ($class->associationMappings[$name]['type'] & ClassMetadata::TO_MANY)
-                    && $value !== null
-                    && ! ($value instanceof PersistentCollection)) {
 
+            if ($class->isCollectionValuedAssociation($name) && $value !== null && ! ($value instanceof PersistentCollection)) {
                 // If $value is not a Collection then use an ArrayCollection.
                 if ( ! $value instanceof Collection) {
                     $value = new ArrayCollection($value);
                 }
-                
+
                 $assoc = $class->associationMappings[$name];
-                
+
                 // Inject PersistentCollection
-                $coll = new PersistentCollection(
-                    $this->em,
-                    $this->em->getClassMetadata($assoc['targetEntity']),
-                    $value
+                $value = new PersistentCollection(
+                    $this->em, $this->em->getClassMetadata($assoc['targetEntity']), $value
                 );
-                
-                $coll->setOwner($entity, $assoc);
-                $coll->setDirty( ! $coll->isEmpty());
-                $class->reflFields[$name]->setValue($entity, $coll);
-                $actualData[$name] = $coll;
-            } else if ( (! $class->isIdentifier($name) || ! $class->isIdGeneratorIdentity()) && ($name !== $class->versionField) ) {
+                $value->setOwner($entity, $assoc);
+                $value->setDirty( ! $value->isEmpty());
+
+                $class->reflFields[$name]->setValue($entity, $value);
+
+                $actualData[$name] = $value;
+
+                continue;
+            }
+
+            if (( ! $class->isIdentifier($name) || ! $class->isIdGeneratorIdentity()) && ($name !== $class->versionField)) {
                 $actualData[$name] = $value;
             }
         }
@@ -439,60 +533,119 @@ public function computeChangeSet(ClassMetadata $class, $entity)
             // These result in an INSERT.
             $this->originalEntityData[$oid] = $actualData;
             $changeSet = array();
+
             foreach ($actualData as $propName => $actualValue) {
-                if (isset($class->associationMappings[$propName])) {
-                    $assoc = $class->associationMappings[$propName];
-                    if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
-                        $changeSet[$propName] = array(null, $actualValue);
-                    }
-                } else {
+                if ( ! isset($class->associationMappings[$propName])) {
+                    $changeSet[$propName] = array(null, $actualValue);
+
+                    continue;
+                }
+
+                $assoc = $class->associationMappings[$propName];
+
+                if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
                     $changeSet[$propName] = array(null, $actualValue);
                 }
             }
+
             $this->entityChangeSets[$oid] = $changeSet;
         } else {
             // Entity is "fully" MANAGED: it was already fully persisted before
             // and we have a copy of the original data
-            $originalData = $this->originalEntityData[$oid];
+            $originalData           = $this->originalEntityData[$oid];
             $isChangeTrackingNotify = $class->isChangeTrackingNotify();
-            $changeSet = ($isChangeTrackingNotify && isset($this->entityChangeSets[$oid])) ? $this->entityChangeSets[$oid] : array();
+            $changeSet              = ($isChangeTrackingNotify && isset($this->entityChangeSets[$oid]))
+                ? $this->entityChangeSets[$oid]
+                : array();
 
             foreach ($actualData as $propName => $actualValue) {
-                $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : null;
-                if (isset($class->associationMappings[$propName])) {
-                    $assoc = $class->associationMappings[$propName];
-                    if ($assoc['type'] & ClassMetadata::TO_ONE && $orgValue !== $actualValue) {
-                        if ($assoc['isOwningSide']) {
-                            $changeSet[$propName] = array($orgValue, $actualValue);
-                        }
-                        if ($orgValue !== null && $assoc['orphanRemoval']) {
-                            $this->scheduleOrphanRemoval($orgValue);
-                        }
-                    } else if ($orgValue instanceof PersistentCollection && $orgValue !== $actualValue) {
-                        // A PersistentCollection was de-referenced, so delete it.
-                        if  ( ! in_array($orgValue, $this->collectionDeletions, true)) {
-                            $this->collectionDeletions[] = $orgValue;
-                            $changeSet[$propName] = $orgValue; // Signal changeset, to-many assocs will be ignored.
+                // skip field, its a partially omitted one!
+                if ( ! (isset($originalData[$propName]) || array_key_exists($propName, $originalData))) {
+                    continue;
+                }
+
+                $orgValue = $originalData[$propName];
+
+                // skip if value havent changed
+                if ($orgValue === $actualValue) {
+                    continue;
+                }
+
+                // if regular field
+                if ( ! isset($class->associationMappings[$propName])) {
+                    if ($isChangeTrackingNotify) {
+                        continue;
+                    }
+
+                    $changeSet[$propName] = array($orgValue, $actualValue);
+
+                    continue;
+                }
+
+                $assoc = $class->associationMappings[$propName];
+
+                // Persistent collection was exchanged with the "originally"
+                // created one. This can only mean it was cloned and replaced
+                // on another entity.
+                if ($actualValue instanceof PersistentCollection) {
+                    $owner = $actualValue->getOwner();
+                    if ($owner === null) { // cloned
+                        $actualValue->setOwner($entity, $assoc);
+                    } else if ($owner !== $entity) { // no clone, we have to fix
+                        if (!$actualValue->isInitialized()) {
+                            $actualValue->initialize(); // we have to do this otherwise the cols share state
                         }
+                        $newValue = clone $actualValue;
+                        $newValue->setOwner($entity, $assoc);
+                        $class->reflFields[$propName]->setValue($entity, $newValue);
+                    }
+                }
+
+                if ($orgValue instanceof PersistentCollection) {
+                    // A PersistentCollection was de-referenced, so delete it.
+                    $coid = spl_object_hash($orgValue);
+
+                    if (isset($this->collectionDeletions[$coid])) {
+                        continue;
                     }
-                } else if ($isChangeTrackingNotify) {
+
+                    $this->collectionDeletions[$coid] = $orgValue;
+                    $changeSet[$propName] = $orgValue; // Signal changeset, to-many assocs will be ignored.
+
                     continue;
-                } else if ($orgValue !== $actualValue) {
-                    $changeSet[$propName] = array($orgValue, $actualValue);
+                }
+
+                if ($assoc['type'] & ClassMetadata::TO_ONE) {
+                    if ($assoc['isOwningSide']) {
+                        $changeSet[$propName] = array($orgValue, $actualValue);
+                    }
+
+                    if ($orgValue !== null && $assoc['orphanRemoval']) {
+                        $this->scheduleOrphanRemoval($orgValue);
+                    }
                 }
             }
+
             if ($changeSet) {
-                $this->entityChangeSets[$oid] = $changeSet;
+                $this->entityChangeSets[$oid]   = $changeSet;
                 $this->originalEntityData[$oid] = $actualData;
-                $this->entityUpdates[$oid] = $entity;
+                $this->entityUpdates[$oid]      = $entity;
             }
         }
 
         // Look for changes in associations of the entity
         foreach ($class->associationMappings as $field => $assoc) {
-            $val = $class->reflFields[$field]->getValue($entity);
-            if ($val !== null) {
+            if (($val = $class->reflFields[$field]->getValue($entity)) !== null) {
                 $this->computeAssociationChanges($assoc, $val);
+                if (!isset($this->entityChangeSets[$oid]) &&
+                    $assoc['isOwningSide'] &&
+                    $assoc['type'] == ClassMetadata::MANY_TO_MANY &&
+                    $val instanceof PersistentCollection &&
+                    $val->isDirty()) {
+                    $this->entityChangeSets[$oid]   = array();
+                    $this->originalEntityData[$oid] = $actualData;
+                    $this->entityUpdates[$oid]      = $entity;
+                }
             }
         }
     }
@@ -505,10 +658,7 @@ public function computeChangeSet(ClassMetadata $class, $entity)
     public function computeChangeSets()
     {
         // Compute changes for INSERTed entities first. This must always happen.
-        foreach ($this->entityInsertions as $entity) {
-            $class = $this->em->getClassMetadata(get_class($entity));
-            $this->computeChangeSet($class, $entity);
-        }
+        $this->computeScheduleInsertsChangeSets();
 
         // Compute changes for other MANAGED entities. Change tracking policies take effect here.
         foreach ($this->identityMap as $className => $entities) {
@@ -521,18 +671,29 @@ public function computeChangeSets()
 
             // If change tracking is explicit or happens through notification, then only compute
             // changes on entities of that type that are explicitly marked for synchronization.
-            $entitiesToProcess = ! $class->isChangeTrackingDeferredImplicit() ?
-                    (isset($this->scheduledForDirtyCheck[$className]) ?
-                        $this->scheduledForDirtyCheck[$className] : array())
-                    : $entities;
+            switch (true) {
+                case ($class->isChangeTrackingDeferredImplicit()):
+                    $entitiesToProcess = $entities;
+                    break;
+
+                case (isset($this->scheduledForDirtyCheck[$className])):
+                    $entitiesToProcess = $this->scheduledForDirtyCheck[$className];
+                    break;
+
+                default:
+                    $entitiesToProcess = array();
+
+            }
 
             foreach ($entitiesToProcess as $entity) {
                 // Ignore uninitialized proxy objects
-                if (/* $entity is readOnly || */ $entity instanceof Proxy && ! $entity->__isInitialized__) {
+                if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
                     continue;
                 }
+
                 // Only MANAGED entities that are NOT SCHEDULED FOR INSERTION are processed here.
                 $oid = spl_object_hash($entity);
+
                 if ( ! isset($this->entityInsertions[$oid]) && isset($this->entityStates[$oid])) {
                     $this->computeChangeSet($class, $entity);
                 }
@@ -548,111 +709,134 @@ public function computeChangeSets()
      */
     private function computeAssociationChanges($assoc, $value)
     {
+        if ($value instanceof Proxy && ! $value->__isInitialized__) {
+            return;
+        }
+
         if ($value instanceof PersistentCollection && $value->isDirty()) {
+            $coid = spl_object_hash($value);
+
             if ($assoc['isOwningSide']) {
-                $this->collectionUpdates[] = $value;
+                $this->collectionUpdates[$coid] = $value;
             }
-            $this->visitedCollections[] = $value;
-        }
 
-        // Look through the entities, and in any of their associations, for transient (new)
-        // enities, recursively. ("Persistence by reachability")
-        if ($assoc['type'] & ClassMetadata::TO_ONE) {
-            if ($value instanceof Proxy && ! $value->__isInitialized__) {
-                return; // Ignore uninitialized proxy objects
-            }
-            $value = array($value);
-        } else if ($value instanceof PersistentCollection) {
-            // Unwrap. Uninitialized collections will simply be empty.
-            $value = $value->unwrap();
+            $this->visitedCollections[$coid] = $value;
         }
 
-        $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
-        foreach ($value as $entry) {
+        // Look through the entities, and in any of their associations,
+        // for transient (new) entities, recursively. ("Persistence by reachability")
+        // Unwrap. Uninitialized collections will simply be empty.
+        $unwrappedValue = ($assoc['type'] & ClassMetadata::TO_ONE) ? array($value) : $value->unwrap();
+        $targetClass    = $this->em->getClassMetadata($assoc['targetEntity']);
+
+        foreach ($unwrappedValue as $key => $entry) {
             $state = $this->getEntityState($entry, self::STATE_NEW);
-            $oid = spl_object_hash($entry);
-            if ($state == self::STATE_NEW) {
-                if ( ! $assoc['isCascadePersist']) {
-                    throw new InvalidArgumentException("A new entity was found through the relationship '"
-                            . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' that was not"
-                            . " configured to cascade persist operations for entity: " . self::objToStr($entry) . "."
-                            . " Explicitly persist the new entity or configure cascading persist operations"
-                            . " on the relationship. If you cannot find out which entity causes the problem"
-                            . " implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue.");
-                }
-                $this->persistNew($targetClass, $entry);
-                $this->computeChangeSet($targetClass, $entry);
-            } else if ($state == self::STATE_REMOVED) {
-                return new InvalidArgumentException("Removed entity detected during flush: "
-                        . self::objToStr($entry).". Remove deleted entities from associations.");
-            } else if ($state == self::STATE_DETACHED) {
-                // Can actually not happen right now as we assume STATE_NEW,
-                // so the exception will be raised from the DBAL layer (constraint violation).
-                throw new InvalidArgumentException("A detached entity was found through a "
-                        . "relationship during cascading a persist operation.");
+            $oid   = spl_object_hash($entry);
+
+            if (!($entry instanceof $assoc['targetEntity'])) {
+                throw new ORMException(sprintf("Found entity of type %s on association %s#%s, but expecting %s",
+                    get_class($entry),
+                    $assoc['sourceEntity'],
+                    $assoc['fieldName'],
+                    $targetClass->name
+                ));
+            }
+
+            switch ($state) {
+                case self::STATE_NEW:
+                    if ( ! $assoc['isCascadePersist']) {
+                        throw ORMInvalidArgumentException::newEntityFoundThroughRelationship($assoc, $entry);
+                    }
+
+                    $this->persistNew($targetClass, $entry);
+                    $this->computeChangeSet($targetClass, $entry);
+                    break;
+
+                case self::STATE_REMOVED:
+                    // Consume the $value as array (it's either an array or an ArrayAccess)
+                    // and remove the element from Collection.
+                    if ($assoc['type'] & ClassMetadata::TO_MANY) {
+                        unset($value[$key]);
+                    }
+                    break;
+
+                case self::STATE_DETACHED:
+                    // Can actually not happen right now as we assume STATE_NEW,
+                    // so the exception will be raised from the DBAL layer (constraint violation).
+                    throw ORMInvalidArgumentException::detachedEntityFoundThroughRelationship($assoc, $entry);
+                    break;
+
+                default:
+                    // MANAGED associated entities are already taken into account
+                    // during changeset calculation anyway, since they are in the identity map.
             }
-            // MANAGED associated entities are already taken into account
-            // during changeset calculation anyway, since they are in the identity map.
         }
     }
 
     private function persistNew($class, $entity)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($class->lifecycleCallbacks[Events::prePersist])) {
             $class->invokeLifecycleCallbacks(Events::prePersist, $entity);
         }
+
         if ($this->evm->hasListeners(Events::prePersist)) {
             $this->evm->dispatchEvent(Events::prePersist, new LifecycleEventArgs($entity, $this->em));
         }
 
         $idGen = $class->idGenerator;
+
         if ( ! $idGen->isPostInsertGenerator()) {
             $idValue = $idGen->generate($this->em, $entity);
+
             if ( ! $idGen instanceof \Doctrine\ORM\Id\AssignedGenerator) {
-                $this->entityIdentifiers[$oid] = array($class->identifier[0] => $idValue);
-                $class->setIdentifierValues($entity, $this->entityIdentifiers[$oid]);
-            } else {
-                $this->entityIdentifiers[$oid] = $idValue;
+                $idValue = array($class->identifier[0] => $idValue);
+
+                $class->setIdentifierValues($entity, $idValue);
             }
+
+            $this->entityIdentifiers[$oid] = $idValue;
         }
+
         $this->entityStates[$oid] = self::STATE_MANAGED;
 
         $this->scheduleForInsert($entity);
     }
-    
+
     /**
      * INTERNAL:
      * Computes the changeset of an individual entity, independently of the
      * computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit().
-     * 
+     *
      * The passed entity must be a managed entity. If the entity already has a change set
      * because this method is invoked during a commit cycle then the change sets are added.
      * whereby changes detected in this method prevail.
-     * 
+     *
      * @ignore
      * @param ClassMetadata $class The class descriptor of the entity.
      * @param object $entity The entity for which to (re)calculate the change set.
      * @throws InvalidArgumentException If the passed entity is not MANAGED.
      */
-    public function recomputeSingleEntityChangeSet($class, $entity)
+    public function recomputeSingleEntityChangeSet(ClassMetadata $class, $entity)
     {
         $oid = spl_object_hash($entity);
-        
+
         if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] != self::STATE_MANAGED) {
-            throw new InvalidArgumentException('Entity must be managed.');
+            throw ORMInvalidArgumentException::entityNotManaged($entity);
         }
-        
-        /* TODO: Just return if changetracking policy is NOTIFY?
+
+        // skip if change tracking is "NOTIFY"
         if ($class->isChangeTrackingNotify()) {
             return;
-        }*/
+        }
 
         if ( ! $class->isInheritanceTypeNone()) {
             $class = $this->em->getClassMetadata(get_class($entity));
         }
 
         $actualData = array();
+
         foreach ($class->reflFields as $name => $refProp) {
             if ( ! $class->isIdentifier($name) || ! $class->isIdGeneratorIdentity()) {
                 $actualData[$name] = $refProp->getValue($entity);
@@ -664,6 +848,7 @@ public function recomputeSingleEntityChangeSet($class, $entity)
 
         foreach ($actualData as $propName => $actualValue) {
             $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : null;
+
             if (is_object($orgValue) && $orgValue !== $actualValue) {
                 $changeSet[$propName] = array($orgValue, $actualValue);
             } else if ($orgValue != $actualValue || ($orgValue === null ^ $actualValue === null)) {
@@ -675,6 +860,7 @@ public function recomputeSingleEntityChangeSet($class, $entity)
             if (isset($this->entityChangeSets[$oid])) {
                 $this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet);
             }
+
             $this->originalEntityData[$oid] = $actualData;
         }
     }
@@ -682,26 +868,28 @@ public function recomputeSingleEntityChangeSet($class, $entity)
     /**
      * Executes all entity insertions for entities of the specified type.
      *
-     * @param Doctrine\ORM\Mapping\ClassMetadata $class
+     * @param \Doctrine\ORM\Mapping\ClassMetadata $class
      */
     private function executeInserts($class)
     {
         $className = $class->name;
         $persister = $this->getEntityPersister($className);
-        
+        $entities  = array();
+
         $hasLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::postPersist]);
-        $hasListeners = $this->evm->hasListeners(Events::postPersist);
-        if ($hasLifecycleCallbacks || $hasListeners) {
-            $entities = array();
-        }
-        
+        $hasListeners          = $this->evm->hasListeners(Events::postPersist);
+
         foreach ($this->entityInsertions as $oid => $entity) {
-            if (get_class($entity) === $className) {
-                $persister->addInsert($entity);
-                unset($this->entityInsertions[$oid]);
-                if ($hasLifecycleCallbacks || $hasListeners) {
-                    $entities[] = $entity;
-                }
+            if (get_class($entity) !== $className) {
+                continue;
+            }
+
+            $persister->addInsert($entity);
+
+            unset($this->entityInsertions[$oid]);
+
+            if ($hasLifecycleCallbacks || $hasListeners) {
+                $entities[] = $entity;
             }
         }
 
@@ -710,24 +898,26 @@ private function executeInserts($class)
         if ($postInsertIds) {
             // Persister returned post-insert IDs
             foreach ($postInsertIds as $id => $entity) {
-                $oid = spl_object_hash($entity);
+                $oid     = spl_object_hash($entity);
                 $idField = $class->identifier[0];
+
                 $class->reflFields[$idField]->setValue($entity, $id);
+
                 $this->entityIdentifiers[$oid] = array($idField => $id);
                 $this->entityStates[$oid] = self::STATE_MANAGED;
                 $this->originalEntityData[$oid][$idField] = $id;
+
                 $this->addToIdentityMap($entity);
             }
         }
-        
-        if ($hasLifecycleCallbacks || $hasListeners) {
-            foreach ($entities as $entity) {
-                if ($hasLifecycleCallbacks) {
-                    $class->invokeLifecycleCallbacks(Events::postPersist, $entity);
-                }
-                if ($hasListeners) {
-                    $this->evm->dispatchEvent(Events::postPersist, new LifecycleEventArgs($entity, $this->em));
-                }
+
+        foreach ($entities as $entity) {
+            if ($hasLifecycleCallbacks) {
+                $class->invokeLifecycleCallbacks(Events::postPersist, $entity);
+            }
+
+            if ($hasListeners) {
+                $this->evm->dispatchEvent(Events::postPersist, new LifecycleEventArgs($entity, $this->em));
             }
         }
     }
@@ -735,7 +925,7 @@ private function executeInserts($class)
     /**
      * Executes all entity updates for entities of the specified type.
      *
-     * @param Doctrine\ORM\Mapping\ClassMetadata $class
+     * @param \Doctrine\ORM\Mapping\ClassMetadata $class
      */
     private function executeUpdates($class)
     {
@@ -743,35 +933,41 @@ private function executeUpdates($class)
         $persister = $this->getEntityPersister($className);
 
         $hasPreUpdateLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::preUpdate]);
-        $hasPreUpdateListeners = $this->evm->hasListeners(Events::preUpdate);
+        $hasPreUpdateListeners          = $this->evm->hasListeners(Events::preUpdate);
+
         $hasPostUpdateLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::postUpdate]);
-        $hasPostUpdateListeners = $this->evm->hasListeners(Events::postUpdate);
-        
+        $hasPostUpdateListeners          = $this->evm->hasListeners(Events::postUpdate);
+
         foreach ($this->entityUpdates as $oid => $entity) {
-            if (get_class($entity) == $className || $entity instanceof Proxy && get_parent_class($entity) == $className) {
-                
-                if ($hasPreUpdateLifecycleCallbacks) {
-                    $class->invokeLifecycleCallbacks(Events::preUpdate, $entity);
-                    $this->recomputeSingleEntityChangeSet($class, $entity);
-                }
-                
-                if ($hasPreUpdateListeners) {
-                    $this->evm->dispatchEvent(Events::preUpdate, new Event\PreUpdateEventArgs(
-                        $entity, $this->em, $this->entityChangeSets[$oid])
-                    );
-                }
+            if ( ! (get_class($entity) === $className || $entity instanceof Proxy && get_parent_class($entity) === $className)) {
+                continue;
+            }
 
-                if ($this->entityChangeSets[$oid]) {
-                    $persister->update($entity);
-                }
-                unset($this->entityUpdates[$oid]);
-                
-                if ($hasPostUpdateLifecycleCallbacks) {
-                    $class->invokeLifecycleCallbacks(Events::postUpdate, $entity);
-                }
-                if ($hasPostUpdateListeners) {
-                    $this->evm->dispatchEvent(Events::postUpdate, new LifecycleEventArgs($entity, $this->em));
-                }
+            if ($hasPreUpdateLifecycleCallbacks) {
+                $class->invokeLifecycleCallbacks(Events::preUpdate, $entity);
+
+                $this->recomputeSingleEntityChangeSet($class, $entity);
+            }
+
+            if ($hasPreUpdateListeners) {
+                $this->evm->dispatchEvent(
+                    Events::preUpdate,
+                    new Event\PreUpdateEventArgs($entity, $this->em, $this->entityChangeSets[$oid])
+                );
+            }
+
+            if ($this->entityChangeSets[$oid]) {
+                $persister->update($entity);
+            }
+
+            unset($this->entityUpdates[$oid]);
+
+            if ($hasPostUpdateLifecycleCallbacks) {
+                $class->invokeLifecycleCallbacks(Events::postUpdate, $entity);
+            }
+
+            if ($hasPostUpdateListeners) {
+                $this->evm->dispatchEvent(Events::postUpdate, new LifecycleEventArgs($entity, $this->em));
             }
         }
     }
@@ -779,38 +975,43 @@ private function executeUpdates($class)
     /**
      * Executes all entity deletions for entities of the specified type.
      *
-     * @param Doctrine\ORM\Mapping\ClassMetadata $class
+     * @param \Doctrine\ORM\Mapping\ClassMetadata $class
      */
     private function executeDeletions($class)
     {
         $className = $class->name;
         $persister = $this->getEntityPersister($className);
-                
+
         $hasLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::postRemove]);
         $hasListeners = $this->evm->hasListeners(Events::postRemove);
-        
+
         foreach ($this->entityDeletions as $oid => $entity) {
-            if (get_class($entity) == $className || $entity instanceof Proxy && get_parent_class($entity) == $className) {
-                $persister->delete($entity);
-                unset(
-                    $this->entityDeletions[$oid],
-                    $this->entityIdentifiers[$oid],
-                    $this->originalEntityData[$oid],
-                    $this->entityStates[$oid]
-                    );
-                // Entity with this $oid after deletion treated as NEW, even if the $oid
-                // is obtained by a new entity because the old one went out of scope.
-                //$this->entityStates[$oid] = self::STATE_NEW;
-                if ( ! $class->isIdentifierNatural()) {
-                    $class->reflFields[$class->identifier[0]]->setValue($entity, null);
-                }
+            if ( ! (get_class($entity) == $className || $entity instanceof Proxy && get_parent_class($entity) == $className)) {
+                continue;
+            }
 
-                if ($hasLifecycleCallbacks) {
-                    $class->invokeLifecycleCallbacks(Events::postRemove, $entity);
-                }
-                if ($hasListeners) {
-                    $this->evm->dispatchEvent(Events::postRemove, new LifecycleEventArgs($entity, $this->em));
-                }
+            $persister->delete($entity);
+
+            unset(
+                $this->entityDeletions[$oid],
+                $this->entityIdentifiers[$oid],
+                $this->originalEntityData[$oid],
+                $this->entityStates[$oid]
+            );
+
+            // Entity with this $oid after deletion treated as NEW, even if the $oid
+            // is obtained by a new entity because the old one went out of scope.
+            //$this->entityStates[$oid] = self::STATE_NEW;
+            if ( ! $class->isIdentifierNatural()) {
+                $class->reflFields[$class->identifier[0]]->setValue($entity, null);
+            }
+
+            if ($hasLifecycleCallbacks) {
+                $class->invokeLifecycleCallbacks(Events::postRemove, $entity);
+            }
+
+            if ($hasListeners) {
+                $this->evm->dispatchEvent(Events::postRemove, new LifecycleEventArgs($entity, $this->em));
             }
         }
     }
@@ -823,60 +1024,76 @@ private function executeDeletions($class)
     private function getCommitOrder(array $entityChangeSet = null)
     {
         if ($entityChangeSet === null) {
-            $entityChangeSet = array_merge(
-                    $this->entityInsertions,
-                    $this->entityUpdates,
-                    $this->entityDeletions
-                    );
+            $entityChangeSet = array_merge($this->entityInsertions, $this->entityUpdates, $this->entityDeletions);
         }
-        
+
         $calc = $this->getCommitOrderCalculator();
-        
+
         // See if there are any new classes in the changeset, that are not in the
         // commit order graph yet (dont have a node).
+        // We have to inspect changeSet to be able to correctly build dependencies.
+        // It is not possible to use IdentityMap here because post inserted ids
+        // are not yet available.
         $newNodes = array();
+
         foreach ($entityChangeSet as $oid => $entity) {
-            $className = get_class($entity);         
-            if ( ! $calc->hasClass($className)) {
-                $class = $this->em->getClassMetadata($className);
-                $calc->addClass($class);
-                $newNodes[] = $class;
+            $className = get_class($entity);
+
+            if ($calc->hasClass($className)) {
+                continue;
             }
+
+            $class = $this->em->getClassMetadata($className);
+            $calc->addClass($class);
+
+            $newNodes[] = $class;
         }
 
         // Calculate dependencies for new nodes
-        foreach ($newNodes as $class) {
+        while ($class = array_pop($newNodes)) {
             foreach ($class->associationMappings as $assoc) {
-                if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
-                    $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
-                    if ( ! $calc->hasClass($targetClass->name)) {
-                        $calc->addClass($targetClass);
-                    }
-                    $calc->addDependency($targetClass, $class);
-                    // If the target class has mapped subclasses,
-                    // these share the same dependency.
-                    if ($targetClass->subClasses) {
-                        foreach ($targetClass->subClasses as $subClassName) {
-                            $targetSubClass = $this->em->getClassMetadata($subClassName);
-                            if ( ! $calc->hasClass($subClassName)) {
-                                $calc->addClass($targetSubClass);
-                            }
-                            $calc->addDependency($targetSubClass, $class);
-                        }
-                    }
+                if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
+                    continue;
                 }
-            }
-        }
 
-        return $calc->getCommitOrder();
-    }
+                $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
 
-    /**
-     * Schedules an entity for insertion into the database.
-     * If the entity already has an identifier, it will be added to the identity map.
-     *
-     * @param object $entity The entity to schedule for insertion.
-     */
+                if ( ! $calc->hasClass($targetClass->name)) {
+                    $calc->addClass($targetClass);
+
+                    $newNodes[] = $targetClass;
+                }
+
+                $calc->addDependency($targetClass, $class);
+
+                // If the target class has mapped subclasses, these share the same dependency.
+                if ( ! $targetClass->subClasses) {
+                    continue;
+                }
+
+                foreach ($targetClass->subClasses as $subClassName) {
+                    $targetSubClass = $this->em->getClassMetadata($subClassName);
+
+                    if ( ! $calc->hasClass($subClassName)) {
+                        $calc->addClass($targetSubClass);
+
+                        $newNodes[] = $targetSubClass;
+                    }
+
+                    $calc->addDependency($targetSubClass, $class);
+                }
+            }
+        }
+
+        return $calc->getCommitOrder();
+    }
+
+    /**
+     * Schedules an entity for insertion into the database.
+     * If the entity already has an identifier, it will be added to the identity map.
+     *
+     * @param object $entity The entity to schedule for insertion.
+     */
     public function scheduleForInsert($entity)
     {
         $oid = spl_object_hash($entity);
@@ -884,11 +1101,16 @@ public function scheduleForInsert($entity)
         if (isset($this->entityUpdates[$oid])) {
             throw new InvalidArgumentException("Dirty entity can not be scheduled for insertion.");
         }
+
         if (isset($this->entityDeletions[$oid])) {
-            throw new InvalidArgumentException("Removed entity can not be scheduled for insertion.");
+            throw ORMInvalidArgumentException::scheduleInsertForRemovedEntity($entity);
+        }
+        if (isset($this->originalEntityData[$oid]) && ! isset($this->entityInsertions[$oid])) {
+            throw ORMInvalidArgumentException::scheduleInsertForManagedEntity($entity);
         }
+
         if (isset($this->entityInsertions[$oid])) {
-            throw new InvalidArgumentException("Entity can not be scheduled for insertion twice.");
+            throw ORMInvalidArgumentException::scheduleInsertTwice($entity);
         }
 
         $this->entityInsertions[$oid] = $entity;
@@ -917,38 +1139,43 @@ public function isScheduledForInsert($entity)
     public function scheduleForUpdate($entity)
     {
         $oid = spl_object_hash($entity);
+
         if ( ! isset($this->entityIdentifiers[$oid])) {
-            throw new InvalidArgumentException("Entity has no identity.");
+            throw ORMInvalidArgumentException::entityHasNoIdentity($entity, "scheduling for update");
         }
+
         if (isset($this->entityDeletions[$oid])) {
-            throw new InvalidArgumentException("Entity is removed.");
+            throw ORMInvalidArgumentException::entityIsRemoved($entity, "schedule for update");
         }
 
         if ( ! isset($this->entityUpdates[$oid]) && ! isset($this->entityInsertions[$oid])) {
             $this->entityUpdates[$oid] = $entity;
         }
     }
-    
+
     /**
      * INTERNAL:
      * Schedules an extra update that will be executed immediately after the
      * regular entity updates within the currently running commit cycle.
-     * 
+     *
      * Extra updates for entities are stored as (entity, changeset) tuples.
-     * 
+     *
      * @ignore
      * @param object $entity The entity for which to schedule an extra update.
      * @param array $changeset The changeset of the entity (what to update).
      */
     public function scheduleExtraUpdate($entity, array $changeset)
     {
-        $oid = spl_object_hash($entity);
+        $oid         = spl_object_hash($entity);
+        $extraUpdate = array($entity, $changeset);
+
         if (isset($this->extraUpdates[$oid])) {
             list($ignored, $changeset2) = $this->extraUpdates[$oid];
-            $this->extraUpdates[$oid] = array($entity, $changeset + $changeset2);
-        } else {
-            $this->extraUpdates[$oid] = array($entity, $changeset);
+
+            $extraUpdate = array($entity, $changeset + $changeset2);
         }
+
+        $this->extraUpdates[$oid] = $extraUpdate;
     }
 
     /**
@@ -964,32 +1191,42 @@ public function isScheduledForUpdate($entity)
         return isset($this->entityUpdates[spl_object_hash($entity)]);
     }
 
+
+    /**
+     * Checks whether an entity is registered to be checked in the unit of work.
+     *
+     * @param object $entity
+     * @return boolean
+     */
     public function isScheduledForDirtyCheck($entity)
     {
         $rootEntityName = $this->em->getClassMetadata(get_class($entity))->rootEntityName;
+
         return isset($this->scheduledForDirtyCheck[$rootEntityName][spl_object_hash($entity)]);
     }
 
     /**
      * INTERNAL:
      * Schedules an entity for deletion.
-     * 
+     *
      * @param object $entity
      */
     public function scheduleForDelete($entity)
     {
         $oid = spl_object_hash($entity);
-        
+
         if (isset($this->entityInsertions[$oid])) {
             if ($this->isInIdentityMap($entity)) {
                 $this->removeFromIdentityMap($entity);
             }
+
             unset($this->entityInsertions[$oid], $this->entityStates[$oid]);
+
             return; // entity has not been persisted yet, so nothing more to do.
         }
 
         if ( ! $this->isInIdentityMap($entity)) {
-            return; // ignore
+            return;
         }
 
         $this->removeFromIdentityMap($entity);
@@ -997,9 +1234,10 @@ public function scheduleForDelete($entity)
         if (isset($this->entityUpdates[$oid])) {
             unset($this->entityUpdates[$oid]);
         }
+
         if ( ! isset($this->entityDeletions[$oid])) {
             $this->entityDeletions[$oid] = $entity;
-            $this->entityStates[$oid] = self::STATE_REMOVED;
+            $this->entityStates[$oid]    = self::STATE_REMOVED;
         }
     }
 
@@ -1017,16 +1255,17 @@ public function isScheduledForDelete($entity)
 
     /**
      * Checks whether an entity is scheduled for insertion, update or deletion.
-     * 
+     *
      * @param $entity
      * @return boolean
      */
     public function isEntityScheduled($entity)
     {
         $oid = spl_object_hash($entity);
-        return isset($this->entityInsertions[$oid]) ||
-                isset($this->entityUpdates[$oid]) ||
-                isset($this->entityDeletions[$oid]);
+
+        return isset($this->entityInsertions[$oid])
+            || isset($this->entityUpdates[$oid])
+            || isset($this->entityDeletions[$oid]);
     }
 
     /**
@@ -1043,18 +1282,24 @@ public function isEntityScheduled($entity)
     public function addToIdentityMap($entity)
     {
         $classMetadata = $this->em->getClassMetadata(get_class($entity));
-        $idHash = implode(' ', $this->entityIdentifiers[spl_object_hash($entity)]);
+        $idHash        = implode(' ', $this->entityIdentifiers[spl_object_hash($entity)]);
+
         if ($idHash === '') {
-            throw new InvalidArgumentException("The given entity has no identity.");
+            throw ORMInvalidArgumentException::entityWithoutIdentity($classMetadata->name, $entity);
         }
+
         $className = $classMetadata->rootEntityName;
+
         if (isset($this->identityMap[$className][$idHash])) {
             return false;
         }
+
         $this->identityMap[$className][$idHash] = $entity;
+
         if ($entity instanceof NotifyPropertyChanged) {
             $entity->addPropertyChangedListener($this);
         }
+
         return true;
     }
 
@@ -1071,45 +1316,67 @@ public function addToIdentityMap($entity)
     public function getEntityState($entity, $assume = null)
     {
         $oid = spl_object_hash($entity);
-        if ( ! isset($this->entityStates[$oid])) {
-            // State can only be NEW or DETACHED, because MANAGED/REMOVED states are known.
-            // Note that you can not remember the NEW or DETACHED state in _entityStates since
-            // the UoW does not hold references to such objects and the object hash can be reused.
-            // More generally because the state may "change" between NEW/DETACHED without the UoW being aware of it.
-            if ($assume === null) {
-                $class = $this->em->getClassMetadata(get_class($entity));
-                $id = $class->getIdentifierValues($entity);
-                if ( ! $id) {
-                    return self::STATE_NEW;
-                } else if ($class->isIdentifierNatural()) {
-                    // Check for a version field, if available, to avoid a db lookup.
-                    if ($class->isVersioned) {
-                        if ($class->getFieldValue($entity, $class->versionField)) {
-                            return self::STATE_DETACHED;
-                        } else {
-                            return self::STATE_NEW;
-                        }
-                    } else {
-                        // Last try before db lookup: check the identity map.
-                        if ($this->tryGetById($id, $class->rootEntityName)) {
-                            return self::STATE_DETACHED;
-                        } else {
-                            // db lookup
-                            if ($this->getEntityPersister(get_class($entity))->exists($entity)) {
-                                return self::STATE_DETACHED;
-                            } else {
-                                return self::STATE_NEW;
-                            }
-                        }
-                    }
-                } else {
+
+        if (isset($this->entityStates[$oid])) {
+            return $this->entityStates[$oid];
+        }
+
+        if ($assume !== null) {
+            return $assume;
+        }
+
+        // State can only be NEW or DETACHED, because MANAGED/REMOVED states are known.
+        // Note that you can not remember the NEW or DETACHED state in _entityStates since
+        // the UoW does not hold references to such objects and the object hash can be reused.
+        // More generally because the state may "change" between NEW/DETACHED without the UoW being aware of it.
+        $class = $this->em->getClassMetadata(get_class($entity));
+        $id    = $class->getIdentifierValues($entity);
+
+        if ( ! $id) {
+            return self::STATE_NEW;
+        }
+
+        switch (true) {
+            case ($class->isIdentifierNatural());
+                // Check for a version field, if available, to avoid a db lookup.
+                if ($class->isVersioned) {
+                    return ($class->getFieldValue($entity, $class->versionField))
+                        ? self::STATE_DETACHED
+                        : self::STATE_NEW;
+                }
+
+                // Last try before db lookup: check the identity map.
+                if ($this->tryGetById($id, $class->rootEntityName)) {
                     return self::STATE_DETACHED;
                 }
-            } else {
-                return $assume;
-            }
+
+                // db lookup
+                if ($this->getEntityPersister(get_class($entity))->exists($entity)) {
+                    return self::STATE_DETACHED;
+                }
+
+                return self::STATE_NEW;
+
+            case ( ! $class->idGenerator->isPostInsertGenerator()):
+                // if we have a pre insert generator we can't be sure that having an id
+                // really means that the entity exists. We have to verify this through
+                // the last resort: a db lookup
+
+                // Last try before db lookup: check the identity map.
+                if ($this->tryGetById($id, $class->rootEntityName)) {
+                    return self::STATE_DETACHED;
+                }
+
+                // db lookup
+                if ($this->getEntityPersister(get_class($entity))->exists($entity)) {
+                    return self::STATE_DETACHED;
+                }
+
+                return self::STATE_NEW;
+
+            default:
+                return self::STATE_DETACHED;
         }
-        return $this->entityStates[$oid];
     }
 
     /**
@@ -1123,16 +1390,22 @@ public function getEntityState($entity, $assume = null)
      */
     public function removeFromIdentityMap($entity)
     {
-        $oid = spl_object_hash($entity);
+        $oid           = spl_object_hash($entity);
         $classMetadata = $this->em->getClassMetadata(get_class($entity));
-        $idHash = implode(' ', $this->entityIdentifiers[$oid]);
+        $idHash        = implode(' ', $this->entityIdentifiers[$oid]);
+
         if ($idHash === '') {
-            throw new InvalidArgumentException("The given entity has no identity.");
+            throw ORMInvalidArgumentException::entityHasNoIdentity($entity, "remove from identity map");
         }
+
         $className = $classMetadata->rootEntityName;
+
         if (isset($this->identityMap[$className][$idHash])) {
             unset($this->identityMap[$className][$idHash]);
+            unset($this->readOnlyObjects[$oid]);
+
             //$this->entityStates[$oid] = self::STATE_DETACHED;
+
             return true;
         }
 
@@ -1165,8 +1438,11 @@ public function getByIdHash($idHash, $rootClassName)
      */
     public function tryGetByIdHash($idHash, $rootClassName)
     {
-        return isset($this->identityMap[$rootClassName][$idHash]) ?
-                $this->identityMap[$rootClassName][$idHash] : false;
+        if (isset($this->identityMap[$rootClassName][$idHash])) {
+            return $this->identityMap[$rootClassName][$idHash];
+        }
+
+        return false;
     }
 
     /**
@@ -1178,15 +1454,18 @@ public function tryGetByIdHash($idHash, $rootClassName)
     public function isInIdentityMap($entity)
     {
         $oid = spl_object_hash($entity);
+
         if ( ! isset($this->entityIdentifiers[$oid])) {
             return false;
         }
+
         $classMetadata = $this->em->getClassMetadata(get_class($entity));
-        $idHash = implode(' ', $this->entityIdentifiers[$oid]);
+        $idHash        = implode(' ', $this->entityIdentifiers[$oid]);
+
         if ($idHash === '') {
             return false;
         }
-        
+
         return isset($this->identityMap[$classMetadata->rootEntityName][$idHash]);
     }
 
@@ -1212,12 +1491,13 @@ public function containsIdHash($idHash, $rootClassName)
     public function persist($entity)
     {
         $visited = array();
+
         $this->doPersist($entity, $visited);
     }
 
     /**
      * Persists an entity as part of the current unit of work.
-     * 
+     *
      * This method is internally called during persist() cascades as it tracks
      * the already visited entities to prevent infinite recursions.
      *
@@ -1227,6 +1507,7 @@ public function persist($entity)
     private function doPersist($entity, array &$visited)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($visited[$oid])) {
             return; // Prevent infinite recursion
         }
@@ -1248,19 +1529,24 @@ private function doPersist($entity, array &$visited)
                     $this->scheduleForDirtyCheck($entity);
                 }
                 break;
+
             case self::STATE_NEW:
                 $this->persistNew($class, $entity);
                 break;
+
             case self::STATE_REMOVED:
                 // Entity becomes managed again
                 unset($this->entityDeletions[$oid]);
+
                 $this->entityStates[$oid] = self::STATE_MANAGED;
                 break;
+
             case self::STATE_DETACHED:
                 // Can actually not happen right now since we assume STATE_NEW.
-                throw new InvalidArgumentException("Detached entity passed to persist().");
+                throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted");
+
             default:
-                throw new UnexpectedValueException("Unexpected entity state: $entityState.");
+                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
         }
 
         $this->cascadePersist($entity, $visited);
@@ -1274,6 +1560,7 @@ private function doPersist($entity, array &$visited)
     public function remove($entity)
     {
         $visited = array();
+
         $this->doRemove($entity, $visited);
     }
 
@@ -1290,36 +1577,42 @@ public function remove($entity)
     private function doRemove($entity, array &$visited)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($visited[$oid])) {
             return; // Prevent infinite recursion
         }
 
         $visited[$oid] = $entity; // mark visited
-        
-        // Cascade first, because scheduleForDelete() removes the entity from the identity map, which 
+
+        // Cascade first, because scheduleForDelete() removes the entity from the identity map, which
         // can cause problems when a lazy proxy has to be initialized for the cascade operation.
         $this->cascadeRemove($entity, $visited);
 
-        $class = $this->em->getClassMetadata(get_class($entity));
+        $class       = $this->em->getClassMetadata(get_class($entity));
         $entityState = $this->getEntityState($entity);
+
         switch ($entityState) {
             case self::STATE_NEW:
             case self::STATE_REMOVED:
                 // nothing to do
                 break;
+
             case self::STATE_MANAGED:
                 if (isset($class->lifecycleCallbacks[Events::preRemove])) {
                     $class->invokeLifecycleCallbacks(Events::preRemove, $entity);
                 }
+
                 if ($this->evm->hasListeners(Events::preRemove)) {
                     $this->evm->dispatchEvent(Events::preRemove, new LifecycleEventArgs($entity, $this->em));
                 }
+
                 $this->scheduleForDelete($entity);
                 break;
+
             case self::STATE_DETACHED:
-                throw new InvalidArgumentException("A detached entity can not be removed.");
+                throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed");
             default:
-                throw new UnexpectedValueException("Unexpected entity state: $entityState.");
+                throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity));
         }
 
     }
@@ -1337,6 +1630,7 @@ private function doRemove($entity, array &$visited)
     public function merge($entity)
     {
         $visited = array();
+
         return $this->doMerge($entity, $visited);
     }
 
@@ -1353,6 +1647,7 @@ public function merge($entity)
     private function doMerge($entity, array &$visited, $prevManagedCopy = null, $assoc = null)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($visited[$oid])) {
             return; // Prevent infinite recursion
         }
@@ -1365,48 +1660,72 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
         // an extra db-roundtrip this way. If it is not MANAGED but has an identity,
         // we need to fetch it from the db anyway in order to merge.
         // MANAGED entities are ignored by the merge operation.
-        if ($this->getEntityState($entity, self::STATE_DETACHED) == self::STATE_MANAGED) {
-            $managedCopy = $entity;
-        } else {
+        $managedCopy = $entity;
+
+        if ($this->getEntityState($entity, self::STATE_DETACHED) !== self::STATE_MANAGED) {
+            if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
+                $entity->__load();
+            }
+
             // Try to look the entity up in the identity map.
             $id = $class->getIdentifierValues($entity);
 
             // If there is no ID, it is actually NEW.
             if ( ! $id) {
-                $managedCopy = $class->newInstance();
+                $managedCopy = $this->newInstance($class);
+
                 $this->persistNew($class, $managedCopy);
             } else {
-                $managedCopy = $this->tryGetById($id, $class->rootEntityName);
+                $flatId = $id;
+                if ($class->containsForeignIdentifier) {
+                    // convert foreign identifiers into scalar foreign key
+                    // values to avoid object to string conversion failures.
+                    foreach ($id as $idField => $idValue) {
+                        if (isset($class->associationMappings[$idField])) {
+                            $targetClassMetadata = $this->em->getClassMetadata($class->associationMappings[$idField]['targetEntity']);
+                            $associatedId = $this->getEntityIdentifier($idValue);
+                            $flatId[$idField] = $associatedId[$targetClassMetadata->identifier[0]];
+                        }
+                    }
+                }
+
+                $managedCopy = $this->tryGetById($flatId, $class->rootEntityName);
+
                 if ($managedCopy) {
                     // We have the entity in-memory already, just make sure its not removed.
                     if ($this->getEntityState($managedCopy) == self::STATE_REMOVED) {
-                        throw new InvalidArgumentException('Removed entity detected during merge.'
-                                . ' Can not merge with a removed entity.');
+                        throw ORMInvalidArgumentException::entityIsRemoved($managedCopy, "merge");
                     }
                 } else {
                     // We need to fetch the managed copy in order to merge.
-                    $managedCopy = $this->em->find($class->name, $id);
+                    $managedCopy = $this->em->find($class->name, $flatId);
                 }
 
                 if ($managedCopy === null) {
                     // If the identifier is ASSIGNED, it is NEW, otherwise an error
                     // since the managed entity was not found.
-                    if ($class->isIdentifierNatural()) {
-                        $managedCopy = $class->newInstance();
-                        $class->setIdentifierValues($managedCopy, $id);
-                        $this->persistNew($class, $managedCopy);
-                    } else {
+                    if ( ! $class->isIdentifierNatural()) {
                         throw new EntityNotFoundException;
                     }
+
+                    $managedCopy = $this->newInstance($class);
+                    $class->setIdentifierValues($managedCopy, $id);
+
+                    $this->persistNew($class, $managedCopy);
+                } else {
+                    if ($managedCopy instanceof Proxy && ! $managedCopy->__isInitialized__) {
+                        $managedCopy->__load();
+                    }
                 }
             }
 
             if ($class->isVersioned) {
                 $managedCopyVersion = $class->reflFields[$class->versionField]->getValue($managedCopy);
                 $entityVersion = $class->reflFields[$class->versionField]->getValue($entity);
+
                 // Throw exception if versions dont match.
                 if ($managedCopyVersion != $entityVersion) {
-                    throw OptimisticLockException::lockFailedVersionMissmatch($entityVersion, $managedCopyVersion);
+                    throw OptimisticLockException::lockFailedVersionMissmatch($entity, $entityVersion, $managedCopyVersion);
                 }
             }
 
@@ -1426,15 +1745,18 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
                             // do not merge fields marked lazy that have not been fetched.
                             continue;
                         } else if ( ! $assoc2['isCascadeMerge']) {
-                            if ($this->getEntityState($other, self::STATE_DETACHED) == self::STATE_MANAGED) {
-                                $prop->setValue($managedCopy, $other);
-                            } else {
+                            if ($this->getEntityState($other, self::STATE_DETACHED) !== self::STATE_MANAGED) {
                                 $targetClass = $this->em->getClassMetadata($assoc2['targetEntity']);
-                                $id = $targetClass->getIdentifierValues($other);
-                                $proxy = $this->em->getProxyFactory()->getProxy($assoc2['targetEntity'], $id);
-                                $prop->setValue($managedCopy, $proxy);
-                                $this->registerManaged($proxy, $id, array());
+                                $relatedId = $targetClass->getIdentifierValues($other);
+
+                                if ($targetClass->subClasses) {
+                                    $other = $this->em->find($targetClass->name, $relatedId);
+                                } else {
+                                    $other = $this->em->getProxyFactory()->getProxy($assoc2['targetEntity'], $relatedId);
+                                    $this->registerManaged($other, $relatedId, array());
+                                }
                             }
+                            $prop->setValue($managedCopy, $other);
                         }
                     } else {
                         $mergeCol = $prop->getValue($entity);
@@ -1456,9 +1778,12 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
                         }
                         if ($assoc2['isCascadeMerge']) {
                             $managedCol->initialize();
-                            if (!$managedCol->isEmpty()) {
+
+                            // clear and set dirty a managed collection if its not also the same collection to merge from.
+                            if (!$managedCol->isEmpty() && $managedCol !== $mergeCol) {
                                 $managedCol->unwrap()->clear();
                                 $managedCol->setDirty(true);
+
                                 if ($assoc2['isOwningSide'] && $assoc2['type'] == ClassMetadata::MANY_TO_MANY && $class->isChangeTrackingNotify()) {
                                     $this->scheduleForDirtyCheck($managedCopy);
                                 }
@@ -1466,11 +1791,13 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
                         }
                     }
                 }
+
                 if ($class->isChangeTrackingNotify()) {
                     // Just treat all properties as changed, there is no other choice.
                     $this->propertyChanged($managedCopy, $name, null, $prop->getValue($managedCopy));
                 }
             }
+
             if ($class->isChangeTrackingDeferredExplicit()) {
                 $this->scheduleForDirtyCheck($entity);
             }
@@ -1479,10 +1806,12 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
         if ($prevManagedCopy !== null) {
             $assocField = $assoc['fieldName'];
             $prevClass = $this->em->getClassMetadata(get_class($prevManagedCopy));
+
             if ($assoc['type'] & ClassMetadata::TO_ONE) {
                 $prevClass->reflFields[$assocField]->setValue($prevManagedCopy, $managedCopy);
             } else {
                 $prevClass->reflFields[$assocField]->getValue($prevManagedCopy)->add($managedCopy);
+
                 if ($assoc['type'] == ClassMetadata::ONE_TO_MANY) {
                     $class->reflFields[$assoc['mappedBy']]->setValue($managedCopy, $prevManagedCopy);
                 }
@@ -1496,7 +1825,7 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
 
         return $managedCopy;
     }
-    
+
     /**
      * Detaches an entity from the persistence management. It's persistence will
      * no longer be managed by Doctrine.
@@ -1506,57 +1835,69 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
     public function detach($entity)
     {
         $visited = array();
+
         $this->doDetach($entity, $visited);
     }
-    
+
     /**
      * Executes a detach operation on the given entity.
-     * 
+     *
      * @param object $entity
      * @param array $visited
+     * @param boolean $noCascade if true, don't cascade detach operation
      */
-    private function doDetach($entity, array &$visited)
+    private function doDetach($entity, array &$visited, $noCascade = false)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($visited[$oid])) {
             return; // Prevent infinite recursion
         }
 
         $visited[$oid] = $entity; // mark visited
-        
+
         switch ($this->getEntityState($entity, self::STATE_DETACHED)) {
             case self::STATE_MANAGED:
                 if ($this->isInIdentityMap($entity)) {
                     $this->removeFromIdentityMap($entity);
                 }
-                unset($this->entityInsertions[$oid], $this->entityUpdates[$oid],
-                        $this->entityDeletions[$oid], $this->entityIdentifiers[$oid],
-                        $this->entityStates[$oid], $this->originalEntityData[$oid]);
+
+                unset(
+                    $this->entityInsertions[$oid],
+                    $this->entityUpdates[$oid],
+                    $this->entityDeletions[$oid],
+                    $this->entityIdentifiers[$oid],
+                    $this->entityStates[$oid],
+                    $this->originalEntityData[$oid]
+                );
                 break;
             case self::STATE_NEW:
             case self::STATE_DETACHED:
                 return;
         }
-        
-        $this->cascadeDetach($entity, $visited);
+
+        if ( ! $noCascade) {
+            $this->cascadeDetach($entity, $visited);
+        }
     }
-    
+
     /**
      * Refreshes the state of the given entity from the database, overwriting
      * any local, unpersisted changes.
-     * 
+     *
      * @param object $entity The entity to refresh.
      * @throws InvalidArgumentException If the entity is not MANAGED.
      */
     public function refresh($entity)
     {
         $visited = array();
+
         $this->doRefresh($entity, $visited);
     }
-    
+
     /**
      * Executes a refresh operation on an entity.
-     * 
+     *
      * @param object $entity The entity to refresh.
      * @param array $visited The already visited entities during cascades.
      * @throws InvalidArgumentException If the entity is not MANAGED.
@@ -1564,6 +1905,7 @@ public function refresh($entity)
     private function doRefresh($entity, array &$visited)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($visited[$oid])) {
             return; // Prevent infinite recursion
         }
@@ -1571,18 +1913,19 @@ private function doRefresh($entity, array &$visited)
         $visited[$oid] = $entity; // mark visited
 
         $class = $this->em->getClassMetadata(get_class($entity));
-        if ($this->getEntityState($entity) == self::STATE_MANAGED) {
-            $this->getEntityPersister($class->name)->refresh(
-                array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]),
-                $entity
-            );
-        } else {
-            throw new InvalidArgumentException("Entity is not MANAGED.");
+
+        if ($this->getEntityState($entity) !== self::STATE_MANAGED) {
+            throw ORMInvalidArgumentException::entityNotManaged($entity);
         }
-        
+
+        $this->getEntityPersister($class->name)->refresh(
+            array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]),
+            $entity
+        );
+
         $this->cascadeRefresh($entity, $visited);
     }
-    
+
     /**
      * Cascades a refresh operation to associated entities.
      *
@@ -1592,25 +1935,38 @@ private function doRefresh($entity, array &$visited)
     private function cascadeRefresh($entity, array &$visited)
     {
         $class = $this->em->getClassMetadata(get_class($entity));
-        foreach ($class->associationMappings as $assoc) {
-            if ( ! $assoc['isCascadeRefresh']) {
-                continue;
-            }
+
+        $associationMappings = array_filter(
+            $class->associationMappings,
+            function ($assoc) { return $assoc['isCascadeRefresh']; }
+        );
+
+        foreach ($associationMappings as $assoc) {
             $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity);
-            if ($relatedEntities instanceof Collection) {
-                if ($relatedEntities instanceof PersistentCollection) {
+
+            switch (true) {
+                case ($relatedEntities instanceof PersistentCollection):
                     // Unwrap so that foreach() does not initialize
                     $relatedEntities = $relatedEntities->unwrap();
-                }
-                foreach ($relatedEntities as $relatedEntity) {
-                    $this->doRefresh($relatedEntity, $visited);
-                }
-            } else if ($relatedEntities !== null) {
-                $this->doRefresh($relatedEntities, $visited);
+                    // break; is commented intentionally!
+
+                case ($relatedEntities instanceof Collection):
+                case (is_array($relatedEntities)):
+                    foreach ($relatedEntities as $relatedEntity) {
+                        $this->doRefresh($relatedEntity, $visited);
+                    }
+                    break;
+
+                case ($relatedEntities !== null):
+                    $this->doRefresh($relatedEntities, $visited);
+                    break;
+
+                default:
+                    // Do nothing
             }
         }
     }
-    
+
     /**
      * Cascades a detach operation to associated entities.
      *
@@ -1620,21 +1976,34 @@ private function cascadeRefresh($entity, array &$visited)
     private function cascadeDetach($entity, array &$visited)
     {
         $class = $this->em->getClassMetadata(get_class($entity));
-        foreach ($class->associationMappings as $assoc) {
-            if ( ! $assoc['isCascadeDetach']) {
-                continue;
-            }
+
+        $associationMappings = array_filter(
+            $class->associationMappings,
+            function ($assoc) { return $assoc['isCascadeDetach']; }
+        );
+
+        foreach ($associationMappings as $assoc) {
             $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity);
-            if ($relatedEntities instanceof Collection) {
-                if ($relatedEntities instanceof PersistentCollection) {
+
+            switch (true) {
+                case ($relatedEntities instanceof PersistentCollection):
                     // Unwrap so that foreach() does not initialize
                     $relatedEntities = $relatedEntities->unwrap();
-                }
-                foreach ($relatedEntities as $relatedEntity) {
-                    $this->doDetach($relatedEntity, $visited);
-                }
-            } else if ($relatedEntities !== null) {
-                $this->doDetach($relatedEntities, $visited);
+                    // break; is commented intentionally!
+
+                case ($relatedEntities instanceof Collection):
+                case (is_array($relatedEntities)):
+                    foreach ($relatedEntities as $relatedEntity) {
+                        $this->doDetach($relatedEntity, $visited);
+                    }
+                    break;
+
+                case ($relatedEntities !== null):
+                    $this->doDetach($relatedEntities, $visited);
+                    break;
+
+                default:
+                    // Do nothing
             }
         }
     }
@@ -1649,16 +2018,25 @@ private function cascadeDetach($entity, array &$visited)
     private function cascadeMerge($entity, $managedCopy, array &$visited)
     {
         $class = $this->em->getClassMetadata(get_class($entity));
-        foreach ($class->associationMappings as $assoc) {
-            if ( ! $assoc['isCascadeMerge']) {
-                continue;
-            }
+
+        $associationMappings = array_filter(
+            $class->associationMappings,
+            function ($assoc) { return $assoc['isCascadeMerge']; }
+        );
+
+        foreach ($associationMappings as $assoc) {
             $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity);
+
             if ($relatedEntities instanceof Collection) {
+                if ($relatedEntities === $class->reflFields[$assoc['fieldName']]->getValue($managedCopy)) {
+                    continue;
+                }
+
                 if ($relatedEntities instanceof PersistentCollection) {
                     // Unwrap so that foreach() does not initialize
                     $relatedEntities = $relatedEntities->unwrap();
                 }
+
                 foreach ($relatedEntities as $relatedEntity) {
                     $this->doMerge($relatedEntity, $visited, $managedCopy, $assoc);
                 }
@@ -1678,22 +2056,34 @@ private function cascadeMerge($entity, $managedCopy, array &$visited)
     private function cascadePersist($entity, array &$visited)
     {
         $class = $this->em->getClassMetadata(get_class($entity));
-        foreach ($class->associationMappings as $assoc) {
-            if ( ! $assoc['isCascadePersist']) {
-                continue;
-            }
-            
+
+        $associationMappings = array_filter(
+            $class->associationMappings,
+            function ($assoc) { return $assoc['isCascadePersist']; }
+        );
+
+        foreach ($associationMappings as $assoc) {
             $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity);
-            if (($relatedEntities instanceof Collection || is_array($relatedEntities))) {
-                if ($relatedEntities instanceof PersistentCollection) {
+
+            switch (true) {
+                case ($relatedEntities instanceof PersistentCollection):
                     // Unwrap so that foreach() does not initialize
                     $relatedEntities = $relatedEntities->unwrap();
-                }
-                foreach ($relatedEntities as $relatedEntity) {
-                    $this->doPersist($relatedEntity, $visited);
-                }
-            } else if ($relatedEntities !== null) {
-                $this->doPersist($relatedEntities, $visited);
+                    // break; is commented intentionally!
+
+                case ($relatedEntities instanceof Collection):
+                case (is_array($relatedEntities)):
+                    foreach ($relatedEntities as $relatedEntity) {
+                        $this->doPersist($relatedEntity, $visited);
+                    }
+                    break;
+
+                case ($relatedEntities !== null):
+                    $this->doPersist($relatedEntities, $visited);
+                    break;
+
+                default:
+                    // Do nothing
             }
         }
     }
@@ -1707,23 +2097,34 @@ private function cascadePersist($entity, array &$visited)
     private function cascadeRemove($entity, array &$visited)
     {
         $class = $this->em->getClassMetadata(get_class($entity));
-        foreach ($class->associationMappings as $assoc) {
-            if ( ! $assoc['isCascadeRemove']) {
-                continue;
-            }
-            
+
+        $associationMappings = array_filter(
+            $class->associationMappings,
+            function ($assoc) { return $assoc['isCascadeRemove']; }
+        );
+
+        foreach ($associationMappings as $assoc) {
             if ($entity instanceof Proxy && !$entity->__isInitialized__) {
                 $entity->__load();
             }
-            
+
             $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity);
-            if ($relatedEntities instanceof Collection || is_array($relatedEntities)) {
-                // If its a PersistentCollection initialization is intended! No unwrap!
-                foreach ($relatedEntities as $relatedEntity) {
-                    $this->doRemove($relatedEntity, $visited);
-                }
-            } else if ($relatedEntities !== null) {
-                $this->doRemove($relatedEntities, $visited);
+
+            switch (true) {
+                case ($relatedEntities instanceof Collection):
+                case (is_array($relatedEntities)):
+                    // If its a PersistentCollection initialization is intended! No unwrap!
+                    foreach ($relatedEntities as $relatedEntity) {
+                        $this->doRemove($relatedEntity, $visited);
+                    }
+                    break;
+
+                case ($relatedEntities !== null):
+                    $this->doRemove($relatedEntities, $visited);
+                    break;
+
+                default:
+                    // Do nothing
             }
         }
     }
@@ -1737,85 +2138,112 @@ private function cascadeRemove($entity, array &$visited)
      */
     public function lock($entity, $lockMode, $lockVersion = null)
     {
-        if ($this->getEntityState($entity) != self::STATE_MANAGED) {
-            throw new InvalidArgumentException("Entity is not MANAGED.");
+        if ($this->getEntityState($entity, self::STATE_DETACHED) != self::STATE_MANAGED) {
+            throw ORMInvalidArgumentException::entityNotManaged($entity);
         }
-        
+
         $entityName = get_class($entity);
         $class = $this->em->getClassMetadata($entityName);
 
-        if ($lockMode == \Doctrine\DBAL\LockMode::OPTIMISTIC) {
-            if (!$class->isVersioned) {
-                throw OptimisticLockException::notVersioned($entityName);
-            }
+        switch ($lockMode) {
+            case \Doctrine\DBAL\LockMode::OPTIMISTIC;
+                if ( ! $class->isVersioned) {
+                    throw OptimisticLockException::notVersioned($entityName);
+                }
+
+                if ($lockVersion === null) {
+                    return;
+                }
 
-            if ($lockVersion != null) {
                 $entityVersion = $class->reflFields[$class->versionField]->getValue($entity);
+
                 if ($entityVersion != $lockVersion) {
                     throw OptimisticLockException::lockFailedVersionMissmatch($entity, $lockVersion, $entityVersion);
                 }
-            }
-        } else if (in_array($lockMode, array(\Doctrine\DBAL\LockMode::PESSIMISTIC_READ, \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE))) {
 
-            if (!$this->em->getConnection()->isTransactionActive()) {
-                throw TransactionRequiredException::transactionRequired();
-            }
-            
-            $oid = spl_object_hash($entity);
+                break;
 
-            $this->getEntityPersister($class->name)->lock(
-                array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]),
-                $lockMode
-            );
+            case \Doctrine\DBAL\LockMode::PESSIMISTIC_READ:
+            case \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE:
+                if (!$this->em->getConnection()->isTransactionActive()) {
+                    throw TransactionRequiredException::transactionRequired();
+                }
+
+                $oid = spl_object_hash($entity);
+
+                $this->getEntityPersister($class->name)->lock(
+                    array_combine($class->getIdentifierFieldNames(), $this->entityIdentifiers[$oid]),
+                    $lockMode
+                );
+                break;
+
+            default:
+                // Do nothing
         }
     }
 
     /**
      * Gets the CommitOrderCalculator used by the UnitOfWork to order commits.
      *
-     * @return Doctrine\ORM\Internal\CommitOrderCalculator
+     * @return \Doctrine\ORM\Internal\CommitOrderCalculator
      */
     public function getCommitOrderCalculator()
     {
         if ($this->commitOrderCalculator === null) {
             $this->commitOrderCalculator = new Internal\CommitOrderCalculator;
         }
+
         return $this->commitOrderCalculator;
     }
 
     /**
      * Clears the UnitOfWork.
-     */
-    public function clear()
-    {
-        $this->identityMap =
-        $this->entityIdentifiers =
-        $this->originalEntityData =
-        $this->entityChangeSets =
-        $this->entityStates =
-        $this->scheduledForDirtyCheck =
-        $this->entityInsertions =
-        $this->entityUpdates =
-        $this->entityDeletions =
-        $this->collectionDeletions =
-        $this->collectionUpdates =
-        $this->extraUpdates =
-        $this->orphanRemovals = array();
-        if ($this->commitOrderCalculator !== null) {
-            $this->commitOrderCalculator->clear();
+     *
+     * @param string $entityName if given, only entities of this type will get detached
+     */
+    public function clear($entityName = null)
+    {
+        if ($entityName === null) {
+            $this->identityMap =
+            $this->entityIdentifiers =
+            $this->originalEntityData =
+            $this->entityChangeSets =
+            $this->entityStates =
+            $this->scheduledForDirtyCheck =
+            $this->entityInsertions =
+            $this->entityUpdates =
+            $this->entityDeletions =
+            $this->collectionDeletions =
+            $this->collectionUpdates =
+            $this->extraUpdates =
+            $this->readOnlyObjects =
+            $this->orphanRemovals = array();
+
+            if ($this->commitOrderCalculator !== null) {
+                $this->commitOrderCalculator->clear();
+            }
+        } else {
+            $visited = array();
+            foreach ($this->identityMap as $className => $entities) {
+                if ($className === $entityName) {
+                    foreach ($entities as $entity) {
+                        $this->doDetach($entity, $visited, true);
+                    }
+                }
+            }
         }
 
         if ($this->evm->hasListeners(Events::onClear)) {
-            $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->em));
+            $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->em, $entityName));
         }
     }
-    
+
     /**
      * INTERNAL:
      * Schedules an orphaned entity for removal. The remove() operation will be
      * invoked on that entity at the beginning of the next commit of this
      * UnitOfWork.
-     * 
+     *
      * @ignore
      * @param object $entity
      */
@@ -1823,7 +2251,7 @@ public function scheduleOrphanRemoval($entity)
     {
         $this->orphanRemovals[spl_object_hash($entity)] = $entity;
     }
-    
+
     /**
      * INTERNAL:
      * Schedules a complete collection for removal when this UnitOfWork commits.
@@ -1832,14 +2260,34 @@ public function scheduleOrphanRemoval($entity)
      */
     public function scheduleCollectionDeletion(PersistentCollection $coll)
     {
+        $coid = spl_object_hash($coll);
+
         //TODO: if $coll is already scheduled for recreation ... what to do?
         // Just remove $coll from the scheduled recreations?
-        $this->collectionDeletions[] = $coll;
+        if (isset($this->collectionUpdates[$coid])) {
+            unset($this->collectionUpdates[$coid]);
+        }
+
+        $this->collectionDeletions[$coid] = $coll;
     }
 
     public function isCollectionScheduledForDeletion(PersistentCollection $coll)
     {
-        return in_array($coll, $this->collectionsDeletions, true);
+        return isset($this->collectionsDeletions[spl_object_hash($coll)]);
+    }
+
+    /**
+     * @param ClassMetadata $class
+     */
+    private function newInstance($class)
+    {
+        $entity = $class->newInstance();
+
+        if ($entity instanceof \Doctrine\Common\Persistence\ObjectManagerAware) {
+            $entity->injectObjectManager($this->em, $class);
+        }
+
+        return $entity;
     }
 
     /**
@@ -1852,7 +2300,7 @@ public function isCollectionScheduledForDeletion(PersistentCollection $coll)
      * @param array $hints Any hints to account for during reconstitution/lookup of the entity.
      * @return object The managed entity instance.
      * @internal Highly performance-sensitive method.
-     * 
+     *
      * @todo Rename: getOrCreateEntity
      */
     public function createEntity($className, array $data, &$hints = array())
@@ -1862,184 +2310,231 @@ public function createEntity($className, array $data, &$hints = array())
 
         if ($class->isIdentifierComposite) {
             $id = array();
+
             foreach ($class->identifier as $fieldName) {
-                if (isset($class->associationMappings[$fieldName])) {
-                    $id[$fieldName] = $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']];
-                } else {
-                    $id[$fieldName] = $data[$fieldName];
-                }
+                $id[$fieldName] = isset($class->associationMappings[$fieldName])
+                    ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
+                    : $data[$fieldName];
             }
+
             $idHash = implode(' ', $id);
         } else {
-            if (isset($class->associationMappings[$class->identifier[0]])) {
-                $idHash = $data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']];
-            } else {
-                $idHash = $data[$class->identifier[0]];
-            }
+            $idHash = isset($class->associationMappings[$class->identifier[0]])
+                ? $data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']]
+                : $data[$class->identifier[0]];
+
             $id = array($class->identifier[0] => $idHash);
         }
-        
-        if (isset($this->identityMap[$class->rootEntityName][$idHash])) {            
+
+        if (isset($this->identityMap[$class->rootEntityName][$idHash])) {
             $entity = $this->identityMap[$class->rootEntityName][$idHash];
             $oid = spl_object_hash($entity);
+
             if ($entity instanceof Proxy && ! $entity->__isInitialized__) {
                 $entity->__isInitialized__ = true;
                 $overrideLocalValues = true;
+
                 if ($entity instanceof NotifyPropertyChanged) {
                     $entity->addPropertyChangedListener($this);
                 }
             } else {
                 $overrideLocalValues = isset($hints[Query::HINT_REFRESH]);
+
+                // If only a specific entity is set to refresh, check that it's the one
+                if(isset($hints[Query::HINT_REFRESH_ENTITY])) {
+                    $overrideLocalValues = $hints[Query::HINT_REFRESH_ENTITY] === $entity;
+
+                    // inject ObjectManager into just loaded proxies.
+                    if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
+                        $entity->injectObjectManager($this->em, $class);
+                    }
+                }
             }
 
             if ($overrideLocalValues) {
                 $this->originalEntityData[$oid] = $data;
             }
         } else {
-            $entity = $class->newInstance();
+            $entity = $this->newInstance($class);
             $oid = spl_object_hash($entity);
+
             $this->entityIdentifiers[$oid] = $id;
             $this->entityStates[$oid] = self::STATE_MANAGED;
             $this->originalEntityData[$oid] = $data;
             $this->identityMap[$class->rootEntityName][$idHash] = $entity;
+
             if ($entity instanceof NotifyPropertyChanged) {
                 $entity->addPropertyChangedListener($this);
             }
+
             $overrideLocalValues = true;
         }
 
-        if ($overrideLocalValues) {
-            foreach ($data as $field => $value) {
-                if (isset($class->fieldMappings[$field])) {
-                    $class->reflFields[$field]->setValue($entity, $value);
-                }
+        if ( ! $overrideLocalValues) {
+            return $entity;
+        }
+
+        foreach ($data as $field => $value) {
+            if (isset($class->fieldMappings[$field])) {
+                $class->reflFields[$field]->setValue($entity, $value);
+            }
+        }
+
+        // Loading the entity right here, if its in the eager loading map get rid of it there.
+        unset($this->eagerLoadingEntities[$class->rootEntityName][$idHash]);
+
+        if (isset($this->eagerLoadingEntities[$class->rootEntityName]) && ! $this->eagerLoadingEntities[$class->rootEntityName]) {
+            unset($this->eagerLoadingEntities[$class->rootEntityName]);
+        }
+
+        // Properly initialize any unfetched associations, if partial objects are not allowed.
+        if (isset($hints[Query::HINT_FORCE_PARTIAL_LOAD])) {
+            return $entity;
+        }
+
+        foreach ($class->associationMappings as $field => $assoc) {
+            // Check if the association is not among the fetch-joined associations already.
+            if (isset($hints['fetchAlias']) && isset($hints['fetched'][$hints['fetchAlias']][$field])) {
+                continue;
             }
 
-            // Loading the entity right here, if its in the eager loading map get rid of it there.
-            unset($this->eagerLoadingEntities[$class->rootEntityName][$idHash]);
-            
-            // Properly initialize any unfetched associations, if partial objects are not allowed.
-            if ( ! isset($hints[Query::HINT_FORCE_PARTIAL_LOAD])) {
-                foreach ($class->associationMappings as $field => $assoc) {
-                    // Check if the association is not among the fetch-joined associations already.
-                    if (isset($hints['fetched'][$className][$field])) {
+            $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
+
+            switch (true) {
+                case ($assoc['type'] & ClassMetadata::TO_ONE):
+                    if ( ! $assoc['isOwningSide']) {
+                        // Inverse side of x-to-one can never be lazy
+                        $class->reflFields[$field]->setValue($entity, $this->getEntityPersister($assoc['targetEntity'])->loadOneToOneEntity($assoc, $entity));
+
+                        continue 2;
+                    }
+
+                    $associatedId = array();
+
+                    // TODO: Is this even computed right in all cases of composite keys?
+                    foreach ($assoc['targetToSourceKeyColumns'] as $targetColumn => $srcColumn) {
+                        $joinColumnValue = isset($data[$srcColumn]) ? $data[$srcColumn] : null;
+
+                        if ($joinColumnValue !== null) {
+                            if ($targetClass->containsForeignIdentifier) {
+                                $associatedId[$targetClass->getFieldForColumn($targetColumn)] = $joinColumnValue;
+                            } else {
+                                $associatedId[$targetClass->fieldNames[$targetColumn]] = $joinColumnValue;
+                            }
+                        }
+                    }
+
+                    if ( ! $associatedId) {
+                        // Foreign key is NULL
+                        $class->reflFields[$field]->setValue($entity, null);
+                        $this->originalEntityData[$oid][$field] = null;
+
                         continue;
                     }
 
-                    $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
-
-                    if ($assoc['type'] & ClassMetadata::TO_ONE) {
-                        if ($assoc['isOwningSide']) {
-                            $associatedId = array();
-                            // TODO: Is this even computed right in all cases of composite keys?
-                            foreach ($assoc['targetToSourceKeyColumns'] as $targetColumn => $srcColumn) {
-                                $joinColumnValue = isset($data[$srcColumn]) ? $data[$srcColumn] : null;
-                                if ($joinColumnValue !== null) {
-                                    if ($targetClass->containsForeignIdentifier) {
-                                        $associatedId[$targetClass->getFieldForColumn($targetColumn)] = $joinColumnValue;
-                                    } else {
-                                        $associatedId[$targetClass->fieldNames[$targetColumn]] = $joinColumnValue;
-                                    }
-                                }
+                    if ( ! isset($hints['fetchMode'][$class->name][$field])) {
+                        $hints['fetchMode'][$class->name][$field] = $assoc['fetch'];
+                    }
+
+                    // Foreign key is set
+                    // Check identity map first
+                    // FIXME: Can break easily with composite keys if join column values are in
+                    //        wrong order. The correct order is the one in ClassMetadata#identifier.
+                    $relatedIdHash = implode(' ', $associatedId);
+
+                    switch (true) {
+                        case (isset($this->identityMap[$targetClass->rootEntityName][$relatedIdHash])):
+                            $newValue = $this->identityMap[$targetClass->rootEntityName][$relatedIdHash];
+
+                            // if this is an uninitialized proxy, we are deferring eager loads,
+                            // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
+                            // then we cann append this entity for eager loading!
+                            if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER &&
+                                isset($hints['deferEagerLoad']) &&
+                                !$targetClass->isIdentifierComposite &&
+                                $newValue instanceof Proxy &&
+                                $newValue->__isInitialized__ === false) {
+
+                                $this->eagerLoadingEntities[$targetClass->rootEntityName][$relatedIdHash] = current($associatedId);
                             }
-                            if ( ! $associatedId) {
-                                // Foreign key is NULL
-                                $class->reflFields[$field]->setValue($entity, null);
-                                $this->originalEntityData[$oid][$field] = null;
-                            } else {
-                                if (!isset($hints['fetchMode'][$class->name][$field])) {
-                                    $hints['fetchMode'][$class->name][$field] = $assoc['fetch'];
-                                }
 
-                                // Foreign key is set
-                                // Check identity map first
-                                // FIXME: Can break easily with composite keys if join column values are in
-                                //        wrong order. The correct order is the one in ClassMetadata#identifier.
-                                $relatedIdHash = implode(' ', $associatedId);
-                                if (isset($this->identityMap[$targetClass->rootEntityName][$relatedIdHash])) {
-                                    $newValue = $this->identityMap[$targetClass->rootEntityName][$relatedIdHash];
-                                    
-                                    // if this is an uninitialized proxy, we are deferring eager loads,
-                                    // this association is marked as eager fetch, and its an uninitialized proxy (wtf!)
-                                    // then we cann append this entity for eager loading!
-                                    if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER &&
-                                        isset($hints['deferEagerLoad']) &&
-                                        !$targetClass->isIdentifierComposite &&
-                                        $newValue instanceof Proxy &&
-                                        $newValue->__isInitialized__ === false) {
-                                        
-                                        $this->eagerLoadingEntities[$targetClass->rootEntityName][$relatedIdHash] = current($associatedId);
-                                    }
-                                } else {
-                                    if ($targetClass->subClasses) {
-                                        // If it might be a subtype, it can not be lazy. There isn't even
-                                        // a way to solve this with deferred eager loading, which means putting
-                                        // an entity with subclasses at a *-to-one location is really bad! (performance-wise)
-                                        $newValue = $this->getEntityPersister($assoc['targetEntity'])
-                                                ->loadOneToOneEntity($assoc, $entity, null, $associatedId);
-                                    } else {
-                                        // Deferred eager load only works for single identifier classes
-
-                                        if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER) {
-                                            if (isset($hints['deferEagerLoad']) && !$targetClass->isIdentifierComposite) {
-                                                // TODO: Is there a faster approach?
-                                                $this->eagerLoadingEntities[$targetClass->rootEntityName][$relatedIdHash] = current($associatedId);
-
-                                                $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $associatedId);
-                                            } else {
-                                                // TODO: This is very imperformant, ignore it?
-                                                $newValue = $this->em->find($assoc['targetEntity'], $associatedId);
-                                            }
-                                        } else {
-                                            $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $associatedId);
-                                        }
-                                        // PERF: Inlined & optimized code from UnitOfWork#registerManaged()
-                                        $newValueOid = spl_object_hash($newValue);
-                                        $this->entityIdentifiers[$newValueOid] = $associatedId;
-                                        $this->identityMap[$targetClass->rootEntityName][$relatedIdHash] = $newValue;
-                                        $this->entityStates[$newValueOid] = self::STATE_MANAGED;
-                                        // make sure that when an proxy is then finally loaded, $this->originalEntityData is set also!
-                                    }
-                                }
-                                $this->originalEntityData[$oid][$field] = $newValue;
-                                $class->reflFields[$field]->setValue($entity, $newValue);
-                                
-                                if ($assoc['inversedBy'] && $assoc['type'] & ClassMetadata::ONE_TO_ONE) {
-                                    $inverseAssoc = $targetClass->associationMappings[$assoc['inversedBy']];
-                                    $targetClass->reflFields[$inverseAssoc['fieldName']]->setValue($newValue, $entity);
-                                }
+                            break;
+
+                        case ($targetClass->subClasses):
+                            // If it might be a subtype, it can not be lazy. There isn't even
+                            // a way to solve this with deferred eager loading, which means putting
+                            // an entity with subclasses at a *-to-one location is really bad! (performance-wise)
+                            $newValue = $this->getEntityPersister($assoc['targetEntity'])->loadOneToOneEntity($assoc, $entity, $associatedId);
+                            break;
+
+                        default:
+                            switch (true) {
+                                // We are negating the condition here. Other cases will assume it is valid!
+                                case ($hints['fetchMode'][$class->name][$field] !== ClassMetadata::FETCH_EAGER):
+                                    $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $associatedId);
+                                    break;
+
+                                // Deferred eager load only works for single identifier classes
+                                case (isset($hints['deferEagerLoad']) && ! $targetClass->isIdentifierComposite):
+                                    // TODO: Is there a faster approach?
+                                    $this->eagerLoadingEntities[$targetClass->rootEntityName][$relatedIdHash] = current($associatedId);
+
+                                    $newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $associatedId);
+                                    break;
+
+                                default:
+                                    // TODO: This is very imperformant, ignore it?
+                                    $newValue = $this->em->find($assoc['targetEntity'], $associatedId);
+                                    break;
                             }
-                        } else {
-                            // Inverse side of x-to-one can never be lazy
-                            $class->reflFields[$field]->setValue($entity, $this->getEntityPersister($assoc['targetEntity'])
-                                    ->loadOneToOneEntity($assoc, $entity, null));
-                        }
-                    } else {
-                        // Inject collection
-                        $pColl = new PersistentCollection($this->em, $targetClass, new ArrayCollection);
-                        $pColl->setOwner($entity, $assoc);
-
-                        $reflField = $class->reflFields[$field];
-                        $reflField->setValue($entity, $pColl);
-
-                        if ($assoc['fetch'] == ClassMetadata::FETCH_EAGER) {
-                            $this->loadCollection($pColl);
-                            $pColl->takeSnapshot();
-                        } else {
-                            $pColl->setInitialized(false);
-                        }
-                        $this->originalEntityData[$oid][$field] = $pColl;
+
+                            // PERF: Inlined & optimized code from UnitOfWork#registerManaged()
+                            $newValueOid = spl_object_hash($newValue);
+                            $this->entityIdentifiers[$newValueOid] = $associatedId;
+                            $this->identityMap[$targetClass->rootEntityName][$relatedIdHash] = $newValue;
+                            $this->entityStates[$newValueOid] = self::STATE_MANAGED;
+                            // make sure that when an proxy is then finally loaded, $this->originalEntityData is set also!
+                            break;
                     }
-                }
+
+                    $this->originalEntityData[$oid][$field] = $newValue;
+                    $class->reflFields[$field]->setValue($entity, $newValue);
+
+                    if ($assoc['inversedBy'] && $assoc['type'] & ClassMetadata::ONE_TO_ONE) {
+                        $inverseAssoc = $targetClass->associationMappings[$assoc['inversedBy']];
+                        $targetClass->reflFields[$inverseAssoc['fieldName']]->setValue($newValue, $entity);
+                    }
+
+                    break;
+
+                default:
+                    // Inject collection
+                    $pColl = new PersistentCollection($this->em, $targetClass, new ArrayCollection);
+                    $pColl->setOwner($entity, $assoc);
+                    $pColl->setInitialized(false);
+
+                    $reflField = $class->reflFields[$field];
+                    $reflField->setValue($entity, $pColl);
+
+                    if ($assoc['fetch'] == ClassMetadata::FETCH_EAGER) {
+                        $this->loadCollection($pColl);
+                        $pColl->takeSnapshot();
+                    }
+
+                    $this->originalEntityData[$oid][$field] = $pColl;
+                    break;
             }
         }
-        
-        //TODO: These should be invoked later, after hydration, because associations may not yet be loaded here.
-        if (isset($class->lifecycleCallbacks[Events::postLoad])) {
-            $class->invokeLifecycleCallbacks(Events::postLoad, $entity);
-        }
-        if ($this->evm->hasListeners(Events::postLoad)) {
-            $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($entity, $this->em));
+
+        if ($overrideLocalValues) {
+            if (isset($class->lifecycleCallbacks[Events::postLoad])) {
+                $class->invokeLifecycleCallbacks(Events::postLoad, $entity);
+            }
+
+
+            if ($this->evm->hasListeners(Events::postLoad)) {
+                $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($entity, $this->em));
+            }
         }
 
         return $entity;
@@ -2050,17 +2545,22 @@ public function createEntity($className, array $data, &$hints = array())
      */
     public function triggerEagerLoads()
     {
-        if (!$this->eagerLoadingEntities) {
+        if ( ! $this->eagerLoadingEntities) {
             return;
         }
 
         // avoid infinite recursion
-        $eagerLoadingEntities = $this->eagerLoadingEntities;
+        $eagerLoadingEntities       = $this->eagerLoadingEntities;
         $this->eagerLoadingEntities = array();
 
-        foreach ($eagerLoadingEntities AS $entityName => $ids) {
+        foreach ($eagerLoadingEntities as $entityName => $ids) {
             $class = $this->em->getClassMetadata($entityName);
-            $this->getEntityPersister($entityName)->loadAll(array_combine($class->identifier, array(array_values($ids))));
+
+            if ($ids) {
+                $this->getEntityPersister($entityName)->loadAll(
+                    array_combine($class->identifier, array(array_values($ids)))
+                );
+            }
         }
     }
 
@@ -2072,15 +2572,16 @@ public function triggerEagerLoads()
      */
     public function loadCollection(PersistentCollection $collection)
     {
-        $assoc = $collection->getMapping();
+        $assoc     = $collection->getMapping();
+        $persister = $this->getEntityPersister($assoc['targetEntity']);
+
         switch ($assoc['type']) {
             case ClassMetadata::ONE_TO_MANY:
-                $this->getEntityPersister($assoc['targetEntity'])->loadOneToManyCollection(
-                        $assoc, $collection->getOwner(), $collection);
+                $persister->loadOneToManyCollection($assoc, $collection->getOwner(), $collection);
                 break;
+
             case ClassMetadata::MANY_TO_MANY:
-                $this->getEntityPersister($assoc['targetEntity'])->loadManyToManyCollection(
-                        $assoc, $collection->getOwner(), $collection);
+                $persister->loadManyToManyCollection($assoc, $collection->getOwner(), $collection);
                 break;
         }
     }
@@ -2105,12 +2606,14 @@ public function getIdentityMap()
     public function getOriginalEntityData($entity)
     {
         $oid = spl_object_hash($entity);
+
         if (isset($this->originalEntityData[$oid])) {
             return $this->originalEntityData[$oid];
         }
+
         return array();
     }
-    
+
     /**
      * @ignore
      */
@@ -2159,9 +2662,11 @@ public function getEntityIdentifier($entity)
     public function tryGetById($id, $rootClassName)
     {
         $idHash = implode(' ', (array) $id);
+
         if (isset($this->identityMap[$rootClassName][$idHash])) {
             return $this->identityMap[$rootClassName][$idHash];
         }
+
         return false;
     }
 
@@ -2174,6 +2679,7 @@ public function tryGetById($id, $rootClassName)
     public function scheduleForDirtyCheck($entity)
     {
         $rootClassName = $this->em->getClassMetadata(get_class($entity))->rootEntityName;
+
         $this->scheduledForDirtyCheck[$rootClassName][spl_object_hash($entity)] = $entity;
     }
 
@@ -2195,34 +2701,45 @@ public function hasPendingInsertions()
      */
     public function size()
     {
-        $count = 0;
-        foreach ($this->identityMap as $entitySet) {
-            $count += count($entitySet);
-        }
-        return $count;
+        $countArray = array_map(function ($item) { return count($item); }, $this->identityMap);
+
+        return array_sum($countArray);
     }
 
     /**
      * Gets the EntityPersister for an Entity.
      *
      * @param string $entityName  The name of the Entity.
-     * @return Doctrine\ORM\Persisters\AbstractEntityPersister
+     *
+     * @return \Doctrine\ORM\Persisters\BasicEntityPersister
      */
     public function getEntityPersister($entityName)
     {
-        if ( ! isset($this->persisters[$entityName])) {
-            $class = $this->em->getClassMetadata($entityName);
-            if ($class->isInheritanceTypeNone()) {
+        if (isset($this->persisters[$entityName])) {
+            return $this->persisters[$entityName];
+        }
+
+        $class = $this->em->getClassMetadata($entityName);
+
+        switch (true) {
+            case ($class->isInheritanceTypeNone()):
                 $persister = new Persisters\BasicEntityPersister($this->em, $class);
-            } else if ($class->isInheritanceTypeSingleTable()) {
+                break;
+
+            case ($class->isInheritanceTypeSingleTable()):
                 $persister = new Persisters\SingleTablePersister($this->em, $class);
-            } else if ($class->isInheritanceTypeJoined()) {
+                break;
+
+            case ($class->isInheritanceTypeJoined()):
                 $persister = new Persisters\JoinedSubclassPersister($this->em, $class);
-            } else {
+                break;
+
+            default:
                 $persister = new Persisters\UnionSubclassPersister($this->em, $class);
-            }
-            $this->persisters[$entityName] = $persister;
         }
+
+        $this->persisters[$entityName] = $persister;
+
         return $this->persisters[$entityName];
     }
 
@@ -2230,19 +2747,29 @@ public function getEntityPersister($entityName)
      * Gets a collection persister for a collection-valued association.
      *
      * @param AssociationMapping $association
+     *
      * @return AbstractCollectionPersister
      */
     public function getCollectionPersister(array $association)
     {
         $type = $association['type'];
-        if ( ! isset($this->collectionPersisters[$type])) {
-            if ($type == ClassMetadata::ONE_TO_MANY) {
+
+        if (isset($this->collectionPersisters[$type])) {
+            return $this->collectionPersisters[$type];
+        }
+
+        switch ($type) {
+            case ClassMetadata::ONE_TO_MANY:
                 $persister = new Persisters\OneToManyPersister($this->em);
-            } else if ($type == ClassMetadata::MANY_TO_MANY) {
+                break;
+
+            case ClassMetadata::MANY_TO_MANY:
                 $persister = new Persisters\ManyToManyPersister($this->em);
-            }
-            $this->collectionPersisters[$type] = $persister;
+                break;
         }
+
+        $this->collectionPersisters[$type] = $persister;
+
         return $this->collectionPersisters[$type];
     }
 
@@ -2257,9 +2784,11 @@ public function getCollectionPersister(array $association)
     public function registerManaged($entity, array $id, array $data)
     {
         $oid = spl_object_hash($entity);
-        $this->entityIdentifiers[$oid] = $id;
-        $this->entityStates[$oid] = self::STATE_MANAGED;
+
+        $this->entityIdentifiers[$oid]  = $id;
+        $this->entityStates[$oid]       = self::STATE_MANAGED;
         $this->originalEntityData[$oid] = $data;
+
         $this->addToIdentityMap($entity);
     }
 
@@ -2286,7 +2815,7 @@ public function clearEntityChangeSet($oid)
      */
     public function propertyChanged($entity, $propertyName, $oldValue, $newValue)
     {
-        $oid = spl_object_hash($entity);
+        $oid   = spl_object_hash($entity);
         $class = $this->em->getClassMetadata(get_class($entity));
 
         $isAssocField = isset($class->associationMappings[$propertyName]);
@@ -2297,6 +2826,7 @@ public function propertyChanged($entity, $propertyName, $oldValue, $newValue)
 
         // Update changeset and mark entity for synchronization
         $this->entityChangeSets[$oid][$propertyName] = array($oldValue, $newValue);
+
         if ( ! isset($this->scheduledForDirtyCheck[$class->rootEntityName][$oid])) {
             $this->scheduleForDirtyCheck($entity);
         }
@@ -2304,27 +2834,27 @@ public function propertyChanged($entity, $propertyName, $oldValue, $newValue)
 
     /**
      * Gets the currently scheduled entity insertions in this UnitOfWork.
-     * 
+     *
      * @return array
      */
     public function getScheduledEntityInsertions()
     {
         return $this->entityInsertions;
     }
-    
+
     /**
      * Gets the currently scheduled entity updates in this UnitOfWork.
-     * 
+     *
      * @return array
      */
     public function getScheduledEntityUpdates()
     {
         return $this->entityUpdates;
     }
-    
+
     /**
      * Gets the currently scheduled entity deletions in this UnitOfWork.
-     * 
+     *
      * @return array
      */
     public function getScheduledEntityDeletions()
@@ -2351,10 +2881,10 @@ public function getScheduledCollectionUpdates()
     {
         return $this->collectionUpdates;
     }
-    
+
     /**
      * Helper method to initialize a lazy loading proxy or persistent collection.
-     * 
+     *
      * @param object
      * @return void
      */
@@ -2362,19 +2892,58 @@ public function initializeObject($obj)
     {
         if ($obj instanceof Proxy) {
             $obj->__load();
-        } else if ($obj instanceof PersistentCollection) {
+
+            return;
+        }
+
+        if ($obj instanceof PersistentCollection) {
             $obj->initialize();
         }
     }
-    
+
     /**
      * Helper method to show an object as string.
-     * 
+     *
      * @param  object $obj
-     * @return string 
+     * @return string
      */
     private static function objToStr($obj)
     {
         return method_exists($obj, '__toString') ? (string)$obj : get_class($obj).'@'.spl_object_hash($obj);
     }
+
+    /**
+     * Marks an entity as read-only so that it will not be considered for updates during UnitOfWork#commit().
+     *
+     * This operation cannot be undone as some parts of the UnitOfWork now keep gathering information
+     * on this object that might be necessary to perform a correct udpate.
+     *
+     * @throws \InvalidArgumentException
+     * @param $object
+     * @return void
+     */
+    public function markReadOnly($object)
+    {
+        if ( ! is_object($object) || ! $this->isInIdentityMap($object)) {
+            throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
+        }
+
+        $this->readOnlyObjects[spl_object_hash($object)] = true;
+    }
+
+    /**
+     * Is this entity read only?
+     *
+     * @throws \InvalidArgumentException
+     * @param $object
+     * @return void
+     */
+    public function isReadOnly($object)
+    {
+        if ( ! is_object($object) ) {
+            throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
+        }
+
+        return isset($this->readOnlyObjects[spl_object_hash($object)]);
+    }
 }
diff --git a/src/lib/Doctrine/ORM/Version.php b/src/lib/Doctrine/ORM/Version.php
index a64643d9fd..9d41ec7aed 100644
--- a/src/lib/Doctrine/ORM/Version.php
+++ b/src/lib/Doctrine/ORM/Version.php
@@ -16,7 +16,7 @@
  * and is licensed under the LGPL. For more information, see
  * .
  */
- 
+
 namespace Doctrine\ORM;
 
 /**
@@ -36,13 +36,13 @@ class Version
     /**
      * Current Doctrine Version
      */
-    const VERSION = '2.1.0';
+    const VERSION = '2.2.2';
 
     /**
      * Compares a Doctrine version with the current one.
      *
      * @param string $version Doctrine version to compare.
-     * @return int Returns -1 if older, 0 if it is the same, 1 if version 
+     * @return int Returns -1 if older, 0 if it is the same, 1 if version
      *             passed as argument is newer.
      */
     public static function compare($version)

From e803a6e30fb47856c10fd8998882814996ce833c Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Thu, 19 Apr 2012 05:19:12 +0400
Subject: [PATCH 013/562] E:0040373 [*] The Doctrine library is updated up to
 latest version (2.2)

---
 src/classes/XLite/Model/Base/Address.php      | 12 +++++------
 src/classes/XLite/Model/Base/Image.php        |  2 +-
 .../XLite/Model/Base/PersonalAddress.php      |  6 +++---
 src/classes/XLite/Model/Base/Storage.php      |  6 +++---
 src/classes/XLite/Model/Base/Surcharge.php    |  6 +++---
 .../XLite/Model/Base/SurchargeOwner.php       |  4 ++--
 src/classes/XLite/Model/Base/Translation.php  |  2 +-
 src/classes/XLite/Model/Category.php          |  2 +-
 src/classes/XLite/Model/CategoryProducts.php  |  2 +-
 .../XLite/Model/CategoryTranslation.php       |  6 +++---
 src/classes/XLite/Model/Config.php            |  6 +++---
 src/classes/XLite/Model/ConfigTranslation.php |  2 +-
 src/classes/XLite/Model/Country.php           |  6 +++---
 src/classes/XLite/Model/Currency.php          | 12 +++++------
 .../XLite/Model/CurrencyTranslation.php       |  2 +-
 src/classes/XLite/Model/DataSource.php        |  2 +-
 src/classes/XLite/Model/EventTask.php         |  2 +-
 src/classes/XLite/Model/FormId.php            |  2 +-
 src/classes/XLite/Model/IframeContent.php     |  2 +-
 .../XLite/Model/Image/Product/Image.php       |  2 +-
 src/classes/XLite/Model/Language.php          |  4 ++--
 src/classes/XLite/Model/LanguageLabel.php     |  2 +-
 .../XLite/Model/LanguageTranslation.php       |  2 +-
 .../XLite/Model/MembershipTranslation.php     |  2 +-
 src/classes/XLite/Model/Module.php            |  4 ++--
 src/classes/XLite/Model/ModuleKey.php         |  6 +++---
 src/classes/XLite/Model/Order.php             |  4 ++--
 src/classes/XLite/Model/Order/Modifier.php    |  2 +-
 src/classes/XLite/Model/OrderDetail.php       |  4 ++--
 src/classes/XLite/Model/OrderItem.php         |  8 ++++----
 src/classes/XLite/Model/Payment/Method.php    |  2 +-
 .../XLite/Model/Payment/MethodSetting.php     |  2 +-
 .../XLite/Model/Payment/MethodTranslation.php |  2 +-
 .../XLite/Model/Payment/Transaction.php       | 12 +++++------
 .../XLite/Model/Payment/TransactionData.php   |  6 +++---
 src/classes/XLite/Model/Product.php           |  4 ++--
 .../XLite/Model/ProductClassTranslation.php   |  2 +-
 .../XLite/Model/ProductTranslation.php        |  6 +++---
 src/classes/XLite/Model/Profile.php           | 16 +++++++--------
 src/classes/XLite/Model/Role/Permission.php   |  4 ++--
 src/classes/XLite/Model/Session.php           |  2 +-
 src/classes/XLite/Model/SessionCell.php       |  4 ++--
 src/classes/XLite/Model/Shipping/Markup.php   | 20 +++++++++----------
 src/classes/XLite/Model/Shipping/Method.php   |  6 +++---
 .../Model/Shipping/MethodTranslation.php      |  2 +-
 src/classes/XLite/Model/State.php             |  4 ++--
 src/classes/XLite/Model/Task.php              |  2 +-
 src/classes/XLite/Model/TemplatePatch.php     | 18 ++++++++---------
 src/classes/XLite/Model/TmpVar.php            |  2 +-
 src/classes/XLite/Model/ViewList.php          | 10 +++++-----
 src/classes/XLite/Model/Zone.php              |  2 +-
 src/classes/XLite/Model/ZoneElement.php       |  6 +++---
 .../Model/Product/AttachmentTranslation.php   |  2 +-
 .../CDev/ProductOptions/Model/OptionGroup.php |  4 ++--
 .../Model/OptionGroupTranslation.php          |  2 +-
 .../ProductOptions/Model/OptionSurcharge.php  |  6 +++---
 .../Model/OptionTranslation.php               |  2 +-
 .../ProductOptions/Model/OrderItemOption.php  |  4 ++--
 .../XLite/Module/CDev/Sale/Model/Product.php  |  2 +-
 .../Module/CDev/SalesTax/Model/Tax/Rate.php   |  2 +-
 .../CDev/SalesTax/Model/TaxTranslation.php    |  2 +-
 .../XLite/Module/CDev/VAT/Model/Tax/Rate.php  |  2 +-
 .../Module/CDev/VAT/Model/TaxTranslation.php  |  2 +-
 63 files changed, 144 insertions(+), 144 deletions(-)

diff --git a/src/classes/XLite/Model/Base/Address.php b/src/classes/XLite/Model/Base/Address.php
index f94980ffb8..1f22ddbb9f 100644
--- a/src/classes/XLite/Model/Base/Address.php
+++ b/src/classes/XLite/Model/Base/Address.php
@@ -57,7 +57,7 @@ abstract class Address extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $address_type = 'R';
 
@@ -68,7 +68,7 @@ abstract class Address extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $phone = '';
 
@@ -79,7 +79,7 @@ abstract class Address extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $street = '';
 
@@ -90,7 +90,7 @@ abstract class Address extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $city = '';
 
@@ -113,7 +113,7 @@ abstract class Address extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $custom_state = '';
 
@@ -136,7 +136,7 @@ abstract class Address extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $zipcode = '';
 
diff --git a/src/classes/XLite/Model/Base/Image.php b/src/classes/XLite/Model/Base/Image.php
index 0fefa7d6c4..c3b617e4cf 100644
--- a/src/classes/XLite/Model/Base/Image.php
+++ b/src/classes/XLite/Model/Base/Image.php
@@ -86,7 +86,7 @@ abstract class Image extends \XLite\Model\Base\Storage
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="32", nullable=true)
+     * @Column (type="fixedstring", length=32, nullable=true)
      */
     protected $hash;
 
diff --git a/src/classes/XLite/Model/Base/PersonalAddress.php b/src/classes/XLite/Model/Base/PersonalAddress.php
index a1238d44e4..a600c4d72e 100644
--- a/src/classes/XLite/Model/Base/PersonalAddress.php
+++ b/src/classes/XLite/Model/Base/PersonalAddress.php
@@ -44,7 +44,7 @@ abstract class PersonalAddress extends \XLite\Model\Base\Address
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $title = '';
 
@@ -55,7 +55,7 @@ abstract class PersonalAddress extends \XLite\Model\Base\Address
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $firstname = '';
 
@@ -66,7 +66,7 @@ abstract class PersonalAddress extends \XLite\Model\Base\Address
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $lastname = '';
 
diff --git a/src/classes/XLite/Model/Base/Storage.php b/src/classes/XLite/Model/Base/Storage.php
index c144544c6c..3a70973fcd 100644
--- a/src/classes/XLite/Model/Base/Storage.php
+++ b/src/classes/XLite/Model/Base/Storage.php
@@ -74,7 +74,7 @@ abstract class Storage extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="512")
+     * @Column (type="string", length=512)
      */
     protected $path;
 
@@ -96,7 +96,7 @@ abstract class Storage extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $mime = 'application/octet-stream';
 
@@ -107,7 +107,7 @@ abstract class Storage extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="1")
+     * @Column (type="string", length=1)
      */
     protected $storageType = self::STORAGE_RELATIVE;
 
diff --git a/src/classes/XLite/Model/Base/Surcharge.php b/src/classes/XLite/Model/Base/Surcharge.php
index 2d17f1a83b..c69103582f 100644
--- a/src/classes/XLite/Model/Base/Surcharge.php
+++ b/src/classes/XLite/Model/Base/Surcharge.php
@@ -80,7 +80,7 @@ abstract class Surcharge extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="8")
+     * @Column (type="fixedstring", length=8)
      */
     protected $type;
 
@@ -91,7 +91,7 @@ abstract class Surcharge extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $code;
 
@@ -102,7 +102,7 @@ abstract class Surcharge extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $class;
 
diff --git a/src/classes/XLite/Model/Base/SurchargeOwner.php b/src/classes/XLite/Model/Base/SurchargeOwner.php
index c2444a52b2..e3c463b007 100644
--- a/src/classes/XLite/Model/Base/SurchargeOwner.php
+++ b/src/classes/XLite/Model/Base/SurchargeOwner.php
@@ -44,7 +44,7 @@ abstract class SurchargeOwner extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $total = 0.0000;
 
@@ -55,7 +55,7 @@ abstract class SurchargeOwner extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $subtotal = 0.0000;
 
diff --git a/src/classes/XLite/Model/Base/Translation.php b/src/classes/XLite/Model/Base/Translation.php
index ce7be196e1..7d550db092 100644
--- a/src/classes/XLite/Model/Base/Translation.php
+++ b/src/classes/XLite/Model/Base/Translation.php
@@ -62,7 +62,7 @@ abstract class Translation extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="2")
+     * @Column (type="fixedstring", length=2)
      */
     protected $code = self::DEFAULT_LANGUAGE;
 
diff --git a/src/classes/XLite/Model/Category.php b/src/classes/XLite/Model/Category.php
index a8cac1ff8e..e7d8cdd889 100644
--- a/src/classes/XLite/Model/Category.php
+++ b/src/classes/XLite/Model/Category.php
@@ -98,7 +98,7 @@ class Category extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $cleanURL = '';
 
diff --git a/src/classes/XLite/Model/CategoryProducts.php b/src/classes/XLite/Model/CategoryProducts.php
index b543f3f56b..8869e3de56 100644
--- a/src/classes/XLite/Model/CategoryProducts.php
+++ b/src/classes/XLite/Model/CategoryProducts.php
@@ -65,7 +65,7 @@ class CategoryProducts extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="integer", length="11", nullable=false)
+     * @Column (type="integer", length=11, nullable=false)
      */
     protected $orderby = 0;
 
diff --git a/src/classes/XLite/Model/CategoryTranslation.php b/src/classes/XLite/Model/CategoryTranslation.php
index d494ef01d5..071606a399 100644
--- a/src/classes/XLite/Model/CategoryTranslation.php
+++ b/src/classes/XLite/Model/CategoryTranslation.php
@@ -50,7 +50,7 @@ class CategoryTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 
@@ -72,7 +72,7 @@ class CategoryTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $meta_tags = '';
 
@@ -94,7 +94,7 @@ class CategoryTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $meta_title = '';
 }
diff --git a/src/classes/XLite/Model/Config.php b/src/classes/XLite/Model/Config.php
index dc303121d3..d5733f7665 100644
--- a/src/classes/XLite/Model/Config.php
+++ b/src/classes/XLite/Model/Config.php
@@ -66,7 +66,7 @@ class Config extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $name;
 
@@ -77,7 +77,7 @@ class Config extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $category;
 
@@ -90,7 +90,7 @@ class Config extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $type = '';
 
diff --git a/src/classes/XLite/Model/ConfigTranslation.php b/src/classes/XLite/Model/ConfigTranslation.php
index ec3fbbbe0c..f4e1e4051c 100644
--- a/src/classes/XLite/Model/ConfigTranslation.php
+++ b/src/classes/XLite/Model/ConfigTranslation.php
@@ -50,7 +50,7 @@ class ConfigTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $option_name;
 
diff --git a/src/classes/XLite/Model/Country.php b/src/classes/XLite/Model/Country.php
index 95bdd80e20..ee90ef6869 100644
--- a/src/classes/XLite/Model/Country.php
+++ b/src/classes/XLite/Model/Country.php
@@ -50,7 +50,7 @@ class Country extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="50")
+     * @Column (type="string", length=50)
      */
     protected $country;
 
@@ -62,7 +62,7 @@ class Country extends \XLite\Model\AEntity
      * @since 1.0.0
      *
      * @Id
-     * @Column (type="fixedstring", length="2", unique=true)
+     * @Column (type="fixedstring", length=2, unique=true)
      */
     protected $code;
 
@@ -84,7 +84,7 @@ class Country extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="3")
+     * @Column (type="fixedstring", length=3)
      */
     protected $code3 = '';
 
diff --git a/src/classes/XLite/Model/Currency.php b/src/classes/XLite/Model/Currency.php
index 6fe7237dba..13058994e7 100644
--- a/src/classes/XLite/Model/Currency.php
+++ b/src/classes/XLite/Model/Currency.php
@@ -61,7 +61,7 @@ class Currency extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="3", unique=true)
+     * @Column (type="fixedstring", length=3, unique=true)
      */
     protected $code;
 
@@ -72,7 +72,7 @@ class Currency extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="16")
+     * @Column (type="string", length=16)
      */
     protected $symbol;
 
@@ -83,7 +83,7 @@ class Currency extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $prefix = '';
 
@@ -94,7 +94,7 @@ class Currency extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $suffix = '';
 
@@ -115,7 +115,7 @@ class Currency extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="8")
+     * @Column (type="string", length=8)
      */
     protected $decimalDelimiter = '.';
 
@@ -126,7 +126,7 @@ class Currency extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="8")
+     * @Column (type="string", length=8)
      */
     protected $thousandDelimiter = '';
 
diff --git a/src/classes/XLite/Model/CurrencyTranslation.php b/src/classes/XLite/Model/CurrencyTranslation.php
index b79ede4927..7e37f17063 100644
--- a/src/classes/XLite/Model/CurrencyTranslation.php
+++ b/src/classes/XLite/Model/CurrencyTranslation.php
@@ -50,7 +50,7 @@ class CurrencyTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 }
diff --git a/src/classes/XLite/Model/DataSource.php b/src/classes/XLite/Model/DataSource.php
index 457531169b..73ab7acdec 100644
--- a/src/classes/XLite/Model/DataSource.php
+++ b/src/classes/XLite/Model/DataSource.php
@@ -64,7 +64,7 @@ class DataSource extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.17
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $type;
 
diff --git a/src/classes/XLite/Model/EventTask.php b/src/classes/XLite/Model/EventTask.php
index 6c0b169c44..81f3dcbe2d 100644
--- a/src/classes/XLite/Model/EventTask.php
+++ b/src/classes/XLite/Model/EventTask.php
@@ -58,7 +58,7 @@ class EventTask extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $name;
 
diff --git a/src/classes/XLite/Model/FormId.php b/src/classes/XLite/Model/FormId.php
index ed6fb2fe84..fb6f5d6855 100644
--- a/src/classes/XLite/Model/FormId.php
+++ b/src/classes/XLite/Model/FormId.php
@@ -77,7 +77,7 @@ class FormId extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $form_id;
 
diff --git a/src/classes/XLite/Model/IframeContent.php b/src/classes/XLite/Model/IframeContent.php
index 3f55e25da5..1e0b3e25af 100644
--- a/src/classes/XLite/Model/IframeContent.php
+++ b/src/classes/XLite/Model/IframeContent.php
@@ -69,7 +69,7 @@ class IframeContent extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="16")
+     * @Column (type="string", length=16)
      */
     protected $method = 'POST';
 
diff --git a/src/classes/XLite/Model/Image/Product/Image.php b/src/classes/XLite/Model/Image/Product/Image.php
index b5369d5aaf..bbd729157e 100644
--- a/src/classes/XLite/Model/Image/Product/Image.php
+++ b/src/classes/XLite/Model/Image/Product/Image.php
@@ -45,7 +45,7 @@ class Image extends \XLite\Model\Base\Image
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $alt = '';
 
diff --git a/src/classes/XLite/Model/Language.php b/src/classes/XLite/Model/Language.php
index e5882599ad..1bd7783d4d 100644
--- a/src/classes/XLite/Model/Language.php
+++ b/src/classes/XLite/Model/Language.php
@@ -73,7 +73,7 @@ class Language extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="2", unique=true)
+     * @Column (type="fixedstring", length=2, unique=true)
      */
     protected $code;
 
@@ -84,7 +84,7 @@ class Language extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="3", unique=true)
+     * @Column (type="fixedstring", length=3, unique=true)
      */
     protected $code3 = '';
 
diff --git a/src/classes/XLite/Model/LanguageLabel.php b/src/classes/XLite/Model/LanguageLabel.php
index 8083a47eac..b44c108c78 100644
--- a/src/classes/XLite/Model/LanguageLabel.php
+++ b/src/classes/XLite/Model/LanguageLabel.php
@@ -62,7 +62,7 @@ class LanguageLabel extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="varbinary", length="255")
+     * @Column (type="varbinary", length=255)
      */
     protected $name;
 }
diff --git a/src/classes/XLite/Model/LanguageTranslation.php b/src/classes/XLite/Model/LanguageTranslation.php
index 13150996ad..9775c2169b 100644
--- a/src/classes/XLite/Model/LanguageTranslation.php
+++ b/src/classes/XLite/Model/LanguageTranslation.php
@@ -49,7 +49,7 @@ class LanguageTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64", nullable=false)
+     * @Column (type="string", length=64, nullable=false)
      */
     protected $name;
 }
diff --git a/src/classes/XLite/Model/MembershipTranslation.php b/src/classes/XLite/Model/MembershipTranslation.php
index 16719bb556..0e5fc77f1d 100644
--- a/src/classes/XLite/Model/MembershipTranslation.php
+++ b/src/classes/XLite/Model/MembershipTranslation.php
@@ -50,7 +50,7 @@ class MembershipTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $name;
 }
diff --git a/src/classes/XLite/Model/Module.php b/src/classes/XLite/Model/Module.php
index 85fce0674d..e9df3b5bf9 100644
--- a/src/classes/XLite/Model/Module.php
+++ b/src/classes/XLite/Model/Module.php
@@ -69,7 +69,7 @@ class Module extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $name;
 
@@ -80,7 +80,7 @@ class Module extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $author;
 
diff --git a/src/classes/XLite/Model/ModuleKey.php b/src/classes/XLite/Model/ModuleKey.php
index 1a0d3b5bc8..8a620f9cef 100644
--- a/src/classes/XLite/Model/ModuleKey.php
+++ b/src/classes/XLite/Model/ModuleKey.php
@@ -65,7 +65,7 @@ class ModuleKey extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $name;
 
@@ -76,7 +76,7 @@ class ModuleKey extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $author;
 
@@ -87,7 +87,7 @@ class ModuleKey extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="64")
+     * @Column (type="fixedstring", length=64)
      */
     protected $keyValue;
 
diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php
index fdddf25fd8..cd94ad9ea4 100644
--- a/src/classes/XLite/Model/Order.php
+++ b/src/classes/XLite/Model/Order.php
@@ -140,7 +140,7 @@ class Order extends \XLite\Model\Base\SurchargeOwner
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $tracking = '';
 
@@ -173,7 +173,7 @@ class Order extends \XLite\Model\Base\SurchargeOwner
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $status = self::STATUS_INPROGRESS;
 
diff --git a/src/classes/XLite/Model/Order/Modifier.php b/src/classes/XLite/Model/Order/Modifier.php
index 7180849c96..610ec94898 100644
--- a/src/classes/XLite/Model/Order/Modifier.php
+++ b/src/classes/XLite/Model/Order/Modifier.php
@@ -58,7 +58,7 @@ class Modifier extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $class;
 
diff --git a/src/classes/XLite/Model/OrderDetail.php b/src/classes/XLite/Model/OrderDetail.php
index 039e9f7c47..4e59485226 100644
--- a/src/classes/XLite/Model/OrderDetail.php
+++ b/src/classes/XLite/Model/OrderDetail.php
@@ -62,7 +62,7 @@ class OrderDetail extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 
@@ -73,7 +73,7 @@ class OrderDetail extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255", nullable=true)
+     * @Column (type="string", length=255, nullable=true)
      */
     protected $label;
 
diff --git a/src/classes/XLite/Model/OrderItem.php b/src/classes/XLite/Model/OrderItem.php
index 4908bfeef7..9daff77728 100644
--- a/src/classes/XLite/Model/OrderItem.php
+++ b/src/classes/XLite/Model/OrderItem.php
@@ -83,7 +83,7 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 
@@ -94,7 +94,7 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $sku = '';
 
@@ -105,7 +105,7 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $price;
 
@@ -116,7 +116,7 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $netPrice;
 
diff --git a/src/classes/XLite/Model/Payment/Method.php b/src/classes/XLite/Model/Payment/Method.php
index b7e6aee711..40e9cf7c82 100644
--- a/src/classes/XLite/Model/Payment/Method.php
+++ b/src/classes/XLite/Model/Payment/Method.php
@@ -75,7 +75,7 @@ class Method extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $class;
 
diff --git a/src/classes/XLite/Model/Payment/MethodSetting.php b/src/classes/XLite/Model/Payment/MethodSetting.php
index 5b96d5113e..eeb17fb007 100644
--- a/src/classes/XLite/Model/Payment/MethodSetting.php
+++ b/src/classes/XLite/Model/Payment/MethodSetting.php
@@ -62,7 +62,7 @@ class MethodSetting extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $name;
 
diff --git a/src/classes/XLite/Model/Payment/MethodTranslation.php b/src/classes/XLite/Model/Payment/MethodTranslation.php
index 997d6864fd..97a3bbbf84 100644
--- a/src/classes/XLite/Model/Payment/MethodTranslation.php
+++ b/src/classes/XLite/Model/Payment/MethodTranslation.php
@@ -50,7 +50,7 @@ class MethodTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 
diff --git a/src/classes/XLite/Model/Payment/Transaction.php b/src/classes/XLite/Model/Payment/Transaction.php
index 7fa03382c4..1339469e05 100644
--- a/src/classes/XLite/Model/Payment/Transaction.php
+++ b/src/classes/XLite/Model/Payment/Transaction.php
@@ -85,7 +85,7 @@ class Transaction extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $method_name;
 
@@ -96,7 +96,7 @@ class Transaction extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $method_local_name = '';
 
@@ -107,7 +107,7 @@ class Transaction extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $status = self::STATUS_INITIALIZED;
 
@@ -118,7 +118,7 @@ class Transaction extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $value = 0.0000;
 
@@ -129,7 +129,7 @@ class Transaction extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $note = '';
 
@@ -140,7 +140,7 @@ class Transaction extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="8")
+     * @Column (type="string", length=8)
      */
     protected $type = 'sale';
 
diff --git a/src/classes/XLite/Model/Payment/TransactionData.php b/src/classes/XLite/Model/Payment/TransactionData.php
index 2f204cb2d1..5532927033 100644
--- a/src/classes/XLite/Model/Payment/TransactionData.php
+++ b/src/classes/XLite/Model/Payment/TransactionData.php
@@ -69,7 +69,7 @@ class TransactionData extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $name;
 
@@ -80,7 +80,7 @@ class TransactionData extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $label = '';
 
@@ -91,7 +91,7 @@ class TransactionData extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $access_level = self::ACCESS_ADMIN;
 
diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php
index 49732b180d..162a79d651 100644
--- a/src/classes/XLite/Model/Product.php
+++ b/src/classes/XLite/Model/Product.php
@@ -79,7 +79,7 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32", nullable=false)
+     * @Column (type="string", length=32, nullable=false)
      */
     protected $sku;
 
@@ -123,7 +123,7 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255", nullable=false)
+     * @Column (type="string", length=255, nullable=false)
      */
     protected $clean_url = '';
 
diff --git a/src/classes/XLite/Model/ProductClassTranslation.php b/src/classes/XLite/Model/ProductClassTranslation.php
index 104295bc86..bff638ed64 100644
--- a/src/classes/XLite/Model/ProductClassTranslation.php
+++ b/src/classes/XLite/Model/ProductClassTranslation.php
@@ -51,7 +51,7 @@ class ProductClassTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 }
diff --git a/src/classes/XLite/Model/ProductTranslation.php b/src/classes/XLite/Model/ProductTranslation.php
index 672bd4f819..f3f3266e56 100644
--- a/src/classes/XLite/Model/ProductTranslation.php
+++ b/src/classes/XLite/Model/ProductTranslation.php
@@ -52,7 +52,7 @@ class ProductTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 
@@ -85,7 +85,7 @@ class ProductTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $meta_tags = '';
 
@@ -107,7 +107,7 @@ class ProductTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $meta_title = '';
 }
diff --git a/src/classes/XLite/Model/Profile.php b/src/classes/XLite/Model/Profile.php
index b7bb1098e1..026ef22a63 100644
--- a/src/classes/XLite/Model/Profile.php
+++ b/src/classes/XLite/Model/Profile.php
@@ -69,7 +69,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $login;
 
@@ -80,7 +80,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $password = '';
 
@@ -91,7 +91,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $password_hint = '';
 
@@ -102,7 +102,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $password_hint_answer = '';
 
@@ -135,7 +135,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $cms_name = '';
 
@@ -179,7 +179,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $status = 'E';
 
@@ -190,7 +190,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $referer = '';
 
@@ -213,7 +213,7 @@ class Profile extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="2")
+     * @Column (type="string", length=2)
      */
     protected $language = '';
 
diff --git a/src/classes/XLite/Model/Role/Permission.php b/src/classes/XLite/Model/Role/Permission.php
index 589d764e95..3462005592 100644
--- a/src/classes/XLite/Model/Role/Permission.php
+++ b/src/classes/XLite/Model/Role/Permission.php
@@ -60,7 +60,7 @@ class Permission extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.17
      *
-     * @Column (type="fixedstring", length="32")
+     * @Column (type="fixedstring", length=32)
      */
     protected $code;
 
@@ -71,7 +71,7 @@ class Permission extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.17
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $section;
 
diff --git a/src/classes/XLite/Model/Session.php b/src/classes/XLite/Model/Session.php
index 96df5b7c23..1d235f6b43 100644
--- a/src/classes/XLite/Model/Session.php
+++ b/src/classes/XLite/Model/Session.php
@@ -71,7 +71,7 @@ class Session extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="32")
+     * @Column (type="fixedstring", length=32)
      */
     protected $sid;
 
diff --git a/src/classes/XLite/Model/SessionCell.php b/src/classes/XLite/Model/SessionCell.php
index 059d0ad831..9324622f59 100644
--- a/src/classes/XLite/Model/SessionCell.php
+++ b/src/classes/XLite/Model/SessionCell.php
@@ -76,7 +76,7 @@ class SessionCell extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 
@@ -98,7 +98,7 @@ class SessionCell extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="16")
+     * @Column (type="string", length=16)
      */
     protected $type;
 
diff --git a/src/classes/XLite/Model/Shipping/Markup.php b/src/classes/XLite/Model/Shipping/Markup.php
index 5ac6acd17c..04c8ec9d01 100644
--- a/src/classes/XLite/Model/Shipping/Markup.php
+++ b/src/classes/XLite/Model/Shipping/Markup.php
@@ -69,7 +69,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $min_weight = 0;
 
@@ -80,7 +80,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $max_weight = 999999999;
 
@@ -91,7 +91,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $min_total = 0;
 
@@ -102,7 +102,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $max_total = 999999999;
 
@@ -113,7 +113,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $min_items = 0;
 
@@ -124,7 +124,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $max_items = 999999999;
 
@@ -135,7 +135,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $markup_flat = 0;
 
@@ -146,7 +146,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="4", scale="2")
+     * @Column (type="decimal", precision=4, scale=2)
      */
     protected $markup_percent = 0;
 
@@ -157,7 +157,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $markup_per_item = 0;
 
@@ -168,7 +168,7 @@ class Markup extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $markup_per_weight = 0;
 
diff --git a/src/classes/XLite/Model/Shipping/Method.php b/src/classes/XLite/Model/Shipping/Method.php
index 0f0a4cef88..040e6b9e71 100644
--- a/src/classes/XLite/Model/Shipping/Method.php
+++ b/src/classes/XLite/Model/Shipping/Method.php
@@ -65,7 +65,7 @@ class Method extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $processor = '';
 
@@ -76,7 +76,7 @@ class Method extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $carrier = '';
 
@@ -87,7 +87,7 @@ class Method extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $code = '';
 
diff --git a/src/classes/XLite/Model/Shipping/MethodTranslation.php b/src/classes/XLite/Model/Shipping/MethodTranslation.php
index 9f9874a725..19bfe6f27c 100644
--- a/src/classes/XLite/Model/Shipping/MethodTranslation.php
+++ b/src/classes/XLite/Model/Shipping/MethodTranslation.php
@@ -50,7 +50,7 @@ class MethodTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255", nullable=false)
+     * @Column (type="string", length=255, nullable=false)
      */
     protected $name = '';
 }
diff --git a/src/classes/XLite/Model/State.php b/src/classes/XLite/Model/State.php
index b72cd762d9..52c5dd6b49 100644
--- a/src/classes/XLite/Model/State.php
+++ b/src/classes/XLite/Model/State.php
@@ -65,7 +65,7 @@ class State extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $state;
 
@@ -76,7 +76,7 @@ class State extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $code;
 
diff --git a/src/classes/XLite/Model/Task.php b/src/classes/XLite/Model/Task.php
index cdb0a755c3..ec42ea0ae2 100644
--- a/src/classes/XLite/Model/Task.php
+++ b/src/classes/XLite/Model/Task.php
@@ -58,7 +58,7 @@ class Task extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $owner;
 
diff --git a/src/classes/XLite/Model/TemplatePatch.php b/src/classes/XLite/Model/TemplatePatch.php
index e921c96af0..763293e8d7 100644
--- a/src/classes/XLite/Model/TemplatePatch.php
+++ b/src/classes/XLite/Model/TemplatePatch.php
@@ -51,7 +51,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      *
      * @Id
      * @GeneratedValue (strategy="AUTO")
-     * @Column         (type="integer", length="11")
+     * @Column         (type="integer", length=11)
      */
     protected $patch_id;
 
@@ -62,7 +62,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="16")
+     * @Column (type="string", length=16)
      */
     protected $zone = 'customer';
 
@@ -73,7 +73,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="2")
+     * @Column (type="string", length=2)
      */
     protected $lang = '';
 
@@ -84,7 +84,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $tpl;
 
@@ -95,7 +95,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="8")
+     * @Column (type="string", length=8)
      */
     protected $patch_type = 'custom';
 
@@ -106,7 +106,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $xpath_query = '';
 
@@ -117,7 +117,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="16")
+     * @Column (type="string", length=16)
      */
     protected $xpath_insert_type = 'before';
 
@@ -139,7 +139,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $regexp_pattern = '';
 
@@ -161,7 +161,7 @@ class TemplatePatch extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $custom_callback = '';
 }
diff --git a/src/classes/XLite/Model/TmpVar.php b/src/classes/XLite/Model/TmpVar.php
index 49d9e2712d..cc26181315 100644
--- a/src/classes/XLite/Model/TmpVar.php
+++ b/src/classes/XLite/Model/TmpVar.php
@@ -62,7 +62,7 @@ class TmpVar extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $name;
 
diff --git a/src/classes/XLite/Model/ViewList.php b/src/classes/XLite/Model/ViewList.php
index b53df51051..b55908e20c 100644
--- a/src/classes/XLite/Model/ViewList.php
+++ b/src/classes/XLite/Model/ViewList.php
@@ -66,7 +66,7 @@ class ViewList extends \XLite\Model\AEntity
      *
      * @Id
      * @GeneratedValue (strategy="AUTO")
-     * @Column         (type="integer", length="11")
+     * @Column         (type="integer", length=11)
      */
     protected $list_id;
 
@@ -99,7 +99,7 @@ class ViewList extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="16")
+     * @Column (type="string", length=16)
      */
     protected $zone = self::INTERFACE_CUSTOMER;
 
@@ -110,7 +110,7 @@ class ViewList extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="512")
+     * @Column (type="string", length=512)
      */
     protected $child = '';
 
@@ -121,7 +121,7 @@ class ViewList extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="integer", length="11")
+     * @Column (type="integer", length=11)
      */
     protected $weight = 0;
 
@@ -132,7 +132,7 @@ class ViewList extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="512")
+     * @Column (type="string", length=512)
      */
     protected $tpl = '';
 }
diff --git a/src/classes/XLite/Model/Zone.php b/src/classes/XLite/Model/Zone.php
index e97e01ef92..63fddba387 100644
--- a/src/classes/XLite/Model/Zone.php
+++ b/src/classes/XLite/Model/Zone.php
@@ -63,7 +63,7 @@ class Zone extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="64")
+     * @Column (type="string", length=64)
      */
     protected $zone_name = '';
 
diff --git a/src/classes/XLite/Model/ZoneElement.php b/src/classes/XLite/Model/ZoneElement.php
index dfc27fd6bb..3a775745ed 100644
--- a/src/classes/XLite/Model/ZoneElement.php
+++ b/src/classes/XLite/Model/ZoneElement.php
@@ -61,7 +61,7 @@ class ZoneElement extends \XLite\Model\AEntity
      *
      * @Id
      * @GeneratedValue (strategy="AUTO")
-     * @Column (type="integer", length="11", nullable=false)
+     * @Column (type="integer", length=11, nullable=false)
      */
     protected $element_id;
 
@@ -72,7 +72,7 @@ class ZoneElement extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $element_value;
 
@@ -83,7 +83,7 @@ class ZoneElement extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $element_type;
 
diff --git a/src/classes/XLite/Module/CDev/FileAttachments/Model/Product/AttachmentTranslation.php b/src/classes/XLite/Module/CDev/FileAttachments/Model/Product/AttachmentTranslation.php
index ca5e731507..b072788df0 100644
--- a/src/classes/XLite/Module/CDev/FileAttachments/Model/Product/AttachmentTranslation.php
+++ b/src/classes/XLite/Module/CDev/FileAttachments/Model/Product/AttachmentTranslation.php
@@ -52,7 +52,7 @@ class AttachmentTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.10
      *
-     * @Column (type="string", length="128")
+     * @Column (type="string", length=128)
      */
     protected $title = '';
 
diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php
index 5ec98b8f8e..07ae47becb 100644
--- a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php
+++ b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php
@@ -90,7 +90,7 @@ class OptionGroup extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="1")
+     * @Column (type="string", length=1)
      */
     protected $type = self::GROUP_TYPE;
 
@@ -101,7 +101,7 @@ class OptionGroup extends \XLite\Model\Base\I18n
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="1")
+     * @Column (type="string", length=1)
      */
     protected $view_type = self::SELECT_VISIBLE;
 
diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroupTranslation.php b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroupTranslation.php
index e97a04e26f..1f5bbe3eff 100644
--- a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroupTranslation.php
+++ b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroupTranslation.php
@@ -50,7 +50,7 @@ class OptionGroupTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name = '';
 
diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php
index 15568c03b1..25294e8340 100644
--- a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php
+++ b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php
@@ -69,7 +69,7 @@ class OptionSurcharge extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32")
+     * @Column (type="string", length=32)
      */
     protected $type = 'price';
 
@@ -80,7 +80,7 @@ class OptionSurcharge extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="decimal", precision="14", scale="4")
+     * @Column (type="decimal", precision=14, scale=4)
      */
     protected $modifier = 0.0000;
 
@@ -91,7 +91,7 @@ class OptionSurcharge extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="1")
+     * @Column (type="string", length=1)
      */
     protected $modifier_type = self::PERCENT_MODIFIER;
 
diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionTranslation.php b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionTranslation.php
index 30e18b9600..a57062f223 100644
--- a/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionTranslation.php
+++ b/src/classes/XLite/Module/CDev/ProductOptions/Model/OptionTranslation.php
@@ -50,7 +50,7 @@ class OptionTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name = '';
 }
diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItemOption.php b/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItemOption.php
index ee89a9320e..26586c8cc9 100644
--- a/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItemOption.php
+++ b/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItemOption.php
@@ -51,7 +51,7 @@ class OrderItemOption extends \XLite\Model\AEntity
      *
      * @Id
      * @GeneratedValue (strategy="AUTO")
-     * @Column         (type="integer", length="11", nullable=false)
+     * @Column         (type="integer", length=11, nullable=false)
      */
     protected $id;
 
@@ -84,7 +84,7 @@ class OrderItemOption extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255", nullable=false)
+     * @Column (type="string", length=255, nullable=false)
      */
     protected $name;
 
diff --git a/src/classes/XLite/Module/CDev/Sale/Model/Product.php b/src/classes/XLite/Module/CDev/Sale/Model/Product.php
index 3b0964f764..d3acd87d95 100644
--- a/src/classes/XLite/Module/CDev/Sale/Model/Product.php
+++ b/src/classes/XLite/Module/CDev/Sale/Model/Product.php
@@ -69,7 +69,7 @@ class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="32", nullable=false)
+     * @Column (type="string", length=32, nullable=false)
      */
     protected $discountType = self::SALE_DISCOUNT_TYPE_PRICE;
 
diff --git a/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php b/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php
index 376a5910d3..9fae8c649b 100644
--- a/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php
+++ b/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php
@@ -76,7 +76,7 @@ class Rate extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $type = self::TYPE_PERCENT;
 
diff --git a/src/classes/XLite/Module/CDev/SalesTax/Model/TaxTranslation.php b/src/classes/XLite/Module/CDev/SalesTax/Model/TaxTranslation.php
index 27e3d1f16d..f5250cd856 100644
--- a/src/classes/XLite/Module/CDev/SalesTax/Model/TaxTranslation.php
+++ b/src/classes/XLite/Module/CDev/SalesTax/Model/TaxTranslation.php
@@ -50,7 +50,7 @@ class TaxTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 }
diff --git a/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php b/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php
index 61e760fc1a..f79cfa82f4 100644
--- a/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php
+++ b/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php
@@ -76,7 +76,7 @@ class Rate extends \XLite\Model\AEntity
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="fixedstring", length="1")
+     * @Column (type="fixedstring", length=1)
      */
     protected $type = self::TYPE_PERCENT;
 
diff --git a/src/classes/XLite/Module/CDev/VAT/Model/TaxTranslation.php b/src/classes/XLite/Module/CDev/VAT/Model/TaxTranslation.php
index 53cf062a71..41e9b12719 100644
--- a/src/classes/XLite/Module/CDev/VAT/Model/TaxTranslation.php
+++ b/src/classes/XLite/Module/CDev/VAT/Model/TaxTranslation.php
@@ -50,7 +50,7 @@ class TaxTranslation extends \XLite\Model\Base\Translation
      * @see   ____var_see____
      * @since 1.0.0
      *
-     * @Column (type="string", length="255")
+     * @Column (type="string", length=255)
      */
     protected $name;
 }

From 2b0badb6f7a2497daf07235af5b251b45cb41399 Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Thu, 19 Apr 2012 05:32:09 +0400
Subject: [PATCH 014/562] E:0040373 [*] The Doctrine library is updated up to
 latest version (2.2)

---
 .../Doctrine/Utils/.EntityManager.php.swp       | Bin 16384 -> 0 bytes
 .../Plugin/Doctrine/Utils/EntityManager.php     |   1 +
 .../Common/Cache/.CacheProvider.php.swp         | Bin 16384 -> 0 bytes
 3 files changed, 1 insertion(+)
 delete mode 100644 src/Includes/Decorator/Plugin/Doctrine/Utils/.EntityManager.php.swp
 delete mode 100644 src/lib/Doctrine/Common/Cache/.CacheProvider.php.swp

diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/.EntityManager.php.swp b/src/Includes/Decorator/Plugin/Doctrine/Utils/.EntityManager.php.swp
deleted file mode 100644
index 2f2a53a15b166c3e7882824414e44f6c2c17a497..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 16384
zcmeI3ZEPGz8OJw$p@h;x6Ql}|%A~mUow4t1x1`8zOw654j@mxsvmt?N+`YXy-!^-@
z*WJ0ZkEjLFLTQ8uiV8>|gv1vLMMC965wrrO6{1q95HI~esSrg-h*m=46D=T>|1&eY
zxA)@25h)UASNeJPc6Z*MdFGjUo*h>vKT=p?w`8Ub9B(y@FCRZ${No?S4RMuWwA%sQ
zJ@2t?nZC$azNqqc#_=rE8J^@`WSDKXDvoV!)J4O|ZacQ%*}%851=n&~RUTyX-12-=
zcz$-pX>HnWHt$)&w_ToH7q$~*=Urio&XVbxo7~Sd>&@XsC3h1EBoY{qz*WXg(^Hf0
zzWxB)zi)luX>ucxKq7%e0*M3?2_zCoB#=lTkw7AW|8EJ1<|W2!XyPT{ey~S#DbB~h
zXY_BJk|U8oB7sB#i3Ab}Boas@kVqhrKq7%e0*M3?2_zEuAC-VvHH`hJ`z;gz!1sTO
z0sP}FhVeZ3EqD(66r2U$1rLJ?7y*B}+Atmi0vrT?#h!tez;oc2;4$z?Z~#30X2bY8
zxEI_7YJh_&FbT%NJHWNzpH~{j%iz!8A#etq0s=HZ4%`5)0eitqZ!(O(fEU42;0f?B
zI0f3k1;cbTW*EN#9zmeKi+;%YIskuT95RYrO|DrLl~o3=YKYgVf|
zzrIK85JTat9BwHo7gv|cOJ=iayPIW|M4xh$Q%bk(q|B!2dxBenSDC6MtF>H<>dpc#
zmbfshrZ9E6y(Q#i!&}(ZLT_t1q*dLQobp=_DzZuxq4Y|M}s_o&p2Av0O;a=7oOEO+;m^N?Z147gGO&vj8D2yKO$
z5~PIR;%W9CX8OL_NsX#fN7=xK4OYVTGaxy89sX})wJ5|Q@jzbTLg8Py%-vBQX(qp_m5%gIqyaI1Vf63a+9
zhR0!;$mBu-N^==w-QkKKeZS~VsHssVA0Htj2orBM_#Lpe@@MY^0UNxOY}ef_+d9Ea%i=-6Y!NW-@CJ7U
z_BYCO`p-av&<15}v|`YEc8#SD*qEF|)P_g^>99h2&e&;8^)yEbo+hW39Cp@
z0@_u%se7GC^TDX!SaD^oP+Xo{G^9{^?U>6<$6-=Yco5lt`DSFv1}4f#I$9G3=DcB3
z9?f!X(;t}da1ZqwW@zPjyx_Xkm5IH0RqLJmd$z0gNmM;!4Yijw65>h2te|sX=T&1^
zPaceK3+`3})}1<|Ewg2{Wwu*`xo|c%7zuqWTx4j0({H)HAYsc+?TQ=yKGs*VA-kA#
zBxssgszh`5&J~ceI$4yS;?aTOGAF76-J@#MY=_5c!45mNdx9P^Ru`fCJy
zXNx+ERI#+k@Ct?_s%Ux5j&E<)1(r(TRmw`U>B*@nWpJ>3WqID_j@Kl+!WI{E>^9r2
zd51096z#WWGYlq-$y@>~e**5eIo52*-E4_ER!%si?K*!}OjQbIZWBuZhDr;b)6$?v
z#LAHsh9z}COV0OZ(30>0tf7(vMn8nxD@PW1Y>P9?q*bk3WgV}@Of2P^9cDw?RU2hG
zoebsWRRq?^Fs4k@eXq4y$Cn;cFGuxFh1~pdX+9&ig_PAAy{HsX
zy+A)(a=A^j6Q$dQ8d5!$i)+Z66&J!X=qAyl19G5ZE^OP48FEjU2oBxMf-U+ZFS(d8
zZhJrNo+tl*3claB;UAL!Pv88Xfp7mHI1Wl+6^w%y;p4lY0StF_qfPLUHa4C2dzWOWRY49XC3w{W`2p$B-!7NCF1K{uQ(fpMM;j244V8FbQ6T
zU;YaCF*pq@PyrtTd5{CQf~&z5;05^WPk?WMZvX*YumFAs-~0^t9C!fK0Qv75;G^Im
z$bx^tFMk324EzLq9()!o0P@$L1z!RcFbS>%&qB682akeBfRuH=L!JCiB#=m;UjoVn
zp}*ZLnkl0Q!iaWIJwN8SbZ<_~!u-j_?V2|)S5B$Xax6wwo>QxaO{|5mFvd#C#zv%
z4~@00d7cxLRhtLWpEOAL1KvXvW`mc)9GvD@Y|Q7I&=&6JT7mEyYn>)^vp>t2Hc(FekI_B7%~hg}0tJ@zqN7~HXxVs_
z5$>q4VJaOfYM5`V+t}|K?-)*v2Luc$g#m{#^d9JG*MpGm!#RSa=V-7lN1wuewOxpf
zg0gx&%H{ta4mfNw)j%KXIB(o4sgS5NNgr-;zmr2Cgcll3CpBWxWlWG!v>fIu42Ycb
zbxJ=l=Ey1V+_FqqmXRQNNr7$ER0eAotCfr-E{6_Y3ZeF;Vt#&6MGH5U!|)hV4JM;V
zy^okegOcTY1C1*9Sc+>33{D9PQws8RXo)J|j>Mudp}xkNuVd@FzC)TY(0m%kN=bF_
zeYX+)m~tyQy)GKqQ#D!d3h34$
zQNFHb)AR5cewUucv^ab@e(ruDYB{`IrcXK}Roj;l?hn9MB=u9De7X;(hdq_EQ13UU
zcsX<(3F92!oTzY>|B5NW*RJnL^|}dQ~cF1G8n%XUf+0QZ1z=i>;nAA$Qs-7
zJJ>F3YJ|D=pSu(M1r?zql6|?6r5`9M3hs^|t|0%5ds>BRA!2I(K!VtN`rF(pw_1o=
zv^nevKK>xSQP5eXA~orD)Ho}Xpn?vj!$$bx%uMO_!pcUzxE429RDY`UE~TKpxI`Ke
v&0dtvU^By3_B66@Ae_6V24x%`q4gs>w43js7)hhC@1UXZLxXq@nHv8F;A0OO

diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php b/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php
index a7ec86292e..44e8f8cc8d 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php
@@ -215,6 +215,7 @@ protected static function getEntityGenerator()
         $generator->setGenerateStubMethods(true);
         $generator->setNumSpaces(4);
         $generator->setClassToExtend('\XLite\Model\AEntity');
+        $generator->setBackupExisting(false);
 
         return $generator;
     }
diff --git a/src/lib/Doctrine/Common/Cache/.CacheProvider.php.swp b/src/lib/Doctrine/Common/Cache/.CacheProvider.php.swp
deleted file mode 100644
index 57ac62c00edcdd071d9d889a50ce436c252d003e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 16384
zcmeI3U5wmT702DA(6ptrqAy5D)k#Q{-DNV91c{H$CS9+`yX$6lW@>wO6A_3!o;$nF
zdhC(ynavQWNKgd`1VvCjBM^D3cqmekDnRNBq6mprD&i#)0+kl2C=xGx2_yvndu`9m
z&hAb&Auk1w^vmqn*Y}?DKiAjyp6k?)E^ABl!TfOvpGPEV{bOIMJpGGDrSdx^soM?t
z(OZ5l+Ex(d?I3EfZr=56%iaExr%+*`-Ko2deSR%!xrK|a6R|=V*ag?A7mB_e1&+rG
zir;GaUO}ZJRs+B5G+2;tueGwkSTC01s;;#fBe|d_a4|!kG`vRtHRm&
zOo2>+Oo2>+Oo2>+Oo2>+Oo2>+|1kxk_8#fq@M#aY4DLzTi|-TQO7a_D*(XyVQy^0y
zQy^0yQy^0yQy^0yQy^0yQy^0yQ{XMCfYp#BzSe&aPXJ*5pXUJn`LHDY1N;p<4=#ZH
z;0E3acm|ZfUhw0GBq;<_;P>y4q~C!r0~6%I6qp42z|2Giif;28Mx{gQMOyaHYZKLcL`p8>1D0H?uY;N9TOeXt3<25x}wfUkqg
zpa+&g6%@cEm;eMG1be|7_es)k!8LFdd>ecPJO#SI1ZD6rxF75T61e$xNqQYT51s?(
zz%rf_nq}2wVqez#kFoH^FzoH^Dc+GoT7IAo>ED;h!m*ZCioWqL9Cvu}TM>
z29deO2;Y%Up4DPu+p<|wI{Bh%z?#lQicqj^g&}M3@*7UHCJx!Y*K}4p0S@;opswY1
z;%W+0Q*rB`jH`ng0gF0;M+c)dCp>bh;Tu+$O&siBEM5{h&3ZW+99w2V==dJJkB&_u
zlZ8seXKMjENfZ5w72k_2#|yWqd~%W=A6PKYB71GSQZ!A+PDn{>L-wRLqPegQEu-c{
z$lT`ibg`nCx>i=tm*pkZsLG0ZUXhhW^|X2x{=^>lJ%ua0>PzC^_+1)mc04=ct~Qv<
zA||`;#H2V+Q-$Q4W)lVLzV9;2BU7)b@?TkUMZ&;CqFV|@@(`m7>=7nM`a1g!G%W$h5-Et?~k%EI^VP~_)8i^q<
z8CRh8T~RR^fbP(qW;}e|9b@{V)40KDIMO?hPw`_W5h(d0o$;Zm%fx8aZw$Yzh}z;w
zgK=vx>^O~Z$028QJmrIb+~(xaSUt{m%7yn&C0563PIKM}fCkUrJ<1HEqyf3C->Zqt~sv_IsaSBDXe
zd4Tbz)Au^d>7bK72|scu{3z_YBw2NYz_KHF3f+
zz<qdC{|Y@cRU
z(<60pV0O)qwl{8$c^9mf34!8gaXWd1cA%%l=M1=0L^KD{Ps4RCehv4Whz6fP@yWy#&8$UHd%95A*x1P9
z86@7=J%Y+FFgp^0p*v2I9-sYnJiNUt`gCcbTFTQr>}vU#XgD5BYzb3x
z6f#Tzr!c+5rJ>)9HY}9jeas0FeZNUv-|aw#pvRA*>3T=_KrO4msNTc3*F%*J2X6~^
zEH^}Lyu!*nnTwi1MrGbyk##jk>atoUZJy-fvSz5oxP(g8ieYGTT1hj{@VS)`)8
zBrmAKs|l^Flxjt-yg+4jp`~hOk|xLPqfvKTl(oiupXI6BRS5uTtImg?t>XmuT
zG*0lp=W1wQH4M~as=8jQnp&kiNsE;gIIWW+!-gVkgVVx9UQtO~(o7sRD>+`5Qq$EX
zwJfYQYIBCEnKe_Tg-WGp@FomZU)B^A?Uf)H_YHOCctu84RW!K-fzPN*)sn1Z3X2Qi
zkD)$ULzOt0C~D9^&K#^Zsaz3WRaVNdGrkJm<4i?2XigO(lvJ9>DK2eM(^W2!Rv!GN
zXhk#v1Gq6VRb}1Olp5@yYE4IURm4Zdm4;H1wI#Kf=W3TLqCc2qEXt)4x{3;et7mm>
zVNn<~tPVe^!7~kNp)2V!TvCMuORBCc;%5?1p)i6XLIIPxK?h_+#W)~NaSzlpRh>r)
z4sETIJC^jeP4aB&$*7J8Y#DABY3}T1+Y$3pQH6Fq*rH1%V&ayUq?yP0%k+HxzX$8q
zJy`Sd^*`V9|25Y7zXaF7RUm_3VZHwq*6u=*_
z_WvyS6sUkQm(ze*>NcUj<(P9#{n`;CX=8!4JW8@O|((a0N^N
z0)K@+e*rha3*ZOfDwqbx!M%X{d=JPznF5&tnF5&tnF9ZR3dC8Y{t^sR`3O^a%-IKN
zMSr26kJ`G7OcIM^1%cHg*&{6BeA~g49t-yPph*0NEav)GZ
zWg>?c&AUpY_GrU`pLd=^9nNMXdD)Rw{&@4#gdfs7I|gigCio6q*k-37UV8TPA8FWP
z^WfxAp15~g4#p|O9ddq6to+iH;VxsxMc&3`(Q$aM5=&R%&5l{{)O}?32Z>9uRl>8F
z5we(AY&2>ANfP$))h-sb=$vh4J59&NVmU5Ge9_L+dc*3_goj)_ojk?6xZ~mf&5H6O
zIT|a6^~FefN%Vc5+KIy;d@S&TJ6(W1nn7`=krqqCR_(xGQ7L@%2a?=Yuk)yk3Su&3
zzxWvDC502ihWpEHiIe1X$KAHcK3qRejW{CcGQ#Z~x5tCc{SBDj_Hqrvdn;X_Q=-Ul
zrO-v>kViEUF7R}0s)-next`+c5jnQ(@TFU0hYy83Jt$IyTX(^5MBMxRtW~nvhtV$X
wtVBck&vYk{=X&3w8+}PmxBo~UPNt`OILU3gWy>$=F?{Ei_nN+Dd{0*T53tP`o&W#<


From f021dd5f9288bcf6158c8f9ce3f1a2fd1519e225 Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Thu, 19 Apr 2012 11:25:57 +0400
Subject: [PATCH 015/562] E:0040373 [*] The Doctrine library is updated up to
 latest version (2.2)

---
 .../Decorator/DataStructure/Graph/Classes.php |   8 +-
 .../Plugin/DocBlockCorrector/Main.php         |   3 +-
 src/Includes/Decorator/Utils/Tokenizer.php    | 131 +++++++++---------
 .../CDev/FeaturedProducts/Model/Category.php  |   1 -
 .../XLite/Module/CDev/Sale/Model/Product.php  |   7 -
 .../Module/CDev/XMLSitemap/Model/Category.php |   2 -
 .../Module/CDev/XMLSitemap/Model/Product.php  |   2 -
 7 files changed, 71 insertions(+), 83 deletions(-)

diff --git a/src/Includes/Decorator/DataStructure/Graph/Classes.php b/src/Includes/Decorator/DataStructure/Graph/Classes.php
index 402e2d4041..f6d2d05af9 100644
--- a/src/Includes/Decorator/DataStructure/Graph/Classes.php
+++ b/src/Includes/Decorator/DataStructure/Graph/Classes.php
@@ -343,16 +343,13 @@ public function getSource(self $parent = null)
      */
     protected function getActualSource(self $parent = null)
     {
-        $this->getReflection()->docComment = $this->isLowLevelNode() 
-            ? '/**' . PHP_EOL . ' * MOVED' . PHP_EOL . ' */' 
-            : null;
-
         return \Includes\Decorator\Utils\Tokenizer::getSourceCode(
             $this->getFile(),
             $this->getActualNamespace(),
             $this->getClassBaseName(),
             $this->getActualParentClassName($parent),
-            $this->getReflection()->docComment
+            $this->getReflection()->docComment,
+            ($this->getReflection()->isAbstract || $this->getReflection()->isFinal) ? null : 'abstract'
         );
     }
 
@@ -369,7 +366,6 @@ protected function getEmptySource(self $parent = null)
     {
         return 'getActualNamespace()) ? ('namespace ' . $namespace . ';' . PHP_EOL . PHP_EOL) : '')
-            . (($comment = $this->getReflection()->docComment) ? ($comment . PHP_EOL) : '')
             . ($this->getReflection()->isFinal ? 'final '    : '')
             . ($this->getReflection()->isAbstract ? 'abstract ' : '')
             . ($this->getReflection()->isInterface ? 'interface' : 'class') . ' ' . $this->getClassBaseName()
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
index 29d23da5df..dca074ea82 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
@@ -43,7 +43,6 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
  * @MappedSuperClass
  */';
 
-
     /**
      * Execute certain hook handler
      *
@@ -75,7 +74,7 @@ public function setMappedSuperClassTag(\Includes\Decorator\DataStructure\Graph\C
             // Write changes to FS
             \Includes\Utils\FileManager::write(
                 $path = LC_DIR_CACHE_CLASSES . $node->getPath(),
-                \Includes\Decorator\Utils\Tokenizer::getSourceCode($path, null, null, null, self::DOC_BLOCK)
+                \Includes\Decorator\Utils\Tokenizer::getSourceCode($path, null, null, null, static::DOC_BLOCK)
             );
         }
     }
diff --git a/src/Includes/Decorator/Utils/Tokenizer.php b/src/Includes/Decorator/Utils/Tokenizer.php
index cb110d6373..58ebd060e7 100644
--- a/src/Includes/Decorator/Utils/Tokenizer.php
+++ b/src/Includes/Decorator/Utils/Tokenizer.php
@@ -53,6 +53,15 @@ abstract class Tokenizer extends \Includes\Decorator\Utils\AUtils
      */
     protected static $tokens;
 
+    /**
+     * Tokens count
+     *
+     * @var   integer
+     * @see   ____var_see____
+     * @since 1.0.22
+     */
+    protected static $count = 0;
+
     /**
      * decoratorFlag 
      * 
@@ -83,7 +92,6 @@ abstract class Tokenizer extends \Includes\Decorator\Utils\AUtils
         'addCodeToClassBody',
     );
 
-
     // {{{ Common access method
 
     /**
@@ -179,7 +187,9 @@ protected static function getInterfaces()
         if (isset($start)) {
             $tokens = array_filter(
                 array_slice(static::$tokens, $start, $end - $start),
-                function ($token) { return T_WHITESPACE !== $token[0]; }
+                function ($token) {
+                    return T_WHITESPACE !== $token[0];
+                }
             );
             $tokens = explode(',', static::composeTokens($tokens));
         }
@@ -188,7 +198,7 @@ function ($token) { return T_WHITESPACE !== $token[0]; }
     }
 
     /**
-     * Check for a certain token
+     * Check for certain class type
      *
      * @param integer $token Token index
      *
@@ -198,7 +208,7 @@ function ($token) { return T_WHITESPACE !== $token[0]; }
      */
     protected static function getFlag($token)
     {
-        list(, $start, ) = static::findTokensByIndexFromOffset(array(T_CLASS), $token);
+        list(, $start, ) = static::findTokensByIndexFromOffset(array(T_CLASS), $token, false);
 
         return isset($start);
     }
@@ -212,7 +222,7 @@ protected static function getFlag($token)
      */
     protected static function getDockBlock()
     {
-        return ($index = static::getDocBlockIndex()) ? static::$tokens[$index][1] : null;
+        return static::getClassRelatedValue(T_DOC_COMMENT);
     }
 
     /**
@@ -279,52 +289,19 @@ protected static function getNamespace()
         return static::getClassRelatedValue(T_NAMESPACE);
     }
 
-    /**
-     * Search for the DocBlock
-     * 
-     * @return integer
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    protected static function getDocBlockIndex()
-    {
-        $result = null;
-
-        // Search for class or interface definition
-        foreach (array(T_CLASS, T_INTERFACE) as $index) {
-            list(, $start, ) = static::getClassRelatedTokens($index);
-            if ($start) {
-                break;
-            }
-        }
-
-        // If class declaration found
-        if (isset($start)) {
-
-            // Search backward for class docblock
-            for (; $start >= 0; $start--) {
-                if (T_DOC_COMMENT === static::$tokens[$start][0]) {
-                    $result = $start;
-                    break;
-                }
-            }
-        }
-
-        return $result;
-    }
-
     /**
      * Common method to search class-related tokens
      *
      * @param integer $token Token index
+     * @param boolean $isInc Flag OPTIONAL
      *
      * @return string
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function getClassRelatedValue($token)
+    protected static function getClassRelatedValue($token, $isInc = true)
     {
-        list($tokens, , ) = static::getClassRelatedTokens($token);
+        list($tokens, , ) = static::getClassRelatedTokens($token, $isInc);
 
         return static::prepareClassRelatedValue(static::composeTokens($tokens));
     }
@@ -354,12 +331,13 @@ protected static function prepareClassRelatedValue($value)
      * @param string $class     New class name
      * @param string $parent    New parent class
      * @param string $dockblock New dockblock OPTIONAL
+     * @param string $prefix    New prefix {abstract|final} OPTIONAL
      *
      * @return string
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function getSourceCode($namespace, $class, $parent, $dockblock = null)
+    protected static function getSourceCode($namespace, $class, $parent, $dockblock = null, $prefix = null)
     {
         // Class has been moved to a new location
         if (isset($namespace)) {
@@ -381,6 +359,11 @@ protected static function getSourceCode($namespace, $class, $parent, $dockblock
             static::replaceDockblock($dockblock);
         }
 
+        // To make abstract base classes in Decorator chains
+        if (isset($prefix)) {
+            static::replaceClassType($prefix);
+        }
+
         return static::composeTokens(static::$tokens);
     }
 
@@ -437,9 +420,20 @@ protected static function replaceParentClassName($token)
      */
     protected static function replaceDockblock($token)
     {
-        if ($index = static::getDocBlockIndex()) {
-            static::$tokens[$index][1] = $token;
-        }
+        static::replaceClassRelatedToken(T_DOC_COMMENT, $token, false);
+    }
+
+    /**
+     * Replace class type
+     *
+     * @param string $token Class type to set
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected static function replaceClassType($token)
+    {
     }
 
     /**
@@ -447,15 +441,16 @@ protected static function replaceDockblock($token)
      *
      * @param integer $type  Token to search
      * @param string  $token Replacement
+     * @param boolean $isInc Flag OPTIONAL
      *
      * @return void
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function replaceClassRelatedToken($type, $token)
+    protected static function replaceClassRelatedToken($type, $token, $isInc = true)
     {
         // Search for a class-related token
-        list(, $start, $end) = static::getClassRelatedTokens($type);
+        list(, $start, $end) = static::getClassRelatedTokens($type, $isInc);
 
         // Replace part of the tokens list
         if (isset($start, $end) && $end > $start) {
@@ -546,6 +541,8 @@ protected static function reset($path, $prepare = true)
             if ($prepare) {
                 static::$tokens = static::prepareTokens(static::$tokens);
             }
+
+            static::$count = count(static::$tokens);
         }
     }
 
@@ -610,14 +607,15 @@ protected static function replaceTokens($start, $end, array $tokens)
      * Common method to search class-related tokens
      *
      * @param integer $token Token index
+     * @param boolean $isInc Flag OPTIONAL
      *
      * @return array
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function getClassRelatedTokens($token)
+    protected static function getClassRelatedTokens($token, $isInc = true)
     {
-        return static::findTokensByIndexFromOffset(array(T_STRING, T_NS_SEPARATOR), $token);
+        return static::findTokensByIndexFromOffset(array(T_STRING, T_NS_SEPARATOR), $token, $isInc);
     }
 
     /**
@@ -625,14 +623,15 @@ protected static function getClassRelatedTokens($token)
      *
      * @param array   $index  List of token indexes to search
      * @param integer $offset Index of the "offset" token
+     * @param boolean $isInc  Flag OPTIONAL
      *
      * @return array
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function findTokensByIndexFromOffset(array $index, $offset)
+    protected static function findTokensByIndexFromOffset(array $index, $offset, $isInc = true)
     {
-        return static::findTokensFromOffset($index, $offset, 0);
+        return static::findTokensFromOffset($index, $offset, 0, $isInc);
     }
 
     /**
@@ -640,48 +639,54 @@ protected static function findTokensByIndexFromOffset(array $index, $offset)
      *
      * @param array   $values List of token values to search
      * @param integer $offset Index of the "offset" token
+     * @param boolean $isInc  Flag OPTIONAL
      *
      * @return array
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function findTokensByValueFromOffset(array $values, $offset)
+    protected static function findTokensByValueFromOffset(array $values, $offset, $isInc = true)
     {
-        return static::findTokensFromOffset($values, $offset, 1);
+        return static::findTokensFromOffset($values, $offset, 1, $isInc);
     }
 
     /**
      * Search for certain tokens from position of some other one
      *
-     * :WARNING: do not modify this method until you really know what you're doing
+     * DO NOT modify this method until you really know what you're doing
      *
      * @param array   $data   List of token indexes/values to search
      * @param integer $offset Index of the "offset" token
      * @param integer $index  Field index in the "token" array
+     * @param boolean $isInc  Flag OPTIONAL
      *
      * @return array
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function findTokensFromOffset(array $data, $offset, $index)
+    protected static function findTokensFromOffset(array $data, $offset, $index, $isInc = true)
     {
         $tokens = array();
         $start  = $end = null;
 
-        foreach (static::$tokens as &$token) {
+        foreach (static::$tokens as $pos => &$token) {
 
             if ($token[0] == $offset) {
 
-                while (empty($found) && (list($key, $result) = each(static::$tokens))) {
-                    $found = in_array($result[$index], $data);
+                for ( ; $pos < static::$count && 0 <= $pos; $isInc ? ++$pos : --$pos) {
+
+                    if (in_array(static::$tokens[$pos][$index], $data)) {
+                        $tokens[] = static::$tokens[$pos];
+                        break;
+                    }
                 }
 
-                if (!empty($found)) {
-                    $start = $key;
+                if (!empty($tokens)) {
+                    $start = $pos;
 
-                    do {
-                        $tokens[] = $result;
-                    } while ((list($end, $result) = each(static::$tokens)) && in_array($result[$index], $data));
+                    for ($end = ++$pos; $end < static::$count && in_array(static::$tokens[$end][$index], $data); $end++) {
+                        $tokens[] = static::$tokens[$end];
+                    }
                 }
 
                 break;
diff --git a/src/classes/XLite/Module/CDev/FeaturedProducts/Model/Category.php b/src/classes/XLite/Module/CDev/FeaturedProducts/Model/Category.php
index 838ceb4b56..d40fe56d97 100644
--- a/src/classes/XLite/Module/CDev/FeaturedProducts/Model/Category.php
+++ b/src/classes/XLite/Module/CDev/FeaturedProducts/Model/Category.php
@@ -46,7 +46,6 @@ class Category extends \XLite\Model\Category implements \XLite\Base\IDecorator
      */
     protected $featuredProducts;
 
-
     /**
      * Constructor
      *
diff --git a/src/classes/XLite/Module/CDev/Sale/Model/Product.php b/src/classes/XLite/Module/CDev/Sale/Model/Product.php
index d3acd87d95..c27ec4614c 100644
--- a/src/classes/XLite/Module/CDev/Sale/Model/Product.php
+++ b/src/classes/XLite/Module/CDev/Sale/Model/Product.php
@@ -33,9 +33,7 @@
  * @see   ____class_see____
  * @since 1.0.0
  *
- * @MappedSuperclass
  * @HasLifecycleCallbacks
- *
  */
 class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
 {
@@ -60,7 +58,6 @@ class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
      */
     protected $participateSale = false;
 
-
     /**
      * self::SALE_DISCOUNT_TYPE_PRICE   if "sale value" is considered as "Sale price",
      * self::SALE_DISCOUNT_TYPE_PERCENT if "sale value" is considered as "Percent Off".
@@ -73,7 +70,6 @@ class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
      */
     protected $discountType = self::SALE_DISCOUNT_TYPE_PRICE;
 
-
     /**
      * "Sale value"
      *
@@ -85,7 +81,6 @@ class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
      */
     protected $salePriceValue = 0;
 
-
     /**
      * "Sale value" price calculated
      *
@@ -97,7 +92,6 @@ class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
      */
     protected $salePriceValueCalculated = 0;
 
-
     /**
      * Get discountType
      *
@@ -221,5 +215,4 @@ public function prepareUpdateSalePriceCalculatedFields()
     {
         $this->setSalePriceValueCalculated($this->getSalePrice());
     }
-
 }
diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Model/Category.php b/src/classes/XLite/Module/CDev/XMLSitemap/Model/Category.php
index 5980dc9394..a8ccb3b120 100644
--- a/src/classes/XLite/Module/CDev/XMLSitemap/Model/Category.php
+++ b/src/classes/XLite/Module/CDev/XMLSitemap/Model/Category.php
@@ -33,7 +33,6 @@
  * @see   ____class_see____
  * @since 1.0.12
  *
- * @MappedSuperclass
  * @HasLifecycleCallbacks
  */
 class Category extends \XLite\Model\Category implements \XLite\Base\IDecorator
@@ -54,4 +53,3 @@ public function clearSitemaps()
         \XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->clear();
     }
 }
-
diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Model/Product.php b/src/classes/XLite/Module/CDev/XMLSitemap/Model/Product.php
index 922ece4df3..33b9ce0d08 100644
--- a/src/classes/XLite/Module/CDev/XMLSitemap/Model/Product.php
+++ b/src/classes/XLite/Module/CDev/XMLSitemap/Model/Product.php
@@ -33,7 +33,6 @@
  * @see   ____class_see____
  * @since 1.0.12
  *
- * @MappedSuperclass
  * @HasLifecycleCallbacks
  */
 class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator
@@ -54,4 +53,3 @@ public function clearSitemaps()
         \XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->clear();
     }
 }
-

From f12eda8a6629f77995e7c46ff473daba819a3e84 Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Sun, 22 Apr 2012 07:28:04 +0400
Subject: [PATCH 016/562] E:0040373 [*] The Doctrine library is updated up to
 latest version (2.2)

---
 src/Includes/Autoloader.php                   |  46 +-
 src/Includes/Decorator/ADecorator.php         |   2 +-
 .../Decorator/DataStructure/Graph/Classes.php |  12 +-
 .../Doctrine/Plugin/ModelGenerator/Main.php   |   2 +-
 .../Doctrine/Plugin/Multilangs/Main.php       | 121 +++--
 .../Plugin/Doctrine/Utils/EntityManager.php   |   4 +-
 .../Plugin/Doctrine/Utils/ModelGenerator.php  | 440 +++++++++++++-----
 src/Includes/Decorator/Utils/CacheManager.php |   5 +-
 src/Includes/Decorator/Utils/Tokenizer.php    |  15 +-
 src/Includes/Decorator/plugins.ini            |   8 +-
 src/Includes/Pattern/Factory.php              |   2 +-
 src/Includes/Utils/Converter.php              |  14 +
 src/Includes/Utils/FileManager.php            |  15 +-
 src/Includes/Utils/Operator.php               |   2 +-
 src/classes/XLite/Core/Database.php           |  17 +-
 src/classes/XLite/Core/FileCache.php          |  20 +-
 src/classes/XLite/Model/Repo/ARepo.php        |  14 +
 src/restoredb                                 |   3 -
 18 files changed, 491 insertions(+), 251 deletions(-)

diff --git a/src/Includes/Autoloader.php b/src/Includes/Autoloader.php
index e3b5e9e355..ab32abcb61 100644
--- a/src/Includes/Autoloader.php
+++ b/src/Includes/Autoloader.php
@@ -47,15 +47,6 @@ abstract class Autoloader
         '__lc_autoload_includes',
     );
 
-    /**
-     * The directory where LC classes are located
-     *
-     * @var   string
-     * @see   ____var_see____
-     * @since 1.0.0
-     */
-    protected static $lcAutoloadDir = LC_DIR_CACHE_CLASSES;
-
     /**
      * Main LC autoloader
      *
@@ -83,8 +74,9 @@ public static function __lc_autoload($class)
          */
         $class = ltrim($class, '\\');
 
-        if (0 === strpos($class, LC_NAMESPACE)) {
-            include_once (static::$lcAutoloadDir . str_replace('\\', LC_DS, $class) . '.php');
+        // Workaround for Doctrine 2 proxies
+        if (0 === strpos($class, LC_NAMESPACE) && false === strpos($class, \Doctrine\Common\Persistence\Proxy::MARKER)) {
+            include_once (LC_DIR_CACHE_CLASSES . str_replace('\\', LC_DS, $class) . '.php');
         }
     }
 
@@ -149,32 +141,6 @@ public static function registerAll()
         static::registerPEARAutolader();
     }
 
-    /**
-     * Return path ot the autoloader current dir
-     *
-     * @return string
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public static function getLCAutoloadDir()
-    {
-        return static::$lcAutoloadDir;
-    }
-
-    /**
-     * Switch autoload directory from var/run/classes/ to classes/
-     *
-     * @param string $dir New autoload directory
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public static function switchLCAutoloadDir()
-    {
-        static::$lcAutoloadDir = LC_DIR_CLASSES;
-    }
-
     /**
      * Register the autoload function for the Doctrine library
      *
@@ -185,12 +151,17 @@ public static function switchLCAutoloadDir()
     protected static function registerDoctrineAutoloader()
     {
         require_once (LC_DIR_LIB . 'Doctrine' . LC_DS . 'Common' . LC_DS . 'ClassLoader.php');
+        require_once (LC_DIR_LIB . 'Doctrine' . LC_DS . 'Common' . LC_DS . 'Persistence' . LC_DS . 'Proxy.php');
 
         $loader = new \Doctrine\Common\ClassLoader('Doctrine', rtrim(LC_DIR_LIB, LC_DS));
         $loader->register();
 
         $loader = new \Doctrine\Common\ClassLoader('Symfony', rtrim(LC_DIR_LIB, LC_DS));
         $loader->register();
+
+        // Workaround for Doctrine 2 proxies
+        $loader = new \Doctrine\Common\ClassLoader('Proxy', rtrim(LC_DIR_CACHE_PROXY, LC_DS));
+        $loader->register();
     }
 
     /**
@@ -222,5 +193,4 @@ protected static function registerModulesLibrariesAutoloader()
             }
         }
     }
-
 }
diff --git a/src/Includes/Decorator/ADecorator.php b/src/Includes/Decorator/ADecorator.php
index 390498488e..4cbc867b54 100644
--- a/src/Includes/Decorator/ADecorator.php
+++ b/src/Includes/Decorator/ADecorator.php
@@ -122,7 +122,7 @@ public static function getModulesGraph()
      */
     public static function getClassesDir()
     {
-        return (static::STEP_FIRST == static::$step) ? LC_DIR_CLASSES : LC_DIR_CACHE_CLASSES;
+        return LC_DIR_CACHE_CLASSES;
     }
 
     /**
diff --git a/src/Includes/Decorator/DataStructure/Graph/Classes.php b/src/Includes/Decorator/DataStructure/Graph/Classes.php
index f6d2d05af9..9df80fced2 100644
--- a/src/Includes/Decorator/DataStructure/Graph/Classes.php
+++ b/src/Includes/Decorator/DataStructure/Graph/Classes.php
@@ -343,14 +343,19 @@ public function getSource(self $parent = null)
      */
     protected function getActualSource(self $parent = null)
     {
-        return \Includes\Decorator\Utils\Tokenizer::getSourceCode(
+        $this->getReflection()->docComment = $this->isLowLevelNode()
+            ? '/**' . PHP_EOL . ' * MOVED' . PHP_EOL . ' */'
+            : null;
+
+        $code = \Includes\Decorator\Utils\Tokenizer::getSourceCode(
             $this->getFile(),
             $this->getActualNamespace(),
             $this->getClassBaseName(),
             $this->getActualParentClassName($parent),
-            $this->getReflection()->docComment,
-            ($this->getReflection()->isAbstract || $this->getReflection()->isFinal) ? null : 'abstract'
+            $this->getReflection()->docComment
         );
+
+        return $code;
     }
 
     /**
@@ -366,6 +371,7 @@ protected function getEmptySource(self $parent = null)
     {
         return 'getActualNamespace()) ? ('namespace ' . $namespace . ';' . PHP_EOL . PHP_EOL) : '')
+            . (($comment = $this->getReflection()->docComment) ? ($comment . PHP_EOL) : '')
             . ($this->getReflection()->isFinal ? 'final '    : '')
             . ($this->getReflection()->isAbstract ? 'abstract ' : '')
             . ($this->getReflection()->isInterface ? 'interface' : 'class') . ' ' . $this->getClassBaseName()
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php
index 197db7c6f2..72f9a2cb62 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php
@@ -44,7 +44,7 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepSecond()
+    public function executeHookHandlerBeforeDecorate()
     {
         // Create model proxy classes (first step of cache generation)
         \Includes\Decorator\Plugin\Doctrine\Utils\EntityManager::generateModels();
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
index 25d84577aa..a8cc5ab6fe 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,16 +13,16 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\Multilangs;
@@ -30,29 +30,26 @@
 /**
  * Routines for Doctrine library
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
     /**
      * List of  pairs (code replacements)
      *
-     * @var    array
-     * @access protected
-     * @see    ____var_see____
-     * @since  1.0.0
+     * @var   array
+     * @see   ____var_see____
+     * @since 1.0.0
      */
     protected $replacements = array();
 
     /**
      * Autogenerated "translate" property
      *
-     * @var    string
-     * @access protected
-     * @see    ____var_see____
-     * @since  1.0.0
+     * @var   string
+     * @see   ____var_see____
+     * @since 1.0.0
      */
     protected $templateTranslation = <<getMetadata() as $main) {
 
             // Process only certain classes
             if (is_subclass_of($main->name, '\XLite\Model\Base\I18n') && !$main->isMappedSuperclass) {
+                $translation = $this->getTranslationClass($main);
 
                 // If the "translation" field is not added manually
-                if (!($translation = $this->getTranslationClass($main))) {
-
+                if (!$translation) {
                     $translation = $this->getTranslationClassDefault($main);
                     $this->addReplacement($main, 'translation', $this->getTranslationSubstitutes($main, $translation));
                 }
@@ -172,7 +166,11 @@ public function executeHookHandlerStepSecond()
 
                     // Two iteartions: "getter" and "setter"
                     foreach ($this->getAutogeneratedMethodsList() as $method => $entry) {
-                        $this->addReplacement($main, $method, $this->getMethodSubstitutes($main, $entry, $method, $field));
+                        $this->addReplacement(
+                            $main,
+                            $method,
+                            $this->getMethodSubstitutes($main, $entry, $method, $field)
+                        );
                     }
                 }
 
@@ -187,8 +185,9 @@ public function executeHookHandlerStepSecond()
         $this->writeData();
     }
 
+    // }}}
 
-    // ------------------------------ Replacements -
+    // {{{ Replacements
 
     /**
      * Add code to replace
@@ -198,7 +197,6 @@ public function executeHookHandlerStepSecond()
      * @param array                               $substitutes List of entries to substitude
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -216,8 +214,9 @@ protected function addReplacement(\Doctrine\ORM\Mapping\ClassMetadata $data, $te
         }
     }
 
+    // }}}
 
-    // ------------------------------ "Translation"-related methods -
+    // {{{ "Translation"-related methods
 
     /**
      * Check if the "translation" field is defined manually
@@ -225,7 +224,6 @@ protected function addReplacement(\Doctrine\ORM\Mapping\ClassMetadata $data, $te
      * @param \Doctrine\ORM\Mapping\ClassMetadata $main Main class metadata
      *
      * @return string
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -246,13 +244,12 @@ protected function getTranslationClass(\Doctrine\ORM\Mapping\ClassMetadata $main
      * @param \Doctrine\ORM\Mapping\ClassMetadata $main Main class metadata
      *
      * @return string
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function getTranslationClassDefault(\Doctrine\ORM\Mapping\ClassMetadata $main)
     {
-        return $this->getMetadata($main->name . 'Translation');
+        return $this->getMetadata(\Includes\Utils\Converter::getPureClassName($main->name) . 'Translation');
     }
 
     /**
@@ -262,7 +259,6 @@ protected function getTranslationClassDefault(\Doctrine\ORM\Mapping\ClassMetadat
      * @param \Doctrine\ORM\Mapping\ClassMetadata $translation Translation class metadata
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -285,7 +281,6 @@ protected function getTranslationSubstitutes(
      * @param \Doctrine\ORM\Mapping\ClassMetadata $translation Translation class metadata
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -297,14 +292,14 @@ protected function getTranslationFields(\Doctrine\ORM\Mapping\ClassMetadata $tra
         );
     }
 
+    // }}}
 
-    // ------------------------------ Methods to generate getters and setters -
+    // {{{ Methods to generate getters and setters
 
     /**
      * Return list of getters/setters patterns
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -322,7 +317,6 @@ protected function getAutogeneratedMethodsList()
      * @param string                              $field  Name of field to get or set
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -336,9 +330,10 @@ protected function getMethodSubstitutes(\Doctrine\ORM\Mapping\ClassMetadata $mai
 
         return $result;
     }
+    
+    // }}}
 
-
-    // ------------------------------ "Owner"-related methods -
+    // {{{ "Owner"-related methods
 
     /**
      * Return the array of substitutes for the "owner" template
@@ -346,7 +341,6 @@ protected function getMethodSubstitutes(\Doctrine\ORM\Mapping\ClassMetadata $mai
      * @param \Doctrine\ORM\Mapping\ClassMetadata $main Current multilang model class metadata
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -359,22 +353,24 @@ protected function getOwnerSubstitutes(\Doctrine\ORM\Mapping\ClassMetadata $main
         );
     }
 
+    // }}}
 
-    // ------------------------------ Methods to write changes -
+    // {{{ Methods to write changes
 
     /**
      * Put prepared code into the files
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function writeData()
     {
         foreach ($this->replacements as $file => $code) {
+            $file = LC_DIR_CACHE_CLASSES . $file;
+
             \Includes\Utils\FileManager::write(
-                $file = LC_DIR_CACHE_CLASSES . $file,
+                $file,
                 \Includes\Decorator\Utils\Tokenizer::addCodeToClassBody($file, $code)
             );
         }
@@ -383,11 +379,10 @@ protected function writeData()
     /**
      * Substitute entries in code template
      *
-     * @param string $template template to prepare
-     * @param array  $entries  list of  pairs
+     * @param string $template Template to prepare
+     * @param array  $entries  List of  pairs
      *
      * @return string
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -396,8 +391,9 @@ protected function substituteTemplate($template, array $entries)
         return str_replace(array_keys($entries), $entries, $this->{'template' . ucfirst($template)});
     }
 
+    // }}}
 
-    // ------------------------------ Auxiliary methods -
+    // {{{ Auxiliary methods
 
     /**
      * Alias
@@ -405,7 +401,6 @@ protected function substituteTemplate($template, array $entries)
      * @param string $class Class name OPTIONAL
      *
      * @return array|\Doctrine\ORM\Mapping\ClassMetadata
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -413,4 +408,6 @@ protected function getMetadata($class = null)
     {
         return \Includes\Decorator\Plugin\Doctrine\Utils\EntityManager::getAllMetadata($class);
     }
+
+    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php b/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php
index 44e8f8cc8d..0c6fa9bc5b 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php
@@ -167,6 +167,7 @@ protected static function setMetadataDriver(\Doctrine\ORM\Configuration $config)
     protected static function getConfig()
     {
         $config = new \Doctrine\ORM\Configuration();
+        $config->setAutoGenerateProxyClasses(false);
 
         static::setMetadataDriver($config);
 
@@ -207,8 +208,7 @@ protected static function getHandler()
      */
     protected static function getEntityGenerator()
     {
-        $generator = new \Doctrine\ORM\Tools\EntityGenerator();
-        // \Includes\Decorator\Plugin\Doctrine\Utils\ModelGenerator();
+        $generator = new \Includes\Decorator\Plugin\Doctrine\Utils\ModelGenerator();
         $generator->setGenerateAnnotations(true);
         $generator->setRegenerateEntityIfExists(false);
         $generator->setUpdateEntityIfExists(true);
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php b/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
index 8cc2812191..d79be9c160 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
@@ -1,28 +1,20 @@
  
- * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link      http://www.litecommerce.com/
- * @see       ____file_see____
- * @since     1.0.6
+/*
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * .
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Utils;
@@ -32,21 +24,41 @@
     Doctrine\Common\Util\Inflector;
 
 /**
- * ModelGenerator 
+ * Generic class used to generate PHP5 entity classes from ClassMetadataInfo instances
+ *
+ *     [php]
+ *     $classes = $em->getClassMetadataFactory()->getAllMetadata();
  *
- * @see   ____class_see____
- * @since 1.0.6
+ *     $generator = new \Doctrine\ORM\Tools\EntityGenerator();
+ *     $generator->setGenerateAnnotations(true);
+ *     $generator->setGenerateStubMethods(true);
+ *     $generator->setRegenerateEntityIfExists(false);
+ *     $generator->setUpdateEntityIfExists(true);
+ *     $generator->generate($classes, '/path/to/generate/entities');
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link    www.doctrine-project.org
+ * @since   2.0
+ * @version $Revision$
+ * @author  Benjamin Eberlei 
+ * @author  Guilherme Blanco 
+ * @author  Jonathan Wage 
+ * @author  Roman Borschel 
  */
 class ModelGenerator
 {
+    /**
+     * @var bool
+     */
+    private $_backupExisting = true;
+
     /** The extension to use for written php files */
     private $_extension = '.php';
 
     /** Whether or not the current ClassMetadataInfo instance is new or old */
     private $_isNew = true;
 
-    /** If isNew is false then this variable contains instance of ReflectionClass for current entity */
-    private $_reflection;
+    private $_staticReflection = array();
 
     /** Number of spaces to use for indention in generated code */
     private $_numSpaces = 4;
@@ -60,6 +72,11 @@ class ModelGenerator
     /** Whether or not to generation annotations */
     private $_generateAnnotations = false;
 
+    /**
+     * @var string
+     */
+    private $_annotationsPrefix = '';
+
     /** Whether or not to generated sub methods */
     private $_generateEntityStubMethods = false;
 
@@ -74,6 +91,8 @@ class ModelGenerator
 
 
 
+use Doctrine\ORM\Mapping as ORM;
+
 
 
 {
@@ -84,7 +103,7 @@ class ModelGenerator
 '/**
  * 
  *
- * @return $
+ * @return 
  */
 public function ()
 {
@@ -96,10 +115,12 @@ public function ()
  * 
  *
  * @param $
+ * @return 
  */
-public function ($)
+public function ($)
 {
 $this-> = $;
+return $this;
 }';
 
     private static $_addMethodTemplate =
@@ -107,10 +128,12 @@ public function ($)
  * 
  *
  * @param $
+ * @return 
  */
 public function ($)
 {
 $this->[] = $;
+return $this;
 }';
 
     private static $_lifecycleCallbackMethodTemplate =
@@ -122,16 +145,35 @@ public function ()
 // Add your code here
 }';
 
+    private static $_constructorMethodTemplate =
+'public function __construct()
+{
+
+}
+';
+
+    public function __construct()
+    {
+        if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
+            $this->_annotationsPrefix = 'ORM\\';
+        }
+    }
+
     /**
      * Generate and write entity classes for the given array of ClassMetadataInfo instances
      *
      * @param array $metadatas
-     * @param string $outputDirectory 
+     * @param string $outputDirectory
      * @return void
      */
     public function generate(array $metadatas, $outputDirectory)
     {
         foreach ($metadatas as $metadata) {
+            if ('XLite\Module\CDev\FeaturedProducts\Model\Category' === $metadata->name) {
+                var_dump($metadata);die;
+            }
+
+
             $this->writeEntityClass($metadata, $outputDirectory);
         }
     }
@@ -140,7 +182,7 @@ public function generate(array $metadatas, $outputDirectory)
      * Generated and write entity class to disk for the given ClassMetadataInfo instance
      *
      * @param ClassMetadataInfo $metadata
-     * @param string $outputDirectory 
+     * @param string $outputDirectory
      * @return void
      */
     public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
@@ -152,16 +194,24 @@ public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
             mkdir($dir, 0777, true);
         }
 
-        $this->_isNew = ! file_exists($path);
+        $this->_isNew = !file_exists($path) || (file_exists($path) && $this->_regenerateEntityIfExists);
 
         if ( ! $this->_isNew) {
-            require_once $path;
+            $this->_parseTokensInEntityFile(file_get_contents($path));
+            $this->_staticReflection[$metadata->name]['parent'] = \Includes\Decorator\Utils\Tokenizer::getParentClassName($path);
+        } else {
+            $this->_staticReflection[$metadata->name] = array('properties' => array(), 'methods' => array());
+        }
 
-            $this->_reflection = new \ReflectionClass($metadata->name);
+        if ($this->_backupExisting && file_exists($path)) {
+            $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
+            if (!copy($path, $backupPath)) {
+                throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
+            }
         }
 
         // If entity doesn't exist or we're re-generating the entities entirely
-        if ($this->_isNew || ( ! $this->_isNew && $this->_regenerateEntityIfExists)) {
+        if ($this->_isNew) {
             file_put_contents($path, $this->generateEntityClass($metadata));
         // If entity exists and we're allowed to update the entity class
         } else if ( ! $this->_isNew && $this->_updateEntityIfExists) {
@@ -172,7 +222,7 @@ public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
     /**
      * Generate a PHP5 Doctrine 2 entity class from the given ClassMetadataInfo instance
      *
-     * @param ClassMetadataInfo $metadata 
+     * @param ClassMetadataInfo $metadata
      * @return string $code
      */
     public function generateEntityClass(ClassMetadataInfo $metadata)
@@ -198,8 +248,8 @@ public function generateEntityClass(ClassMetadataInfo $metadata)
     /**
      * Generate the updated code for the given ClassMetadataInfo and entity at path
      *
-     * @param ClassMetadataInfo $metadata 
-     * @param string $path 
+     * @param ClassMetadataInfo $metadata
+     * @param string $path
      * @return string $code;
      */
     public function generateUpdatedEntityClass(ClassMetadataInfo $metadata, $path)
@@ -216,7 +266,7 @@ public function generateUpdatedEntityClass(ClassMetadataInfo $metadata, $path)
     /**
      * Set the number of spaces the exported class should have
      *
-     * @param integer $numSpaces 
+     * @param integer $numSpaces
      * @return void
      */
     public function setNumSpaces($numSpaces)
@@ -228,7 +278,7 @@ public function setNumSpaces($numSpaces)
     /**
      * Set the extension to use when writing php files to disk
      *
-     * @param string $extension 
+     * @param string $extension
      * @return void
      */
     public function setExtension($extension)
@@ -249,7 +299,7 @@ public function setClassToExtend($classToExtend)
     /**
      * Set whether or not to generate annotations for the entity
      *
-     * @param bool $bool 
+     * @param bool $bool
      * @return void
      */
     public function setGenerateAnnotations($bool)
@@ -257,10 +307,20 @@ public function setGenerateAnnotations($bool)
         $this->_generateAnnotations = $bool;
     }
 
+    /**
+     * Set an annotation prefix.
+     *
+     * @param string $prefix
+     */
+    public function setAnnotationPrefix($prefix)
+    {
+        $this->_annotationsPrefix = $prefix;
+    }
+
     /**
      * Set whether or not to try and update the entity if it already exists
      *
-     * @param bool $bool 
+     * @param bool $bool
      * @return void
      */
     public function setUpdateEntityIfExists($bool)
@@ -290,6 +350,14 @@ public function setGenerateStubMethods($bool)
         $this->_generateEntityStubMethods = $bool;
     }
 
+    /**
+     * Should an existing entity be backed up if it already exists?
+     */
+    public function setBackupExisting($bool)
+    {
+        $this->_backupExisting = $bool;
+    }
+
     private function _generateEntityNamespace(ClassMetadataInfo $metadata)
     {
         if ($this->_hasNamespace($metadata)) {
@@ -305,8 +373,8 @@ private function _generateEntityClassName(ClassMetadataInfo $metadata)
 
     private function _generateEntityBody(ClassMetadataInfo $metadata)
     {
-        $fieldMappingProperties  = $this->_generateEntityFieldMappingProperties($metadata);
-        $associationMappingProperties = $this->_generateEntityAssociationMappingProperties($metadata);
+        $fieldMappingProperties = false; //$this->_generateEntityFieldMappingProperties($metadata);
+        $associationMappingProperties = false; //$this->_generateEntityAssociationMappingProperties($metadata);
         $stubMethods = $this->_generateEntityStubMethods ? $this->_generateEntityStubMethods($metadata) : null;
         $lifecycleCallbackMethods = $this->_generateEntityLifecycleCallbackMethods($metadata);
 
@@ -320,6 +388,8 @@ private function _generateEntityBody(ClassMetadataInfo $metadata)
             $code[] = $associationMappingProperties;
         }
 
+        $code[] = $this->_generateEntityConstructor($metadata);
+
         if ($stubMethods) {
             $code[] = $stubMethods;
         }
@@ -331,14 +401,107 @@ private function _generateEntityBody(ClassMetadataInfo $metadata)
         return implode("\n", $code);
     }
 
+    private function _generateEntityConstructor(ClassMetadataInfo $metadata)
+    {
+        if ($this->_hasMethod('__construct', $metadata)) {
+            return '';
+        }
+
+        $collections = array();
+
+        foreach ($metadata->associationMappings AS $mapping) {
+            if ($mapping['type'] & ClassMetadataInfo::TO_MANY) {
+                $collections[] = '$this->'.$mapping['fieldName'].' = new \Doctrine\Common\Collections\ArrayCollection();';
+            }
+        }
+
+        if ($collections) {
+            return $this->_prefixCodeWithSpaces(str_replace("", implode("\n".$this->_spaces, $collections), self::$_constructorMethodTemplate));
+        }
+
+        return '';
+    }
+
+    /**
+     * @todo this won't work if there is a namespace in brackets and a class outside of it.
+     * @param string $src
+     */
+    private function _parseTokensInEntityFile($src)
+    {
+        $tokens = token_get_all($src);
+        $lastSeenNamespace = "";
+        $lastSeenClass = false;
+
+        $inNamespace = false;
+        $inClass = false;
+        for ($i = 0; $i < count($tokens); $i++) {
+            $token = $tokens[$i];
+            if (in_array($token[0], array(T_WHITESPACE, T_COMMENT, T_DOC_COMMENT))) {
+                continue;
+            }
+
+            if ($inNamespace) {
+                if ($token[0] == T_NS_SEPARATOR || $token[0] == T_STRING) {
+                    $lastSeenNamespace .= $token[1];
+                } else if (is_string($token) && in_array($token, array(';', '{'))) {
+                    $inNamespace = false;
+                }
+            }
+
+            if ($inClass) {
+                $inClass = false;
+                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
+                $this->_staticReflection[$lastSeenClass]['properties'] = array();
+                $this->_staticReflection[$lastSeenClass]['methods'] = array();
+            }
+
+            if ($token[0] == T_NAMESPACE) {
+                $lastSeenNamespace = "";
+                $inNamespace = true;
+            } else if ($token[0] == T_CLASS) {
+                $inClass = true;
+            } else if ($token[0] == T_FUNCTION) {
+                if ($tokens[$i+2][0] == T_STRING) {
+                    $this->_staticReflection[$lastSeenClass]['methods'][] = $this->prepareMethodName($tokens[$i+2][1]);
+                } else if ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) {
+                    $this->_staticReflection[$lastSeenClass]['methods'][] = $this->prepareMethodName($tokens[$i+3][1]);
+                }
+            } else if (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) {
+                $this->_staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
+            }
+        }
+    }
+
     private function _hasProperty($property, ClassMetadataInfo $metadata)
     {
-        return ($this->_isNew) ? false : $this->_reflection->hasProperty($property);
+        if ($this->_extendsClass()) {
+            // don't generate property if its already on the base class.
+            $reflClass = new \ReflectionClass($this->_getClassToExtend());
+            if ($reflClass->hasProperty($property)) {
+                return true;
+            }
+        }
+
+        return (
+            isset($this->_staticReflection[$metadata->name]) &&
+            in_array($property, $this->_staticReflection[$metadata->name]['properties'])
+        );
     }
 
     private function _hasMethod($method, ClassMetadataInfo $metadata)
     {
-        return ($this->_isNew) ? false : $this->_reflection->hasMethod($method);
+        if ($class = $this->_getClassToExtend($metadata->name)) {
+            // don't generate method if its already on the base class.
+            $reflClass = new \ReflectionClass($class);
+            if ($reflClass->hasMethod($method)) {
+                return true;
+            }
+        }
+
+        return (
+            isset($this->_staticReflection[$metadata->name]) &&
+            in_array($this->prepareMethodName($method), $this->_staticReflection[$metadata->name]['methods'])
+        );
     }
 
     private function _hasNamespace(ClassMetadataInfo $metadata)
@@ -351,8 +514,12 @@ private function _extendsClass()
         return $this->_classToExtend ? true : false;
     }
 
-    private function _getClassToExtend()
+    private function _getClassToExtend($name = null)
     {
+        if (!empty($this->_staticReflection[$name]['parent'])) {
+            $this->setClassToExtend($this->_staticReflection[$name]['parent']);
+        }
+
         return $this->_classToExtend;
     }
 
@@ -397,9 +564,9 @@ private function _generateEntityDocBlock(ClassMetadataInfo $metadata)
             }
 
             if ($metadata->isMappedSuperclass) {
-                $lines[] = ' * @MappedSupperClass';
+                $lines[] = ' * @' . $this->_annotationsPrefix . 'MappedSuperClass';
             } else {
-                $lines[] = ' * @Entity';
+                $lines[] = ' * @' . $this->_annotationsPrefix . 'Entity';
             }
 
             if ($metadata->customRepositoryClassName) {
@@ -407,7 +574,7 @@ private function _generateEntityDocBlock(ClassMetadataInfo $metadata)
             }
 
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
-                $lines[] = ' * @HasLifecycleCallbacks';
+                $lines[] = ' * @' . $this->_annotationsPrefix . 'HasLifecycleCallbacks';
             }
         }
 
@@ -419,21 +586,45 @@ private function _generateEntityDocBlock(ClassMetadataInfo $metadata)
     private function _generateTableAnnotation($metadata)
     {
         $table = array();
-        if ($metadata->table['name']) {
-            $table[] = 'name="' . $metadata->table['name'] . '"';
-        }
 
         if (isset($metadata->table['schema'])) {
             $table[] = 'schema="' . $metadata->table['schema'] . '"';
         }
 
-        return '@Table(' . implode(', ', $table) . ')';
+        if (isset($metadata->table['name'])) {
+            $table[] = 'name="' . $metadata->table['name'] . '"';
+        }
+
+        if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
+            $constraints = $this->_generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
+            $table[] = 'uniqueConstraints={' . $constraints . '}';
+        }
+
+        if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
+            $constraints = $this->_generateTableConstraints('Index', $metadata->table['indexes']);
+            $table[] = 'indexes={' . $constraints . '}';
+        }
+
+        return '@' . $this->_annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
+    }
+
+    private function _generateTableConstraints($constraintName, $constraints)
+    {
+        $annotations = array();
+        foreach ($constraints as $name => $constraint) {
+            $columns = array();
+            foreach ($constraint['columns'] as $column) {
+                $columns[] = '"' . $column . '"';
+            }
+            $annotations[] = '@' . $this->_annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
+        }
+        return implode(', ', $annotations);
     }
 
     private function _generateInheritanceAnnotation($metadata)
     {
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
-            return '@InheritanceType("'.$this->_getInheritanceTypeString($metadata->inheritanceType).'")';
+            return '@' . $this->_annotationsPrefix . 'InheritanceType("'.$this->_getInheritanceTypeString($metadata->inheritanceType).'")';
         }
     }
 
@@ -445,7 +636,7 @@ private function _generateDiscriminatorColumnAnnotation($metadata)
                 . '", type="' . $discrColumn['type']
                 . '", length=' . $discrColumn['length'];
 
-            return '@DiscriminatorColumn(' . $columnDefinition . ')';
+            return '@' . $this->_annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
         }
     }
 
@@ -458,7 +649,7 @@ private function _generateDiscriminatorMapAnnotation($metadata)
                 $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
             }
 
-            return '@DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
+            return '@' . $this->_annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
         }
     }
 
@@ -467,7 +658,7 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
         $methods = array();
 
         foreach ($metadata->fieldMappings as $fieldMapping) {
-            if ( ! isset($fieldMapping['id']) || ! $fieldMapping['id']) {
+            if ( ! isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType == ClassMetadataInfo::GENERATOR_TYPE_NONE) {
                 if ($code = $this->_generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'])) {
                     $methods[] = $code;
                 }
@@ -480,29 +671,14 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
 
         foreach ($metadata->associationMappings as $associationMapping) {
             if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
-                if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
+                $nullable = $this->_isAssociationIsNullable($associationMapping) ? 'null' : null;
+                if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'], $nullable)) {
                     $methods[] = $code;
                 }
                 if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
                     $methods[] = $code;
                 }
-            } else if ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_MANY) {
-                if ($associationMapping['isOwningSide']) {
-                    if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
-                        $methods[] = $code;
-                    }
-                    if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
-                        $methods[] = $code;
-                    }
-                } else {
-                    if ($code = $this->_generateEntityStubMethod($metadata, 'add', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
-                        $methods[] = $code;
-                    }
-                    if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping['fieldName'], 'Doctrine\Common\Collections\Collection')) {
-                        $methods[] = $code;
-                    }
-                }
-            } else if ($associationMapping['type'] == ClassMetadataInfo::MANY_TO_MANY) {
+            } else if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
                 if ($code = $this->_generateEntityStubMethod($metadata, 'add', $associationMapping['fieldName'], $associationMapping['targetEntity'])) {
                     $methods[] = $code;
                 }
@@ -515,6 +691,25 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
         return implode("\n\n", $methods);
     }
 
+    private function _isAssociationIsNullable($associationMapping)
+    {
+        if (isset($associationMapping['id']) && $associationMapping['id']) {
+            return false;
+        }
+        if (isset($associationMapping['joinColumns'])) {
+            $joinColumns = $associationMapping['joinColumns'];
+        } else {
+            //@todo thereis no way to retreive targetEntity metadata
+            $joinColumns = array();
+        }
+        foreach ($joinColumns as $joinColumn) {
+            if(isset($joinColumn['nullable']) && !$joinColumn['nullable']) {
+                return false;
+            }
+        }
+        return true;
+    }
+
     private function _generateEntityLifecycleCallbackMethods(ClassMetadataInfo $metadata)
     {
         if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
@@ -528,8 +723,10 @@ private function _generateEntityLifecycleCallbackMethods(ClassMetadataInfo $meta
                 }
             }
 
-            return implode('', $methods);
+            return implode("\n\n", $methods);
         }
+
+        return "";
     }
 
     private function _generateEntityAssociationMappingProperties(ClassMetadataInfo $metadata)
@@ -554,7 +751,8 @@ private function _generateEntityFieldMappingProperties(ClassMetadataInfo $metada
         $lines = array();
 
         foreach ($metadata->fieldMappings as $fieldMapping) {
-            if ($this->_hasProperty($fieldMapping['fieldName'], $metadata)) {
+            if ($this->_hasProperty($fieldMapping['fieldName'], $metadata) ||
+                $metadata->isInheritedField($fieldMapping['fieldName'])) {
                 continue;
             }
 
@@ -566,13 +764,25 @@ private function _generateEntityFieldMappingProperties(ClassMetadataInfo $metada
         return implode("\n", $lines);
     }
 
-    private function _generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null)
+    protected function prepareMethodName($name)
     {
-        $methodName = $type . Inflector::classify($fieldName);
+        return strtolower($name);
+    }
+
+    private function _generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null,  $defaultValue = null)
+    {
+        /*if ($type == "add") {
+            $addMethod = explode("\\", $typeHint);
+            $addMethod = end($addMethod);
+            $methodName = $type . $addMethod;
+        } else {*/
+            $methodName = $type . Inflector::classify($fieldName);
+        //}
 
         if ($this->_hasMethod($methodName, $metadata)) {
             return;
         }
+        $this->_staticReflection[$metadata->name]['methods'][] = $this->prepareMethodName($methodName);
 
         $var = sprintf('_%sMethodTemplate', $type);
         $template = self::$$var;
@@ -588,7 +798,9 @@ private function _generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $
           ''      => $variableType,
           ''      => Inflector::camelize($fieldName),
           ''        => $methodName,
-          ''         => $fieldName
+          ''         => $fieldName,
+          ''   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
+          ''            => $this->_getClassName($metadata)
         );
 
         $method = str_replace(
@@ -605,9 +817,10 @@ private function _generateLifecycleCallbackMethod($name, $methodName, $metadata)
         if ($this->_hasMethod($methodName, $metadata)) {
             return;
         }
+        $this->_staticReflection[$metadata->name]['methods'][] = $this->prepareMethodName($methodName);
 
         $replacements = array(
-            ''        => $name,
+            ''        => $this->_annotationsPrefix . $name,
             ''  => $methodName,
         );
 
@@ -641,28 +854,37 @@ private function _generateJoinColumnAnnotation(array $joinColumn)
         }
 
         if (isset($joinColumn['onDelete'])) {
-            $joinColumnAnnot[] = 'onDelete=' . ($joinColumn['onDelete'] ? 'true' : 'false');
-        }
-
-        if (isset($joinColumn['onUpdate'])) {
-            $joinColumnAnnot[] = 'onUpdate=' . ($joinColumn['onUpdate'] ? 'true' : 'false');
+            $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"');
         }
 
         if (isset($joinColumn['columnDefinition'])) {
             $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"';
         }
 
-        return '@JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
+        return '@' . $this->_annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
     }
 
     private function _generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata)
     {
         $lines = array();
         $lines[] = $this->_spaces . '/**';
-        $lines[] = $this->_spaces . ' * @var ' . $associationMapping['targetEntity'];
+
+        if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
+            $lines[] = $this->_spaces . ' * @var \Doctrine\Common\Collections\ArrayCollection';
+        } else {
+            $lines[] = $this->_spaces . ' * @var ' . $associationMapping['targetEntity'];
+        }
 
         if ($this->_generateAnnotations) {
             $lines[] = $this->_spaces . ' *';
+            
+            if (isset($associationMapping['id']) && $associationMapping['id']) {
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'Id';
+            
+                if ($generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
+                    $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
+                }
+            }
 
             $type = null;
             switch ($associationMapping['type']) {
@@ -702,17 +924,17 @@ private function _generateAssociationMappingPropertyDocBlock(array $associationM
                 if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"';
                 if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"';
 
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';            
+                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
             }
 
             if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) {
                 $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false');
             }
 
-            $lines[] = $this->_spaces . ' * @' . $type . '(' . implode(', ', $typeOptions) . ')';
+            $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
 
             if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) {
-                $lines[] = $this->_spaces . ' * @JoinColumns({';
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'JoinColumns({';
 
                 $joinColumnsLines = array();
 
@@ -734,7 +956,7 @@ private function _generateAssociationMappingPropertyDocBlock(array $associationM
                     $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"';
                 }
 
-                $lines[] = $this->_spaces . ' * @JoinTable(' . implode(', ', $joinTable) . ',';
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ',';
                 $lines[] = $this->_spaces . ' *   joinColumns={';
 
                 foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) {
@@ -753,10 +975,10 @@ private function _generateAssociationMappingPropertyDocBlock(array $associationM
             }
 
             if (isset($associationMapping['orderBy'])) {
-                $lines[] = $this->_spaces . ' * @OrderBy({';
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'OrderBy({';
 
                 foreach ($associationMapping['orderBy'] as $name => $direction) {
-                    $lines[] = $this->_spaces . ' *     "' . $name . '"="' . $direction . '",'; 
+                    $lines[] = $this->_spaces . ' *     "' . $name . '"="' . $direction . '",';
                 }
 
                 $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1);
@@ -807,31 +1029,17 @@ private function _generateFieldMappingPropertyDocBlock(array $fieldMapping, Clas
                 $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"';
             }
 
-            if (isset($fieldMapping['options'])) {
-                $options = array();
-
-                foreach ($fieldMapping['options'] as $key => $value) {
-                    $value = var_export($value, true);
-                    $value = str_replace("'", '"', $value);
-                    $options[] = ! is_numeric($key) ? $key . '=' . $value:$value;
-                }
-
-                if ($options) {
-                    $column[] = 'options={' . implode(', ', $options) . '}';
-                }
-            }
-
             if (isset($fieldMapping['unique'])) {
                 $column[] = 'unique=' . var_export($fieldMapping['unique'], true);
             }
 
-            $lines[] = $this->_spaces . ' * @Column(' . implode(', ', $column) . ')';
+            $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
 
             if (isset($fieldMapping['id']) && $fieldMapping['id']) {
-                $lines[] = $this->_spaces . ' * @Id';
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'Id';
 
                 if ($generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
-                    $lines[] = $this->_spaces.' * @GeneratedValue(strategy="' . $generatorType . '")';
+                    $lines[] = $this->_spaces.' * @' . $this->_annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
                 }
 
                 if ($metadata->sequenceGeneratorDefinition) {
@@ -849,12 +1057,12 @@ private function _generateFieldMappingPropertyDocBlock(array $fieldMapping, Clas
                         $sequenceGenerator[] = 'initialValue="' . $metadata->sequenceGeneratorDefinition['initialValue'] . '"';
                     }
 
-                    $lines[] = $this->_spaces . ' * @SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')';
+                    $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')';
                 }
             }
 
             if (isset($fieldMapping['version']) && $fieldMapping['version']) {
-                $lines[] = $this->_spaces . ' * @Version';
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'Version';
             }
         }
 
diff --git a/src/Includes/Decorator/Utils/CacheManager.php b/src/Includes/Decorator/Utils/CacheManager.php
index 70e8faa43a..c3efc2af53 100644
--- a/src/Includes/Decorator/Utils/CacheManager.php
+++ b/src/Includes/Decorator/Utils/CacheManager.php
@@ -513,8 +513,9 @@ public static function executeStepHandler1()
         static::cleanupCache();
         static::showStepInfo();
 
-        // Load classes from "classes" (do not use cache)
-        \Includes\Autoloader::switchLcAutoloadDir();
+        // Copy classes from "classes"
+        static::showStepMessage('Copy classes to cache...');
+        \Includes\Utils\FileManager::copyRecursive(LC_DIR_CLASSES, LC_DIR_CACHE_CLASSES);
 
         // Main procedure: build decorator chains
         static::showStepMessage('Building classes tree...');
diff --git a/src/Includes/Decorator/Utils/Tokenizer.php b/src/Includes/Decorator/Utils/Tokenizer.php
index 58ebd060e7..6fe7df6ad7 100644
--- a/src/Includes/Decorator/Utils/Tokenizer.php
+++ b/src/Includes/Decorator/Utils/Tokenizer.php
@@ -420,7 +420,11 @@ protected static function replaceParentClassName($token)
      */
     protected static function replaceDockblock($token)
     {
-        static::replaceClassRelatedToken(T_DOC_COMMENT, $token, false);
+        list(, $start, $end) = static::findTokensByIndexFromOffset(array(T_DOC_COMMENT), T_CLASS, false);
+
+        if (isset($start)) {
+            static::replaceTokens($start, $end, static::prepareTokens(array($token)));
+        }
     }
 
     /**
@@ -434,6 +438,15 @@ protected static function replaceDockblock($token)
      */
     protected static function replaceClassType($token)
     {
+        list(, $start, ) = static::findTokensByIndexFromOffset(array(T_ABSTRACT, T_FINAL), T_CLASS, false);
+
+        if (!isset($start)) {
+            list(, , $start) = static::findTokensByIndexFromOffset(array(T_WHITESPACE), T_CLASS, false);
+
+            if (isset($start)) {
+                static::replaceTokens($start, $start, static::prepareTokens(array($token, ' ')));
+            }
+        }
     }
 
     /**
diff --git a/src/Includes/Decorator/plugins.ini b/src/Includes/Decorator/plugins.ini
index f07a07c96e..44a61906de 100644
--- a/src/Includes/Decorator/plugins.ini
+++ b/src/Includes/Decorator/plugins.ini
@@ -7,6 +7,8 @@
 
 [before_decorate]
 ModuleControllers                 = 10
+Doctrine_Plugin_Multilangs        = 20
+Doctrine_Plugin_ModelGenerator    = 30
 
 [before_write]
 ; Empty now
@@ -16,10 +18,8 @@ Doctrine_Plugin_DocBlockCorrector = 10
 Doctrine_Plugin_Cache             = 20
 
 [step_second]
-Doctrine_Plugin_Multilangs        = 10
-Doctrine_Plugin_ModelGenerator    = 20
-PHPCache_Plugin_APC               = 30
-StaticRoutines                    = 40
+PHPCache_Plugin_APC               = 10
+StaticRoutines                    = 20
 
 [step_third]
 Doctrine_Plugin_ProxyGenerator    = 10
diff --git a/src/Includes/Pattern/Factory.php b/src/Includes/Pattern/Factory.php
index 6ab604e9d9..d7a01c94b7 100644
--- a/src/Includes/Pattern/Factory.php
+++ b/src/Includes/Pattern/Factory.php
@@ -70,7 +70,7 @@ public static function create($class, array $args = array())
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected static function getClassHandler($class)
+    public static function getClassHandler($class)
     {
         if (!isset(static::$classHandlers[$class])) {
             static::$classHandlers[$class] = new \ReflectionClass($class);
diff --git a/src/Includes/Utils/Converter.php b/src/Includes/Utils/Converter.php
index 30b9b4a6b8..5a850b7748 100644
--- a/src/Includes/Utils/Converter.php
+++ b/src/Includes/Utils/Converter.php
@@ -298,4 +298,18 @@ public static function removeCRLF($value)
     {
         return trim(preg_replace('/[\r\n]+/', '', ((string)$value)));
     }
+
+    /**
+     * Get non-decorated class name
+     *
+     * @param string $class Class name to prepare
+     *
+     * @return string
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    public static function getPureClassName($class)
+    {
+        return preg_replace('/' . \Includes\Decorator\Utils\Operator::BASE_CLASS_SUFFIX . '$/S', '', $class);
+    }
 }
diff --git a/src/Includes/Utils/FileManager.php b/src/Includes/Utils/FileManager.php
index 65bab82f9b..fa194b7fde 100644
--- a/src/Includes/Utils/FileManager.php
+++ b/src/Includes/Utils/FileManager.php
@@ -224,21 +224,24 @@ public static function getRelativePath($path, $compareTo)
     /**
      * Prepare file path
      *
-     * @param string $dir Dir to prepare
+     * @param string  $dir   Dir to prepare
+     * @param boolean $check Flag OPTIONAL
      *
      * @return string
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public static function getCanonicalDir($dir)
+    public static function getCanonicalDir($dir, $check = true)
     {
-        $path = null;
+        if ($check) {
+            $dir = static::getRealPath($dir);
+        }
 
-        if (static::isDir($dir) && ($path = static::getRealPath($dir))) {
-            $path = \Includes\Utils\Converter::trimTrailingChars($path,  LC_DS) . LC_DS;
+        if (!$check || (!empty($dir) && static::isDir($dir))) {
+            $dir = \Includes\Utils\Converter::trimTrailingChars($dir,  LC_DS) . LC_DS;
         }
 
-        return $path ?: null;
+        return $dir ?: null;
     }
 
     /**
diff --git a/src/Includes/Utils/Operator.php b/src/Includes/Utils/Operator.php
index 93c4a551a7..cf4c90f136 100644
--- a/src/Includes/Utils/Operator.php
+++ b/src/Includes/Utils/Operator.php
@@ -219,7 +219,7 @@ public static function checkIfClassExists($name)
 
         if (!$result) {
             $result = \Includes\Utils\FileManager::isFileReadable(
-                \Includes\Autoloader::getLCAutoloadDir() . \Includes\Utils\Converter::getClassFile($name)
+                LC_DIR_CACHE_CLASSES . \Includes\Utils\Converter::getClassFile($name)
             );
         }
 
diff --git a/src/classes/XLite/Core/Database.php b/src/classes/XLite/Core/Database.php
index 680ea23d9b..2b86cd1e9f 100644
--- a/src/classes/XLite/Core/Database.php
+++ b/src/classes/XLite/Core/Database.php
@@ -424,7 +424,7 @@ public function __construct()
      */
     public function connect()
     {
-        $this->configuration = new \Doctrine\ORM\Configuration;
+        $this->configuration = new \Doctrine\ORM\Configuration();
 
         // Setup cache
         $this->setDoctrineCache();
@@ -1506,23 +1506,22 @@ protected function getDisabledStructuresPath()
     /**
      * Detect custom repository class name by entity class name
      *
-     * @param string $entityClass Entity class name
+     * @param string $class Entity class name
      *
      * @return string
      * @see    ____func_see____
      * @since  1.0.0
      */
-    protected function detectCustomRepositoryClassName($entityClass)
+    protected function detectCustomRepositoryClassName($class)
     {
-        $class = str_replace('\Model\\', '\Model\Repo\\', $entityClass);
+        $class = \Includes\Utils\Converter::getPureClassName($class);
+        $class = \Includes\Utils\Converter::prepareClassName(str_replace('\Model\\', '\Model\Repo\\', $class), false);
 
         if (!\XLite\Core\Operator::isClassExists($class)) {
-            if (preg_match('/\wTranslation$/Ss', $entityClass)) {
-                $class = '\XLite\Model\Repo\Base\Translation';
+            $class = '\XLite\Model\Repo\Base\\' . (preg_match('/\wTranslation$/Ss', $class) ? 'Translation' : 'Common');
 
-            } else {
-                $class = '\XLite\Model\Repo\Base\Common';
-            }
+        } elseif (\Includes\Pattern\Factory::getClassHandler($class)->isAbstract()) {
+            $class = null;
         }
 
         return $class;
diff --git a/src/classes/XLite/Core/FileCache.php b/src/classes/XLite/Core/FileCache.php
index 7d20b76abe..2106dca30e 100644
--- a/src/classes/XLite/Core/FileCache.php
+++ b/src/classes/XLite/Core/FileCache.php
@@ -29,6 +29,7 @@
 
 /**
  * File system cache
+ * FIXME: must be completely refactored
  *
  * @see   ____class_see____
  * @since 1.0.0
@@ -128,6 +129,23 @@ public function getPath()
         return $this->path;
     }
 
+    /**
+     * getNamespacedId
+     *
+     * @param string $id ____param_comment____
+     *
+     * @return string
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function getNamespacedId($id)
+    {
+        $namespaceCacheKey = sprintf(static::DOCTRINE_NAMESPACE_CACHEKEY, $this->getNamespace());
+        $namespaceVersion  = ($this->doContains($namespaceCacheKey)) ? $this->doFetch($namespaceCacheKey) : 1;
+
+        return sprintf('%s[%s][%s]', $this->getNamespace(), $id, $namespaceVersion);
+    }
+
     /**
      * Delete by prefix 
      * 
@@ -141,7 +159,7 @@ public function deleteByPrefix($prefix)
     {
         $deleted = array();
 
-        $prefix = $this->_getNamespacedId($prefix);
+        $prefix = $this->getNamespacedId($prefix);
 
         $list = glob($this->path . LC_DS . $prefix . '*.php');
 
diff --git a/src/classes/XLite/Model/Repo/ARepo.php b/src/classes/XLite/Model/Repo/ARepo.php
index 69a616b8fd..b9e9d3e3cb 100644
--- a/src/classes/XLite/Model/Repo/ARepo.php
+++ b/src/classes/XLite/Model/Repo/ARepo.php
@@ -387,6 +387,20 @@ public function count()
         return intval($this->defineCountQuery()->getSingleScalarResult());
     }
 
+    /**
+     * Wrapper
+     *
+     * @param mixed $id Entity identifier
+     *
+     * @return \XLite\Model\AEntity
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    public function find($id)
+    {
+        return isset($id) ? parent::find($id) : null;
+    }
+
     /**
      * Find entities by id's list
      *
diff --git a/src/restoredb b/src/restoredb
index d81edcdba3..3a11e81ac3 100755
--- a/src/restoredb
+++ b/src/restoredb
@@ -105,9 +105,6 @@ require_once './top.inc.php';
 set_time_limit(0);
 error_reporting(E_ALL ^ E_NOTICE);
 
-// Load classes from "classes" (do not use cache)
-\Includes\Autoloader::switchLCAutoloadDir();
-
 $config = parse_ini_file('etc/config.default.php');
 
 if (file_exists('etc/config.php')) {

From d2b247911bf53c67d9e1dc66abfbe8b1cb4649b6 Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Sun, 22 Apr 2012 11:15:03 +0400
Subject: [PATCH 017/562] E:0040373 [*] The Doctrine library is updated up to
 latest version (2.2)

---
 src/Includes/DataStructure/Graph.php          |  12 +-
 .../Decorator/DataStructure/Graph/Classes.php |  17 +++
 .../Plugin/Doctrine/Plugin/Cache/Main.php     |  51 +++-----
 .../Plugin/DocBlockCorrector/Main.php         | 120 ++++++++++++++----
 .../Doctrine/Plugin/Multilangs/Main.php       |  34 ++---
 .../Plugin/Doctrine/Utils/ModelGenerator.php  |   5 -
 .../Plugin/ModuleControllers/Main.php         |  50 ++++----
 .../Plugin/PHPCache/Plugin/APC/Main.php       |  45 ++++---
 .../Decorator/Plugin/StaticRoutines/Main.php  |  31 +++--
 src/Includes/Decorator/Utils/CacheManager.php |  35 ++---
 src/Includes/Decorator/plugins.ini            |  17 +--
 11 files changed, 251 insertions(+), 166 deletions(-)

diff --git a/src/Includes/DataStructure/Graph.php b/src/Includes/DataStructure/Graph.php
index d57fef130e..d85237aa54 100644
--- a/src/Includes/DataStructure/Graph.php
+++ b/src/Includes/DataStructure/Graph.php
@@ -175,6 +175,7 @@ public function replant(self $oldParent, self $newParent)
      * Common method to iterate over the tree
      *
      * @param callback $callback  Callback to perform on each node
+     * @param boolean  $invert    Flag OPTIONAL
      * @param self     $parent    Parent node (this param is needed for recursion) OPTIONAL
      * @param boolean  $isStarted Flag OPTIONAL
      *
@@ -182,15 +183,20 @@ public function replant(self $oldParent, self $newParent)
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function walkThrough($callback, self $parent = null, $isStarted = false)
+    public function walkThrough($callback, $invert = false, self $parent = null, $isStarted = false)
     {
+        // Condition to avoid callback on the root node
+        if ($isStarted && $invert) {
+            call_user_func_array($callback, array($this, $parent));
+        }
+
         // Recursive call on all child nodes
         foreach ($this->getChildren() as $node) {
-            $node->{__FUNCTION__}($callback, $isStarted ? $this : null, true);
+            $node->{__FUNCTION__}($callback, $invert, $isStarted ? $this : null, true);
         }
 
         // Condition to avoid callback on the root node
-        if ($isStarted) {
+        if ($isStarted && !$invert) {
             call_user_func_array($callback, array($this, $parent));
         }
     }
diff --git a/src/Includes/Decorator/DataStructure/Graph/Classes.php b/src/Includes/Decorator/DataStructure/Graph/Classes.php
index 9df80fced2..e072b52a3a 100644
--- a/src/Includes/Decorator/DataStructure/Graph/Classes.php
+++ b/src/Includes/Decorator/DataStructure/Graph/Classes.php
@@ -466,6 +466,23 @@ public function getTag($name)
         return \Includes\Utils\ArrayManager::getIndex($this->getTags(), strtolower($name), true);
     }
 
+    /**
+     * Setter
+     *
+     * @param string $name  Tag name
+     * @param array  $value Value to set
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    public function setTag($name, array $value)
+    {
+        $this->getTags();
+
+        $this->tags[$name] = $value;
+    }
+
     /**
      * Parse and return all tags
      *
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php
index cdd122758c..0feaad4477 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,16 +13,16 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\Cache;
@@ -30,37 +30,28 @@
 /**
  * Routines for Doctrine library
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
+    // {{{ Hook handlers
+
     /**
      * Execute certain hook handler
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepFirst()
+    public function executeHookHandlerStepSecond()
     {
-        if ($driver = $this->getDoctrineCacheDriver()) {
+        $driver = \XLite\Core\Database::getCacheDriverByOptions(\Includes\Utils\ConfigParser::getOptions('cache'));
+
+        if (isset($driver)) {
             $driver->deleteAll();
         }
     }
 
-    /**
-     * Get cache driver
-     *
-     * @return \Doctrine\Common\Cache\AbstractCache
-     * @access protected
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    protected function getDoctrineCacheDriver()
-    {
-        return \XLite\Core\Database::getCacheDriverByOptions(\Includes\Utils\ConfigParser::getOptions('cache'));
-    }
+    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
index dca074ea82..821ab69e96 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,16 +13,16 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\DocBlockCorrector;
@@ -30,52 +30,118 @@
 /**
  * Doctrine tags support for Decorator
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
     /**
-     * Comment to set for decorated entities
+     * Comments to set for decorated entities
      */
-    const DOC_BLOCK = '/**
+    const DOC_BLOCK_FOR_PLUGINS = '/**
+ * @Entity
+ */';
+    const DOC_BLOCK_FINAL       = '/**
  * @MappedSuperClass
  */';
 
+    // {{{ Hook handlers
+
     /**
      * Execute certain hook handler
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
     public function executeHookHandlerStepFirst()
     {
-        static::getClassesTree()->walkThrough(array($this, 'setMappedSuperClassTag'));
+        static::getClassesTree()->walkThrough(array($this, 'setMappedSuperClassTagStepFirst'));
+    }
+
+    /**
+     * Execute certain hook handler
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public function executeHookHandlerStepSecond()
+    {
+        static::getClassesTree()->walkThrough(array($this, 'setMappedSuperClassTagStepSecond'));
     }
 
+    // }}}
+
+    // {{{ Methods to apply for class tree nodes
+
     /**
      * Check and correct (if needed) class doc block comment
      *
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function setMappedSuperClassTag(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    public function setMappedSuperClassTagStepFirst(\Includes\Decorator\DataStructure\Graph\Classes $node)
     {
         // Only perform the action if node has been decorated, and it's a Doctrine entity
-        if ($node->isLowLevelNode() && $node->getTag('Entity')) {
+        if ($node->isDecorator() && is_subclass_of($node->getClass(), '\XLite\Model\AEntity')) {
+            $this->writeCorrectedDockBlock($node, static::DOC_BLOCK_FOR_PLUGINS);
+        }
+    }
 
-            // Write changes to FS
-            \Includes\Utils\FileManager::write(
-                $path = LC_DIR_CACHE_CLASSES . $node->getPath(),
-                \Includes\Decorator\Utils\Tokenizer::getSourceCode($path, null, null, null, static::DOC_BLOCK)
-            );
+    /**
+     * Check and correct (if needed) class doc block comment
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public function setMappedSuperClassTagStepSecond(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        // Only perform the action if node has been decorated, and it's a Doctrine entity
+        if (
+            ($node->isLowLevelNode() || $node->isDecorator()) 
+            && is_subclass_of($node->getClass(), '\XLite\Model\AEntity')
+        ) {
+            $this->writeCorrectedDockBlock($node, static::DOC_BLOCK_FINAL);
         }
     }
+
+    // }}}
+
+    // {{{ Auxiliarry methods
+
+    /**
+     * Write corrected DockBlock
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node     Current node
+     * @param string                                          $docBlock DOC block to set
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function writeCorrectedDockBlock(\Includes\Decorator\DataStructure\Graph\Classes $node, $docBlock)
+    {
+        $path = LC_DIR_CACHE_CLASSES . $node->getPath();
+
+        \Includes\Utils\FileManager::write(
+            $path,
+            \Includes\Decorator\Utils\Tokenizer::getSourceCode(
+                $path,
+                null,
+                null,
+                null,
+                $docBlock,
+                $node->isDecorator() ? 'abstract' : null
+            )
+        );
+    }
+
+    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
index a8cc5ab6fe..4ecebc8819 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
@@ -156,27 +156,31 @@ public function executeHookHandlerBeforeDecorate()
                 $translation = $this->getTranslationClass($main);
 
                 // If the "translation" field is not added manually
-                if (!$translation) {
+                if (empty($translation)) {
                     $translation = $this->getTranslationClassDefault($main);
-                    $this->addReplacement($main, 'translation', $this->getTranslationSubstitutes($main, $translation));
                 }
 
-                // Iterate over all translatable fields
-                foreach ($this->getTranslationFields($translation) as $field) {
+                // It may be empty for the decorating classes
+                if (!empty($translation)) {
+                    $this->addReplacement($main, 'translation', $this->getTranslationSubstitutes($main, $translation));
 
-                    // Two iteartions: "getter" and "setter"
-                    foreach ($this->getAutogeneratedMethodsList() as $method => $entry) {
-                        $this->addReplacement(
-                            $main,
-                            $method,
-                            $this->getMethodSubstitutes($main, $entry, $method, $field)
-                        );
+                    // Iterate over all translatable fields
+                    foreach ($this->getTranslationFields($translation) as $field) {
+
+                        // Two iteartions: "getter" and "setter"
+                        foreach ($this->getAutogeneratedMethodsList() as $method => $entry) {
+                            $this->addReplacement(
+                                $main,
+                                $method,
+                                $this->getMethodSubstitutes($main, $entry, $method, $field)
+                            );
+                        }
                     }
-                }
 
-                // Add the "owner" field to the main class (if not defined manually)
-                if (!property_exists($translation, 'owner')) {
-                    $this->addReplacement($translation, 'owner', $this->getOwnerSubstitutes($main));
+                    // Add the "owner" field to the main class (if not defined manually)
+                    if (!property_exists($translation, 'owner')) {
+                        $this->addReplacement($translation, 'owner', $this->getOwnerSubstitutes($main));
+                    }
                 }
             }
         }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php b/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
index d79be9c160..2c31f38343 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
@@ -169,11 +169,6 @@ public function __construct()
     public function generate(array $metadatas, $outputDirectory)
     {
         foreach ($metadatas as $metadata) {
-            if ('XLite\Module\CDev\FeaturedProducts\Model\Category' === $metadata->name) {
-                var_dump($metadata);die;
-            }
-
-
             $this->writeEntityClass($metadata, $outputDirectory);
         }
     }
diff --git a/src/Includes/Decorator/Plugin/ModuleControllers/Main.php b/src/Includes/Decorator/Plugin/ModuleControllers/Main.php
index 12d967e9d9..7c18bdd35e 100644
--- a/src/Includes/Decorator/Plugin/ModuleControllers/Main.php
+++ b/src/Includes/Decorator/Plugin/ModuleControllers/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Decorator
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\ModuleControllers;
 
 /**
- * Main
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\APlugin
 {
@@ -41,23 +40,23 @@ class Main extends \Includes\Decorator\Plugin\APlugin
      */
     const PATTERN = '/^XLite\\\(Module\\\[\w]+\\\[\w]+\\\)Controller(\\\[\w\\\]*)$/Ss';
 
-
-    // ------------------------------ Hook handlers -
+    // {{{ Hook handlers
 
     /**
      * Execute certain hook handler
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerBeforeDecorate()
+    public function executeHookHandlerStepFirst()
     {
         static::getClassesTree()->walkThrough(array($this, 'changeControllerClass'));
     }
 
-    // ------------------------------ Auxiliary methods -
+    // }}}
+
+    // {{{ Auxiliary methods
 
     /**
      * Change class name for "module controllers"
@@ -66,7 +65,6 @@ public function executeHookHandlerBeforeDecorate()
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -83,13 +81,12 @@ public function changeControllerClass(\Includes\Decorator\DataStructure\Graph\Cl
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Node to check
      *
      * @return boolean
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function isModuleController(\Includes\Decorator\DataStructure\Graph\Classes $node)
     {
-        return !$node->isDecorator() && preg_match(self::PATTERN, $node->getClass());
+        return !$node->isDecorator() && preg_match(static::PATTERN, $node->getClass());
     }
 
     /**
@@ -98,12 +95,13 @@ protected function isModuleController(\Includes\Decorator\DataStructure\Graph\Cl
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Node to get and prepare class
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function prepareModuleControllerClass(\Includes\Decorator\DataStructure\Graph\Classes $node)
     {
-        return preg_replace(self::PATTERN, 'XLite\\\\Controller$2', $node->getClass());
+        return preg_replace(static::PATTERN, 'XLite\\\\Controller$2', $node->getClass());
     }
+
+    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php b/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php
index 90e23a8a17..8539cdbfa2 100644
--- a/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php
+++ b/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,41 +13,48 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\PHPCache\Plugin\APC;
 
 /**
- * Main
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\PHPCache\Plugin\APlugin
 {
+    /**
+     * Name of the function to clean cache
+     */
+    const CLEAR_FUNCTION = 'apc_clear_cache';
+
+    // {{{ Hook handlers
+
     /**
      * Execute certain hook handle
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
     public function executeHookHandlerStepSecond()
     {
-        if (function_exists('apc_clear_cache')) {
-            apc_clear_cache();
+        if (function_exists(static::CLEAR_FUNCTION)) {
+            call_user_func(static::CLEAR_FUNCTION);
         }
     }
+
+    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/StaticRoutines/Main.php b/src/Includes/Decorator/Plugin/StaticRoutines/Main.php
index 813b9d2c95..cda7ba3cea 100644
--- a/src/Includes/Decorator/Plugin/StaticRoutines/Main.php
+++ b/src/Includes/Decorator/Plugin/StaticRoutines/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Decorator
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\StaticRoutines;
 
 /**
- * Main
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\APlugin
 {
diff --git a/src/Includes/Decorator/Utils/CacheManager.php b/src/Includes/Decorator/Utils/CacheManager.php
index c3efc2af53..768c9c004a 100644
--- a/src/Includes/Decorator/Utils/CacheManager.php
+++ b/src/Includes/Decorator/Utils/CacheManager.php
@@ -516,26 +516,11 @@ public static function executeStepHandler1()
         // Copy classes from "classes"
         static::showStepMessage('Copy classes to cache...');
         \Includes\Utils\FileManager::copyRecursive(LC_DIR_CLASSES, LC_DIR_CACHE_CLASSES);
-
-        // Main procedure: build decorator chains
-        static::showStepMessage('Building classes tree...');
-        $tree = static::getClassesTree();
         static::showStepInfo();
 
-        // Invoke plugins
-        \Includes\Decorator\Utils\PluginManager::invokeHook(self::HOOK_BEFORE_DECORATE);
-
         // Main procedure: build decorator chains
-        static::showStepMessage('Decorate classes...');
-        $tree->walkThrough(array('\Includes\Decorator\Utils\Operator', 'decorateClass'));
-        static::showStepInfo();
-
-        // Invoke plugins
-        \Includes\Decorator\Utils\PluginManager::invokeHook(self::HOOK_BEFORE_WRITE);
-
-        // Write class files to FS
-        static::showStepMessage('Writing class files to the cache...');
-        $tree->walkThrough(array('\Includes\Decorator\Utils\Operator', 'writeClassFile'));
+        static::showStepMessage('Building classes tree...');
+        static::getClassesTree();
         static::showStepInfo();
 
         // Invoke plugins
@@ -554,6 +539,22 @@ public static function executeStepHandler1()
      */
     public static function executeStepHandler2()
     {
+        // Invoke plugins
+        \Includes\Decorator\Utils\PluginManager::invokeHook(self::HOOK_BEFORE_DECORATE);
+
+        // Main procedure: build decorator chains
+        static::showStepMessage('Decorate classes...');
+        static::getClassesTree()->walkThrough(array('\Includes\Decorator\Utils\Operator', 'decorateClass'));
+        static::showStepInfo();
+
+        // Invoke plugins
+        \Includes\Decorator\Utils\PluginManager::invokeHook(self::HOOK_BEFORE_WRITE);
+
+        // Write class files to FS
+        static::showStepMessage('Writing class files to the cache...');
+        static::getClassesTree()->walkThrough(array('\Includes\Decorator\Utils\Operator', 'writeClassFile'), true);
+        static::showStepInfo();
+
         // Invoke plugins
         \Includes\Decorator\Utils\PluginManager::invokeHook(self::HOOK_STEP_SECOND);
     }
diff --git a/src/Includes/Decorator/plugins.ini b/src/Includes/Decorator/plugins.ini
index 44a61906de..8cca7dc30b 100644
--- a/src/Includes/Decorator/plugins.ini
+++ b/src/Includes/Decorator/plugins.ini
@@ -5,21 +5,22 @@
 [before_cleanup]
 ; Empty now
 
-[before_decorate]
+[step_first]
 ModuleControllers                 = 10
-Doctrine_Plugin_Multilangs        = 20
-Doctrine_Plugin_ModelGenerator    = 30
+Doctrine_Plugin_DocBlockCorrector = 20
+
+[before_decorate]
+Doctrine_Plugin_Multilangs        = 10
+Doctrine_Plugin_ModelGenerator    = 20
 
 [before_write]
 ; Empty now
 
-[step_first]
+[step_second]
 Doctrine_Plugin_DocBlockCorrector = 10
 Doctrine_Plugin_Cache             = 20
-
-[step_second]
-PHPCache_Plugin_APC               = 10
-StaticRoutines                    = 20
+PHPCache_Plugin_APC               = 30
+StaticRoutines                    = 40
 
 [step_third]
 Doctrine_Plugin_ProxyGenerator    = 10

From e4ee8141bbb08c8d0662998d0cb7858f74a96cb8 Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Tue, 24 Apr 2012 18:43:56 +0400
Subject: [PATCH 018/562] E:166421 [!] Wrong location for autogenerated getters
 and setters of Doctrine models. Fixed

---
 .dev/code-sniffs/XLite/NameSniff.php          |   2 +-
 src/Includes/Autoloader.php                   |  38 ++++-
 src/Includes/DataStructure/Graph.php          |  16 +-
 src/Includes/Decorator/ADecorator.php         |   2 +-
 .../Decorator/DataStructure/Graph/Classes.php |  73 +++++----
 .../Plugin/Doctrine/Plugin/Cache/Main.php     |   2 +-
 .../Doctrine/Plugin/DocBlock/ADocBlock.php    | 102 ++++++++++++
 .../Plugin/DocBlock/FakeEntities/Main.php     |  65 ++++++++
 .../DocBlock/MappedSuperClasses/Main.php      |  65 ++++++++
 .../Plugin/DocBlockCorrector/Main.php         | 147 ------------------
 .../Doctrine/Plugin/LoadFixtures/Main.php     |  34 ++--
 .../Doctrine/Plugin/ModelGenerator/Main.php   |  34 ++--
 .../Doctrine/Plugin/Multilangs/Main.php       |  25 +--
 .../Doctrine/Plugin/ProxyGenerator/Main.php   |  37 ++---
 .../Doctrine/Plugin/UpdateModules/Main.php    |  34 ++--
 .../Doctrine/Plugin/UpdateSchema/Main.php     |  34 ++--
 .../Plugin/Doctrine/Utils/ModelGenerator.php  |   8 +
 .../Plugin/ModuleControllers/Main.php         |  12 +-
 .../Decorator/Plugin/ModuleHandlers/Main.php  |   3 +-
 .../Plugin/PHPCache/Plugin/APC/Main.php       |   6 +-
 .../Decorator/Plugin/StaticRoutines/Main.php  |  17 +-
 .../Plugin/Templates/Plugin/Compiler/Main.php |  57 +++----
 .../Plugin/Templates/Plugin/Patcher/Main.php  |  65 ++++----
 .../Templates/Plugin/ViewLists/Main.php       |  52 +++----
 src/Includes/Decorator/Utils/CacheManager.php |   6 +-
 src/Includes/Decorator/Utils/Operator.php     |  15 +-
 .../Decorator/Utils/PluginManager.php         |  54 +++----
 src/Includes/Decorator/Utils/Tokenizer.php    |  31 +++-
 src/Includes/Decorator/plugins.ini            |  33 ++--
 src/Includes/Utils/FileManager.php            |  37 ++++-
 src/Includes/Utils/Operator.php               |   2 +-
 31 files changed, 613 insertions(+), 495 deletions(-)
 create mode 100644 src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/ADocBlock.php
 create mode 100644 src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/FakeEntities/Main.php
 create mode 100644 src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/MappedSuperClasses/Main.php
 delete mode 100644 src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php

diff --git a/.dev/code-sniffs/XLite/NameSniff.php b/.dev/code-sniffs/XLite/NameSniff.php
index ae12281c85..80dd82675a 100644
--- a/.dev/code-sniffs/XLite/NameSniff.php
+++ b/.dev/code-sniffs/XLite/NameSniff.php
@@ -12,7 +12,7 @@ class XLite_NameSniff extends XLite_ReqCodesSniff
 		'NVP', 'PHP', 'CURL', 'VS', 'PC', 'UTF8', 'TTL', 'SMTP', 'IP4', 'CC', 'CVV2', 'UK', 'FMF', 'CSSURL',
 		'HMACMD5', 'HMAC', 'URI', 'ID', 'JS', 'SSL', 'AVS', 'CVV', 'DB', 'HSBC', 'SOAP', 'GMT', 'HTTPS', 'CLI',
 		'CMS', 'GC', 'AJAX', 'URLAJAX', 'USPS', 'GD', 'PM', 'XPC', 'DSN', 'EM', 'QB', 'SKU', 'REST', 'FS', 'IREST',
-        'YAML', 'GZ', 'HTTP', 'SPL', 'PHAR', 'JSON', 'LC',
+        'YAML', 'GZ', 'HTTP', 'SPL', 'PHAR', 'JSON', 'LC', 'APC',
 	);
 
 	protected $twoWordsAbbrs = array('ECard', 'ECards');
diff --git a/src/Includes/Autoloader.php b/src/Includes/Autoloader.php
index ab32abcb61..96df741215 100644
--- a/src/Includes/Autoloader.php
+++ b/src/Includes/Autoloader.php
@@ -47,6 +47,16 @@ abstract class Autoloader
         '__lc_autoload_includes',
     );
 
+    /**
+     * The directory where LC classes are located
+     *
+     * @var    string
+     * @access protected
+     * @see    ____var_see____
+     * @since  1.0.0
+     */
+    protected static $lcAutoloadDir = LC_DIR_CACHE_CLASSES;
+
     /**
      * Main LC autoloader
      *
@@ -76,7 +86,7 @@ public static function __lc_autoload($class)
 
         // Workaround for Doctrine 2 proxies
         if (0 === strpos($class, LC_NAMESPACE) && false === strpos($class, \Doctrine\Common\Persistence\Proxy::MARKER)) {
-            include_once (LC_DIR_CACHE_CLASSES . str_replace('\\', LC_DS, $class) . '.php');
+            include_once (static::$lcAutoloadDir . str_replace('\\', LC_DS, $class) . '.php');
         }
     }
 
@@ -193,4 +203,30 @@ protected static function registerModulesLibrariesAutoloader()
             }
         }
     }
+
+    /**
+     * Switch autoload directory from var/run/classes/ to classes/
+     *
+     * @param string $dir New autoload directory
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public static function switchLCAutoloadDir()
+    {
+        static::$lcAutoloadDir = LC_DIR_CLASSES;
+    }
+
+    /**
+     * Return path ot the autoloader current dir
+     *
+     * @return string
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public static function getLCAutoloadDir()
+    {
+        return static::$lcAutoloadDir;
+    }
 }
diff --git a/src/Includes/DataStructure/Graph.php b/src/Includes/DataStructure/Graph.php
index d85237aa54..b45b244e7f 100644
--- a/src/Includes/DataStructure/Graph.php
+++ b/src/Includes/DataStructure/Graph.php
@@ -71,7 +71,7 @@ class Graph
      */
     public function __construct($key = self::ROOT_NODE_KEY)
     {
-        $this->key = $key;
+        $this->setKey($key);
     }
 
     /**
@@ -98,6 +98,20 @@ public function getChildren()
         return $this->children;
     }
 
+    /**
+     * Check for root node
+     *
+     * @param string $key Key to check OPTIONAL
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    public function isRoot($key = null)
+    {
+        return static::ROOT_NODE_KEY === ($key ?: $this->getKey());
+    }
+
     // }}}
 
     // {{{ Methods to modify graph
diff --git a/src/Includes/Decorator/ADecorator.php b/src/Includes/Decorator/ADecorator.php
index 4cbc867b54..ebe77e65a9 100644
--- a/src/Includes/Decorator/ADecorator.php
+++ b/src/Includes/Decorator/ADecorator.php
@@ -122,7 +122,7 @@ public static function getModulesGraph()
      */
     public static function getClassesDir()
     {
-        return LC_DIR_CACHE_CLASSES;
+        return (self::STEP_FIRST == static::$step) ? LC_DIR_CLASSES : LC_DIR_CACHE_CLASSES;
     }
 
     /**
diff --git a/src/Includes/Decorator/DataStructure/Graph/Classes.php b/src/Includes/Decorator/DataStructure/Graph/Classes.php
index c45d781b24..63c5330a40 100644
--- a/src/Includes/Decorator/DataStructure/Graph/Classes.php
+++ b/src/Includes/Decorator/DataStructure/Graph/Classes.php
@@ -78,27 +78,10 @@ class Classes extends \Includes\DataStructure\Graph
      * @see   ____var_see____
      * @since 1.0.0
      */
-    protected $isChanged;
+    protected $isChanged = false;
 
     // {{{ Constructor and common getters
 
-    /**
-     * Constructor
-     *
-     * @param string $key  Node unique key OPTIONAL
-     * @param string $file File name OPTIONAL
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public function __construct($key = self::ROOT_NODE_KEY, $file = null)
-    {
-        parent::__construct($key);
-
-        $this->file = $file;
-    }
-
     /**
      * Add child node
      *
@@ -246,22 +229,26 @@ public function getTopLevelNode()
     /**
      * Set node key
      *
-     * @param string $key Key to set
+     * @param string  $key     Key to set
+     * @param boolean $setFlag Flag OPTIONAL
      *
      * @return void
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function setKey($key)
+    public function setKey($key, $setFlag = false)
     {
         foreach ($this->getChildren() as $node) {
             $node->setParentClass($key);
         }
 
+        $this->moveClassFile($key);
+
         parent::setKey($key);
 
-        // Set flag
-        $this->isChanged = true;
+        if ($setFlag) {
+            $this->isChanged = true;
+        }
     }
 
     /**
@@ -294,26 +281,31 @@ public function setTopLevelNodeFlag()
 
     /**
      * Name of the origin class file 
+     *
+     * @param string $class Class name OPTIONAL
+     * @param string $dir   Dir to file OPTIONAL
      * 
      * @return string
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function getFile()
+    public function getFile($class = null, $dir = LC_DIR_CACHE_CLASSES)
     {
-        return $this->file;
+        return $dir . $this->getPath($class);
     }
 
     /**
      * Transform class name into the relative path
      *
+     * @param string $class Class name OPTIONAL
+     *
      * @return string
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function getPath()
+    public function getPath($class = null)
     {
-        return \Includes\Utils\Converter::getClassFile($this->getClass());
+        return \Includes\Utils\Converter::getClassFile($class ?: $this->getClass());
     }
 
     /**
@@ -344,9 +336,6 @@ public function getSource(self $parent = null)
     protected function getActualSource(self $parent = null)
     {
         // Change DOCBlock and clear tags
-        $this->getReflection()->docComment = $this->isLowLevelNode() 
-            ? '/**' . PHP_EOL . ' * MOVED' . PHP_EOL . ' */' 
-            : null;
         $this->clearTags();
 
         $code = \Includes\Decorator\Utils\Tokenizer::getSourceCode(
@@ -354,7 +343,8 @@ protected function getActualSource(self $parent = null)
             $this->getActualNamespace(),
             $this->getClassBaseName(),
             $this->getActualParentClassName($parent),
-            $this->getReflection()->docComment
+            $this->getReflection()->docComment,
+            ($this->isLowLevelNode() || $this->isDecorator()) ? 'abstract' : null
         );
 
         return $code;
@@ -538,7 +528,7 @@ public function getReflection()
             $this->reflection = new \StdClass();
             $util = '\Includes\Decorator\Utils\Tokenizer';
 
-            if ($util::getDecoratorFlag() || !\Includes\Utils\Operator::checkIfClassExists($this->getClass())) {
+            if ($util::getDecoratorFlag()) {
                 $this->reflection->parentClass = $util::getParentClassName($this->getFile());
                 $this->reflection->interfaces  = $util::getInterfaces($this->getFile());
                 $this->reflection->docComment  = $util::getDockBlock($this->getFile());
@@ -604,5 +594,26 @@ protected function drawAdditional(self $node)
         return $result;
     }
 
+    /**
+     * Move/copy class file
+     *
+     * @param string $class New class name
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function moveClassFile($class)
+    {
+        if (!$this->isRoot() && !$this->isRoot($class)) {
+            if ($this->getClass()) {
+                \Includes\Utils\FileManager::move($this->getFile(), $this->getFile($class));
+
+            } else {
+                \Includes\Utils\FileManager::copy($this->getFile($class, LC_DIR_CLASSES), $this->getFile($class));
+            }
+        }
+    }
+
     // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php
index 0feaad4477..7a99e63339 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Cache/Main.php
@@ -44,7 +44,7 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepSecond()
+    public function executeHookHandler()
     {
         $driver = \XLite\Core\Database::getCacheDriverByOptions(\Includes\Utils\ConfigParser::getOptions('cache'));
 
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/ADocBlock.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/ADocBlock.php
new file mode 100644
index 0000000000..7c6629a88d
--- /dev/null
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/ADocBlock.php
@@ -0,0 +1,102 @@
+ 
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
+ */
+
+namespace Includes\Decorator\Plugin\Doctrine\Plugin\DocBlock;
+
+/**
+ * ADocBlock 
+ *
+ * @see   ____class_see____
+ * @since 1.0.22
+ */
+abstract class ADocBlock extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
+{
+    /**
+     * Return DocBlock string
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return string
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    abstract protected function getDocBlockToRewrite(\Includes\Decorator\DataStructure\Graph\Classes $node);
+
+    /**
+     * Execute certain hook handler
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public function executeHookHandler()
+    {
+        static::getClassesTree()->walkThrough(array($this, 'correctTags'));
+    }
+
+    /**
+     * Check and correct (if needed) class doc block comment
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public function correctTags(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        if ($this->checkRewriteCondition($node)) {
+            $path = LC_DIR_CACHE_CLASSES . $node->getPath();
+        
+            \Includes\Utils\FileManager::write(
+                $path,
+                \Includes\Decorator\Utils\Tokenizer::getSourceCode(
+                    $path,
+                    null,
+                    null,
+                    null,
+                    $this->getDocBlockToRewrite($node),
+                    $node->isDecorator() ? 'abstract' : null
+                )   
+            );
+        }
+    }
+
+    /**
+     * Condition to check for rewrite
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return boolean
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function checkRewriteCondition(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        return is_subclass_of($node->getClass(), '\XLite\Model\AEntity');
+    }
+}
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/FakeEntities/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/FakeEntities/Main.php
new file mode 100644
index 0000000000..57ab7635aa
--- /dev/null
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/FakeEntities/Main.php
@@ -0,0 +1,65 @@
+ 
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
+ */
+
+namespace Includes\Decorator\Plugin\Doctrine\Plugin\DocBlock\FakeEntities;
+
+/**
+ * Main 
+ *
+ * @see   ____class_see____
+ * @since 1.0.0
+ */
+class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\DocBlock\ADocBlock
+{
+    /**
+     * Condition to check for rewrite
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return boolean
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function checkRewriteCondition(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        return parent::checkRewriteCondition($node) && $node->isDecorator();
+    }
+
+    /**
+     * Return DocBlock string
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return string
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function getDocBlockToRewrite(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        return '/**' . PHP_EOL . ' * @Entity' . PHP_EOL . ' */';
+    }
+}
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/MappedSuperClasses/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/MappedSuperClasses/Main.php
new file mode 100644
index 0000000000..e53453b983
--- /dev/null
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlock/MappedSuperClasses/Main.php
@@ -0,0 +1,65 @@
+ 
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
+ */
+
+namespace Includes\Decorator\Plugin\Doctrine\Plugin\DocBlock\MappedSuperClasses;
+
+/**
+ * Main 
+ *
+ * @see   ____class_see____
+ * @since 1.0.0
+ */
+class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\DocBlock\ADocBlock
+{
+    /**
+     * Condition to check for rewrite
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return boolean
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function checkRewriteCondition(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        return parent::checkRewriteCondition($node) && $node->isLowLevelNode();
+    }
+
+    /**
+     * Return DocBlock string
+     *
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
+     *
+     * @return string
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function getDocBlockToRewrite(\Includes\Decorator\DataStructure\Graph\Classes $node)
+    {
+        return '/**' . PHP_EOL . ' * @MappedSuperClass' . PHP_EOL . ' */';
+    }
+}
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
deleted file mode 100644
index 821ab69e96..0000000000
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php
+++ /dev/null
@@ -1,147 +0,0 @@
- 
- * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link      http://www.litecommerce.com/
- * @see       ____file_see____
- * @since     1.0.0
- */
-
-namespace Includes\Decorator\Plugin\Doctrine\Plugin\DocBlockCorrector;
-
-/**
- * Doctrine tags support for Decorator
- *
- * @see   ____class_see____
- * @since 1.0.0
- */
-class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
-{
-    /**
-     * Comments to set for decorated entities
-     */
-    const DOC_BLOCK_FOR_PLUGINS = '/**
- * @Entity
- */';
-    const DOC_BLOCK_FINAL       = '/**
- * @MappedSuperClass
- */';
-
-    // {{{ Hook handlers
-
-    /**
-     * Execute certain hook handler
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public function executeHookHandlerStepFirst()
-    {
-        static::getClassesTree()->walkThrough(array($this, 'setMappedSuperClassTagStepFirst'));
-    }
-
-    /**
-     * Execute certain hook handler
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public function executeHookHandlerStepSecond()
-    {
-        static::getClassesTree()->walkThrough(array($this, 'setMappedSuperClassTagStepSecond'));
-    }
-
-    // }}}
-
-    // {{{ Methods to apply for class tree nodes
-
-    /**
-     * Check and correct (if needed) class doc block comment
-     *
-     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public function setMappedSuperClassTagStepFirst(\Includes\Decorator\DataStructure\Graph\Classes $node)
-    {
-        // Only perform the action if node has been decorated, and it's a Doctrine entity
-        if ($node->isDecorator() && is_subclass_of($node->getClass(), '\XLite\Model\AEntity')) {
-            $this->writeCorrectedDockBlock($node, static::DOC_BLOCK_FOR_PLUGINS);
-        }
-    }
-
-    /**
-     * Check and correct (if needed) class doc block comment
-     *
-     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public function setMappedSuperClassTagStepSecond(\Includes\Decorator\DataStructure\Graph\Classes $node)
-    {
-        // Only perform the action if node has been decorated, and it's a Doctrine entity
-        if (
-            ($node->isLowLevelNode() || $node->isDecorator()) 
-            && is_subclass_of($node->getClass(), '\XLite\Model\AEntity')
-        ) {
-            $this->writeCorrectedDockBlock($node, static::DOC_BLOCK_FINAL);
-        }
-    }
-
-    // }}}
-
-    // {{{ Auxiliarry methods
-
-    /**
-     * Write corrected DockBlock
-     *
-     * @param \Includes\Decorator\DataStructure\Graph\Classes $node     Current node
-     * @param string                                          $docBlock DOC block to set
-     *
-     * @return void
-     * @see    ____func_see____
-     * @since  1.0.22
-     */
-    protected function writeCorrectedDockBlock(\Includes\Decorator\DataStructure\Graph\Classes $node, $docBlock)
-    {
-        $path = LC_DIR_CACHE_CLASSES . $node->getPath();
-
-        \Includes\Utils\FileManager::write(
-            $path,
-            \Includes\Decorator\Utils\Tokenizer::getSourceCode(
-                $path,
-                null,
-                null,
-                null,
-                $docBlock,
-                $node->isDecorator() ? 'abstract' : null
-            )
-        );
-    }
-
-    // }}}
-}
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/LoadFixtures/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/LoadFixtures/Main.php
index 90b86bed79..5ccb3db6e2 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/LoadFixtures/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/LoadFixtures/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\LoadFixtures;
 
 /**
- * Routines for Doctrine library
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
@@ -40,11 +39,10 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * Execute certain hook handle
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepFourth()
+    public function executeHookHandler()
     {
         foreach (\Includes\Decorator\Plugin\Doctrine\Utils\FixturesManager::getFixtures() as $fixture) {
             \XLite\Core\Database::getInstance()->loadFixturesFromYaml($fixture);
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php
index 72f9a2cb62..9f8702e576 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/ModelGenerator/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\ModelGenerator;
 
 /**
- * Routines for Doctrine library
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
@@ -40,11 +39,10 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * Execute certain hook handle
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerBeforeDecorate()
+    public function executeHookHandler()
     {
         // Create model proxy classes (first step of cache generation)
         \Includes\Decorator\Plugin\Doctrine\Utils\EntityManager::generateModels();
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
index 4ecebc8819..b4722669b1 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php
@@ -146,21 +146,20 @@ public function ____SETTER____(\$value)
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerBeforeDecorate()
+    public function executeHookHandler()
     {
         // It's the metadata collected by Doctrine
         foreach ($this->getMetadata() as $main) {
+            $node = static::getClassesTree()->find($main->name);
 
             // Process only certain classes
-            if (is_subclass_of($main->name, '\XLite\Model\Base\I18n') && !$main->isMappedSuperclass) {
-                $translation = $this->getTranslationClass($main);
+            if (
+                is_subclass_of($node->getClass(), '\XLite\Model\Base\I18n') 
+                && !$node->isTopLevelNode() 
+                && !$node->isDecorator()
+            ) {
+                $translation = $this->getTranslationClass($main) ?: $this->getTranslationClassDefault($main);
 
-                // If the "translation" field is not added manually
-                if (empty($translation)) {
-                    $translation = $this->getTranslationClassDefault($main);
-                }
-
-                // It may be empty for the decorating classes
                 if (!empty($translation)) {
                     $this->addReplacement($main, 'translation', $this->getTranslationSubstitutes($main, $translation));
 
@@ -236,7 +235,9 @@ protected function getTranslationClass(\Doctrine\ORM\Mapping\ClassMetadata $main
         $class = null;
 
         if (property_exists($main, 'associationMappings') && isset($main->associationMappings['translations'])) {
-            $class = $this->getMetadata($main->associationMappings['translations']['targetEntity']);
+            $class = $this->getMetadata(
+                \Includes\Utils\Converter::getPureClassName($main->associationMappings['translations']['targetEntity'])
+            );
         }
 
         return $class;
@@ -351,8 +352,8 @@ protected function getMethodSubstitutes(\Doctrine\ORM\Mapping\ClassMetadata $mai
     protected function getOwnerSubstitutes(\Doctrine\ORM\Mapping\ClassMetadata $main)
     {
         return array(
-            '____OWNER_CLASS____'   => $main->name,
-            '____MAIN_CLASS____'    => $main->name,
+            '____OWNER_CLASS____'   => \Includes\Utils\Converter::getPureClassName($main->name),
+            '____MAIN_CLASS____'    => \Includes\Utils\Converter::getPureClassName($main->name),
             '____MAIN_CLASS_ID____' => array_shift($main->identifier),
         );
     }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/ProxyGenerator/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/ProxyGenerator/Main.php
index d1847b1d00..2a5b533095 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/ProxyGenerator/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/ProxyGenerator/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\ProxyGenerator;
 
 /**
- * Routines for Doctrine library
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
@@ -40,11 +39,10 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * Execute certain hook handle
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepThird()
+    public function executeHookHandler()
     {
         if (!$this->areProxiesExist()) {
 
@@ -59,8 +57,7 @@ public function executeHookHandlerStepThird()
     /**
      * Check if proxy classes are already generated
      *
-     * @return bool
-     * @access protected
+     * @return boolean
      * @see    ____func_see____
      * @since  1.0.0
      */
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateModules/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateModules/Main.php
index c86f48929c..2da071f2fb 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateModules/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateModules/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\UpdateModules;
 
 /**
- * Routines for Doctrine library
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
@@ -43,14 +42,13 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepThird()
+    public function executeHookHandler()
     {
         // To cache data
         \Includes\Utils\ModulesManager::getActiveModules();
 
         // Walk through the "XLite/Module" directory
         foreach ($this->getModuleMainFileIterator()->getIterator() as $path => $data) {
-
             $dir    = $path;
             $name   = basename($dir = dirname($dir));
             $author = basename($dir = dirname($dir));
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php
index 7b4921ec75..6b1a702b57 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Doctrine\Plugin\UpdateSchema;
 
 /**
- * Routines for Doctrine library
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
 {
@@ -40,11 +39,10 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin
      * Execute certain hook handle
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepThird()
+    public function executeHookHandler()
     {
         \XLite\Core\Database::getInstance()->updateDBSchema();
     }
diff --git a/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php b/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
index 2c31f38343..ed6e3ca073 100644
--- a/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
+++ b/src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php
@@ -653,6 +653,10 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
         $methods = array();
 
         foreach ($metadata->fieldMappings as $fieldMapping) {
+            if (isset($fieldMapping['inherited'])) {
+                continue;
+            }
+
             if ( ! isset($fieldMapping['id']) || ! $fieldMapping['id'] || $metadata->generatorType == ClassMetadataInfo::GENERATOR_TYPE_NONE) {
                 if ($code = $this->_generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'])) {
                     $methods[] = $code;
@@ -665,6 +669,10 @@ private function _generateEntityStubMethods(ClassMetadataInfo $metadata)
         }
 
         foreach ($metadata->associationMappings as $associationMapping) {
+            if (isset($associationMapping['inherited'])) {
+                continue;
+            }
+
             if ($associationMapping['type'] & ClassMetadataInfo::TO_ONE) {
                 $nullable = $this->_isAssociationIsNullable($associationMapping) ? 'null' : null;
                 if ($code = $this->_generateEntityStubMethod($metadata, 'set', $associationMapping['fieldName'], $associationMapping['targetEntity'], $nullable)) {
diff --git a/src/Includes/Decorator/Plugin/ModuleControllers/Main.php b/src/Includes/Decorator/Plugin/ModuleControllers/Main.php
index 7c18bdd35e..b37280b084 100644
--- a/src/Includes/Decorator/Plugin/ModuleControllers/Main.php
+++ b/src/Includes/Decorator/Plugin/ModuleControllers/Main.php
@@ -40,8 +40,6 @@ class Main extends \Includes\Decorator\Plugin\APlugin
      */
     const PATTERN = '/^XLite\\\(Module\\\[\w]+\\\[\w]+\\\)Controller(\\\[\w\\\]*)$/Ss';
 
-    // {{{ Hook handlers
-
     /**
      * Execute certain hook handler
      *
@@ -49,15 +47,11 @@ class Main extends \Includes\Decorator\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepFirst()
+    public function executeHookHandler()
     {
         static::getClassesTree()->walkThrough(array($this, 'changeControllerClass'));
     }
 
-    // }}}
-
-    // {{{ Auxiliary methods
-
     /**
      * Change class name for "module controllers"
      * NOTE: method is public since it's used as a callback in external class
@@ -71,7 +65,7 @@ public function executeHookHandlerStepFirst()
     public function changeControllerClass(\Includes\Decorator\DataStructure\Graph\Classes $node)
     {
         if ($this->isModuleController($node)) {
-            $node->setKey($this->prepareModuleControllerClass($node));
+            $node->setKey($this->prepareModuleControllerClass($node), true);
         }
     }
 
@@ -102,6 +96,4 @@ protected function prepareModuleControllerClass(\Includes\Decorator\DataStructur
     {
         return preg_replace(static::PATTERN, 'XLite\\\\Controller$2', $node->getClass());
     }
-
-    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/ModuleHandlers/Main.php b/src/Includes/Decorator/Plugin/ModuleHandlers/Main.php
index 0b3d0ef61d..a1afe35421 100644
--- a/src/Includes/Decorator/Plugin/ModuleHandlers/Main.php
+++ b/src/Includes/Decorator/Plugin/ModuleHandlers/Main.php
@@ -42,10 +42,11 @@ class Main extends \Includes\Decorator\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.17
      */
-    public function executeHookHandlerStepFifth()
+    public function executeHookHandler()
     {
         foreach (\Includes\Utils\ModulesManager::getActiveModules() as $name => $data) {
             $class = \Includes\Utils\ModulesManager::getClassNameByModuleName($name);
+
             $class::runBuildCacheHandler();
         }
     }
diff --git a/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php b/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php
index 8539cdbfa2..e6435a5c02 100644
--- a/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php
+++ b/src/Includes/Decorator/Plugin/PHPCache/Plugin/APC/Main.php
@@ -40,8 +40,6 @@ class Main extends \Includes\Decorator\Plugin\PHPCache\Plugin\APlugin
      */
     const CLEAR_FUNCTION = 'apc_clear_cache';
 
-    // {{{ Hook handlers
-
     /**
      * Execute certain hook handle
      *
@@ -49,12 +47,10 @@ class Main extends \Includes\Decorator\Plugin\PHPCache\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepSecond()
+    public function executeHookHandler()
     {
         if (function_exists(static::CLEAR_FUNCTION)) {
             call_user_func(static::CLEAR_FUNCTION);
         }
     }
-
-    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/StaticRoutines/Main.php b/src/Includes/Decorator/Plugin/StaticRoutines/Main.php
index cda7ba3cea..821b86fe12 100644
--- a/src/Includes/Decorator/Plugin/StaticRoutines/Main.php
+++ b/src/Includes/Decorator/Plugin/StaticRoutines/Main.php
@@ -40,8 +40,6 @@ class Main extends \Includes\Decorator\Plugin\APlugin
      */
     const STATIC_CONSTRUCTOR_METHOD = '__constructStatic';
 
-    // {{{ Hook handlers
-
     /**
      * Execute certain hook handler
      *
@@ -49,21 +47,16 @@ class Main extends \Includes\Decorator\Plugin\APlugin
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepSecond()
+    public function executeHookHandler()
     {
         static::getClassesTree()->walkThrough(array($this, 'addStaticConstructorCall'));
     }
 
-    // }}}
-
-    // {{{ Auxiliary methods
-
     /**
      * Add static constructor calls
      * NOTE: method is public since it's used as a callback in external class
      *
-     * @param \Includes\Decorator\DataStructure\Graph\Classes $node   Current node
-     * @param \Includes\Decorator\DataStructure\Graph\Classes $parent Current node parent
+     * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
      *
      * @return void
      * @see    ____func_see____
@@ -96,19 +89,17 @@ protected function checkForStaticConstructor(\Includes\Decorator\DataStructure\G
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function writeCallToSourceFile(\Includes\Decorator\DataStructure\Graph\Classes $node)
     {
-        $content = \Includes\Utils\FileManager::read($path = LC_DIR_CACHE_CLASSES . $node->getPath());
+        $path = LC_DIR_CACHE_CLASSES . $node->getPath();
 
+        $content  = \Includes\Utils\FileManager::read($path);
         $content .= PHP_EOL . '// Call static constructor' . PHP_EOL;
         $content .= '\\' . $node->getClass() . '::' . static::STATIC_CONSTRUCTOR_METHOD . '();';
 
         \Includes\Utils\FileManager::write($path, $content);
     }
-
-    // }}}
 }
diff --git a/src/Includes/Decorator/Plugin/Templates/Plugin/Compiler/Main.php b/src/Includes/Decorator/Plugin/Templates/Plugin/Compiler/Main.php
index ba7c2c9416..3d24d3109c 100644
--- a/src/Includes/Decorator/Plugin/Templates/Plugin/Compiler/Main.php
+++ b/src/Includes/Decorator/Plugin/Templates/Plugin/Compiler/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,36 +13,34 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Templates\Plugin\Compiler;
 
 /**
- * Decorator plugin to compile templates
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
 {
     /**
      * Instance of the Flexy compiler
      *
-     * @var    \Xlite\Core\FlexyCompiler
-     * @access protected
-     * @see    ____var_see____
-     * @since  1.0.0
+     * @var   \Xlite\Core\FlexyCompiler
+     * @see   ____var_see____
+     * @since 1.0.0
      */
     protected $flexy;
 
@@ -50,42 +48,27 @@ class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
      * Execute "postprocess" hook handler
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepFifth()
+    public function executeHookHandler()
     {
         if (!LC_DEVELOPER_MODE) {
             $this->createTemplatesCache();
         }
     }
 
-    /**
-     * Constructor
-     *
-     * @return void
-     * @access public
-     * @see    ____func_see____
-     * @since  1.0.0
-     */
-    public function __construct()
-    {
-        $this->flexy = \XLite\Core\FlexyCompiler::getInstance();
-    }
-
     /**
      * Static templates compilation
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function createTemplatesCache()
     {
         foreach ($this->getAnnotatedTemplates() as $data) {
-            $this->flexy->prepare($data['path'], true);
+            \XLite\Singletons::$handler->flexy->prepare($data['path'], true);
         }
     }
 }
diff --git a/src/Includes/Decorator/Plugin/Templates/Plugin/Patcher/Main.php b/src/Includes/Decorator/Plugin/Templates/Plugin/Patcher/Main.php
index 2c9654c03e..dd6378eb40 100644
--- a/src/Includes/Decorator/Plugin/Templates/Plugin/Patcher/Main.php
+++ b/src/Includes/Decorator/Plugin/Templates/Plugin/Patcher/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Templates\Plugin\Patcher;
 
 /**
- * Decorator plugin to patch templates
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
 {
@@ -41,27 +40,23 @@ class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
      */
     const INTERFACE_PATCHER = '\XLite\Base\IPatcher';
 
-
     /**
      * List of pather classes
      *
-     * @var    array
-     * @access protected
-     * @see    ____var_see____
-     * @since  1.0.0
+     * @var   array
+     * @see   ____var_see____
+     * @since 1.0.0
      */
-    protected $pathers;
-
+    protected $patchers;
 
     /**
      * Execute certain hook handler
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepFifth()
+    public function executeHookHandler()
     {
         // Truncate old
         $this->clearAll();
@@ -76,13 +71,12 @@ public function executeHookHandlerStepFifth()
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
     public function checkClassForPatcherInterface(\Includes\Decorator\DataStructure\Graph\Classes $node)
     {
-        if ($node->isImplements(self::INTERFACE_PATCHER)) {
+        if ($node->isImplements(static::INTERFACE_PATCHER)) {
             $this->patchers[] = $node;
         }
     }
@@ -91,7 +85,6 @@ public function checkClassForPatcherInterface(\Includes\Decorator\DataStructure\
      * Remove existing lists from database
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -104,7 +97,6 @@ protected function clearAll()
      * Save pathes info in DB
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -114,9 +106,10 @@ protected function collectPatches()
 
         // List of all "patcher" classes
         foreach ($this->getPatchers() as $node) {
+            $class = $node->getClass();
 
             // List of patches defined in class
-            foreach (call_user_func(array($class = $node->getClass(), 'getPatches')) as $patch) {
+            foreach (call_user_func(array($class, 'getPatches')) as $patch) {
 
                 // Prepare model class properties
                 $data[] = new \XLite\Model\TemplatePatch(
@@ -133,18 +126,18 @@ protected function collectPatches()
      * Return list of the "patcher" classes
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected function getPatchers()
     {
-        if (!isset($this->pathers)) {
-            $this->pathers = array();
+        if (!isset($this->patchers)) {
+            $this->patchers = array();
+
             static::getClassesTree()->walkThrough(array($this, 'checkClassForPatcherInterface'));
         }
 
-        return $this->pathers;
+        return $this->patchers;
     }
 
     /**
@@ -154,7 +147,6 @@ protected function getPatchers()
      * @param string $class Patcher class
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -171,7 +163,6 @@ protected function getCommonData(array $data, $class)
      * @param string $class Patcher class
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -191,7 +182,6 @@ protected function getXpathData(array $data, $class)
      * @param string $class Patcher class
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -209,7 +199,6 @@ protected function getRegexpData(array $data, $class)
      * @param array $data Data describe the patch
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
diff --git a/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php b/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php
index a412dbb514..9b09240454 100644
--- a/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php
+++ b/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,26 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Plugin\Templates\Plugin\ViewLists;
 
 /**
- * Decorator plugin to generate widget lists
+ * Main 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.0
  */
 class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
 {
@@ -50,10 +49,9 @@ class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
     /**
      * List of PHP classes with the "ListChild" tags
      *
-     * @var    array
-     * @access protected
-     * @see    ____var_see____
-     * @since  1.0.0
+     * @var   array
+     * @see   ____var_see____
+     * @since 1.0.0
      */
     protected $annotatedPHPCLasses;
 
@@ -61,11 +59,10 @@ class Main extends \Includes\Decorator\Plugin\Templates\Plugin\APlugin
      * Execute certain hook handler
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
-    public function executeHookHandlerStepFifth()
+    public function executeHookHandler()
     {
         // Truncate old
         $this->clearAll();
@@ -80,7 +77,6 @@ public function executeHookHandlerStepFifth()
      * @param \Includes\Decorator\DataStructure\Graph\Classes $node Current node
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -99,7 +95,6 @@ public function checkClassForListChildTag(\Includes\Decorator\DataStructure\Grap
      * Remove existing lists from database
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -113,7 +108,6 @@ protected function clearAll()
      * Create lists
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -126,7 +120,6 @@ protected function createLists()
      * Return all defined "ListChild" tags
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -139,7 +132,6 @@ protected function getAllListChildTags()
      * Return list of PHP classes with the "ListChild" tag
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -158,7 +150,6 @@ protected function getAnnotatedPHPCLasses()
      * Return all "ListChild" tags defined in PHP classes
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -171,7 +162,6 @@ protected function getListChildTagsFromPHP()
      * Return all "ListChild" tags defined in templates
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -272,7 +262,6 @@ protected function prepareListChildTemplates(array $list)
      * @param array $nodes List of nodes
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -307,7 +296,6 @@ protected function prepareListChildTagData(array $data)
      * @param array &$data Data to prepare
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -340,7 +328,6 @@ protected function prepareWeightAttrs(array &$data)
      * @param array &$data Data to use
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -355,7 +342,6 @@ protected function preparePreprocessors(array &$data)
      * There are some reserved words for the "weight" param of the "ListChild" tag
      *
      * @return void
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
diff --git a/src/Includes/Decorator/Utils/CacheManager.php b/src/Includes/Decorator/Utils/CacheManager.php
index 768c9c004a..91e11e3194 100644
--- a/src/Includes/Decorator/Utils/CacheManager.php
+++ b/src/Includes/Decorator/Utils/CacheManager.php
@@ -513,10 +513,8 @@ public static function executeStepHandler1()
         static::cleanupCache();
         static::showStepInfo();
 
-        // Copy classes from "classes"
-        static::showStepMessage('Copy classes to cache...');
-        \Includes\Utils\FileManager::copyRecursive(LC_DIR_CLASSES, LC_DIR_CACHE_CLASSES);
-        static::showStepInfo();
+        // Load classes from "classes" (do not use cache)
+        \Includes\Autoloader::switchLcAutoloadDir();
 
         // Main procedure: build decorator chains
         static::showStepMessage('Building classes tree...');
diff --git a/src/Includes/Decorator/Utils/Operator.php b/src/Includes/Decorator/Utils/Operator.php
index d54812043b..fc35d6b204 100644
--- a/src/Includes/Decorator/Utils/Operator.php
+++ b/src/Includes/Decorator/Utils/Operator.php
@@ -106,7 +106,7 @@ protected static function getClassesTreeIndex()
             if ($class = \Includes\Decorator\Utils\Tokenizer::getFullClassName($path)) {
 
                 // File contains a class declaration: create node (descriptor)
-                $node = new \Includes\Decorator\DataStructure\Graph\Classes($class, $path);
+                $node = new \Includes\Decorator\DataStructure\Graph\Classes($class);
 
                 // Check parent class (so called optional dependencies for modules)
                 $dependencies = $node->getTag('lc_dependencies');
@@ -239,8 +239,15 @@ public static function decorateClass(\Includes\Decorator\DataStructure\Graph\Cla
                 $parent = $child;
             }
 
+            // Save value
+            $baseClass = $node->getClass();
+
+            // Rename base class to avoid coflicts with the top-level node
+            $node->setKey($node->getClass() . static::BASE_CLASS_SUFFIX, true);
+            $node->setLowLevelNodeFlag();
+
             // Special top-level node: stub class with empty body
-            $topNode = new \Includes\Decorator\DataStructure\Graph\Classes($node->getClass(), $node->getFile());
+            $topNode = new \Includes\Decorator\DataStructure\Graph\Classes($baseClass);
             $topNode->setTopLevelNodeFlag();
 
             // Add this stub node as a child to the last decorator in the chain
@@ -250,10 +257,6 @@ public static function decorateClass(\Includes\Decorator\DataStructure\Graph\Cla
             foreach ($regular as $child) {
                 $child->replant($node, $topNode);
             }
-
-            // Rename base class to avoid coflicts with the top-level node
-            $node->setKey($node->getClass() . static::BASE_CLASS_SUFFIX);
-            $node->setLowLevelNodeFlag();
         }
     }
 
diff --git a/src/Includes/Decorator/Utils/PluginManager.php b/src/Includes/Decorator/Utils/PluginManager.php
index db24e20eaf..78b9dedd0a 100644
--- a/src/Includes/Decorator/Utils/PluginManager.php
+++ b/src/Includes/Decorator/Utils/PluginManager.php
@@ -3,9 +3,9 @@
 
 /**
  * LiteCommerce
- *
+ * 
  * NOTICE OF LICENSE
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0)
  * that is bundled with this package in the file LICENSE.txt.
  * It is also available through the world-wide-web at this URL:
@@ -13,29 +13,25 @@
  * If you did not receive a copy of the license and are unable to
  * obtain it through the world-wide-web, please send an email
  * to licensing@litecommerce.com so we can send you a copy immediately.
- *
- * @category   LiteCommerce
- * @package    XLite
- * @subpackage Includes
- * @author     Creative Development LLC 
- * @copyright  Copyright (c) 2011 Creative Development LLC . All rights reserved
- * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- * @link       http://www.litecommerce.com/
- * @see        ____file_see____
- * @since      1.0.0
+ * 
+ * PHP version 5.3.0
+ * 
+ * @category  LiteCommerce
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @see       ____file_see____
+ * @since     1.0.0
  */
 
 namespace Includes\Decorator\Utils;
 
 /**
- * Plugins manager
- *
- * Available hooks:
- * - run()
+ * PluginManager 
  *
- * @package XLite
- * @see     ____class_see____
- * @since   1.0.0
+ * @see   ____class_see____
+ * @since 1.0.22
  */
 abstract class PluginManager extends \Includes\Decorator\Utils\AUtils
 {
@@ -44,25 +40,21 @@ abstract class PluginManager extends \Includes\Decorator\Utils\AUtils
      */
     const FILE_INI = 'plugins.ini';
 
-
     /**
      * List of registered plugins
      *
-     * @var    array
-     * @access protected
-     * @see    ____var_see____
-     * @since  1.0.0
+     * @var   array
+     * @see   ____var_see____
+     * @since 1.0.0
      */
     protected static $plugins;
 
-
     /**
      * Check and execute hook handlers
      *
      * @param string $hook Hook name
      *
      * @return void
-     * @access public
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -80,7 +72,7 @@ public static function invokeHook($hook)
             \Includes\Decorator\Utils\CacheManager::showStepMessage('Run the "' . $plugin . '" plugin...');
 
             // Execute plugin main method
-            $instance->{'executeHookHandler' . ucfirst(\Includes\Utils\Converter::convertToCamelCase($hook))}();
+            $instance->executeHookHandler();
 
             // Show memory usage
             \Includes\Decorator\Utils\CacheManager::showStepInfo();
@@ -90,10 +82,9 @@ public static function invokeHook($hook)
     /**
      * Return list of registered plugins
      *
-     * @param string $hook hook name (optional)
+     * @param string $hook Hook name OPTIONAL
      *
      * @return array
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
@@ -108,7 +99,6 @@ protected static function getPlugins($hook = null)
                 foreach (parse_ini_file(static::getConfigFile(), true) as $section => $plugins) {
 
                     // Set plugins order
-                    $plugins = array_filter($plugins);
                     asort($plugins, SORT_NUMERIC);
 
                     // Save plugins list
@@ -116,7 +106,6 @@ protected static function getPlugins($hook = null)
                 }
 
             } else {
-
                 \Includes\ErrorHandler::fireError('Unable to read config file for the Decorator plugins');
             }
         }
@@ -128,12 +117,11 @@ protected static function getPlugins($hook = null)
      * Return configuration file
      *
      * @return string
-     * @access protected
      * @see    ____func_see____
      * @since  1.0.0
      */
     protected static function getConfigFile()
     {
-        return LC_DIR_INCLUDES . 'Decorator' . LC_DS . self::FILE_INI;
+        return LC_DIR_INCLUDES . 'Decorator' . LC_DS . static::FILE_INI;
     }
 }
diff --git a/src/Includes/Decorator/Utils/Tokenizer.php b/src/Includes/Decorator/Utils/Tokenizer.php
index 6fe7df6ad7..a2a66e730f 100644
--- a/src/Includes/Decorator/Utils/Tokenizer.php
+++ b/src/Includes/Decorator/Utils/Tokenizer.php
@@ -92,6 +92,15 @@ abstract class Tokenizer extends \Includes\Decorator\Utils\AUtils
         'addCodeToClassBody',
     );
 
+    /**
+     * Flag
+     *
+     * @var   boolean
+     * @see   ____var_see____
+     * @since 1.0.22
+     */
+    protected static $isPrepared = false;
+
     // {{{ Common access method
 
     /**
@@ -115,7 +124,7 @@ public static function __callStatic($method, array $args = array())
         }
 
         // Prepare tokens
-        static::reset($path, static::getDecoratorFlag() || !LC_DEVELOPER_MODE || 'getFullClassName' !== $method);
+        static::reset($path, !LC_DEVELOPER_MODE || 'getFullClassName' !== $method);
 
         return call_user_func_array(array('static', $method), $args);
     }
@@ -208,7 +217,7 @@ function ($token) {
      */
     protected static function getFlag($token)
     {
-        list(, $start, ) = static::findTokensByIndexFromOffset(array(T_CLASS), $token, false);
+        list(, $start, ) = static::findTokensByIndexFromOffset(array($token), T_CLASS, false);
 
         return isset($start);
     }
@@ -222,7 +231,9 @@ protected static function getFlag($token)
      */
     protected static function getDockBlock()
     {
-        return static::getClassRelatedValue(T_DOC_COMMENT);
+        list($tokens, ,) = static::findTokensByIndexFromOffset(array(T_DOC_COMMENT), T_CLASS, false);
+
+        return empty($tokens) ? null : static::composeTokens($tokens);
     }
 
     /**
@@ -548,15 +559,19 @@ protected static function getBodyTokenData($type)
     protected static function reset($path, $prepare = true)
     {
         if ($path !== static::$path) {
-            static::$path   = $path;
             static::$tokens = token_get_all(\Includes\Utils\FileManager::read($path, LC_DEVELOPER_MODE));
+            static::$count  = count(static::$tokens);
 
-            if ($prepare) {
-                static::$tokens = static::prepareTokens(static::$tokens);
-            }
+            static::$isPrepared = false;
+        }
+
+        if ($prepare && !static::$isPrepared) {
+            static::$tokens = static::prepareTokens(static::$tokens);
 
-            static::$count = count(static::$tokens);
+            static::$isPrepared = true;
         }
+
+        static::$path = $path;
     }
 
     /**
diff --git a/src/Includes/Decorator/plugins.ini b/src/Includes/Decorator/plugins.ini
index 8cca7dc30b..a0cc0b774a 100644
--- a/src/Includes/Decorator/plugins.ini
+++ b/src/Includes/Decorator/plugins.ini
@@ -6,33 +6,32 @@
 ; Empty now
 
 [step_first]
-ModuleControllers                 = 10
-Doctrine_Plugin_DocBlockCorrector = 20
+Doctrine_Plugin_Cache                       = 10
+Doctrine_Plugin_DocBlock_FakeEntities       = 20
 
 [before_decorate]
-Doctrine_Plugin_Multilangs        = 10
-Doctrine_Plugin_ModelGenerator    = 20
+ModuleControllers                           = 10
+Doctrine_Plugin_ModelGenerator              = 20
 
 [before_write]
 ; Empty now
 
 [step_second]
-Doctrine_Plugin_DocBlockCorrector = 10
-Doctrine_Plugin_Cache             = 20
-PHPCache_Plugin_APC               = 30
-StaticRoutines                    = 40
+StaticRoutines                              = 10
 
 [step_third]
-Doctrine_Plugin_ProxyGenerator    = 10
-Doctrine_Plugin_UpdateSchema      = 20
-Doctrine_Plugin_UpdateModules     = 30
+Doctrine_Plugin_Multilangs                  = 10
+Doctrine_Plugin_DocBlock_MappedSuperClasses = 20
 
 [step_fourth]
-Doctrine_Plugin_LoadFixtures      = 10
+Doctrine_Plugin_UpdateSchema                = 10 
+Doctrine_Plugin_UpdateModules               = 20
+Doctrine_Plugin_ProxyGenerator              = 30
+Doctrine_Plugin_LoadFixtures                = 40
 
 [step_fifth]
-Templates_Plugin_ViewLists        = 10
-Templates_Plugin_Patcher          = 20
-Templates_Plugin_Compiler         = 30
-ModuleHandlers                    = 40
-
+Templates_Plugin_ViewLists                  = 10
+Templates_Plugin_Patcher                    = 20
+Templates_Plugin_Compiler                   = 30
+ModuleHandlers                              = 40
+PHPCache_Plugin_APC                         = 50
diff --git a/src/Includes/Utils/FileManager.php b/src/Includes/Utils/FileManager.php
index fa194b7fde..4c31b798a5 100644
--- a/src/Includes/Utils/FileManager.php
+++ b/src/Includes/Utils/FileManager.php
@@ -483,8 +483,41 @@ public static function deleteDir($dir, $skipCheck = false)
      */
     public static function copy($pathFrom, $pathTo, $overwrite = true)
     {
-        return (!$overwrite && static::isFile($pathTo))
-            ?: static::mkdirRecursive(static::getDir($pathTo)) && copy($pathFrom, $pathTo);
+        $result = false;
+
+        if (!$overwrite && static::isFile($pathTo)) {
+            $result = true;
+
+        } elseif (static::isFile($pathFrom)) {
+            $result = static::mkdirRecursive(static::getDir($pathTo)) && copy($pathFrom, $pathTo);
+        }
+
+        return $result;
+    }
+
+    /**
+     * Move file
+     *
+     * @param string  $pathFrom  File path (from)
+     * @param string  $pathTo    File path (to)
+     * @param boolean $overwrite Flag OPTIONAL
+     *
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    public static function move($pathFrom, $pathTo, $overwrite = true)
+    {
+        $result = false;
+
+        if (!$overwrite && static::isFile($pathTo)) {
+            $result = true;
+
+        } elseif (static::isFile($pathFrom)) {
+            $result = static::mkdirRecursive(static::getDir($pathTo)) && rename($pathFrom, $pathTo);
+        }
+
+        return $result;
     }
 
     /**
diff --git a/src/Includes/Utils/Operator.php b/src/Includes/Utils/Operator.php
index cf4c90f136..d08370cb3b 100644
--- a/src/Includes/Utils/Operator.php
+++ b/src/Includes/Utils/Operator.php
@@ -219,7 +219,7 @@ public static function checkIfClassExists($name)
 
         if (!$result) {
             $result = \Includes\Utils\FileManager::isFileReadable(
-                LC_DIR_CACHE_CLASSES . \Includes\Utils\Converter::getClassFile($name)
+                 \Includes\Autoloader::getLCAutoloadDir() . \Includes\Utils\Converter::getClassFile($name)
             );
         }
 

From 03fda7e353dfe02c8d1e7cc33ea3e163b490bb7a Mon Sep 17 00:00:00 2001
From: Maxim Shamaev 
Date: Wed, 25 Apr 2012 13:47:57 +0400
Subject: [PATCH 019/562] [*] Improve design into Persmissions seletor

---
 .../View/FormField/Permissions.php            | 61 +++++++++++++++++++
 .../Select/CheckboxList/ACheckboxList.php     | 12 ++++
 src/skins/admin/en/form_field/form_field.css  |  4 ++
 .../CDev/UserPermissions/role/permissions.js  | 54 ++++++++++++++++
 4 files changed, 131 insertions(+)
 create mode 100644 src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js

diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php b/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php
index a584cefd78..209c74ddd9 100644
--- a/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php
+++ b/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php
@@ -35,6 +35,31 @@
  */
 class Permissions extends \XLite\View\FormField\Select\CheckboxList\ACheckboxList
 {
+    /**
+     * Root permission
+     * 
+     * @var   \XLite\Model\Role\Permission
+     * @see   ____var_see____
+     * @since 1.0.22
+     */
+    protected $root;
+
+    /**
+     * Register JS files
+     *
+     * @return array
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    public function getJSFiles()
+    {
+        $list[] = parent::getJSFiles();
+
+        $list[] = 'modules/CDev/UserPermissions/role/permissions.js';
+
+        return $list;
+    }
+
     /**
      * Return default options list
      *
@@ -61,4 +86,40 @@ protected function getDefaultOptions()
         return $list;
     }
 
+    /**
+     * Get option attributes
+     *
+     * @param mixed $value Value
+     *
+     * @return array
+     * @see    ____func_see____
+     * @since  1.0.19
+     */
+    protected function getOptionAttributes($value)
+    {
+        $list = parent::getOptionAttributes($value);
+
+        if ($value == $this->getRootPermission()->getId()) {
+            $list['data-isRoot'] = '1';
+        }
+
+        return $list;
+    }
+
+    /**
+     * Get root permission 
+     * 
+     * @return void
+     * @see    ____func_see____
+     * @since  1.0.22
+     */
+    protected function getRootPermission()
+    {
+        if (!isset($this->root)) {
+            $this->root = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')
+                ->findOneBy(array('code' => \XLite\Model\Role\Permission::ROOT_ACCESS));
+        }
+
+        return $this->root;
+    }
 }
diff --git a/src/classes/XLite/View/FormField/Select/CheckboxList/ACheckboxList.php b/src/classes/XLite/View/FormField/Select/CheckboxList/ACheckboxList.php
index 594b8bfc65..45571cc2ec 100644
--- a/src/classes/XLite/View/FormField/Select/CheckboxList/ACheckboxList.php
+++ b/src/classes/XLite/View/FormField/Select/CheckboxList/ACheckboxList.php
@@ -91,5 +91,17 @@ protected function prepareAttributes(array $attrs)
         return $attrs;
     }
 
+    /**
+     * Get default attributes
+     *
+     * @return array
+     * @see    ____func_see____
+     * @since  1.0.0
+     */
+    protected function getDefaultAttributes()
+    {
+        return parent::getDefaultAttributes() + array('data-header' => '0');
+    }
+
 }
 
diff --git a/src/skins/admin/en/form_field/form_field.css b/src/skins/admin/en/form_field/form_field.css
index 985be17f5b..352c4f5d81 100644
--- a/src/skins/admin/en/form_field/form_field.css
+++ b/src/skins/admin/en/form_field/form_field.css
@@ -28,6 +28,10 @@ input[type="text"].form_field_error {
   font-size: 0.9em;
 }
 
+button.ui-multiselect {
+  margin: 0px;
+}
+
 button.ui-multiselect,
 button.ui-multiselect.ui-state-hover,
 button.ui-multiselect.ui-state-active
diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js b/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js
new file mode 100644
index 0000000000..40aefe6a5a
--- /dev/null
+++ b/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js
@@ -0,0 +1,54 @@
+/* vim: set ts=2 sw=2 sts=2 et: */
+
+/**
+ * Permissions selector controller
+ *  
+ * @author    Creative Development LLC  
+ * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved
+ * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ * @link      http://www.litecommerce.com/
+ * @since     1.0.22
+ */
+
+jQuery(document).ready(
+  function () {
+    jQuery('li.permissions select').multiselect({
+      create: function (event, ui) {
+        var rootId;
+        jQuery(event.target.options).each(
+          function () {
+            if (jQuery(this).data('isRoot')) {
+              rootId = this.value;
+            }
+          }
+        );
+
+        if (rootId) {
+          var inp = jQuery('.ui-multiselect-menu').find(':checkbox[value="' + rootId + '"]');
+          inp.change(
+            function () {
+              var box = jQuery(this).parents('.ui-multiselect-menu').eq(0).find(':checkbox').not('[value="' + rootId + '"]');
+              if (this.checked) {
+                box.each(
+                  function () {
+                    this.prevCheckesState = this.checked;
+                    this.checked = true;
+                  }
+                ).attr('disabled', 'disabled');
+
+              } else {
+                box.each(
+                  function () {
+                    this.checked = 'undexfined' == typeof(this.prevCheckesState) ? false : this.prevCheckesState;
+                  }
+                ).removeAttr('disabled');
+              }
+            }
+          );
+          inp.change();
+        }
+
+      }
+    });
+  }
+);

From 21c86ed81048b62f070ae9fe52c7a3e16b95a91b Mon Sep 17 00:00:00 2001
From: Maxim Shamaev 
Date: Wed, 25 Apr 2012 14:20:59 +0400
Subject: [PATCH 020/562] [*] Small fixes

---
 .../View/FormField/Permissions.php            |  2 +-
 .../CDev/UserPermissions/role/permissions.js  | 63 ++++++++++---------
 2 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php b/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php
index 209c74ddd9..30bdd8241b 100644
--- a/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php
+++ b/src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php
@@ -53,7 +53,7 @@ class Permissions extends \XLite\View\FormField\Select\CheckboxList\ACheckboxLis
      */
     public function getJSFiles()
     {
-        $list[] = parent::getJSFiles();
+        $list = parent::getJSFiles();
 
         $list[] = 'modules/CDev/UserPermissions/role/permissions.js';
 
diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js b/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js
index 40aefe6a5a..38de5a494d 100644
--- a/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js
+++ b/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js
@@ -13,41 +13,44 @@
 jQuery(document).ready(
   function () {
     jQuery('li.permissions select').multiselect({
-      create: function (event, ui) {
-        var rootId;
-        jQuery(event.target.options).each(
-          function () {
-            if (jQuery(this).data('isRoot')) {
-              rootId = this.value;
-            }
-          }
-        );
-
-        if (rootId) {
-          var inp = jQuery('.ui-multiselect-menu').find(':checkbox[value="' + rootId + '"]');
-          inp.change(
+      open: function (event, ui) {
+        if ('undefined' == typeof(event.target.minicontrollerAssigned)) {
+          var rootId;
+          jQuery(event.target.options).each(
             function () {
-              var box = jQuery(this).parents('.ui-multiselect-menu').eq(0).find(':checkbox').not('[value="' + rootId + '"]');
-              if (this.checked) {
-                box.each(
-                  function () {
-                    this.prevCheckesState = this.checked;
-                    this.checked = true;
-                  }
-                ).attr('disabled', 'disabled');
-
-              } else {
-                box.each(
-                  function () {
-                    this.checked = 'undexfined' == typeof(this.prevCheckesState) ? false : this.prevCheckesState;
-                  }
-                ).removeAttr('disabled');
+              if (jQuery(this).data('isRoot')) {
+                rootId = this.value;
               }
             }
           );
-          inp.change();
-        }
 
+          if (rootId) {
+            var inp = jQuery('.ui-multiselect-menu').find(':checkbox[value="' + rootId + '"]');
+            inp.change(
+              function () {
+                var box = jQuery(this).parents('.ui-multiselect-menu').eq(0).find(':checkbox').not('[value="' + rootId + '"]');
+                if (this.checked) {
+                  box.each(
+                    function () {
+                      this.prevCheckesState = this.checked;
+                      this.checked = true;
+                    }
+                  ).attr('disabled', 'disabled');
+
+                } else {
+                  box.each(
+                    function () {
+                      this.checked = 'undexfined' == typeof(this.prevCheckesState) ? false : this.prevCheckesState;
+                    }
+                  ).removeAttr('disabled');
+                }
+              }
+            );
+            inp.change();
+          }
+
+          event.target.minicontrollerAssigned = true;
+        }
       }
     });
   }

From 37603314b754fbb9492a27ca5dc92e5a8d13b9ba Mon Sep 17 00:00:00 2001
From: Vadim Sannikov 
Date: Thu, 26 Apr 2012 16:05:52 +0400
Subject: [PATCH 021/562] [!] Some errors from merge. Fixed

---
 src/Includes/Utils/URLManager.php             |  2 +-
 src/skins/admin/en/categories/body.tpl        |  2 +-
 .../admin/en/categories/parts/actions.tpl     | 19 -----------
 .../en/categories/parts/availability.tpl      | 23 -------------
 .../admin/en/categories/parts/clean_url.tpl   | 18 -----------
 .../admin/en/categories/parts/description.tpl | 18 -----------
 .../admin/en/categories/parts/html_title.tpl  | 18 -----------
 src/skins/admin/en/categories/parts/image.tpl | 14 --------
 .../en/categories/parts/image_modify.tpl      | 32 -------------------
 .../admin/en/categories/parts/membership.tpl  | 20 ------------
 .../en/categories/parts/meta_description.tpl  | 18 -----------
 .../en/categories/parts/meta_keywords.tpl     | 18 -----------
 src/skins/admin/en/categories/parts/name.tpl  | 21 ------------
 .../admin/en/categories/parts/page_title.tpl  | 22 -------------
 .../admin/en/categories/parts/separator.tpl   | 16 ----------
 src/skins/admin/en/center.tpl                 |  3 +-
 16 files changed, 3 insertions(+), 261 deletions(-)
 delete mode 100644 src/skins/admin/en/categories/parts/actions.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/availability.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/clean_url.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/description.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/html_title.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/image.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/image_modify.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/membership.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/meta_description.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/meta_keywords.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/name.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/page_title.tpl
 delete mode 100644 src/skins/admin/en/categories/parts/separator.tpl

diff --git a/src/Includes/Utils/URLManager.php b/src/Includes/Utils/URLManager.php
index 403680bdb7..1928233ba3 100644
--- a/src/Includes/Utils/URLManager.php
+++ b/src/Includes/Utils/URLManager.php
@@ -82,7 +82,7 @@ public static function getShopURL(
         }
 
         if (!isset($output)) {
-            $output = static::::URL_OUTPUT_FULL;
+            $output = static::URL_OUTPUT_FULL;
         }
 
         $hostDetails = \Includes\Utils\ConfigParser::getOptions('host_details');
diff --git a/src/skins/admin/en/categories/body.tpl b/src/skins/admin/en/categories/body.tpl
index 569de19b1a..1eaba3ec7b 100644
--- a/src/skins/admin/en/categories/body.tpl
+++ b/src/skins/admin/en/categories/body.tpl
@@ -17,7 +17,7 @@
   
- - diff --git a/src/skins/admin/en/categories/parts/availability.tpl b/src/skins/admin/en/categories/parts/availability.tpl deleted file mode 100644 index a79cdee464..0000000000 --- a/src/skins/admin/en/categories/parts/availability.tpl +++ /dev/null @@ -1,23 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category availability - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="60") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/clean_url.tpl b/src/skins/admin/en/categories/parts/clean_url.tpl deleted file mode 100644 index 12ed4adcc3..0000000000 --- a/src/skins/admin/en/categories/parts/clean_url.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category clean url - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="100") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/description.tpl b/src/skins/admin/en/categories/parts/description.tpl deleted file mode 100644 index c5485db09f..0000000000 --- a/src/skins/admin/en/categories/parts/description.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category description - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="30") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/html_title.tpl b/src/skins/admin/en/categories/parts/html_title.tpl deleted file mode 100644 index 82fccddf83..0000000000 --- a/src/skins/admin/en/categories/parts/html_title.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category HTML title - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="70") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/image.tpl b/src/skins/admin/en/categories/parts/image.tpl deleted file mode 100644 index 3678db0051..0000000000 --- a/src/skins/admin/en/categories/parts/image.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category image - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.13 - * - *} - - diff --git a/src/skins/admin/en/categories/parts/image_modify.tpl b/src/skins/admin/en/categories/parts/image_modify.tpl deleted file mode 100644 index 22097050c6..0000000000 --- a/src/skins/admin/en/categories/parts/image_modify.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category image selector - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="40") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/membership.tpl b/src/skins/admin/en/categories/parts/membership.tpl deleted file mode 100644 index 4e5e3ca3e9..0000000000 --- a/src/skins/admin/en/categories/parts/membership.tpl +++ /dev/null @@ -1,20 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category membership - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="50") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/meta_description.tpl b/src/skins/admin/en/categories/parts/meta_description.tpl deleted file mode 100644 index d41d66d551..0000000000 --- a/src/skins/admin/en/categories/parts/meta_description.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category meta description - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="90") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/meta_keywords.tpl b/src/skins/admin/en/categories/parts/meta_keywords.tpl deleted file mode 100644 index 93e90d8fb0..0000000000 --- a/src/skins/admin/en/categories/parts/meta_keywords.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category meta keywords - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="80") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/name.tpl b/src/skins/admin/en/categories/parts/name.tpl deleted file mode 100644 index 0e4895851f..0000000000 --- a/src/skins/admin/en/categories/parts/name.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="10") - *} - - - - - - diff --git a/src/skins/admin/en/categories/parts/page_title.tpl b/src/skins/admin/en/categories/parts/page_title.tpl deleted file mode 100644 index e3f7dd8be8..0000000000 --- a/src/skins/admin/en/categories/parts/page_title.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category page title - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="20") - *} - - - - - diff --git a/src/skins/admin/en/categories/parts/separator.tpl b/src/skins/admin/en/categories/parts/separator.tpl deleted file mode 100644 index 8c54bc4a2a..0000000000 --- a/src/skins/admin/en/categories/parts/separator.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category add/modify form separator - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="10100") - *} - - - - diff --git a/src/skins/admin/en/center.tpl b/src/skins/admin/en/center.tpl index 5f66661223..be5ab722be 100644 --- a/src/skins/admin/en/center.tpl +++ b/src/skins/admin/en/center.tpl @@ -24,8 +24,7 @@ {* Some bug in Flexy *} - - + From cbaa04fbc869741265ef43fcc3d654758e0850f3 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 11 May 2012 09:13:30 +0400 Subject: [PATCH 022/562] [*] Small client logic changes --- .../admin/en/modules/CDev/UserPermissions/role/permissions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js b/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js index 38de5a494d..f4eaf48a58 100644 --- a/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js +++ b/src/skins/admin/en/modules/CDev/UserPermissions/role/permissions.js @@ -40,7 +40,9 @@ jQuery(document).ready( } else { box.each( function () { - this.checked = 'undexfined' == typeof(this.prevCheckesState) ? false : this.prevCheckesState; + if ('undefined' != typeof(this.prevCheckesState)) { + this.checked = this.prevCheckesState; + } } ).removeAttr('disabled'); } From 70047f36042391e5253e670d3863f9675c2c5a99 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Sun, 13 May 2012 22:39:28 +0400 Subject: [PATCH 023/562] [*] Small improvements into User permissions module --- src/classes/XLite/Model/RoleTranslation.php | 11 ---- .../View/ItemsList/Model/Roles.php | 35 +++++----- .../CDev/UserPermissions/View/Model/Role.php | 64 ++++++++++++------- src/skins/admin/en/form_field/form_field.css | 4 ++ .../en/form_field/input/checkbox/switcher.js | 16 +++-- .../admin/en/form_field/js/multiselect.js | 23 ++++++- .../roles/{switcher.tpl => controller.js} | 16 +++-- .../CDev/UserPermissions/roles/style.css | 5 ++ 8 files changed, 106 insertions(+), 68 deletions(-) rename src/skins/admin/en/modules/CDev/UserPermissions/roles/{switcher.tpl => controller.js} (51%) diff --git a/src/classes/XLite/Model/RoleTranslation.php b/src/classes/XLite/Model/RoleTranslation.php index 875fea6ea7..7e3dc6e8a2 100644 --- a/src/classes/XLite/Model/RoleTranslation.php +++ b/src/classes/XLite/Model/RoleTranslation.php @@ -49,15 +49,4 @@ class RoleTranslation extends \XLite\Model\Base\Translation */ protected $name = ''; - /** - * Description - * - * @var string - * @see ____var_see____ - * @since 1.0.17 - * - * @Column (type="text") - */ - protected $description = ''; - } diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php index 136f9cb5cd..536953706f 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php @@ -51,6 +51,22 @@ public function getCSSFiles() return $list; } + /** + * Get a list of JavaScript files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + $list[] = 'modules/CDev/UserPermissions/roles/controller.js'; + + return $list; + } + /** * Define columns structure * @@ -214,25 +230,6 @@ protected function preprocessName($value, array $column, \XLite\Model\Role $role return $value ?: $role->getPublicName(); } - /** - * Get left actions tempaltes - * - * @return array - * @see ____func_see____ - * @since 1.0.15 - */ - protected function getLeftActions() - { - $list = parent::getLeftActions(); - - $key = array_search('items_list/model/table/parts/switcher.tpl', $list); - if (false !== $key) { - $list[$key] = 'modules/CDev/UserPermissions/roles/switcher.tpl'; - } - - return $list; - } - /** * Get right actions tempaltes * diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php index 6307f2e6c0..de084ef274 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php @@ -56,10 +56,6 @@ class Role extends \XLite\View\Model\AModel self::SCHEMA_CLASS => 'XLite\Module\CDev\UserPermissions\View\FormField\Permissions', self::SCHEMA_LABEL => 'Permissions', ), - 'description' => array( - self::SCHEMA_CLASS => 'XLite\View\FormField\Textarea\Simple', - self::SCHEMA_LABEL => 'Description', - ), ); /** @@ -85,6 +81,7 @@ protected function getFormFieldsForSectionDefault() { if ($this->getModelObject()->isPermanentRole()) { unset($this->schemaDefault['enabled']); + $this->schemaDefault['permissions'][self::SCHEMA_CLASS] = 'XLite\View\FormField\Label'; } return $this->getFieldsBySchema($this->schemaDefault); @@ -163,28 +160,31 @@ protected function setModelProperties(array $data) $model = $this->getModelObject(); - // Remove old links - foreach ($model->getPermissions() as $perm) { - $perm->getRoles()->removeElement($model); - } - $model->getPermissions()->clear(); - - $permanent = \XLite\Core\Database::getRepo('XLite\Model\Role')->getPermanentRole(); - if ($permanent->getId() == $model->getId()) { - $root = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->findOneBy( - array('code' => \XLite\Model\Role\Permission::ROOT_ACCESS) - ); - if ($root && !in_array($root->getId(), $permissions)) { - $permissions[] = $root->getId(); + if (!$model->isPermanentRole()) { + + // Remove old links + foreach ($model->getPermissions() as $perm) { + $perm->getRoles()->removeElement($model); + } + $model->getPermissions()->clear(); + + $permanent = \XLite\Core\Database::getRepo('XLite\Model\Role')->getPermanentRole(); + if ($permanent->getId() == $model->getId()) { + $root = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->findOneBy( + array('code' => \XLite\Model\Role\Permission::ROOT_ACCESS) + ); + if ($root && !in_array($root->getId(), $permissions)) { + $permissions[] = $root->getId(); + } } - } - // Add new links - foreach ($permissions as $pid) { - $permission = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->find($pid); - if ($permission) { - $model->addPermissions($permission); - $permission->addRoles($model); + // Add new links + foreach ($permissions as $pid) { + $permission = \XLite\Core\Database::getRepo('XLite\Model\Role\Permission')->find($pid); + if ($permission) { + $model->addPermissions($permission); + $permission->addRoles($model); + } } } } @@ -206,4 +206,20 @@ protected function addDataSavedTopMessage() } } + /** + * Retrieve property from the model object + * + * @param mixed $name Field/property name + * + * @return mixed + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModelObjectValue($name) + { + return ('permissions' == $name && $this->getModelObject()->isPermanentRole()) + ? 'Root access' + : parent::getModelObjectValue($name); + } + } diff --git a/src/skins/admin/en/form_field/form_field.css b/src/skins/admin/en/form_field/form_field.css index 352c4f5d81..e1d5a865ac 100644 --- a/src/skins/admin/en/form_field/form_field.css +++ b/src/skins/admin/en/form_field/form_field.css @@ -105,6 +105,10 @@ button.ui-state-default span.ui-icon { padding-left: 11px; } +.ui-multiselect-checkboxes .ui-state-hover span { + color: #fff; +} + .ui-multiselect-checkboxes label input { top: 2px; } diff --git a/src/skins/admin/en/form_field/input/checkbox/switcher.js b/src/skins/admin/en/form_field/input/checkbox/switcher.js index c1a3d94bd3..b923db815d 100644 --- a/src/skins/admin/en/form_field/input/checkbox/switcher.js +++ b/src/skins/admin/en/form_field/input/checkbox/switcher.js @@ -20,15 +20,17 @@ CommonForm.elementControllers.push( widget.click( function () { - if (!input.attr('checked')) { - input.attr('checked', 'checked'); - input.get(0).setAttribute('checked', 'checked'); + if (!input.attr('disabled')) { + if (!input.attr('checked')) { + input.attr('checked', 'checked'); + input.get(0).setAttribute('checked', 'checked'); - } else { - input.removeAttr('checked'); - } + } else { + input.removeAttr('checked'); + } - input.change(); + input.change(); + } } ); diff --git a/src/skins/admin/en/form_field/js/multiselect.js b/src/skins/admin/en/form_field/js/multiselect.js index 489e1df9e2..2c5214e724 100644 --- a/src/skins/admin/en/form_field/js/multiselect.js +++ b/src/skins/admin/en/form_field/js/multiselect.js @@ -16,14 +16,35 @@ CommonElement.prototype.handlers.push( return 0 < this.$element.filter('select.multiselect').length; }, handler: function () { - var options = { minWidth: 300, header: false, selectedList: 2 }; + var options = { minWidth: 300, header: false, selectedList: 2, height: 250 }; if (this.$element.data('text')) { options.selectedText = this.$element.data('text'); } if (this.$element.data('header')) { options.header = true; + + } else if (this.$element.data('filter')) { + options.header = 'close'; + } + + if (this.$element.data('filter')) { + options.classes = 'ui-multiselect-with-filter'; } + this.$element.multiselect(options); + + if (this.$element.data('filter')) { + var options = {placeholder: this.$element.data('filter-placeholder')}; + this.$element.multiselectfilter(options); + jQuery('.ui-multiselect-filter').each( + function () { + if (3 == this.childNodes[0].nodeType) { + this.removeChild(this.childNodes[0]); + } + } + ); + } + } } ); diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl b/src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js similarity index 51% rename from src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl rename to src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js index ecb25b3d55..8d76a1b743 100644 --- a/src/skins/admin/en/modules/CDev/UserPermissions/roles/switcher.tpl +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js @@ -1,13 +1,17 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} +/* vim: set ts=2 sw=2 sts=2 et: */ -{** - * Entity switcher +/** + * Controller * * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ - * @since 1.0.15 - *} + * @since 1.0.22 + */ + +TableItemsList.prototype.listeners.unremovableRole = function(handler) +{ + jQuery('.unremovable .input-field-wrapper.switcher input', handler.container).attr('disabled', 'disabled'); +} - diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css b/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css index 2d6972b5e5..712f9df57b 100644 --- a/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css @@ -14,3 +14,8 @@ width: 400px; } +.roles table.list tbody .unremovable .input-field-wrapper.switcher .widget { + background-position: 0px -32px; + cursor: auto; +} + From 416279a12e5298f80bac90cd9cc4c5064eeffd79 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 15 May 2012 16:14:14 +0400 Subject: [PATCH 024/562] [*] Core improvements --- src/classes/XLite/Controller/Admin/AAdmin.php | 2 +- .../XLite/Controller/Admin/EventTask.php | 133 ++++++ .../XLite/Controller/Admin/OrdersStats.php | 4 +- .../XLite/Controller/Console/AConsole.php | 1 + .../Controller/Customer/IframeContent.php | 4 +- .../XLite/Controller/Customer/Product.php | 25 +- src/classes/XLite/Core/Auth.php | 16 + src/classes/XLite/Core/DataSource/Ecwid.php | 12 +- .../XLite/Core/DataSource/Ecwid/Products.php | 2 +- .../XLite/Core/Doctrine/IfFunction.php | 12 +- .../XLite/Core/EventDriver/AEventDriver.php | 12 + src/classes/XLite/Core/EventDriver/AMQP.php | 12 + .../Core/EventListener/Base/Countable.php | 187 +++++++++ src/classes/XLite/Core/EventTask.php | 2 +- src/classes/XLite/Core/ImageOperator.php | 2 +- src/classes/XLite/Logic/Math.php | 14 +- src/classes/XLite/Model/AEntity.php | 14 + src/classes/XLite/Model/Collection.php | 16 +- src/classes/XLite/Model/ListNode.php | 8 +- src/classes/XLite/Model/OrderItem.php | 3 + src/classes/XLite/Model/Product.php | 22 +- .../Model/QueryBuilder/AQueryBuilder.php | 2 + src/classes/XLite/Model/Repo/ARepo.php | 23 ++ src/classes/XLite/Model/Repo/Base/I18n.php | 4 +- src/classes/XLite/Model/Repo/Config.php | 18 +- src/classes/XLite/Model/Repo/Product.php | 76 +++- src/classes/XLite/Model/Repo/TmpVar.php | 85 +++- src/classes/XLite/Model/Role.php | 33 ++ .../XLite/Module/CDev/AuthorizeNet/Main.php | 3 +- .../CDev/Bestsellers/Model/Repo/Product.php | 41 +- .../CDev/Bestsellers/View/Bestsellers.php | 34 +- .../XLite/Module/CDev/DeTranslation/Main.php | 4 +- .../CDev/Demo/Controller/Admin/AAdmin.php | 10 +- .../CDev/Demo/Controller/Admin/Profile.php | 28 +- .../XLite/Module/CDev/Demo/View/Demo.php | 20 +- .../Controller/Customer/OrderList.php | 4 +- .../CDev/DrupalConnector/Drupal/Admin.php | 26 +- .../CDev/DrupalConnector/Drupal/Block.php | 10 +- .../DrupalConnector/Drupal/Controller.php | 2 + .../CDev/DrupalConnector/Drupal/Module.php | 7 +- .../CDev/DrupalConnector/Drupal/UserSync.php | 2 +- .../CDev/DrupalConnector/View/PoweredBy.php | 3 +- .../Controller/Admin/Categories.php | 2 +- .../Controller/Admin/Product.php | 4 +- .../Module/CDev/FileAttachments/Main.php | 3 +- .../FileAttachments/View/Form/Attachments.php | 6 + .../FileAttachments/View/Product/Customer.php | 2 +- .../XLite/Module/CDev/FrTranslation/Main.php | 4 +- .../XLite/Module/CDev/GoSocial/Main.php | 3 +- .../FormField/Select/UseCustomOpenGraph.php | 6 + .../Controller/Admin/MoneybookersSettings.php | 28 +- .../XLite/Module/CDev/Moneybookers/Main.php | 54 ++- .../Model/Payment/Processor/Moneybookers.php | 306 +++++++------- .../Model/Payment/Processor/PaypalWPS.php | 8 +- .../Controller/Customer/Cart.php | 2 +- .../CDev/ProductOptions/Model/OrderItem.php | 13 +- .../Model/Payment/Processor/Quantum.php | 25 +- .../XLite/Module/CDev/RuTranslation/Main.php | 4 +- .../Sale/Controller/Admin/SaleSelected.php | 2 +- .../XLite/Module/CDev/Sale/Model/Product.php | 25 +- .../Module/CDev/Sale/Model/Repo/Product.php | 39 +- .../XLite/Module/CDev/Sale/View/ASale.php | 6 +- .../Module/CDev/Sale/View/Form/AForm.php | 21 +- .../Sale/View/Form/Product/Modify/Single.php | 4 +- .../Sale/View/Form/SaleSelectedDialog.php | 4 +- .../XLite/Module/CDev/Sale/View/ItemsList.php | 7 +- .../Module/CDev/Sale/View/ItemsListForm.php | 13 +- .../CDev/SalesTax/Controller/Admin/Taxes.php | 4 +- .../XLite/Module/CDev/SalesTax/Model/Tax.php | 2 +- .../Module/CDev/SalesTax/Model/Tax/Rate.php | 5 +- .../Model/Payment/Processor/TwoCheckout.php | 14 +- .../CDev/VAT/Controller/Admin/Taxes.php | 4 +- .../Module/CDev/VAT/Logic/Shipping/Tax.php | 10 +- .../Module/CDev/VAT/Model/Repo/Product.php | 3 +- .../XLite/Module/CDev/VAT/Model/Tax.php | 2 +- .../XLite/Module/CDev/VAT/Model/Tax/Rate.php | 16 +- .../XMLSitemap/Controller/Admin/Sitemap.php | 10 +- .../Controller/Customer/Sitemap.php | 3 +- .../XMLSitemap/Logic/SitemapGenerator.php | 7 +- .../CDev/XMLSitemap/Logic/SitemapIterator.php | 5 +- .../CDev/XMLSitemap/Model/Repo/Config.php | 7 +- src/classes/XLite/View/Category.php | 2 +- src/classes/XLite/View/EventTaskProgress.php | 185 +++++++++ src/classes/XLite/View/FormField/Image.php | 26 ++ .../XLite/View/FormField/Inline/AInline.php | 378 +++++++++++++----- .../View/FormField/Inline/Base/Single.php | 122 ++++++ .../Inline/Input/Checkbox/Switcher.php | 8 +- .../Input/Checkbox/Switcher/Enabled.php | 9 - .../View/FormField/Inline/Input/Text.php | 2 +- .../Inline/Input/Text/Currency/Symbol.php | 71 ---- .../Text/{Currency/Name.php => Email.php} | 22 +- .../FormField/Inline/Input/Text/Float.php | 15 +- .../FormField/Inline/Input/Text/Integer.php | 16 +- .../Input/Text/Integer/ProductQuantity.php | 17 +- .../FormField/Inline/Input/Text/Position.php | 8 +- .../Inline/Input/Text/Position/Move.php | 21 - .../Inline/Input/Text/Position/OrderBy.php | 21 - .../FormField/Inline/Input/Text/Price.php | 41 +- .../Inline/Input/Text/Price/Product.php | 15 +- .../Inline/Input/Text/Product/SKU.php | 26 +- .../XLite/View/FormField/Input/Text/Float.php | 4 +- .../Name.php => Input/Text/TCPIPPort.php} | 38 +- .../XLite/View/FormField/Select/Base/Rich.php | 88 ++++ .../XLite/View/ItemsList/Model/AModel.php | 72 +++- .../ItemsList/Model/Product/Admin/Search.php | 15 +- .../XLite/View/ItemsList/Model/Table.php | 82 +++- src/classes/XLite/View/Model/AModel.php | 7 +- .../XLite/View/Model/Address/Address.php | 9 +- .../admin/en/event_task_progress/body.tpl | 23 ++ .../en/event_task_progress/controller.js | 107 +++++ .../admin/en/event_task_progress/style.css | 33 ++ src/skins/admin/en/form_field/form_field.css | 71 +++- src/skins/admin/en/form_field/image.tpl | 5 + .../admin/en/form_field/inline/controller.js | 5 +- .../admin/en/form_field/inline/field.tpl | 6 +- .../en/form_field/inline/input/text/float.js | 3 +- .../inline/input/text/position/move.tpl | 2 +- .../en/form_field/inline/input/text/price.tpl | 4 +- src/skins/admin/en/form_field/inline/view.tpl | 4 +- .../en/form_field/input/checkbox/switcher.js | 16 +- .../admin/en/form_field/input/text/float.js | 23 +- .../admin/en/form_field/js/multiselect.js | 23 +- src/skins/admin/en/form_field/js/rich.js | 50 +++ src/skins/admin/en/items_list/items_list.js | 2 + src/skins/admin/en/items_list/model/table.tpl | 2 +- .../admin/en/items_list/model/table/body.tpl | 2 +- .../en/items_list/model/table/parts/move.tpl | 2 +- .../items_list/model/table/parts/position.tpl | 2 +- .../items_list/model/table/parts/switcher.tpl | 2 +- .../admin/en/items_list/model/table/style.css | 56 ++- .../en/modules/CDev/GoSocial/product.tpl | 2 +- src/skins/common/js/core.form.js | 6 +- 132 files changed, 2510 insertions(+), 882 deletions(-) create mode 100644 src/classes/XLite/Controller/Admin/EventTask.php create mode 100644 src/classes/XLite/Core/EventListener/Base/Countable.php create mode 100644 src/classes/XLite/View/EventTaskProgress.php create mode 100644 src/classes/XLite/View/FormField/Inline/Base/Single.php delete mode 100644 src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Symbol.php rename src/classes/XLite/View/FormField/Inline/Input/Text/{Currency/Name.php => Email.php} (75%) rename src/classes/XLite/View/FormField/{Inline/Input/Text/Product/Name.php => Input/Text/TCPIPPort.php} (63%) create mode 100644 src/classes/XLite/View/FormField/Select/Base/Rich.php create mode 100644 src/skins/admin/en/event_task_progress/body.tpl create mode 100644 src/skins/admin/en/event_task_progress/controller.js create mode 100644 src/skins/admin/en/event_task_progress/style.css create mode 100644 src/skins/admin/en/form_field/js/rich.js diff --git a/src/classes/XLite/Controller/Admin/AAdmin.php b/src/classes/XLite/Controller/Admin/AAdmin.php index c565ebc8c2..1dc10b1fea 100644 --- a/src/classes/XLite/Controller/Admin/AAdmin.php +++ b/src/classes/XLite/Controller/Admin/AAdmin.php @@ -209,7 +209,7 @@ protected function isFormIdValid() $request = \XLite\Core\Request::getInstance(); $result = true; - if (\Xlite\Core\Config::getInstance()->Security->form_id_protection) { + if (\XLite\Core\Config::getInstance()->Security->form_id_protection) { if (!isset($request->xlite_form_id) || !$request->xlite_form_id) { $result = false; diff --git a/src/classes/XLite/Controller/Admin/EventTask.php b/src/classes/XLite/Controller/Admin/EventTask.php new file mode 100644 index 0000000000..76c5e75ac7 --- /dev/null +++ b/src/classes/XLite/Controller/Admin/EventTask.php @@ -0,0 +1,133 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.22 + */ + +namespace XLite\Controller\Admin; + +/** + * Event task controller + * + * @see ____class_see____ + * @since 1.0.22 + */ +class EventTask extends \XLite\Controller\Admin\AAdmin +{ + /** + * Check if current page is accessible + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function checkAccess() + { + return parent::checkAccess() && $this->isAJAX(); + } + + /** + * Check ACL permissions + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function checkACL() + { + return true; + } + + /** + * Run task + * + * @return void + * @see ____func_see____ + * @since 1.0.22 + */ + protected function doActionRun() + { + $event = \XLite\Core\Request::getInstance()->event; + $result = false; + + $task = \XLite\Core\Database::getRepo('XLite\Model\EventTask')->findOneBy(array('name' => $event)); + if ($task && \XLite\Core\EventListener::getInstance()->handle($task->getName(), $task->getArguments())) { + \XLite\Core\Database::getEM()->remove($task); + $result = true; + + } else { + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->removeEventState($event); + } + + \XLite\Core\Database::getEM()->flush(); + + $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState($event); + + $this->setPureAction(true); + if ($result && $state) { + \XLite\Core\Event::eventTaskRun( + array( + 'percent' => 0 < $state['position'] ? min(100, round($state['position'] / $state['length'] * 100)) : 0, + ) + ); + + } else { + $result = false; + } + + $this->valid = $result; + } + + /** + * Run task + * + * @return void + * @see ____func_see____ + * @since 1.0.22 + */ + protected function doActionTouch() + { + $event = \XLite\Core\Request::getInstance()->event; + $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState($event); + + $this->setPureAction(true); + + $data = array( + 'percent' => $state && 0 < $state['position'] ? min(100, round($state['position'] / $state['length'] * 100)) : 0, + ); + + print json_encode($data); + } + + /** + * Process request + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function processRequest() + { + } +} diff --git a/src/classes/XLite/Controller/Admin/OrdersStats.php b/src/classes/XLite/Controller/Admin/OrdersStats.php index 3384ba0113..62c8feeeb7 100644 --- a/src/classes/XLite/Controller/Admin/OrdersStats.php +++ b/src/classes/XLite/Controller/Admin/OrdersStats.php @@ -193,7 +193,7 @@ protected function getData() * Collect statistics record * * @param string $row Row identificator - * @param \Xlite\Model\Order $order Order + * @param \XLite\Model\Order $order Order * * @return void * @see ____func_see____ @@ -218,7 +218,7 @@ protected function collectStatsRecord($row, $order) /** * Process statistics record * - * @param \Xlite\Model\Order $order Order + * @param \XLite\Model\Order $order Order * * @return void * @see ____func_see____ diff --git a/src/classes/XLite/Controller/Console/AConsole.php b/src/classes/XLite/Controller/Console/AConsole.php index 3141822c8b..79d3719b72 100644 --- a/src/classes/XLite/Controller/Console/AConsole.php +++ b/src/classes/XLite/Controller/Console/AConsole.php @@ -71,6 +71,7 @@ public function handleRequest() set_time_limit(0); $this->actionTime = microtime(true); + \XLite\Core\Session::getInstance(); parent::handleRequest(); if (!$this->pureOutput) { diff --git a/src/classes/XLite/Controller/Customer/IframeContent.php b/src/classes/XLite/Controller/Customer/IframeContent.php index 10dcf6459c..ee65df7197 100644 --- a/src/classes/XLite/Controller/Customer/IframeContent.php +++ b/src/classes/XLite/Controller/Customer/IframeContent.php @@ -72,7 +72,7 @@ protected function doNoAction() -
+
$body
@@ -96,7 +96,7 @@ protected function doNoAction() * @see ____func_see____ * @since 1.0.0 */ - protected function assembleFormBody(\EMM\Model\IframeContent $content) + protected function assembleFormBody(\XLite\Model\IframeContent $content) { $inputs = array(); foreach ($content->getData() as $name => $value) { diff --git a/src/classes/XLite/Controller/Customer/Product.php b/src/classes/XLite/Controller/Customer/Product.php index da5d4fe1d7..5c877f8dc9 100644 --- a/src/classes/XLite/Controller/Customer/Product.php +++ b/src/classes/XLite/Controller/Customer/Product.php @@ -44,6 +44,14 @@ class Product extends \XLite\Controller\Customer\Catalog */ protected $params = array('target', 'product_id'); + /** + * Product + * + * @var \XLite\Model\Product + * @see ____var_see____ + * @since 1.0.21 + */ + protected $product; /** * Check whether the title is to be displayed in the content area @@ -108,9 +116,24 @@ public function getModelObject() */ public function getProduct() { - return \XLite\Core\Database::getRepo('XLite\Model\Product')->find($this->getProductId()); + if (!isset($this->product)) { + $this->product = $this->defineProduct(); + } + + return $this->product; } + /** + * Define product + * + * @return \XLite\Model\Product + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineProduct() + { + return \XLite\Core\Database::getRepo('XLite\Model\Product')->find($this->getProductId()); + } /** * Common method to determine current location diff --git a/src/classes/XLite/Core/Auth.php b/src/classes/XLite/Core/Auth.php index 38405a5b07..3d2b704d08 100644 --- a/src/classes/XLite/Core/Auth.php +++ b/src/classes/XLite/Core/Auth.php @@ -600,5 +600,21 @@ public function isPermissionAllowed($code) return $profile && $profile->isPermissionAllowed($code); } + /** + * Check - specified permission is allowed or not + * + * @param string|array $code Permission code(s) + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function isPermissionAllowedOr($code) + { + $profile = $this->getProfile(); + + return $profile && call_user_func_array(array($profile, __METHOD__), func_get_args()); + } + // }}} } diff --git a/src/classes/XLite/Core/DataSource/Ecwid.php b/src/classes/XLite/Core/DataSource/Ecwid.php index 711d102ec5..933d85ed74 100644 --- a/src/classes/XLite/Core/DataSource/Ecwid.php +++ b/src/classes/XLite/Core/DataSource/Ecwid.php @@ -38,7 +38,7 @@ class Ecwid extends ADataSource /** * How long can make a request to Ecwid API (seconds). */ - const RATE_LIMIT = 2.8; + const RATE_LIMIT = 0.36; /** * Temporary vaiable name @@ -153,10 +153,12 @@ public function getStoreId() */ public function callApi($apiMethod, $params = array()) { + $time = microtime(true); $lastTime = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getVar(static::TMP_VAR_NAME); - if ($lastTime && $lastTime + static::RATE_LIMIT > time()) { - sleep(ceil(($lastTime + static::RATE_LIMIT) - time())); + if ($lastTime && $lastTime + static::RATE_LIMIT > $time) { + $delay = ($lastTime + static::RATE_LIMIT) - $time; + usleep(round($delay * 1000000)); } $url = 'http://app.ecwid.com/api/v1/' @@ -166,12 +168,12 @@ public function callApi($apiMethod, $params = array()) $bouncer = new \XLite\Core\HTTP\Request($url); - $bouncer->requestTimeout = 5; + $bouncer->requestTimeout = 60; $response = $bouncer->sendRequest(); $result = null; - \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setVar(static::TMP_VAR_NAME, time()); + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setVar(static::TMP_VAR_NAME, microtime(true)); if (200 == $response->code) { $result = json_decode($response->body, true); diff --git a/src/classes/XLite/Core/DataSource/Ecwid/Products.php b/src/classes/XLite/Core/DataSource/Ecwid/Products.php index 72da445aef..58b4b49512 100644 --- a/src/classes/XLite/Core/DataSource/Ecwid/Products.php +++ b/src/classes/XLite/Core/DataSource/Ecwid/Products.php @@ -226,7 +226,7 @@ protected function normalizeProduct(array $data) 'name' => $data['name'], 'description' => empty($data['description']) ? '' : $data['description'], 'sku' => empty($data['sku']) ? '' : $data['sku'], - 'quantity' => empty($data['quantity']) ? 0 : intval($data['quantity']), + 'quantity' => empty($data['quantity']) ? \XLite\Model\Inventory::AMOUNT_DEFAULT_INV_TRACK : intval($data['quantity']), 'optionGroups' => array(), ); diff --git a/src/classes/XLite/Core/Doctrine/IfFunction.php b/src/classes/XLite/Core/Doctrine/IfFunction.php index 9e39c57c10..124c87d51d 100644 --- a/src/classes/XLite/Core/Doctrine/IfFunction.php +++ b/src/classes/XLite/Core/Doctrine/IfFunction.php @@ -52,10 +52,18 @@ public function parse(\Doctrine\ORM\Query\Parser $parser) $this->ifCondition = $parser->ConditionalExpression(); $parser->match(\Doctrine\ORM\Query\Lexer::T_COMMA); - $this->ifThen = $parser->ScalarExpression(); + try { + $this->ifThen = $parser->FunctionDeclaration(); + } catch (\Doctrine\ORM\Query\QueryException $e) { + $this->ifThen = $parser->ScalarExpression(); + } $parser->match(\Doctrine\ORM\Query\Lexer::T_COMMA); - $this->ifElse = $parser->ScalarExpression(); + try { + $this->ifElse = $parser->FunctionDeclaration(); + } catch (\Doctrine\ORM\Query\QueryException $e) { + $this->ifElse = $parser->ScalarExpression(); + } $parser->match(\Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS); } diff --git a/src/classes/XLite/Core/EventDriver/AEventDriver.php b/src/classes/XLite/Core/EventDriver/AEventDriver.php index 8af969fc79..4e3e5a46e7 100644 --- a/src/classes/XLite/Core/EventDriver/AEventDriver.php +++ b/src/classes/XLite/Core/EventDriver/AEventDriver.php @@ -81,4 +81,16 @@ public static function getCode() public function __construct() { } + + /** + * Current driver is blocking + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + public function isBlocking() + { + return false; + } } diff --git a/src/classes/XLite/Core/EventDriver/AMQP.php b/src/classes/XLite/Core/EventDriver/AMQP.php index 5c866acd21..90ab7070de 100644 --- a/src/classes/XLite/Core/EventDriver/AMQP.php +++ b/src/classes/XLite/Core/EventDriver/AMQP.php @@ -79,6 +79,18 @@ public static function getCode() return 'amqp'; } + /** + * Current driver is blocking + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + public function isBlocking() + { + return true; + } + /** * Fire event * diff --git a/src/classes/XLite/Core/EventListener/Base/Countable.php b/src/classes/XLite/Core/EventListener/Base/Countable.php new file mode 100644 index 0000000000..cf3048504a --- /dev/null +++ b/src/classes/XLite/Core/EventListener/Base/Countable.php @@ -0,0 +1,187 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.23 + */ + +namespace XLite\Core\EventListener\Base; + +/** + * Abstract countable task + * + * @see ____class_see____ + * @since 1.0.23 + */ +abstract class Countable extends \XLite\Core\EventListener\AEventListener +{ + /** + * Event record + * + * @var array + * @see ____var_see____ + * @since 1.0.23 + */ + protected $record; + + /** + * Get event name + * + * @return string + * @see ____func_see____ + * @since 1.0.23 + */ + abstract protected function getEventName(); + + /** + * Get length + * + * @return integer + * @see ____func_see____ + * @since 1.0.23 + */ + abstract protected function getLength(); + + /** + * Get items + * + * @return array + * @see ____func_see____ + * @since 1.0.23 + */ + abstract protected function getItems(); + + /** + * Process item + * + * @param mixed $item Item + * + * @return boolean + * @see ____func_see____ + * @since 1.0.23 + */ + abstract protected function processItem($item); + + /** + * Handle event (internal, after checking) + * + * @param string $name Event name + * @param array $arguments Event arguments OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function handleEvent($name, array $arguments) + { + $result = false; + + $this->initializeStep(); + + if ($this->isStepValid()) { + + $this->startStep(); + $repo = \XLite\Core\Database::getRepo('XLite\Model\TmpVar'); + foreach ($this->getItems() as $item) { + if ($this->processItem($item)) { + $this->record['position']++; + $repo->setEventState($this->getEventName(), $this->record); + } + } + + if ($this->record['length'] <= $this->record['position'] + 1) { + $this->finishTask(); + + } else { + $this->finishStep(); + } + + $result = true; + } + + return $result; + } + + /** + * Initialize step + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function initializeStep() + { + $this->record = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState($this->getEventName()); + } + + /** + * Check step valid state + * + * @return boolean + * @see ____func_see____ + * @since 1.0.23 + */ + protected function isStepValid() + { + return !empty($this->record) && 0 < $this->getLength(); + } + + /** + * Start step + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function startStep() + { + if (0 == $this->record['length']) { + $this->record['length'] = $this->getLength(); + } + } + + /** + * Finish step + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function finishStep() + { + $event = $this->getEventName(); + \XLite\Core\EventTask::$event(); + } + + /** + * Finish task + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function finishTask() + { + } +} + diff --git a/src/classes/XLite/Core/EventTask.php b/src/classes/XLite/Core/EventTask.php index dbdc2e64ba..3faf7c5943 100644 --- a/src/classes/XLite/Core/EventTask.php +++ b/src/classes/XLite/Core/EventTask.php @@ -74,7 +74,7 @@ public static function __callStatic($name, array $args = array()) * @see ____func_see____ * @since 1.0.19 */ - protected function getDriver() + public function getDriver() { if (!isset($this->driver)) { $driver = \XLite::GetInstance()->getOptions(array('other', 'event_driver')) ?: 'auto'; diff --git a/src/classes/XLite/Core/ImageOperator.php b/src/classes/XLite/Core/ImageOperator.php index 553e03f385..305ce66d51 100644 --- a/src/classes/XLite/Core/ImageOperator.php +++ b/src/classes/XLite/Core/ImageOperator.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -class ImageOperator extends \Xlite\Base\SuperClass +class ImageOperator extends \XLite\Base\SuperClass { /** * Engine diff --git a/src/classes/XLite/Logic/Math.php b/src/classes/XLite/Logic/Math.php index 6e736536b4..1ecd493100 100644 --- a/src/classes/XLite/Logic/Math.php +++ b/src/classes/XLite/Logic/Math.php @@ -84,13 +84,11 @@ public function roundByCurrency($value, \XLite\Model\Currency $currency) */ public function formatValue($value, \XLite\Model\Currency $currency) { - $config = \XLite\Core\Config::getInstance(); - return number_format( $this->roundByCurrency($value, $currency), - $config->General->decimal_delim ? $currency->getE() : 0, - $config->General->decimal_delim, - $config->General->thousand_delim + $currency->getE(), + $currency->getDecimalDelimiter(), + $currency->getThousandDelimiter() ); } @@ -123,8 +121,10 @@ public function formatParts($value, \XLite\Model\Currency $currency) $parts['integer'] = number_format(floor(abs($value)), 0, '', $currency->getThousandDelimiter()); - $parts['decimalDelimiter'] = $currency->getDecimalDelimiter(); - $parts['decimal'] = substr(strval(abs($value != 0 ? $value : 1) * pow(10, $currency->getE())), -1 * $currency->getE()); + if (0 < $currency->getE()) { + $parts['decimalDelimiter'] = $currency->getDecimalDelimiter(); + $parts['decimal'] = substr(strval(abs($value != 0 ? $value : 1) * pow(10, $currency->getE())), -1 * $currency->getE()); + } if ($currency->getSuffix()) { $parts['suffix'] = $currency->getSuffix(); diff --git a/src/classes/XLite/Model/AEntity.php b/src/classes/XLite/Model/AEntity.php index bfd648fe83..6585728932 100644 --- a/src/classes/XLite/Model/AEntity.php +++ b/src/classes/XLite/Model/AEntity.php @@ -137,6 +137,20 @@ public function __set($name, $value) return $this->{'set' . $this->getMethodName($name)}($value); } + /** + * Common isset + * + * @param string $name Property name + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function __isset($name) + { + return !is_null($this->__get($name)); + } + /** * Common unset * diff --git a/src/classes/XLite/Model/Collection.php b/src/classes/XLite/Model/Collection.php index 7d06c7e516..b5906fe306 100644 --- a/src/classes/XLite/Model/Collection.php +++ b/src/classes/XLite/Model/Collection.php @@ -93,13 +93,13 @@ public function findByKey($key) * Insert new node before a certain node * * @param string $key Node key to search - * @param \Xlite\Model\ListNode $node New node to insert + * @param \XLite\Model\ListNode $node New node to insert * * @return void * @see ____func_see____ * @since 1.0.0 */ - public function insertBefore($key, \Xlite\Model\ListNode $node) + public function insertBefore($key, \XLite\Model\ListNode $node) { $current = $this->findByKey($key); $prev = $current->getPrev(); @@ -120,13 +120,13 @@ public function insertBefore($key, \Xlite\Model\ListNode $node) * Insert new node after a certain node * * @param string $key Node key to search - * @param \Xlite\Model\ListNode $node New node to insert + * @param \XLite\Model\ListNode $node New node to insert * * @return void * @see ____func_see____ * @since 1.0.0 */ - public function insertAfter($key, \Xlite\Model\ListNode $node) + public function insertAfter($key, \XLite\Model\ListNode $node) { $current = $this->findByKey($key); $next = $current->getNext(); @@ -146,13 +146,13 @@ public function insertAfter($key, \Xlite\Model\ListNode $node) /** * Add new node to the end of list * - * @param \Xlite\Model\ListNode $node Node to add + * @param \XLite\Model\ListNode $node Node to add * * @return void * @see ____func_see____ * @since 1.0.0 */ - public function add(\Xlite\Model\ListNode $node) + public function add(\XLite\Model\ListNode $node) { if ($this->isInitialized()) { $this->insertAfter($this->tail->getKey(), $node); @@ -164,7 +164,7 @@ public function add(\Xlite\Model\ListNode $node) /** * Return first element of the list * - * @return \Xlite\Model\ListNode + * @return \XLite\Model\ListNode * @see ____func_see____ * @since 1.0.0 */ @@ -176,7 +176,7 @@ public function getHead() /** * Return last element of the list * - * @return \Xlite\Model\ListNode + * @return \XLite\Model\ListNode * @see ____func_see____ * @since 1.0.0 */ diff --git a/src/classes/XLite/Model/ListNode.php b/src/classes/XLite/Model/ListNode.php index e21d79cc82..9fbb72566c 100644 --- a/src/classes/XLite/Model/ListNode.php +++ b/src/classes/XLite/Model/ListNode.php @@ -104,13 +104,13 @@ public function getNext() /** * Set link to previous list element * - * @param \Xlite\Model\ListNode $node Node link to set OPTIONAL + * @param \XLite\Model\ListNode $node Node link to set OPTIONAL * * @return void * @see ____func_see____ * @since 1.0.0 */ - public function setPrev(\Xlite\Model\ListNode $node = null) + public function setPrev(\XLite\Model\ListNode $node = null) { $this->prev = $node; } @@ -118,13 +118,13 @@ public function setPrev(\Xlite\Model\ListNode $node = null) /** * Set link to next list element * - * @param \Xlite\Model\ListNode $node Node link to set OPTIONAL + * @param \XLite\Model\ListNode $node Node link to set OPTIONAL * * @return void * @see ____func_see____ * @since 1.0.0 */ - public function setNext(\Xlite\Model\ListNode $node = null) + public function setNext(\XLite\Model\ListNode $node = null) { $this->next = $node; } diff --git a/src/classes/XLite/Model/OrderItem.php b/src/classes/XLite/Model/OrderItem.php index f4e29b2be3..c5aa45600a 100644 --- a/src/classes/XLite/Model/OrderItem.php +++ b/src/classes/XLite/Model/OrderItem.php @@ -504,6 +504,9 @@ public function renew() $available = false; } else { + + // The product goes again, because it can be initialized specifically for the current order item. + $product = $this->getProduct(); $this->setPrice($product->getPrice()); $this->setName($product->getName()); $this->setSKU($product->getSKU()); diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index 49732b180d..fe7b04e687 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -346,15 +346,21 @@ public function getFreeShipping() */ public function isAvailable() { - $result = true; - - if (!\XLite::isAdminZone()) { - $result = $this->getEnabled() - && (!$this->getArrivalDate() || time() > $this->getArrivalDate()) - && !$this->getInventory()->isOutOfStock(); - } + return \XLite::isAdminZone() || $this->isPublicAvailable(); + } - return $result; + /** + * Check prodyct availability for public usage (customer interface) + * + * @return boolean + * @see ____func_see____ + * @since 1.0.23 + */ + public function isPublicAvailable() + { + return $this->getEnabled() + && (!$this->getArrivalDate() || time() > $this->getArrivalDate()) + && !$this->getInventory()->isOutOfStock(); } /** diff --git a/src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php b/src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php index f73b23bd8b..56fe645dd8 100644 --- a/src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php +++ b/src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php @@ -82,6 +82,8 @@ public function getObjectResult() foreach ($this->getResult() as $idx => $item) { $result[$idx] = is_object($item) ? $item : $item[0]; } + + return $result; } /** diff --git a/src/classes/XLite/Model/Repo/ARepo.php b/src/classes/XLite/Model/Repo/ARepo.php index 3fa5346770..2e420927a9 100644 --- a/src/classes/XLite/Model/Repo/ARepo.php +++ b/src/classes/XLite/Model/Repo/ARepo.php @@ -1792,4 +1792,27 @@ protected function getDetailedForeignKeys() { return array(); } + + /** + * Assign calculated field + * + * @param \XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder Query builder + * @param string $name Field name + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.22 + */ + protected function assignCalculatedField(\XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder, $name) + { + $uname = ucfirst($name); + $method = 'defineCalculated' . $uname . 'DQL'; + if (method_exists($this, $method) && !$queryBuilder->getFlag('calculated.' . $name)) { + $alias = $alias ?: $queryBuilder->getRootAlias(); + $queryBuilder->addSelect($this->$method($queryBuilder, $alias) . ' calculated' . $uname); + $queryBuilder->setFlag('calculated.' . $name, true); + } + + return $queryBuilder; + } } diff --git a/src/classes/XLite/Model/Repo/Base/I18n.php b/src/classes/XLite/Model/Repo/Base/I18n.php index 09471a37bc..c1347c2ad4 100644 --- a/src/classes/XLite/Model/Repo/Base/I18n.php +++ b/src/classes/XLite/Model/Repo/Base/I18n.php @@ -68,7 +68,9 @@ protected function addLanguageQuery(\Doctrine\ORM\QueryBuilder $queryBuilder, $a } if (!isset($code)) { - $code = \XLite\Core\Session::getInstance()->getLanguage()->getCode(); + $code = \XLite\Core\Session::getInstance()->getLanguage() + ? \XLite\Core\Session::getInstance()->getLanguage()->getCode() + : 'en'; } $queryBuilder diff --git a/src/classes/XLite/Model/Repo/Config.php b/src/classes/XLite/Model/Repo/Config.php index 94683fdce4..937f65b472 100644 --- a/src/classes/XLite/Model/Repo/Config.php +++ b/src/classes/XLite/Model/Repo/Config.php @@ -104,7 +104,7 @@ public function getByCategory($category, $force = false, $doNotProcess = false) } if (!isset($data)) { - $data = $this->defineByCategoryQuery($category)->getResult(); + $data = $this->findBy(array('category' => $category)); if (!$doNotProcess) { $data = $this->processOptions($data); $this->saveToCache($data, 'category', array('category' => $category)); @@ -395,22 +395,6 @@ protected function prepareOptionsAvailabilityCondition(\Doctrine\ORM\QueryBuilde : $qb; } - /** - * Define query builder for getByCategory() - * - * @param string $category Category name - * - * @return \Doctrine\ORM\QueryBuilder - * @see ____func_see____ - * @since 1.0.0 - */ - protected function defineByCategoryQuery($category) - { - return $this->createQueryBuilder() - ->andWhere('c.category = :category') - ->setParameter('category', $category); - } - /** * Define query for findByCategoryAndVisible() method * diff --git a/src/classes/XLite/Model/Repo/Product.php b/src/classes/XLite/Model/Repo/Product.php index 391d08d78b..db33dfc856 100644 --- a/src/classes/XLite/Model/Repo/Product.php +++ b/src/classes/XLite/Model/Repo/Product.php @@ -141,7 +141,7 @@ public function searchCount(\Doctrine\ORM\QueryBuilder $qb) */ public function searchResult(\Doctrine\ORM\QueryBuilder $qb) { - return $qb->getResult(); + return $qb->getOnlyEntities(); } /** @@ -538,13 +538,19 @@ protected function prepareCndPrice(\Doctrine\ORM\QueryBuilder $queryBuilder, $va */ protected function assignPriceRangeCondition(\Doctrine\ORM\QueryBuilder $queryBuilder, $min, $max) { + $field = 'p.price'; + if (!\XLite::isAdminZone() && (isset($min) || isset($max))) { + $this->assignCalculatedField($queryBuilder, 'price'); + $field = 'calculatedPrice'; + } + if (isset($min)) { - $queryBuilder->andWhere('p.price > :minPrice') + $queryBuilder->andWhere($field . ' > :minPrice') ->setParameter('minPrice', doubleval($min)); } if (isset($max)) { - $queryBuilder->andWhere('p.price < :maxPrice') + $queryBuilder->andWhere($field . ' < :maxPrice') ->setParameter('maxPrice', doubleval($max)); } } @@ -724,6 +730,10 @@ protected function prepareCndOrderBy(\Doctrine\ORM\QueryBuilder $queryBuilder, a // FIXME - add aliases for sort modes if ('i.amount' === $sort) { $queryBuilder->innerJoinInventory(); + + } elseif ('p.price' == $sort && !\XLite::isAdminZone()) { + $this->assignCalculatedField($queryBuilder, 'price'); + $sort = 'calculatedPrice'; } $queryBuilder->addOrderBy($sort, $order); @@ -804,6 +814,66 @@ protected function assignEnabledCondition(\Doctrine\ORM\QueryBuilder $queryBuild return $queryBuilder; } + /** + * Define calculated price definition DQL + * + * @param \XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder Query builder + * @param string $alias Main alias + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function defineCalculatedPriceDQL(\XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder, $alias) + { + return $alias . '.price'; + } + + /** + * Define calculated amount definition DQL + * + * @param \XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder Query builder + * @param string $alias Main alias + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function defineCalculatedAmountDQL(\XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder, $alias) + { + return 'i.amount'; + } + + /** + * Define calculated name definition DQL + * + * @param \XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder Query builder + * @param string $alias Main alias + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function defineCalculatedNameDQL(\XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder, $alias) + { + return 'translations.name'; + } + + /** + * Define calculated sku definition DQL + * + * @param \XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder Query builder + * @param string $alias Main alias + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function defineCalculatedSkuDQL(\XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder, $alias) + { + return $alias . '.sku'; + } + /** * Adds additional condition to the query for checking if product is up-to-date * diff --git a/src/classes/XLite/Model/Repo/TmpVar.php b/src/classes/XLite/Model/Repo/TmpVar.php index eb797aedbb..d2ecdbc146 100644 --- a/src/classes/XLite/Model/Repo/TmpVar.php +++ b/src/classes/XLite/Model/Repo/TmpVar.php @@ -35,6 +35,11 @@ */ class TmpVar extends \XLite\Model\Repo\ARepo { + /** + * Event task state prefix + */ + const EVENT_TASK_STATE_PREFIX = 'eventTaskState.'; + /** * Set variable * @@ -55,6 +60,10 @@ public function setVar($name, $value) \XLite\Core\Database::getEM()->persist($entity); } + if (!is_scalar($value)) { + $value = serialize($value); + } + $entity->setValue($value); \XLite\Core\Database::getEM()->flush(); @@ -73,7 +82,81 @@ public function getVar($name) { $entity = $this->findOneBy(array('name' => $name)); - return $entity ? $entity->getValue() : null; + $value = $entity ? $entity->getValue() : null; + + if (!empty($value)) { + $tmp = @unserialize($value); + if (false !== $tmp) { + $value = $tmp; + } + } + + return $value; } + + // {{{ Event tasks-based temporary variable operations + + /** + * Initialize event task state + * + * @param string $name Event task name + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + public function initializeEventState($name) + { + $this->setEventState($name, array('position' => 0, 'length' => 0)); + } + + /** + * Get event task state + * + * @param string $name Event task name + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + public function getEventState($name) + { + return $this->getVar(static::EVENT_TASK_STATE_PREFIX . $name); + } + + /** + * Set event state + * + * @param string $name Event task name + * @param array $rec Event task state + * + * @return void + * @see ____func_see____ + * @since 1.0.22 + */ + public function setEventState($name, array $rec) + { + $this->setVar(static::EVENT_TASK_STATE_PREFIX . $name, $rec); + } + + /** + * Set event state + * + * @param string $name Event task name + * + * @return void + * @see ____func_see____ + * @since 1.0.22 + */ + public function removeEventState($name) + { + $var = $this->findOneBy(array('name' => static::EVENT_TASK_STATE_PREFIX . $name)); + if ($var) { + \XLite\Core\Database::getEM()->remove($var); + \XLite\Core\Database::getEM()->flush(); + } + } + + // }}} } diff --git a/src/classes/XLite/Model/Role.php b/src/classes/XLite/Model/Role.php index 38073a165a..104db0aadd 100644 --- a/src/classes/XLite/Model/Role.php +++ b/src/classes/XLite/Model/Role.php @@ -130,4 +130,37 @@ public function isPermissionAllowed($code) return $allowed; } + /** + * Check - specified permission (only one from list) is allowed + * + * @param string|array $code Permission code(s) + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function isPermissionAllowedOr($code) + { + $result = false; + + $list = array(); + foreach (func_get_args() as $code) { + if (is_array($code)) { + $list = array_merge($list, $code); + + } else { + $list[] = $code; + } + } + + foreach ($list as $code) { + if ($this->isPermissionAllowed($code)) { + $result = true; + break; + } + } + + return $result; + } + } diff --git a/src/classes/XLite/Module/CDev/AuthorizeNet/Main.php b/src/classes/XLite/Module/CDev/AuthorizeNet/Main.php index 21774b40bb..9ab602c033 100644 --- a/src/classes/XLite/Module/CDev/AuthorizeNet/Main.php +++ b/src/classes/XLite/Module/CDev/AuthorizeNet/Main.php @@ -80,6 +80,7 @@ public static function getMinorVersion() */ public static function getDescription() { - return 'Enables taking credit card payments for your online store via AuthorizeNet payment gateway (Server Integration Method).'; + return 'Enables taking credit card payments for your online store' + . ' via AuthorizeNet payment gateway (Server Integration Method).'; } } diff --git a/src/classes/XLite/Module/CDev/Bestsellers/Model/Repo/Product.php b/src/classes/XLite/Module/CDev/Bestsellers/Model/Repo/Product.php index ee4065813e..455b42d8f0 100644 --- a/src/classes/XLite/Module/CDev/Bestsellers/Model/Repo/Product.php +++ b/src/classes/XLite/Module/CDev/Bestsellers/Model/Repo/Product.php @@ -50,9 +50,7 @@ public function findBestsellers(\XLite\Core\CommonCell $cnd, $count = 0, $cat = { list($sort, $order) = $cnd->{self::P_ORDER_BY}; - return $this->getObjectOnlyResult( - $this->defineBestsellersQuery($cnd, $count, $cat) - ); + return $this->defineBestsellersQuery($cnd, $count, $cat)->getOnlyEntities(); } /** @@ -71,8 +69,8 @@ protected function defineBestsellersQuery(\XLite\Core\CommonCell $cnd, $count, $ list($sort, $order) = $cnd->{self::P_ORDER_BY}; $qb = $this->createQueryBuilder() - ->innerJoin('p.order_items', 'o') - ->innerJoin('o.order', 'ord') + ->linkInner('p.order_items', 'o') + ->linkInner('o.order', 'ord') ->addSelect('sum(o.amount) as product_amount') ->andWhere('ord.status IN (:complete_status, :processed_status)') ->groupBy('o.object') @@ -86,41 +84,12 @@ protected function defineBestsellersQuery(\XLite\Core\CommonCell $cnd, $count, $ } if (0 < $cat) { - $qb->leftJoin('p.categoryProducts', 'cp') - ->leftJoin('cp.category', 'c'); + $qb->linkLeft('p.categoryProducts', 'cp') + ->linkLeft('cp.category', 'c'); \XLite\Core\Database::getRepo('XLite\Model\Category')->addSubTreeCondition($qb, $cat); } return $qb; } - /** - * Returns query result with the object collection only - * - * @param \Doctrine\ORM\QueryBuilder $qb Query builder object - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getObjectOnlyResult($qb) - { - $result = array(); - - foreach ($qb->getResult() as $row) { - - if (is_array($row)) { - - $object = $row[0]; - - unset($row[0]); - - } - - $result[] = $object; - - } - - return $result; - } } diff --git a/src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php b/src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php index 8c2279514b..31835fa03e 100644 --- a/src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php +++ b/src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php @@ -65,23 +65,6 @@ class Bestsellers extends \XLite\View\ItemsList\Product\Customer\ACustomer protected $bestsellProducts = null; - /** - * Define and set widget attributes; initialize widget - * - * @param array $params Widget params OPTIONAL - * - * @return void - * @see ____func_see____ - * @since 1.0.1 - */ - public function __construct(array $params = array()) - { - parent::__construct($params); - - unset($this->sortByModes[self::SORT_BY_MODE_AMOUNT_ASC]); - unset($this->sortByModes[self::SORT_BY_MODE_AMOUNT_DESC]); - } - /** * Return list of targets allowed for this widget * @@ -99,6 +82,23 @@ public static function getAllowedTargets() return $result; } + /** + * Define and set widget attributes; initialize widget + * + * @param array $params Widget params OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.1 + */ + public function __construct(array $params = array()) + { + parent::__construct($params); + + unset($this->sortByModes[self::SORT_BY_MODE_AMOUNT_ASC]); + unset($this->sortByModes[self::SORT_BY_MODE_AMOUNT_DESC]); + } + /** * Initialize widget (set attributes) * diff --git a/src/classes/XLite/Module/CDev/DeTranslation/Main.php b/src/classes/XLite/Module/CDev/DeTranslation/Main.php index 52f4e5a107..3f46385af4 100644 --- a/src/classes/XLite/Module/CDev/DeTranslation/Main.php +++ b/src/classes/XLite/Module/CDev/DeTranslation/Main.php @@ -18,11 +18,11 @@ * * @category LiteCommerce * @author Creative Development LLC - * @copyright Copyright (c) 2012 Creative Development LLC . All rights reserved + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ * @see ____file_see____ - * @since 1.0.19 + * @since 1.0.23 */ namespace XLite\Module\CDev\DeTranslation; diff --git a/src/classes/XLite/Module/CDev/Demo/Controller/Admin/AAdmin.php b/src/classes/XLite/Module/CDev/Demo/Controller/Admin/AAdmin.php index 89a8a18426..b25311226a 100644 --- a/src/classes/XLite/Module/CDev/Demo/Controller/Admin/AAdmin.php +++ b/src/classes/XLite/Module/CDev/Demo/Controller/Admin/AAdmin.php @@ -119,11 +119,13 @@ protected function getForbidInDemoModeRedirectURL() */ protected function forbidInDemoMode() { - if ($message = $this->getForbidInDemoModeMessage()) { + $message = $this->getForbidInDemoModeMessage(); + if ($message) { \XLite\Core\TopMessage::addWarning($message); } - if ($url = $this->getForbidInDemoModeRedirectURL()) { + $url = $this->getForbidInDemoModeRedirectURL(); + if ($url) { \Includes\Utils\Operator::redirect($url); } } @@ -137,7 +139,9 @@ protected function forbidInDemoMode() */ protected function checkForDemoController() { - return in_array($class = \Includes\Utils\Converter::trimLeadingChars(get_class($this), '\\'), $this->demoControllers) + $class = \Includes\Utils\Converter::trimLeadingChars(get_class($this), '\\'); + + return in_array($class, $this->demoControllers) ? !$this->isDemoActionPermitted($class) : $this->isDemoActionForbidden($class); } diff --git a/src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php b/src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php index 61c9f8dd04..7c2c77cbfc 100644 --- a/src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php +++ b/src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php @@ -56,16 +56,24 @@ protected function checkForDemoController() */ protected function getForbidInDemoModeRedirectURL() { - return 'delete' == \XLite\Core\Request::getInstance()->action - ? \XLite\Core\Converter::buildURL('users', '', array('mode' => 'search')) - : ( - $this->getProfile()->getProfileId() - ? \XLite\Core\Converter::buildURL( - 'profile', - '', - array('profile_id' => $this->getProfile()->getProfileId()) - ) - : \XLite\Core\Converter::buildURL('profile', '', array('mode' => 'register')) + if ('delete' == \XLite\Core\Request::getInstance()->action) { + + // Redirect for delete action + $url = \XLite\Core\Converter::buildURL('users', '', array('mode' => 'search')); + + } elseif ($this->getProfile()->getProfileId()) { + + // Redirect if profile found + $url = \XLite\Core\Converter::buildURL( + 'profile', + '', + array('profile_id' => $this->getProfile()->getProfileId()) ); + + } else { + $url = \XLite\Core\Converter::buildURL('profile', '', array('mode' => 'register')); + } + + return $url; } } diff --git a/src/classes/XLite/Module/CDev/Demo/View/Demo.php b/src/classes/XLite/Module/CDev/Demo/View/Demo.php index c72f6caafd..9f224deff6 100644 --- a/src/classes/XLite/Module/CDev/Demo/View/Demo.php +++ b/src/classes/XLite/Module/CDev/Demo/View/Demo.php @@ -47,7 +47,7 @@ class Demo extends \XLite\View\AView */ public static function getAdditionalHeader() { - return <<<'HTML' + return << This LiteCommerce Admin zone demo has been created for illustrative purposes only. No changes made in the demo will be reflected in the Customer zone @@ -88,11 +88,27 @@ public static function getAdditionalHeader() HTML; } + /** + * Display + * + * @param string $template Tempalte OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ public function display($template = null) { - echo(static::getAdditionalHeader()); + echo (static::getAdditionalHeader()); } + /** + * Get default template + * + * @return string + * @see ____func_see____ + * @since 1.0.23 + */ protected function getDefaultTemplate() { return null; diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/OrderList.php b/src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/OrderList.php index 125383d1c2..e01b2811ee 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/OrderList.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/OrderList.php @@ -69,7 +69,9 @@ public static function getPortalLCArgs($path, array $args = array(), array $page */ public static function getPortalDrupalArgs($path, array $args = array()) { - $id = empty($args['profile_id']) ? \XLite\Core\Auth::getInstance()->getProfile()->getProfileId() : $args['profile_id']; + $id = empty($args['profile_id']) + ? \XLite\Core\Auth::getInstance()->getProfile()->getProfileId() + : $args['profile_id']; unset($args['profile_id']); diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php index 261eea481f..e16150e04e 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php @@ -227,7 +227,10 @@ protected function addSettingsFieldset(array &$form, $class, $label, array $bloc '#attributes' => array('id' => $key), ); - $extendedItemsList = is_subclass_of($widget->getProtectedWidget(), 'XLite\View\ItemsList\Product\Customer\ACustomer'); + $extendedItemsList = is_subclass_of( + $widget->getProtectedWidget(), + 'XLite\View\ItemsList\Product\Customer\ACustomer' + ); // Translate native LC options into Drupal format foreach ($settings as $name => $param) { @@ -238,22 +241,15 @@ protected function addSettingsFieldset(array &$form, $class, $label, array $bloc '#default_value' => isset($block['options'][$name]) ? $block['options'][$name] : $param->value, ); + $extendedAttributes = array( + \XLite\View\ItemsList\Product\Customer\ACustomer::PARAM_ICON_MAX_WIDTH, + \XLite\View\ItemsList\Product\Customer\ACustomer::PARAM_ICON_MAX_HEIGHT, + ); if ('select' === $form[$key][$name]['#type']) { $form[$key][$name]['#options'] = $param->options; - } else { - if ( - $extendedItemsList - && in_array( - $name, - array( - \XLite\View\ItemsList\Product\Customer\ACustomer::PARAM_ICON_MAX_WIDTH, - \XLite\View\ItemsList\Product\Customer\ACustomer::PARAM_ICON_MAX_HEIGHT - ) - ) - ) { - $form[$key][$name]['#description'] = t('recommended: !size', array('!size' => 110)); - } + } elseif ($extendedItemsList && in_array($name, $extendedAttributes)) { + $form[$key][$name]['#description'] = t('recommended: !size', array('!size' => 110)); } } @@ -621,7 +617,7 @@ public function submitUserPermissionsForm(array &$form, array &$formState) /** * Change block definition before saving to the database * - * @param array $blocks A multidimensional array of blocks keyed by the defining module and delta + * @param array &$blocks A multidimensional array of blocks keyed by the defining module and delta * @param string $theme The theme these blocks belong to * @param array $codeBlocks The blocks as defined in hook_block_info() * diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Block.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Block.php index 8cf951dfb3..49e8c16451 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Block.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Block.php @@ -48,13 +48,15 @@ class Block extends \XLite\Module\CDev\DrupalConnector\Drupal\ADrupal public function setBlockContent(array &$data, \stdClass $block) { // Check if current block is an LC one + $blockInfo = \XLite\Module\CDev\DrupalConnector\Drupal\Model::getInstance()->getBlock($block->delta); if ( 'block' == $block->module - && $blockInfo = \XLite\Module\CDev\DrupalConnector\Drupal\Model::getInstance()->getBlock($block->delta) + && $blockInfo ) { // Trying to get widget from LC - if ($widget = $this->getHandler()->getWidget($blockInfo['lc_class'], $blockInfo['options'])) { + $widget = $this->getHandler()->getWidget($blockInfo['lc_class'], $blockInfo['options']); + if ($widget) { // Check if widget is visible and its content is not empty $data['content'] = ($widget->checkVisibility() && ($content = $widget->getContent())) ? $content : null; @@ -67,8 +69,8 @@ public function setBlockContent(array &$data, \stdClass $block) /** * Preprocess theme variables for a specific theme block * - * @param array &$variables Data to modify - * @param string $class LC widget class + * @param array &$data Data to modify + * @param string $class LC widget class * * @return void * @see ____func_see____ diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php index 6612796bb6..04d3192dab 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php @@ -139,6 +139,7 @@ public function updateMetaTags(array &$elements) if (!defined('MAINTENANCE_MODE')) { foreach (array('description' => 'getMetaDescription', 'keywords' => 'getKeywords') as $name => $method) { + // $method stored into static array $content = $this->getViewer()->$method(); if ($content) { @@ -372,6 +373,7 @@ protected function registerLCResources() if (function_exists($method)) { foreach ($files as $name => $data) { + // $method assembled from 'drupal_add_' + $type $method($data['file'], $this->getResourceInfo($type, $data)); } } diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php index eed3da69c1..1d90920107 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php @@ -292,9 +292,12 @@ public function optimizeJSFiles(array $list) if (preg_match('/(jquery([^\/]+))$/isSU', $key, $match)) { - // Depending on Drupal's module 'jQuery update' status on the list will be available or jquery.js or jquery.min.js + // Depending on Drupal's module 'jQuery update' status on the list + // will be available or jquery.js or jquery.min.js if (preg_match('/^jquery\.js$/', $match[1])) { - $uniqueScripts['jquery.min.js'] = isset($uniqueScripts['jquery.min.js']) ? $uniqueScripts['jquery.min.js'] + 1 : 1; + $uniqueScripts['jquery.min.js'] = isset($uniqueScripts['jquery.min.js']) + ? $uniqueScripts['jquery.min.js'] + 1 + : 1; } $uniqueScripts[$match[1]] = isset($uniqueScripts[$match[1]]) ? $uniqueScripts[$match[1]] + 1 : 1; diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php index 1aa59a4122..e5c46adcba 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php @@ -195,7 +195,7 @@ public function processUserSyncFormSubmit(array &$form, array &$formState) /** * Perform a single step of user synchronization batch process * - * @param array $context Batch process context data + * @param array &$context Batch process context data * * @return void * @see ____func_see____ diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/View/PoweredBy.php b/src/classes/XLite/Module/CDev/DrupalConnector/View/PoweredBy.php index fbbf670ae1..702f93d0f2 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/View/PoweredBy.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/View/PoweredBy.php @@ -87,7 +87,8 @@ public function isLink() public function getMessage() { if ($this->isLink()) { - $phrase = 'Powered by
LiteCommerce 3 integrated with Drupal'; + $phrase = 'Powered by LiteCommerce 3' + . ' integrated with Drupal'; } else { $phrase = 'Powered by LiteCommerce 3 integrated with Drupal'; diff --git a/src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php b/src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php index d9b6cfdd70..0d776c87d8 100644 --- a/src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php +++ b/src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php @@ -42,7 +42,7 @@ class Categories extends \XLite\Controller\Admin\Categories implements \XLite\Ba * @see ____var_see____ * @since 1.0.0 */ - public $params = array('category_id'); + protected $params = array('category_id'); /** diff --git a/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php b/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php index dd28f6d8a7..7f4e7fa8e4 100644 --- a/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php +++ b/src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php @@ -110,9 +110,9 @@ protected function doActionUpdateAttachments() $data = \XLite\Core\Request::getInstance()->data; if ($data && is_array($data)) { + $repository = \XLite\Core\Database::getRepo('XLite\Module\CDev\FileAttachments\Model\Product\Attachment'); foreach ($data as $id => $row) { - $attachment = \XLite\Core\Database::getRepo('XLite\Module\CDev\FileAttachments\Model\Product\Attachment') - ->find($id); + $attachment = $repository->find($id); if ($attachment) { $attachment->map($row); diff --git a/src/classes/XLite/Module/CDev/FileAttachments/Main.php b/src/classes/XLite/Module/CDev/FileAttachments/Main.php index a5cfb0cbc2..df57472e1a 100644 --- a/src/classes/XLite/Module/CDev/FileAttachments/Main.php +++ b/src/classes/XLite/Module/CDev/FileAttachments/Main.php @@ -80,6 +80,7 @@ public static function getModuleName() */ public static function getDescription() { - return 'Allows you to attach files to goods that can be downloaded from the detailed pages of this product by visitors.'; + return 'Allows you to attach files to goods that can be downloaded' + . ' from the detailed pages of this product by visitors.'; } } diff --git a/src/classes/XLite/Module/CDev/FileAttachments/View/Form/Attachments.php b/src/classes/XLite/Module/CDev/FileAttachments/View/Form/Attachments.php index 444d7cd449..0a8b49a82a 100644 --- a/src/classes/XLite/Module/CDev/FileAttachments/View/Form/Attachments.php +++ b/src/classes/XLite/Module/CDev/FileAttachments/View/Form/Attachments.php @@ -27,6 +27,12 @@ namespace XLite\Module\CDev\FileAttachments\View\Form; +/** + * Attachments form + * + * @see ____class_see____ + * @since 1.0.23 + */ class Attachments extends \XLite\View\Form\Product\Modify\Base\Single { /** diff --git a/src/classes/XLite/Module/CDev/FileAttachments/View/Product/Customer.php b/src/classes/XLite/Module/CDev/FileAttachments/View/Product/Customer.php index a96352788f..81d087ff12 100644 --- a/src/classes/XLite/Module/CDev/FileAttachments/View/Product/Customer.php +++ b/src/classes/XLite/Module/CDev/FileAttachments/View/Product/Customer.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.10 * - * @ListCHild (list="product.details.page.tab.description", weight="50") + * @ListChild (list="product.details.page.tab.description", weight="50") */ class Customer extends \XLite\View\AView { diff --git a/src/classes/XLite/Module/CDev/FrTranslation/Main.php b/src/classes/XLite/Module/CDev/FrTranslation/Main.php index 3d52f0bec1..508a8466a1 100644 --- a/src/classes/XLite/Module/CDev/FrTranslation/Main.php +++ b/src/classes/XLite/Module/CDev/FrTranslation/Main.php @@ -18,11 +18,11 @@ * * @category LiteCommerce * @author Creative Development LLC - * @copyright Copyright (c) 2012 Creative Development LLC . All rights reserved + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ * @see ____file_see____ - * @since 1.0.19 + * @since 1.0.23 */ namespace XLite\Module\CDev\FrTranslation; diff --git a/src/classes/XLite/Module/CDev/GoSocial/Main.php b/src/classes/XLite/Module/CDev/GoSocial/Main.php index 6c455a8603..94bebf2b86 100644 --- a/src/classes/XLite/Module/CDev/GoSocial/Main.php +++ b/src/classes/XLite/Module/CDev/GoSocial/Main.php @@ -80,7 +80,8 @@ public static function getModuleName() */ public static function getDescription() { - return 'Adds social media sharing functions like Facebook comments, OpenGraph meta tags and share buttons for product pages.'; + return 'Adds social media sharing functions like Facebook comments,' + . ' OpenGraph meta tags and share buttons for product pages.'; } /** diff --git a/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php b/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php index f23f82e846..7bf1d1b066 100644 --- a/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php +++ b/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php @@ -27,6 +27,12 @@ namespace XLite\Module\CDev\GoSocial\View\FormField\Select; +/** + * Use Custom Open Graph selector + * + * @see ____class_see____ + * @since 1.0.23 + */ class UseCustomOpenGraph extends \XLite\View\FormField\Select\ASelect { /** diff --git a/src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php b/src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php index 396f912861..6c3b3bd418 100644 --- a/src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php +++ b/src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php @@ -61,10 +61,11 @@ protected function doActionCheckEmail() $sword = \XLite\Module\CDev\Moneybookers\Model\Payment\Processor\Moneybookers::getPlatformSecretWord(); $sword = md5($sword); + $platformId = \XLite\Module\CDev\Moneybookers\Model\Payment\Processor\Moneybookers::getPlatformCustomerID(); $request = new \XLite\Core\HTTP\Request( 'https://www.moneybookers.com/app/email_check.pl' . '?email=' . urlencode($email) - . '&cust_id=' . \XLite\Module\CDev\Moneybookers\Model\Payment\Processor\Moneybookers::getPlatformCustomerID() + . '&cust_id=' . $platformId . '&password=' . $sword ); $response = $request->sendRequest(); @@ -98,7 +99,12 @@ protected function doActionCheckEmail() \XLite\Core\TopMessage::getInstance()->add('E-mail address is valid'); } else { - \XLite\Core\TopMessage::getInstance()->add('E-mail address is not valid', array(), null, \XLite\Core\TopMessage::ERROR); + \XLite\Core\TopMessage::getInstance()->add( + 'E-mail address is not valid', + array(), + null, + \XLite\Core\TopMessage::ERROR + ); } } @@ -125,7 +131,10 @@ protected function doActionActivate() && \XLite\Core\Config::getInstance()->CDev->Moneybookers->id ) { \XLite\Core\Mailer::sendMoneybookersActivation(); - \XLite\Core\TopMessage::getInstance()->add('You have sent a request for activation on the X.', array('date' => date('m.d.Y'))); + \XLite\Core\TopMessage::getInstance()->add( + 'You have sent a request for activation on the X.', + array('date' => date('m.d.Y')) + ); } } @@ -144,11 +153,12 @@ protected function doActionValidateSecretWord() . md5(\XLite\Module\CDev\Moneybookers\Model\Payment\Processor\Moneybookers::getPlatformSecretWord()) ); + $platformId = \XLite\Module\CDev\Moneybookers\Model\Payment\Processor\Moneybookers::getPlatformCustomerID(); $request = new \XLite\Core\HTTP\Request( 'https://www.moneybookers.com/app/secret_word_check.pl' . '?secret=' . $secret . '&email=' . urlencode(\XLite\Core\Config::getInstance()->CDev->Moneybookers->email) - . '&cust_id=' . \XLite\Module\CDev\Moneybookers\Model\Payment\Processor\Moneybookers::getPlatformCustomerID() + . '&cust_id=' . $platformId ); $response = $request->sendRequest(); @@ -166,7 +176,8 @@ protected function doActionValidateSecretWord() } elseif ('VELOCITY_CHECK_EXCEEDED' == $response->body) { \XLite\Core\TopMessage::getInstance()->add( - 'Maximum number of checks for a particular user has been reached (currently set to 3 per user per hour)', + 'Maximum number of checks for a particular user has been reached' + . ' (currently set to 3 per user per hour)', array(), null, \XLite\Core\TopMessage::ERROR @@ -182,7 +193,12 @@ protected function doActionValidateSecretWord() ); } else { - \XLite\Core\TopMessage::getInstance()->add('Secret word is not valid', array(), null, \XLite\Core\TopMessage::ERROR); + \XLite\Core\TopMessage::getInstance()->add( + 'Secret word is not valid', + array(), + null, + \XLite\Core\TopMessage::ERROR + ); } } diff --git a/src/classes/XLite/Module/CDev/Moneybookers/Main.php b/src/classes/XLite/Module/CDev/Moneybookers/Main.php index ee8684b85d..e14247876d 100644 --- a/src/classes/XLite/Module/CDev/Moneybookers/Main.php +++ b/src/classes/XLite/Module/CDev/Moneybookers/Main.php @@ -3,9 +3,9 @@ /** * LiteCommerce - * + * * NOTICE OF LICENSE - * + * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: @@ -13,16 +13,16 @@ * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to licensing@litecommerce.com so we can send you a copy immediately. - * - * @category LiteCommerce - * @package XLite - * @subpackage Model - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @see ____file_see____ - * @since 1.0.0 + * + * PHP version 5.3.0 + * + * @category LiteCommerce + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.23 */ namespace XLite\Module\CDev\Moneybookers; @@ -30,17 +30,15 @@ /** * Moneybookers payment gateway integration (iframe) * - * @package XLite - * @see ____class_see____ - * @since 1.0.0 + * @see ____class_see____ + * @since 1.0.0 */ abstract class Main extends \XLite\Module\AModule { /** * Author name * - * @var string - * @access public + * @return string * @see ____func_see____ * @since 1.0.0 */ @@ -52,8 +50,7 @@ public static function getAuthorName() /** * Module name * - * @var string - * @access public + * @return string * @see ____func_see____ * @since 1.0.0 */ @@ -66,7 +63,7 @@ public static function getModuleName() * Module version * * @return string - * @access public + * @see ____func_see____ * @since 1.0.0 */ public static function getMinorVersion() @@ -75,15 +72,16 @@ public static function getMinorVersion() } /** - * Module description - * + * Fet description + * * @return string - * @access public - * @since 1.0.0 + * @see ____func_see____ + * @since 1.0.23 */ public static function getDescription() { - return 'Enables taking payments for your online shop via Moneybookers payment gateway (iframe integration method)'; + return 'Enables taking payments for your online shop via Moneybookers payment gateway' + . ' (iframe integration method)'; } /** @@ -100,9 +98,9 @@ public static function getSettingsForm() /** * Determines if we need to show settings form link - * - * @return boolean - * @access public + * + * @return mixed + * @see ____func_see____ * @since 1.0.0 */ public static function showSettingsForm() diff --git a/src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php b/src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php index a5d10a6c18..e6c3dfcff9 100644 --- a/src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php +++ b/src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php @@ -3,9 +3,9 @@ /** * LiteCommerce - * + * * NOTICE OF LICENSE - * + * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: @@ -13,26 +13,25 @@ * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to licensing@litecommerce.com so we can send you a copy immediately. - * - * @category LiteCommerce - * @package XLite - * @subpackage Model - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @see ____file_see____ - * @since 1.0.0 + * + * PHP version 5.3.0 + * + * @category LiteCommerce + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.23 */ namespace XLite\Module\CDev\Moneybookers\Model\Payment\Processor; /** * Moneybookers payment processor - * - * @package XLite - * @see ____class_see____ - * @since 1.0.0 + * + * @see ____class_see____ + * @since 1.0.23 */ class Moneybookers extends \XLite\Model\Payment\Base\Iframe { @@ -328,10 +327,42 @@ static public function getPlatformCustomerID() return 22784076; } + /** + * Check - payment method is configured or not + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isConfigured(\XLite\Model\Payment\Method $method) + { + return parent::isConfigured($method) + && \XLite\Core\Config::getInstance()->CDev->Moneybookers->email; + } + + /** + * Check - payment processor is applicable for specified order or not + * + * @param \XLite\Model\Order $order Order + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isApplicable(\XLite\Model\Order $order, \XLite\Model\Payment\Method $method) + { + return parent::isApplicable($order, $method) + && $this->isPaymentTypeAllowed($this->convertServiceNameToType($method->getServiceName()), $order) + && in_array(strtoupper($order->getCurrency()->getCode()), $this->allowedCurrencies); + } + /** * Payment method has settings into Module settings section * - * @return boolan + * @return boolean * @see ____func_see____ * @since 1.0.0 */ @@ -356,7 +387,7 @@ public function getIconPath(\XLite\Model\Order $order, \XLite\Model\Payment\Meth $icon = isset($this->paymentTypeIcons[$type]) ? $this->paymentTypeIcons[$type] : null; if (is_array($icon)) { - $code3 = $order->getProfile() && $order->getProfile()->getBillingAddress() + $code3 = ($order->getProfile() && $order->getProfile()->getBillingAddress()) ? $order->getProfile()->getBillingAddress()->getCountry()->getCode3() : null; $icon = $code3 && isset($icon[$code3]) ? $icon[$code3] : null; @@ -379,131 +410,12 @@ public function getCheckoutTemplate(\XLite\Model\Payment\Method $method) return 'modules/CDev/Moneybookers/method.tpl'; } - /** - * Get iframe size - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getIframeSize() - { - return array(600, 550); - } - - /** - * Get iframe data - * - * @return string|array URL or POST data - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getIframeData() - { - $id = $this->getSessionId(); - - return $id ? $this->getPostURL() . '?sid=' . $id : null; - } - - /** - * Get Moneybookers session id - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getSessionId() - { - $data = array( - 'pay_to_email' => \XLite\Core\Config::getInstance()->CDev->Moneybookers->email, - 'language' => $this->getLanguageCode(), - 'recipient_description' => substr(\XLite\Core\Config::getInstance()->Company->company_name, 0, 30), - 'transaction_id' => \XLite\Core\Config::getInstance()->CDev->Moneybookers->prefix . $this->transaction->getTransactionId(), - 'pay_from_email' => $this->getProfile()->getLogin(), - 'firstname' => $this->getProfile()->getBillingAddress()->getFirstname(), - 'lastname' => $this->getProfile()->getBillingAddress()->getLastname(), - 'address' => $this->getProfile()->getBillingAddress()->getStreet(), - 'postal_code' => $this->getProfile()->getBillingAddress()->getZipcode(), - 'city' => $this->getProfile()->getBillingAddress()->getCity(), - 'country' => $this->getCountryCode(), - 'amount' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), - 'currency' => $this->getCurrencyCode(), - 'status_url' => $this->getCallbackURL(null, true), - 'return_url' => $this->getReturnURL(null, true), - 'cancel_url' => $this->getReturnURL(null, true, true), - 'hide_login' => 1, - 'prepare_only' => 1, - 'payment_methods' => $this->convertServiceNameToType($this->transaction->getPaymentMethod()->getServiceName()), - 'merchant_fields' => 'platform', - 'platform' => '21889079', - ); - - if (\XLite\Core\Config::getInstance()->CDev->Moneybookers->logo_url) { - $data['logo_url'] = \XLite\Core\Config::getInstance()->CDev->Moneybookers->logo_url; - } - - $this->transaction->setPublicId($data['transaction_id']); - - $request = new \XLite\Core\HTTP\Request($this->getPostURL()); - $request->body = $data; - $response = $request->sendRequest(); - - $id = null; - if ( - 200 == $response->code - && preg_match('/SESSION_ID=([a-z0-9]+)/iSs', $response->headers->SetCookie, $match) - && $response->body == $match[1] - ) { - $id = $match[1]; - - } elseif (200 != $response->code) { - $this->setDetail( - 'moneybookers_session_error', - 'Moneybookers payment processor did not receive session ID successfull (HTTP error: ' . $response->code . ').', - 'Session initialization error' - ); - - } elseif (preg_match('/SESSION_ID=([a-z0-9]+)/iSs', $response->headers->SetCookie, $match)) { - - $this->setDetail( - 'moneybookers_session_error', - 'Moneybookers payment processor did not receive session ID successfull (page body has not session ID).', - 'Session initialization error' - ); - - } else { - $this->setDetail( - 'moneybookers_session_error', - 'Moneybookers payment processor did not receive session ID successfull.', - 'Session initialization error' - ); - } - - if ( - !$id - && preg_match('/]*>(.+)<\/h1>/USs', $response->body, $m1) - && preg_match('/
(.+)<\/div>/USs', $response->body, $m2) - ) { - $m1 = trim($m1[1]); - $m2 = trim(strip_tags($m2[1])); - - $this->setDetail( - 'moneybookers_session_error', - $m1 . ': ' . $m2, - 'Session initialization error' - ); - } - - return $id; - } - /** * Process return * * @param \XLite\Model\Payment\Transaction $transaction Return-owner transaction * * @return void - * @access public * @see ____func_see____ * @since 1.0.0 */ @@ -624,36 +536,122 @@ public function processCallback(\XLite\Model\Payment\Transaction $transaction) } /** - * Check - payment method is configured or not - * - * @param \XLite\Model\Payment\Method $method Payment method + * Get iframe size * - * @return boolean - * @access public + * @return array * @see ____func_see____ * @since 1.0.0 */ - public function isConfigured(\XLite\Model\Payment\Method $method) + protected function getIframeSize() { - return parent::isConfigured($method) - && \XLite\Core\Config::getInstance()->CDev->Moneybookers->email; + return array(600, 550); } /** - * Check - payment processor is applicable for specified order or not + * Get iframe data * - * @param \XLite\Model\Order $order Order - * @param \XLite\Model\Payment\Method $method Payment method + * @return string|array URL or POST data + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getIframeData() + { + $id = $this->getSessionId(); + + return $id ? $this->getPostURL() . '?sid=' . $id : null; + } + + /** + * Get Moneybookers session id * - * @return boolean + * @return string * @see ____func_see____ * @since 1.0.0 */ - public function isApplicable(\XLite\Model\Order $order, \XLite\Model\Payment\Method $method) + protected function getSessionId() { - return parent::isApplicable($order, $method) - && $this->isPaymentTypeAllowed($this->convertServiceNameToType($method->getServiceName()), $order) - && in_array(strtoupper($order->getCurrency()->getCode()), $this->allowedCurrencies); + $data = array( + 'pay_to_email' => \XLite\Core\Config::getInstance()->CDev->Moneybookers->email, + 'language' => $this->getLanguageCode(), + 'recipient_description' => substr(\XLite\Core\Config::getInstance()->Company->company_name, 0, 30), + 'transaction_id' => \XLite\Core\Config::getInstance()->CDev->Moneybookers->prefix . $this->transaction->getTransactionId(), + 'pay_from_email' => $this->getProfile()->getLogin(), + 'firstname' => $this->getProfile()->getBillingAddress()->getFirstname(), + 'lastname' => $this->getProfile()->getBillingAddress()->getLastname(), + 'address' => $this->getProfile()->getBillingAddress()->getStreet(), + 'postal_code' => $this->getProfile()->getBillingAddress()->getZipcode(), + 'city' => $this->getProfile()->getBillingAddress()->getCity(), + 'country' => $this->getCountryCode(), + 'amount' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), + 'currency' => $this->getCurrencyCode(), + 'status_url' => $this->getCallbackURL(null, true), + 'return_url' => $this->getReturnURL(null, true), + 'cancel_url' => $this->getReturnURL(null, true, true), + 'hide_login' => 1, + 'prepare_only' => 1, + 'payment_methods' => $this->convertServiceNameToType($this->transaction->getPaymentMethod()->getServiceName()), + 'merchant_fields' => 'platform', + 'platform' => '21889079', + ); + + if (\XLite\Core\Config::getInstance()->CDev->Moneybookers->logo_url) { + $data['logo_url'] = \XLite\Core\Config::getInstance()->CDev->Moneybookers->logo_url; + } + + $this->transaction->setPublicId($data['transaction_id']); + + $request = new \XLite\Core\HTTP\Request($this->getPostURL()); + $request->body = $data; + $response = $request->sendRequest(); + + $id = null; + if ( + 200 == $response->code + && preg_match('/SESSION_ID=([a-z0-9]+)/iSs', $response->headers->SetCookie, $match) + && $response->body == $match[1] + ) { + $id = $match[1]; + + } elseif (200 != $response->code) { + $this->setDetail( + 'moneybookers_session_error', + 'Moneybookers payment processor did not receive session ID successfull' + . ' (HTTP error: ' . $response->code . ').', + 'Session initialization error' + ); + + } elseif (preg_match('/SESSION_ID=([a-z0-9]+)/iSs', $response->headers->SetCookie, $match)) { + + $this->setDetail( + 'moneybookers_session_error', + 'Moneybookers payment processor did not receive session ID successfull (page body has not session ID).', + 'Session initialization error' + ); + + } else { + $this->setDetail( + 'moneybookers_session_error', + 'Moneybookers payment processor did not receive session ID successfull.', + 'Session initialization error' + ); + } + + if ( + !$id + && preg_match('/]*>(.+)<\/h1>/USs', $response->body, $m1) + && preg_match('/
(.+)<\/div>/USs', $response->body, $m2) + ) { + $m1 = trim($m1[1]); + $m2 = trim(strip_tags($m2[1])); + + $this->setDetail( + 'moneybookers_session_error', + $m1 . ': ' . $m2, + 'Session initialization error' + ); + } + + return $id; } /** @@ -743,7 +741,7 @@ protected function convertServiceNameToType($serviceName) /** * Check - payment type is allowed for specified order or not * - * @param string $type Payment type + * @param string $type Payment type * @param \XLite\Model\Order $order Order * * @return boolean diff --git a/src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php b/src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php index 6c6d4eedde..b170e9850a 100644 --- a/src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php +++ b/src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php @@ -121,8 +121,12 @@ public function processCallback(\XLite\Model\Payment\Transaction $transaction) $status = $transaction::STATUS_PENDING; break; + default: + } + default: + } $this->saveDataFromRequest(); @@ -156,7 +160,7 @@ public function processReturn(\XLite\Model\Payment\Transaction $transaction) $this->transaction->setStatus($transaction::STATUS_PENDING); } - } + } /** * Check - payment method is configured or not @@ -323,7 +327,7 @@ protected function getAmountValue() settype($value, 'float'); - $value = sprintf("%0.2f", $value); + $value = sprintf('%0.2f', $value); return $value; } diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Controller/Customer/Cart.php b/src/classes/XLite/Module/CDev/ProductOptions/Controller/Customer/Cart.php index 3e7a392113..5ca7162328 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/Controller/Customer/Cart.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/Controller/Customer/Cart.php @@ -50,7 +50,7 @@ class Cart extends \XLite\Controller\Customer\Cart implements \XLite\Base\IDecor * * @param \XLite\Model\Product $product Product class that is requested to add to cart * - * @return null|array + * @return array * @see ____func_see____ * @since 1.0.14 */ diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php b/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php index 3c6b436f45..3bb90e9b2a 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php @@ -262,21 +262,16 @@ public function isValid() { $options = array(); - $isValidOptions = true; - if ($this->getProduct()->hasOptions()) { - foreach ($this->getOptions() as $option) { $options[] = $option->getOptionId(); } - - if (!empty($options)) { - $isValidOptions = \XLite\Core\Database::getRepo('XLite\Module\CDev\ProductOptions\Model\OptionException') - ->checkOptions($options); - } } - return parent::isValid() && $isValidOptions; + $repository = \XLite\Core\Database::getRepo('XLite\Module\CDev\ProductOptions\Model\OptionException'); + + return parent::isValid() + && (!$options || $repository->checkOptions($options)); } /** diff --git a/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php b/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php index eff8a807b6..75022a400e 100644 --- a/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php +++ b/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php @@ -139,25 +139,25 @@ protected function getFormURL() */ protected function getFormFields() { + $billingAddress = $this->getProfile()->getBillingAddress(); + $fields = array( 'gwlogin' => $this->getSetting('login'), 'post_return_url_approved' => $this->getReturnURL('ID'), 'post_return_url_declined' => $this->getReturnURL('ID'), 'ID' => $this->transaction->getTransactionId(), 'amount' => $this->transaction->getValue(), - 'BADDR1' => $this->getProfile()->getBillingAddress()->getStreet(), - 'BZIP1' => $this->getProfile()->getBillingAddress()->getZipcode(), - - 'FNAME' => $this->getProfile()->getBillingAddress()->getFirstname(), - 'LNAME' => $this->getProfile()->getBillingAddress()->getLastname(), - 'BCITY' => $this->getProfile()->getBillingAddress()->getCity(), - 'BSTATE' => $this->getProfile()->getBillingAddress()->getState()->getState(), - 'BCOUNTRY' => $this->getProfile()->getBillingAddress()->getCountry() - ? $this->getProfile()->getBillingAddress()->getCountry()->getCode() - : '', + 'BADDR1' => $billingAddress->getStreet(), + 'BZIP1' => $billingAddress->getZipcode(), + + 'FNAME' => $billingAddress->getFirstname(), + 'LNAME' => $billingAddress->getLastname(), + 'BCITY' => $billingAddress->getCity(), + 'BSTATE' => $billingAddress->getState()->getState(), + 'BCOUNTRY' => $billingAddress->getCountry() ? $billingAddress->getCountry()->getCode() : '', 'BCUST_EMAIL' => $this->getProfile()->getLogin(), - 'PHONE' => $this->getProfile()->getBillingAddress()->getPhone(), + 'PHONE' => $billingAddress->getPhone(), 'trans_method' => 'CC', 'ResponseMethod' => 'POST', 'cust_id' => $this->getProfile()->getLogin(), @@ -167,7 +167,8 @@ protected function getFormFields() 'MAXMIND' => '1', ); - if ($shippingAddress = $this->getProfile()->getShippingAddress()) { + $shippingaddress = $this->getProfile()->getShippingAddress(); + if ($shippingAddress) { $fields += array( 'SFNAME' => $shippingAddress->getFirstname(), diff --git a/src/classes/XLite/Module/CDev/RuTranslation/Main.php b/src/classes/XLite/Module/CDev/RuTranslation/Main.php index e852c4ed67..1216d508de 100644 --- a/src/classes/XLite/Module/CDev/RuTranslation/Main.php +++ b/src/classes/XLite/Module/CDev/RuTranslation/Main.php @@ -18,11 +18,11 @@ * * @category LiteCommerce * @author Creative Development LLC - * @copyright Copyright (c) 2012 Creative Development LLC . All rights reserved + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ * @see ____file_see____ - * @since 1.0.19 + * @since 1.0.23 */ namespace XLite\Module\CDev\RuTranslation; diff --git a/src/classes/XLite/Module/CDev/Sale/Controller/Admin/SaleSelected.php b/src/classes/XLite/Module/CDev/Sale/Controller/Admin/SaleSelected.php index fe32f09d74..f0750b6972 100644 --- a/src/classes/XLite/Module/CDev/Sale/Controller/Admin/SaleSelected.php +++ b/src/classes/XLite/Module/CDev/Sale/Controller/Admin/SaleSelected.php @@ -50,7 +50,7 @@ public function getTitle() /** * Set sale price parameters for products list * - * @return null + * @return void * @see ____func_see____ * @since 1.0.0 */ diff --git a/src/classes/XLite/Module/CDev/Sale/Model/Product.php b/src/classes/XLite/Module/CDev/Sale/Model/Product.php index 3b0964f764..9fee94533c 100644 --- a/src/classes/XLite/Module/CDev/Sale/Model/Product.php +++ b/src/classes/XLite/Module/CDev/Sale/Model/Product.php @@ -97,11 +97,12 @@ class Product extends \XLite\Model\Product implements \XLite\Base\IDecorator */ protected $salePriceValueCalculated = 0; - /** - * Get discountType - * - * @return string $discountType + * Get discount type + * + * @return string + * @see ____func_see____ + * @since 1.0.23 */ public function getDiscountType() { @@ -111,8 +112,10 @@ public function getDiscountType() /** * Calculate "Sale percent off" value. * Based on "salePriceValue" and "discountType" fields values - * + * * @return float + * @see ____func_see____ + * @since 1.0.23 */ public function getSalePercent() { @@ -126,7 +129,7 @@ public function getSalePercent() case self::SALE_DISCOUNT_TYPE_PRICE: $price = $this->getPrice(); - $percent = ($price > 0) + $percent = (0 < $price) ? (($price - $this->getSalePriceValue()) / $price * 100) : 0; break; @@ -140,19 +143,21 @@ public function getSalePercent() /** * Return sale product price * + * @param float $value Base OPTIONAL + * * @return float * @see ____func_see____ * @since 1.0.0 */ - public function getSalePrice() + public function getSalePrice($value = null) { - $salePrice = $price = $this->getPrice(); + $salePrice = $price = isset($value) ? $value : $this->getPrice(); if ($this->getParticipateSale()) { switch ($this->getDiscountType()) { case self::SALE_DISCOUNT_TYPE_PERCENT: - $salePrice = $price * ( 1 - $this->getSalePriceValue()/100); + $salePrice = $price * (1 - $this->getSalePriceValue() / 100); break; case self::SALE_DISCOUNT_TYPE_PRICE: @@ -205,7 +210,7 @@ public function getSalePriceDifference() */ public function getListPrice() { - return $this->getSalePrice(); + return $this->getSalePrice(parent::getListPrice()); } /** diff --git a/src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php b/src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php index ac6ca915e2..51f53aec1e 100644 --- a/src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php +++ b/src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php @@ -69,6 +69,7 @@ protected function getHandlingSearchParams() * * @param \Doctrine\ORM\QueryBuilder $queryBuilder Query builder to prepare * @param array $value Condition data + * @param boolean $countOnly Count only flag * * @return void * @see ____func_see____ @@ -97,8 +98,7 @@ protected function prepareCndParticipateSale(\Doctrine\ORM\QueryBuilder $queryBu ); } - $queryBuilder - ->andWhere('p.participateSale = :participateSale') + $queryBuilder->andWhere('p.participateSale = :participateSale') ->andWhere($cnd) ->setParameter('participateSale', $value) ->setParameter('discountTypePercent', \XLite\Module\CDev\Sale\Model\Product::SALE_DISCOUNT_TYPE_PERCENT) @@ -107,34 +107,27 @@ protected function prepareCndParticipateSale(\Doctrine\ORM\QueryBuilder $queryBu } /** - * Prepare certain search condition + * Define calculated price definition DQL * - * @param \Doctrine\ORM\QueryBuilder $queryBuilder Query builder to prepare - * @param array $value Condition data - * @param boolean $countOnly "Count only" flag. Do not need to add "order by" clauses if only count is needed. + * @param \XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder Query builder + * @param string $alias Main alias * - * @return void + * @return string * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.22 */ - protected function prepareCndOrderBy(\Doctrine\ORM\QueryBuilder $queryBuilder, array $value, $countOnly) + protected function defineCalculatedPriceDQL(\XLite\Model\QueryBuilder\AQueryBuilder $queryBuilder, $alias) { - if (!$countOnly) { - list($sort, $order) = $value; - - if ('p.price' === $sort && !\XLite::isAdminZone()) { - - $queryBuilder->addSelect( - 'if(p.participateSale != 1 , p.price, p.salePriceValueCalculated) salePriceValueCalculated' - ); + $dql = parent::defineCalculatedPriceDQL($queryBuilder, $alias); - $queryBuilder->addOrderBy('salePriceValueCalculated', $order); + $queryBuilder->SetParameter('saleDiscountTypePercent', \XLite\Model\Product::SALE_DISCOUNT_TYPE_PERCENT); - } else { - - parent::prepareCndOrderBy($queryBuilder, $value, $countOnly); - } - } + return 'IF(' . $alias . '.participateSale = 1,' + . ' IF(' . $alias . '.discountType = :saleDiscountTypePercent,' + . ' ' . $dql . ' * (1 - ' . $alias . '.salePriceValue / 100),' + . ' ' . $alias . '.salePriceValue' + . '),' + . ' ' . $dql . ')'; } // }}} diff --git a/src/classes/XLite/Module/CDev/Sale/View/ASale.php b/src/classes/XLite/Module/CDev/Sale/View/ASale.php index 65eef947e3..99bd8bd6f4 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/ASale.php +++ b/src/classes/XLite/Module/CDev/Sale/View/ASale.php @@ -137,10 +137,8 @@ protected function getSearchConditions(\XLite\Core\CommonCell $cnd) */ protected function getData(\XLite\Core\CommonCell $cnd, $countOnly = false) { - return $this->getOnlyEntities( - \XLite\Core\Database::getRepo('XLite\Model\Product') - ->search($this->getSearchConditions($cnd), $countOnly) - ); + return \XLite\Core\Database::getRepo('XLite\Model\Product') + ->search($this->getSearchConditions($cnd), $countOnly); } /** diff --git a/src/classes/XLite/Module/CDev/Sale/View/Form/AForm.php b/src/classes/XLite/Module/CDev/Sale/View/Form/AForm.php index 4ba5459ac4..4cdc608996 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/Form/AForm.php +++ b/src/classes/XLite/Module/CDev/Sale/View/Form/AForm.php @@ -38,23 +38,28 @@ class AForm extends \XLite\View\Form\AForm implements \XLite\Base\IDecorator /** * Set validators pairs for products data. Sale structure. * - * @param mixed $data Data + * @param mixed &$data Data * - * @return null + * @return void * @see ____func_see____ * @since 1.0.0 */ protected function setSaleDataValidators(&$data) { if ($this->getPostedData('participateSale')) { + switch ($this->getPostedData('discountType')) { - if (\XLite\Module\CDev\Sale\Model\Product::SALE_DISCOUNT_TYPE_PRICE == $this->getPostedData('discountType')) { - // sale value is price - $data->addPair('salePriceValue', new \XLite\Core\Validator\Float(), null, 'Sale price')->setRange(0); + case \XLite\Module\CDev\Sale\Model\Product::SALE_DISCOUNT_TYPE_PRICE: + $data->addPair('salePriceValue', new \XLite\Core\Validator\Float(), null, 'Sale price') + ->setRange(0); + break; - } else { - // sale value is percent - $data->addPair('salePriceValue', new \XLite\Core\Validator\Integer(), null, 'Percent off')->setRange(1, 100); + case \XLite\Module\CDev\Sale\Model\Product::SALE_DISCOUNT_TYPE_PERCENT: + $data->addPair('salePriceValue', new \XLite\Core\Validator\Integer(), null, 'Percent off') + ->setRange(1, 100); + break; + + default: } } } diff --git a/src/classes/XLite/Module/CDev/Sale/View/Form/Product/Modify/Single.php b/src/classes/XLite/Module/CDev/Sale/View/Form/Product/Modify/Single.php index 7e973da36e..dfde72ac87 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/Module/CDev/Sale/View/Form/Product/Modify/Single.php @@ -38,9 +38,9 @@ class Single extends \XLite\View\Form\Product\Modify\Single implements \XLite\Ba /** * Set validators pairs for products data * - * @param mixed $data Data + * @param mixed &$data Data * - * @return null + * @return void * @see ____func_see____ * @since 1.0.0 */ diff --git a/src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php b/src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php index 3414bfbfc2..412efda7b6 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php +++ b/src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php @@ -79,9 +79,9 @@ protected function getValidator() /** * Set validators pairs for products data * - * @param mixed $data Data + * @param mixed &$data Data * - * @return null + * @return void * @see ____func_see____ * @since 1.0.0 */ diff --git a/src/classes/XLite/Module/CDev/Sale/View/ItemsList.php b/src/classes/XLite/Module/CDev/Sale/View/ItemsList.php index 1b51413726..7ca2a4b052 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/ItemsList.php +++ b/src/classes/XLite/Module/CDev/Sale/View/ItemsList.php @@ -50,9 +50,10 @@ protected function getLabels(\XLite\Model\Product $product) if ($this->participateSale($product)) { + $label = intval($product->getSalePercent()) . '% ' + . \XLite\Core\Translation::getInstance()->translate('off'); $labels += array( - 'orange sale-price' => intval($product->getSalePercent()) . '% ' - . \XLite\Core\Translation::getInstance()->translate('off') + 'orange sale-price' => $label, ); } @@ -93,7 +94,7 @@ protected function getPageData() /** * Return collection result from the mixed one. * - * @param mixed $data + * @param mixed $data Data * * @return mixed * @see ____func_see____ diff --git a/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php b/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php index 110d091e0b..5c6d2a20f4 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php +++ b/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php @@ -44,14 +44,11 @@ abstract class ItemsListForm extends \XLite\View\StickyPanel\Product\Admin\AAdmi */ protected function getButtons() { - return array_merge( - array( - $this->getWidget( - array('disabled' => true,), - 'XLite\Module\CDev\Sale\View\SaleSelectedButton' - ) - ), - parent::getButtons() + $widget = $this->getWidget( + array('disabled' => true), + 'XLite\Module\CDev\Sale\View\SaleSelectedButton' ); + + return array_merge(array($widget), parent::getButtons()); } } diff --git a/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php b/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php index 553a2500dc..c6d4036ab7 100644 --- a/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php +++ b/src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php @@ -169,7 +169,7 @@ protected function doActionSalesTaxUpdate() } \XLite\Core\TopMessage::addInfo('Tax rates have been updated successfully'); - \Xlite\Core\Database::getEM()->flush(); + \XLite\Core\Database::getEM()->flush(); } /** @@ -202,7 +202,7 @@ protected function doActionSalesTaxRemoveRate() \XLite\Core\TopMessage::addError('Tax rate has not been deleted successfully'); } - \Xlite\Core\Database::getEM()->flush(); + \XLite\Core\Database::getEM()->flush(); } /** diff --git a/src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php b/src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php index 0fac7349fb..3d1d4bbbbc 100644 --- a/src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php +++ b/src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php @@ -94,7 +94,7 @@ public function __construct(array $data = array()) * Get filtered rates by zones and membership * * @param array $zones Zone id list - * @param \XLite\Model\Membership $membership Membership + * @param \XLite\Model\Membership $membership Membership OPTIONAL * @param \Doctrine\Common\Collections\ArrayCollection $productClasses Product classes OPTIONAL * * @return array diff --git a/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php b/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php index a13657de07..f2d0d14eb3 100644 --- a/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php +++ b/src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php @@ -143,13 +143,14 @@ class Rate extends \XLite\Model\AEntity * Check if rate is applied for specified zones and membership * * @param array $zones Zone id list - * @param \XLite\Model\Membership $membership Membership + * @param \XLite\Model\Membership $membership Membership OPTIONAL * * @return boolean * @see ____func_see____ * @since 1.0.0 */ - public function isApplied(array $zones, \XLite\Model\Membership $membership = null) { + public function isApplied(array $zones, \XLite\Model\Membership $membership = null) + { return (!$this->getZone() || in_array($this->getZone()->getZoneId(), $zones)) && ( !$this->getMembership() diff --git a/src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php b/src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php index d5bdf061fc..29c4b90015 100644 --- a/src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php +++ b/src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php @@ -287,7 +287,7 @@ protected function getCountryField($address) */ protected function getFormattedPrice($price) { - return sprintf("%.2f", round((double)($price) + 0.00000000001, 2)); + return sprintf('%.2f', round((double)($price) + 0.00000000001, 2)); } @@ -345,12 +345,14 @@ protected function getFormFields() $product = $item->getProduct(); $i++; - $suffix = $i == 0 ? '' : ('_' . $i); + $suffix = 0 == $i ? '' : ('_' . $i); - $fields['c_prod' . $suffix] = $product->getProductId() . ',' . $item->getAmount(); - $fields['c_name' . $suffix] = substr($product->getName(), 0, 127); - $fields['c_price' . $suffix] = $this->getFormattedPrice($item->getPrice()); - $fields['c_description' . $suffix] = strip_tags(substr(($product->getCommonDescription() ? : $product->getName()), 0, 254)); + $description = $product->getCommonDescription() ?: $product->getName(); + + $fields['c_prod' . $suffix] = $product->getProductId() . ',' . $item->getAmount(); + $fields['c_name' . $suffix] = substr($product->getName(), 0, 127); + $fields['c_price' . $suffix] = $this->getFormattedPrice($item->getPrice()); + $fields['c_description' . $suffix] = strip_tags(substr(($description), 0, 254)); } return $fields; diff --git a/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php b/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php index db7fd44431..042bc78024 100644 --- a/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php +++ b/src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php @@ -184,7 +184,7 @@ protected function doActionVATTaxUpdate() } \XLite\Core\TopMessage::addInfo('Tax rates have been updated successfully'); - \Xlite\Core\Database::getEM()->flush(); + \XLite\Core\Database::getEM()->flush(); } /** @@ -217,7 +217,7 @@ protected function doActionVATTaxRemoveRate() \XLite\Core\TopMessage::addError('Tax rate has not been deleted successfully'); } - \Xlite\Core\Database::getEM()->flush(); + \XLite\Core\Database::getEM()->flush(); } /** diff --git a/src/classes/XLite/Module/CDev/VAT/Logic/Shipping/Tax.php b/src/classes/XLite/Module/CDev/VAT/Logic/Shipping/Tax.php index 776fabb731..b63f727438 100644 --- a/src/classes/XLite/Module/CDev/VAT/Logic/Shipping/Tax.php +++ b/src/classes/XLite/Module/CDev/VAT/Logic/Shipping/Tax.php @@ -41,14 +41,14 @@ class Tax extends \XLite\Logic\ALogic /** * Calculate rate cost * - * @param \XLite\Model\Shipping\Rate $rate Rate - * @param float $price Price + * @param \XLite\Model\Shipping\Rate $rate Rate + * @param float $price Price * * @return float * @see ____func_see____ * @since 1.0.0 */ - public function calculatRateCost(\XLite\Model\Shipping\Rate $rate, $price) + public function calculateRateCost(\XLite\Model\Shipping\Rate $rate, $price) { $zones = $this->getZonesList(); $memebrship = $this->getMembership(); @@ -69,8 +69,8 @@ public function calculatRateCost(\XLite\Model\Shipping\Rate $rate, $price) /** * Calculate rate net cost * - * @param \XLite\Model\Shipping\Rate $rate Rate - * @param float $price Price + * @param \XLite\Model\Shipping\Rate $rate Rate + * @param float $price Price * * @return float * @see ____func_see____ diff --git a/src/classes/XLite/Module/CDev/VAT/Model/Repo/Product.php b/src/classes/XLite/Module/CDev/VAT/Model/Repo/Product.php index e5c5b62c65..115c308d46 100644 --- a/src/classes/XLite/Module/CDev/VAT/Model/Repo/Product.php +++ b/src/classes/XLite/Module/CDev/VAT/Model/Repo/Product.php @@ -53,7 +53,8 @@ protected function assignPriceRangeCondition(\Doctrine\ORM\QueryBuilder $queryBu } else { $queryBuilder->leftJoin('p.classes', 'classes', 'WITH'); - $cnd = \XLite\Module\CDev\VAT\Logic\Product\Tax::getInstance()->getSearchPriceConbdition('p.price', 'classes'); + $cnd = \XLite\Module\CDev\VAT\Logic\Product\Tax::getInstance() + ->getSearchPriceConbdition('p.price', 'classes'); if (isset($min)) { $queryBuilder->andWhere($cnd . ' > :minPrice') diff --git a/src/classes/XLite/Module/CDev/VAT/Model/Tax.php b/src/classes/XLite/Module/CDev/VAT/Model/Tax.php index 8d8f5044d1..0710b28abd 100644 --- a/src/classes/XLite/Module/CDev/VAT/Model/Tax.php +++ b/src/classes/XLite/Module/CDev/VAT/Model/Tax.php @@ -180,7 +180,7 @@ public function setVATMembership(\XLite\Model\Membership $membership = null) /** * Set VAT base zone * - * @param \XLite\Model\Zone $zone Zone + * @param \XLite\Model\Zone $zone Zone OPTIONAL * * @return void * @see ____func_see____ diff --git a/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php b/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php index 4c66aae801..2511511e6b 100644 --- a/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php +++ b/src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php @@ -197,9 +197,19 @@ public function isApplied( \XLite\Model\Membership $membership = null, \Doctrine\Common\Collections\Collection $productClasses = null ) { - return (!$this->getZone() || in_array($this->getZone()->getZoneId(), $zones)) - && (!$this->getMembership() || ($membership && $this->getMembership()->getMembershipId() == $membership->getMembershipId())) - && (2 == func_num_args() || !$this->getProductClass() || ($productClasses && $productClasses->contains($this->getProductClass()))); + + $result = !$this->getZone() || in_array($this->getZone()->getZoneId(), $zones); + + if ($result && $this->getMembership()) { + $result = $membership && $this->getMembership()->getMembershipId() == $membership->getMembershipId(); + } + + if ($result && 2 < func_num_args()) { + $result = !$this->getProductClass() + || ($productClasses && $productClasses->contains($this->getProductClass())); + } + + return $result; } // {{{ Calculation diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php b/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php index 840d014382..4f8522b5f0 100644 --- a/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php +++ b/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php @@ -91,10 +91,16 @@ protected function doActionLocate() $request = new \XLite\Core\HTTP\Request($url); $response = $request->sendRequest(); if (200 == $response->code) { - \XLite\Core\TopMessage::addInfo('Site map successfully registred on X', array('engine' => $key)); + \XLite\Core\TopMessage::addInfo( + 'Site map successfully registred on X', + array('engine' => $key) + ); } else { - \XLite\Core\TopMessage::addWarning('Site map has not been registred in X', array('engine' => $key)); + \XLite\Core\TopMessage::addWarning( + 'Site map has not been registred in X', + array('engine' => $key) + ); } } } diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php b/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php index 3235158ca2..c25c6c6d37 100644 --- a/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php +++ b/src/classes/XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php @@ -90,7 +90,8 @@ protected function displayContent($content) print ($content); $this->silent = true; - die(0); + + die (0); } /** diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php b/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php index f825f54cc8..f5f1a2abdb 100644 --- a/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php +++ b/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php @@ -117,8 +117,8 @@ public function isEmpty() */ public function isGenerated() { - return 0 < count(glob(LC_DIR_DATA . 'xmlsitemap.*.xml')); - } + return 0 < count(glob(LC_DIR_DATA . 'xmlsitemap.*.xml')); + } // {{{ Generate sitemaps @@ -257,7 +257,8 @@ protected function initializeWrite() \Includes\Utils\FileManager::mkdir(LC_DIR_DATA); if (!\Includes\Utils\FileManager::isExists(LC_DIR_DATA)) { \XLite\Logger::getInstance()->log( - 'The directory ' . LC_DIR_DATA . ' can not be created. Check the permissions to create directories.', + 'The directory ' . LC_DIR_DATA . ' can not be created.' + . ' Check the permissions to create directories.', LOG_ERR ); } diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php b/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php index 0e4ae462e3..db7e9f09ce 100644 --- a/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php +++ b/src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php @@ -100,7 +100,8 @@ public function current() } elseif ($this->position < $this->getCategoriesLength() + $this->getProductsLength() + 1) { - $data = \XLite\Core\Database::getRepo('XLite\Model\Product')->findFrame($this->position - $this->getCategoriesLength() - 1, 1); + $data = \XLite\Core\Database::getRepo('XLite\Model\Product') + ->findFrame($this->position - $this->getCategoriesLength() - 1, 1); $data = $this->assembleProductData($data[0]); } @@ -284,7 +285,7 @@ protected function assembleProductData(\XLite\Model\Product $product) protected function processPriority($priority) { $priority = is_numeric($priority) ? round(doubleval($priority), 1) : self::DEFAULT_PRIORITY; - if ($priority > 1 || $priority < 0) { + if (1 < $priority || 0 > $priority) { $priority = self::DEFAULT_PRIORITY; } diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/Model/Repo/Config.php b/src/classes/XLite/Module/CDev/XMLSitemap/Model/Repo/Config.php index 0b6626ceae..90f0c2a5ec 100644 --- a/src/classes/XLite/Module/CDev/XMLSitemap/Model/Repo/Config.php +++ b/src/classes/XLite/Module/CDev/XMLSitemap/Model/Repo/Config.php @@ -27,6 +27,12 @@ namespace XLite\Module\CDev\XMLSitemap\Model\Repo; +/** + * Config model repository + * + * @see ____class_see____ + * @since 1.0.23 + */ abstract class Config extends \XLite\Model\Repo\Config implements \XLite\Base\IDecorator { /** @@ -35,7 +41,6 @@ abstract class Config extends \XLite\Model\Repo\Config implements \XLite\Base\ID * @param array $data Option data in the following format * * @return void - * @throws \Exception * @see ____func_see____ * @since 1.0.0 */ diff --git a/src/classes/XLite/View/Category.php b/src/classes/XLite/View/Category.php index 6943a558ce..f7f3457d13 100644 --- a/src/classes/XLite/View/Category.php +++ b/src/classes/XLite/View/Category.php @@ -123,7 +123,7 @@ protected function getWebPreprocessingTags() protected function getWebPreprocessingURL() { // Get URL of shop. If the HTTPS is used then it should be cleaned from ?xid= construction - $url = \Xlite::getInstance()->getShopURL(null, \XLite\Core\Request::getInstance()->isHTTPS()); + $url = \XLite::getInstance()->getShopURL(null, \XLite\Core\Request::getInstance()->isHTTPS()); // We are cleaning URL from unnecessary here construction $url = preg_replace('/(\?.*)/', '', $url); diff --git a/src/classes/XLite/View/EventTaskProgress.php b/src/classes/XLite/View/EventTaskProgress.php new file mode 100644 index 0000000000..4c1da5ec8b --- /dev/null +++ b/src/classes/XLite/View/EventTaskProgress.php @@ -0,0 +1,185 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.22 + */ + +namespace XLite\View; + +/** + * Event task progress bar + * + * @see ____class_see____ + * @since 1.0.22 + */ +class EventTaskProgress extends \XLite\View\AView +{ + /** + * Widget parameter names + */ + const PARAM_EVENT = 'event'; + const PARAM_TITLE = 'title'; + + /** + * Register JS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + $list[] = 'event_task_progress/controller.js'; + + return $list; + } + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'event_task_progress/style.css'; + + return $list; + } + + /** + * Define widget parameters + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineWidgetParams() + { + parent::defineWidgetParams(); + + $this->widgetParams += array( + static::PARAM_EVENT => new \XLite\Model\WidgetParam\String('Event name', null), + static::PARAM_TITLE => new \XLite\Model\WidgetParam\String('Progress bar title', null), + ); + } + + /** + * Return widget default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'event_task_progress/body.tpl'; + } + + /** + * Check if widget is visible + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isVisible() + { + return parent::isVisible() + && $this->getTmpVar(); + } + + /** + * Get temporary variable data + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getTmpVar() + { + return \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState($this->getParam(static::PARAM_EVENT)); + } + + // {{{ Content helpers + + /** + * Get event title + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getEventTitle() + { + return $this->getParam(static::PARAM_TITLE); + } + + /** + * Get event name + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getEvent() + { + return $this->getParam(static::PARAM_EVENT); + } + + /** + * Get percent + * + * @return integer + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getPercent() + { + $rec = $this->getTmpVar(); + + return 0 < $rec['position'] ? min(100, round($rec['position'] / $rec['length'] * 100)) : 0; + } + + /** + * Check - current event driver is blocking or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + protected function isBlockingDriver() + { + return \XLite\Core\EventTask::getInstance()->getDriver()->isBlocking(); + } + + // }}} + +} + diff --git a/src/classes/XLite/View/FormField/Image.php b/src/classes/XLite/View/FormField/Image.php index 41214ed2b7..e14ec959b0 100644 --- a/src/classes/XLite/View/FormField/Image.php +++ b/src/classes/XLite/View/FormField/Image.php @@ -36,6 +36,7 @@ class Image extends \XLite\View\FormField\AFormField { const PARAM_BUTTON_LABEL = 'buttonLabel'; + const PARAM_REMOVE_BUTTON = 'removeButton'; const PARAM_OBJECT = \XLite\View\Button\FileSelector::PARAM_OBJECT; const PARAM_OBJECT_ID = \XLite\View\Button\FileSelector::PARAM_OBJECT_ID; const PARAM_FILE_OBJECT = \XLite\View\Button\FileSelector::PARAM_FILE_OBJECT; @@ -80,6 +81,7 @@ protected function defineWidgetParams() $this->widgetParams += array( self::PARAM_BUTTON_LABEL => new \XLite\Model\WidgetParam\String('Button label', 'Add image'), + self::PARAM_REMOVE_BUTTON => new \XLite\Model\WidgetParam\Bool('Remove button', false), self::PARAM_OBJECT => new \XLite\Model\WidgetParam\String('Object', ''), self::PARAM_OBJECT_ID => new \XLite\Model\WidgetParam\Int('Object ID', 0), self::PARAM_FILE_OBJECT => new \XLite\Model\WidgetParam\String('File object', 'image'), @@ -99,6 +101,30 @@ protected function isVisible() return parent::isVisible() && $this->getObjectId(); } + /** + * Check - remove button is visible or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + protected function isRemoveButtonVisible() + { + return $this->getParam(static::PARAM_REMOVE_BUTTON); + } + + /** + * Get remove button label + * + * @return string + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getRemoveButtonLabel() + { + return 'Remove image'; + } + /** * Get default wrapper class * diff --git a/src/classes/XLite/View/FormField/Inline/AInline.php b/src/classes/XLite/View/FormField/Inline/AInline.php index 0e550e08b3..1951676d6c 100644 --- a/src/classes/XLite/View/FormField/Inline/AInline.php +++ b/src/classes/XLite/View/FormField/Inline/AInline.php @@ -35,27 +35,24 @@ */ abstract class AInline extends \XLite\View\AView { - const PARAM_ENTITY = 'entity'; - const PARAM_ITEMS_LIST = 'itemsList'; + const PARAM_ENTITY = 'entity'; + const PARAM_ITEMS_LIST = 'itemsList'; + const PARAM_FIELD_NAME = 'fieldName'; + const PARAM_FIELD_PARAMS = 'fieldParams'; + const FIELD_NAME = 'name'; + const FIELD_PARAMS = 'parameters'; + const FIELD_CLASS = 'class'; + const FIELD_LABEL = 'label'; /** - * Form field + * Form fields * - * @var \XLite\View\FormField\AFormField + * @var array * @see ____var_see____ * @since 1.0.15 */ - protected $field; - - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName; + protected $fields; /** * Register CSS files @@ -101,8 +98,10 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - static::PARAM_ENTITY => new \XLite\Model\WidgetParam\Object('Entity', null, false, 'XLite\Model\AEntity'), - static::PARAM_ITEMS_LIST => new \XLite\Model\WidgetParam\Object('Items list', null, false, 'XLite\View\ItemsList\Model\AModel'), + static::PARAM_ENTITY => new \XLite\Model\WidgetParam\Object('Entity', null, false, 'XLite\Model\AEntity'), + static::PARAM_ITEMS_LIST => new \XLite\Model\WidgetParam\Object('Items list', null, false, 'XLite\View\ItemsList\Model\AModel'), + static::PARAM_FIELD_NAME => new \XLite\Model\WidgetParam\String('Field name', ''), + static::PARAM_FIELD_PARAMS => new \XLite\Model\WidgetParam\Collection('Field parameters list', array()), ); } @@ -178,9 +177,13 @@ protected function isVisible() */ protected function getContainerClass() { + $parts = explode('\\', get_class($this->getParam(static::PARAM_ENTITY))); + $class = strtolower(array_pop($parts)); + return 'inline-field' . ($this->isEditable() ? ' editable' : '') - . ($this->hasSeparateView() ? ' has-view' : ''); + . ($this->hasSeparateView() ? ' has-view' : '') + . (' ' . $class . '-' . $this->getParam(static::PARAM_FIELD_NAME)); } /** @@ -208,72 +211,182 @@ protected function getFieldTemplate() } /** - * Get view value - * + * Get view value + * + * @param array $field Field + * * @return mixed * @see ____func_see____ * @since 1.0.15 */ - protected function getViewValue() + protected function getViewValue(array $field) { - return 0 == strlen(strval($this->getField()->getValue())) ? ' ' : $this->getField()->getValue(); - } + $method = 'getViewValue' . ucfirst($field['field'][static::FIELD_NAME]); - // }}} + if (method_exists($this, $method)) { - // {{{ Form field + // $method assembled from 'getViewValue' + field short name + $result = $this->$method($field); + + } else { + $value = $field['widget']->getValue(); + $result = 0 == strlen(strval($value)) ? ' ' : $value; + } + + return $result; + } /** - * Save value - * - * @return void + * Get field + * + * @param string $name Feild name + * + * @return array * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - public function saveValue() + protected function getField($name) { - $method = 'set' . $this->shortName; + $list = $this->getFields(); - // $method assembled from 'set' + field short name - $this->getEntity()->$method($this->preprocessSavedValue($this->getField()->getValue())); + return isset($list[$name]) ? $list[$name] : null; } /** - * Define form field - * - * @return string + * Get field widget + * + * @param string $name Field name + * + * @return \XLite\View\FormField\AFormField * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - abstract protected function defineFieldClass(); + protected function getFieldWidget($name) + { + $field = $this->getField($name); + + return $field ? $field['widget'] : null; + } /** - * Preprocess value forsave + * Get dield class name * - * @param mixed $value Value + * @param array $field Field * - * @return mixed + * @return string * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - protected function preprocessSavedValue($value) + protected function getFieldClassName(array $field) { - return $value; + return 'subfield subfield-' . $field['field'][static::FIELD_NAME]; } + // }}} + + // {{{ Form field + /** - * Get entity value for field + * Define fields * - * @return mixed + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + abstract protected function defineFields(); + + /** + * Set value from request + * + * @param array $data Data OPTIONAL + * @param mixed $key Row key OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.22 + */ + public function setValueFromRequest(array $data = array(), $key = null) + { + $data = $data ?: \XLite\Core\Request::getInstance()->getData(); + + foreach ($this->getFields() as $field) { + + $method = 'setValue' . ucfirst($field['field'][static::FIELD_NAME]); + if (method_exists($this, $method)) { + + // $method assemble from 'setValue' + field name + $this->$method($field, $data); + + } else { + $this->setFieldValue($field, $data); + } + } + } + + /** + * Validate + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + public function validate() + { + $result = array(true, null); + + foreach ($this->getFields() as $field) { + + $method = 'validate' . ucfirst($field['field'][static::FIELD_NAME]); + if (method_exists($this, $method)) { + + // $method assemble from 'validate' + field name + $result = $this->$method($field); + + } else { + $result = $field['widget']->validate(); + } + + if (!$result[0]) { + break; + } + } + + return $result; + } + + /** + * Save value + * + * @return void * @see ____func_see____ * @since 1.0.15 */ - protected function getEntityValue() + public function saveValue() { - $method = 'get' . $this->shortName; + foreach ($this->getFields() as $field) { + $method = 'saveValue' . ucfirst($field['field'][static::FIELD_NAME]); + if (method_exists($this, $method)) { - // $method assembled from 'get' + field short name - return $this->getEntity()->$method(); + // $method assemble from 'saveValue' + field name + $this->$method($field); + + } else { + $value = $field['widget']->getValue(); + $value = $this->preprocessValueBeforeSave($value); + + $method = 'preprocessValueBeforeSave' . ucfirst($field['field'][static::FIELD_NAME]); + if (method_exists($this, $method)) { + + // $method assemble from 'preprocessValueBeforeSave' + field name + $value = $this->$method($value); + } + + $method = 'set' . ucfirst($field['field'][static::FIELD_NAME]); + + // $method assemble from 'set' + field name + $this->getEntity()->$method($value); + } + } } /** @@ -283,114 +396,156 @@ protected function getEntityValue() * @see ____func_see____ * @since 1.0.15 */ - protected function getLabel() + public function getLabel() { - return \XLite\Core\Translation::lbl(ucfirst($this->shortName)); + return \XLite\Core\Translation::lbl(ucfirst($this->getParam(static::PARAM_FIELD_NAME))); } /** - * Get field + * Get fields * - * @return \XLite\View\FormField\AFormField + * @return array * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - public function getField() + protected function getFields() { - if (!isset($this->field)) { - $this->field = $this->defineField(); + if (!isset($this->fields)) { + $this->fields = array(); + foreach ($this->defineFields() as $name => $field) { + if (isset($field[static::FIELD_CLASS])) { + $field[static::FIELD_NAME] = isset($field[static::FIELD_NAME]) ? $field[static::FIELD_NAME] : $name; + $field[static::FIELD_PARAMS] = $this->getFieldParams($field); + + $this->fields[$name] = array( + 'field' => $field, + 'widget' => $this->getWidget($field[static::FIELD_PARAMS], $field[static::FIELD_CLASS]), + ); + } + } } - return $this->field; + return $this->fields; } /** - * Define field - * - * @return \XLite\View\FormField\Inline\AInline + * Get field widgets + * + * @return array * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - protected function defineField() + protected function getFieldWidgets() { - return $this->getWidget($this->getFieldParams(), $this->defineFieldClass()); + $list = array(); + + foreach ($this->getFields() as $name => $field) { + $list[$name] = $field['widget']; + } + + return $list; } /** - * Get field name parts + * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - public function getNameParts() + protected function getFieldParams(array $field) + { + $parts = $this->getNameParts($field); + $label = isset($field[static::FIELD_LABEL]) ? $field[static::FIELD_LABEL] : $field[static::FIELD_NAME]; + + $list = array( + 'fieldOnly' => true, + 'nameParts' => $parts, + 'fieldName' => array_shift($parts) . ($parts ? ('[' . implode('][', $parts) . ']') : ''), + 'value' => $this->getFieldEntityValue($field), + 'label' => \XLite\Core\Translation::lbl($label), + ); + + if (!empty($field[static::FIELD_PARAMS]) && is_array($field[static::FIELD_PARAMS])) { + $list = array_merge($list, $field[static::FIELD_PARAMS]); + } + + return array_merge($list, $this->getParam(static::PARAM_FIELD_PARAMS)); + } + + /** + * Get field name parts + * + * @param array $field Field + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getNameParts(array $field) { - return $this->getEntity()->getUniqueIdentifier() ? + return $this->getEntity()->getUniqueIdentifier() ? array( $this->getParam(static::PARAM_ITEMS_LIST)->getDataPrefix(), $this->getEntity()->getUniqueIdentifier(), - $this->shortName, + $field[static::FIELD_NAME], ) : array( $this->getParam(static::PARAM_ITEMS_LIST)->getCreateDataPrefix(), 0, - $this->shortName, + $field[static::FIELD_NAME], ); } /** - * Get initial field parameters + * Get field value from entity * - * @return array + * @param array $field Field + * + * @return mixed * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - protected function getFieldParams() + protected function getFieldEntityValue(array $field) { - $parts = $this->getNameParts(); + $method = 'get' . ucfirst($field[static::FIELD_NAME]); - return array( - 'fieldOnly' => true, - 'fieldName' => array_shift($parts) . ($parts ? ('[' . implode('][', $parts) . ']') : ''), - 'value' => $this->getEntityValue(), - 'label' => $this->getLabel(), - ); + // $method assembled from 'get' + field short name + return $this->getEntity()->$method(); } /** - * Set value + * Set field value * - * @param mixed $value Value + * @param array $field Field + * @param array $data Data * * @return void * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.22 */ - protected function setValue($value) + protected function setFieldValue(array $field, array $data) { - $this->getField()->setValue($value); + $this->transferValueToField($field, $this->isolateFieldValue($field, $data)); } - // }}} - - // {{{ Request data - /** - * Get field data from request + * Isolate field value * - * @param array $data Request data OPTIONAL - * @param integer $key Field key gathered from request data, eg: new[this-key][field-name] + * @param array $field Field info + * @param array $data Data * * @return mixed * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.23 */ - public function getFieldDataFromRequest(array $data = array(), $key = null) + protected function isolateFieldValue(array $field, array $data) { - $data = $data ?: \XLite\Core\Request::GetInstance()->getData(); $found = true; - foreach ($this->getNameParts() as $part) { + foreach ($field['field'][static::FIELD_PARAMS]['nameParts'] as $part) { if (0 === $part && isset($key)) { $part = $key; @@ -408,6 +563,37 @@ public function getFieldDataFromRequest(array $data = array(), $key = null) return $found ? $data : null; } + /** + * Transfer isolated value to field + * + * @param array $field Filed info + * @param mixed $value Value + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function transferValueToField(array $field, $value) + { + if (isset($value)) { + $field['widget']->setValue($value); + } + } + + /** + * Preprocess value before save + * + * @param mixed $value Value + * + * @return mixed + * @see ____func_see____ + * @since 1.0.15 + */ + protected function preprocessValueBeforeSave($value) + { + return $value; + } + // }}} } diff --git a/src/classes/XLite/View/FormField/Inline/Base/Single.php b/src/classes/XLite/View/FormField/Inline/Base/Single.php new file mode 100644 index 0000000000..411c97c1bb --- /dev/null +++ b/src/classes/XLite/View/FormField/Inline/Base/Single.php @@ -0,0 +1,122 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.22 + */ + +namespace XLite\View\FormField\Inline\Base; + +/** + * Single-field + * + * @see ____class_see____ + * @since 1.0.22 + */ +abstract class Single extends \XLite\View\FormField\Inline\AInline +{ + /** + * Define form field + * + * @return string + * @see ____func_see____ + * @since 1.0.15 + */ + abstract protected function defineFieldClass(); + + /** + * Define fields + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function defineFields() + { + return array( + $this->getParam(static::PARAM_FIELD_NAME) => array( + static::FIELD_NAME => $this->getParam(static::PARAM_FIELD_NAME), + static::FIELD_CLASS => $this->defineFieldClass(), + ), + ); + } + + /** + * Get entity value + * + * @return mixed + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getEntityValue() + { + $method = 'get' . ucfirst($this->getParam(static::PARAM_FIELD_NAME)); + + // $method assembled from 'get' + field short name + return $this->getEntity()->$method(); + } + + /** + * Get field value from entity + * + * @param array $field Field + * + * @return mixed + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getFieldEntityValue(array $field) + { + return $this->getEntityValue(); + } + + /** + * Get single field + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getSingleField() + { + $list = $this->getFields(); + + return array_shift($list); + } + + /** + * Get single field as widget + * + * @return \XLite\View\FormField\AFormField + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getSingleFieldAsWidget() + { + $field = $this->getSingleField(); + + return $field['widget']; + } + +} + diff --git a/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher.php b/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher.php index ab664689b2..cdc9545ac7 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.15 */ -abstract class Switcher extends \XLite\View\FormField\Inline\AInline +abstract class Switcher extends \XLite\View\FormField\Inline\Base\Single { /** * Define form field @@ -62,13 +62,15 @@ protected function getContainerClass() /** * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldParams() + protected function getFieldParams(array $field) { - return parent::getFieldParams() + array( + return parent::getFieldParams($field) + array( \XLite\View\FormField\Input\Checkbox::PARAM_IS_CHECKED => $this->getEntityValue(), ); } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher/Enabled.php b/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher/Enabled.php index e23465ae96..e83c1b6b9d 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher/Enabled.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher/Enabled.php @@ -35,15 +35,6 @@ */ class Enabled extends \XLite\View\FormField\Inline\Input\Checkbox\Switcher { - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'enabled'; - /** * Preprocess value forsave * diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text.php b/src/classes/XLite/View/FormField/Inline/Input/Text.php index a692c3f8df..ca1773e8d4 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.15 */ -abstract class Text extends \XLite\View\FormField\Inline\AInline +class Text extends \XLite\View\FormField\Inline\Base\Single { /** * Define form field diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Symbol.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Symbol.php deleted file mode 100644 index 18d0dc9e35..0000000000 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Symbol.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @see ____file_see____ - * @since 1.0.15 - */ - -namespace XLite\View\FormField\Inline\Input\Text\Currency; - -/** - * Currency symbol - * - * @see ____class_see____ - * @since 1.0.15 - */ -class Symbol extends \XLite\View\FormField\Inline\Input\Text -{ - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'symbol'; - - /** - * Get container class - * - * @return string - * @see ____func_see____ - * @since 1.0.15 - */ - protected function getContainerClass() - { - return trim(parent::getContainerClass() . ' currency-symbol'); - } - - /** - * Get initial field parameters - * - * @return array - * @see ____func_see____ - * @since 1.0.15 - */ - protected function getFieldParams() - { - return parent::getFieldParams() + array('maxlength' => 16); - } -} - diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Name.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Email.php similarity index 75% rename from src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Name.php rename to src/classes/XLite/View/FormField/Inline/Input/Text/Email.php index 89082dd1a4..6a3b675a32 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Currency/Name.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Email.php @@ -25,24 +25,28 @@ * @since 1.0.15 */ -namespace XLite\View\FormField\Inline\Input\Text\Currency; +namespace XLite\View\FormField\Inline\Input\Text; /** - * Currency name + * Email * * @see ____class_see____ * @since 1.0.15 */ -class Name extends \XLite\View\FormField\Inline\Input\Text +class Email extends \XLite\View\FormField\Inline\Base\Single { + /** - * Short name + * Define form field * - * @var string - * @see ____var_see____ - * @since 1.0.15 + * @return string + * @see ____func_see____ + * @since 1.0.15 */ - protected $shortName = 'name'; + protected function defineFieldClass() + { + return 'XLite\View\FormField\Input\Text\Email'; + } /** * Get container class @@ -53,7 +57,7 @@ class Name extends \XLite\View\FormField\Inline\Input\Text */ protected function getContainerClass() { - return trim(parent::getContainerClass() . ' currency-name'); + return parent::getContainerClass() . ' inline-email'; } } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Float.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Float.php index 45f52076a5..d08430b785 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Float.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Float.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.15 */ -abstract class Float extends \XLite\View\FormField\Inline\AInline +class Float extends \XLite\View\FormField\Inline\Base\Single { /** * Register JS files @@ -75,5 +75,18 @@ protected function getContainerClass() return parent::getContainerClass() . ' inline-float'; } + /** + * Get field value from entity + * + * @param array $field Field + * + * @return mixed + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getFieldEntityValue(array $field) + { + return doubleval(parent::getFieldEntityValue($field)); + } } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Integer.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Integer.php index b70907ab74..135c81fd77 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Integer.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Integer.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.15 */ -abstract class Integer extends \XLite\View\FormField\Inline\AInline +class Integer extends \XLite\View\FormField\Inline\Base\Single { /** * Register JS files @@ -75,5 +75,19 @@ protected function getContainerClass() return parent::getContainerClass() . ' inline-integer'; } + /** + * Get field value from entity + * + * @param array $field Field + * + * @return mixed + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getFieldEntityValue(array $field) + { + return intval(parent::getFieldEntityValue($field)); + } + } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Integer/ProductQuantity.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Integer/ProductQuantity.php index 92f6b7a0cf..8e8b384347 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Integer/ProductQuantity.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Integer/ProductQuantity.php @@ -35,15 +35,6 @@ */ class ProductQuantity extends \XLite\View\FormField\Inline\Input\Text\Integer { - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'quantity'; - /** * Save value * @@ -53,7 +44,7 @@ class ProductQuantity extends \XLite\View\FormField\Inline\Input\Text\Integer */ public function saveValue() { - $this->getEntity()->getInventory()->setAmount($this->getField()->getValue()); + $this->getEntity()->getInventory()->setAmount($this->getSingleFieldAsWidget()->getValue()); } /** @@ -83,13 +74,15 @@ protected function isEditable() /** * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldParams() + protected function getFieldParams(array $field) { - return parent::getFieldParams() + array('min' => 0); + return parent::getFieldParams($field) + array('min' => 0); } /** diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Position.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Position.php index 0847e5fa9d..830ecfcae2 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Position.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Position.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.15 */ -abstract class Position extends \XLite\View\FormField\Inline\AInline +class Position extends \XLite\View\FormField\Inline\Base\Single { /** * Register CSS files @@ -78,13 +78,15 @@ protected function getContainerClass() /** * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldParams() + protected function getFieldParams(array $field) { - return parent::getFieldParams() + return parent::getFieldParams($field) + array(\XLite\View\FormField\Input\Text\Base\Numeric::PARAM_MOUSE_WHEEL_ICON => false); } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Position/Move.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Position/Move.php index abb99f3d8d..12ddbfdd78 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Position/Move.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Position/Move.php @@ -35,15 +35,6 @@ */ class Move extends \XLite\View\FormField\Inline\Input\Text\Position { - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'orderby'; - /** * Register CSS files * @@ -76,18 +67,6 @@ public function getJSFiles() return $list; } - /** - * Get field label - * - * @return string - * @see ____func_see____ - * @since 1.0.15 - */ - protected function getLabel() - { - return \XLite\Core\Translation::lbl('Position'); - } - /** * Get container class * diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Position/OrderBy.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Position/OrderBy.php index 2106d88793..9c648653e1 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Position/OrderBy.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Position/OrderBy.php @@ -35,25 +35,4 @@ */ class OrderBy extends \XLite\View\FormField\Inline\Input\Text\Position { - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'orderby'; - - /** - * Get field label - * - * @return string - * @see ____func_see____ - * @since 1.0.15 - */ - protected function getLabel() - { - return \XLite\Core\Translation::lbl('Position'); - } - } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Price.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Price.php index 9c5081f76c..0819fb4d68 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Price.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Price.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.15 */ -abstract class Price extends \XLite\View\FormField\Inline\AInline +class Price extends \XLite\View\FormField\Inline\Base\Single { /** * Register JS files @@ -66,16 +66,18 @@ protected function defineFieldClass() /** * Get view value * + * @param array $field Field + * * @return mixed * @see ____func_see____ * @since 1.0.15 */ - protected function getViewValue() + protected function getViewValue(array $field) { - $value = parent::getViewValue(); + $value = parent::getViewValue($field); $sign = 0 <= $value ? '' : '− '; - return $sign . $this->getField()->getCurrency()->formatValue(abs($value)); + return $sign . $field['widget']->getCurrency()->formatValue(abs($value)); } /** @@ -102,18 +104,45 @@ protected function getViewTemplate() return 'form_field/inline/input/text/price.tpl'; } + /** + * Get currency + * + * @return \XLite\Model\Currency + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getCurrency() + { + return $this->getSingleFieldAsWidget()->getCurrency(); + } + /** * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldParams() + protected function getFieldParams(array $field) { - return parent::getFieldParams() + return parent::getFieldParams($field) + array(\XLite\View\FormField\Input\Text\Base\Numeric::PARAM_MOUSE_WHEEL_ICON => false); } + /** + * Get field value from entity + * + * @param array $field Field + * + * @return mixed + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getFieldEntityValue(array $field) + { + return doubleval(parent::getFieldEntityValue($field)); + } } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Price/Product.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Price/Product.php index a8f841cff7..d25eaea6c9 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Price/Product.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Price/Product.php @@ -35,25 +35,18 @@ */ class Product extends \XLite\View\FormField\Inline\Input\Text\Price { - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'price'; - /** * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldParams() + protected function getFieldParams(array $field) { - return parent::getFieldParams() + array('min' => 0); + return parent::getFieldParams($field) + array('min' => 0); } } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Product/SKU.php b/src/classes/XLite/View/FormField/Inline/Input/Text/Product/SKU.php index 984ca8f14e..2f8a713fe2 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Product/SKU.php +++ b/src/classes/XLite/View/FormField/Inline/Input/Text/Product/SKU.php @@ -35,15 +35,6 @@ */ class SKU extends \XLite\View\FormField\Inline\Input\Text { - /** - * Short name - * - * @var string - * @see ____var_see____ - * @since 1.0.15 - */ - protected $shortName = 'SKU'; - /** * Get a list of CSS files required to display the widget properly * @@ -63,25 +54,16 @@ public function getCSSFiles() /** * Get initial field parameters * + * @param array $field Field data + * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldParams() + protected function getFieldParams(array $field) { - return parent::getFieldParams() + array('maxlength' => 32); + return parent::getFieldParams($field) + array('maxlength' => 32); } - /** - * Get container class - * - * @return string - * @see ____func_see____ - * @since 1.0.15 - */ - protected function getContainerClass() - { - return trim(parent::getContainerClass() . ' product-sku'); - } } diff --git a/src/classes/XLite/View/FormField/Input/Text/Float.php b/src/classes/XLite/View/FormField/Input/Text/Float.php index 7b307f3ec1..1b48d1326a 100644 --- a/src/classes/XLite/View/FormField/Input/Text/Float.php +++ b/src/classes/XLite/View/FormField/Input/Text/Float.php @@ -68,7 +68,7 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - self::PARAM_E => new \XLite\Model\WidgetParam\Int('Number of digits after the decimal separator', 2), + static::PARAM_E => new \XLite\Model\WidgetParam\Int('Number of digits after the decimal separator', 2), ); } @@ -161,7 +161,7 @@ protected function getCommonAttributes() */ protected function getE() { - return null; + return $this->getParam(static::PARAM_E); } } diff --git a/src/classes/XLite/View/FormField/Inline/Input/Text/Product/Name.php b/src/classes/XLite/View/FormField/Input/Text/TCPIPPort.php similarity index 63% rename from src/classes/XLite/View/FormField/Inline/Input/Text/Product/Name.php rename to src/classes/XLite/View/FormField/Input/Text/TCPIPPort.php index 1d6495dd51..197212c0c3 100644 --- a/src/classes/XLite/View/FormField/Inline/Input/Text/Product/Name.php +++ b/src/classes/XLite/View/FormField/Input/Text/TCPIPPort.php @@ -22,38 +22,46 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ * @see ____file_see____ - * @since 1.0.15 + * @since 1.0.22 */ -namespace XLite\View\FormField\Inline\Input\Text\Product; +namespace XLite\View\FormField\Input\Text; /** - * Product name + * TCP/IP port * * @see ____class_see____ - * @since 1.0.15 + * @since 1.0.22 */ -class Name extends \XLite\View\FormField\Inline\Input\Text +class TCPIPPort extends \XLite\View\FormField\Input\Text\Integer { /** - * Short name + * Get default maximum size * - * @var string - * @see ____var_see____ - * @since 1.0.15 + * @return integer + * @see ____func_see____ + * @since 1.0.13 */ - protected $shortName = 'name'; + protected function getDefaultMaxSize() + { + return 5; + } /** - * Get container class + * Assemble validation rules * - * @return string + * @return array * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.13 */ - protected function getContainerClass() + protected function assembleValidationRules() { - return trim(parent::getContainerClass() . ' product-name'); + $rules = parent::assembleValidationRules(); + + $rules[] = 'min[0]'; + $rules[] = 'max[65535]'; + + return $rules; } } diff --git a/src/classes/XLite/View/FormField/Select/Base/Rich.php b/src/classes/XLite/View/FormField/Select/Base/Rich.php new file mode 100644 index 0000000000..9ff271fe90 --- /dev/null +++ b/src/classes/XLite/View/FormField/Select/Base/Rich.php @@ -0,0 +1,88 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.22 + */ + +namespace XLite\View\FormField\Select\Base; + +abstract class Rich extends \XLite\View\FormField\Select\Regular +{ + /** + * Register JS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + $list[] = $this->getDir() . '/js/rich.js'; + + return $list; + } + + /** + * Register files from common repository + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getCommonFiles() + { + $list = parent::getCommonFiles(); + + $list[static::RESOURCE_JS][] = 'js/jquery.multiselect.min.js'; + $list[static::RESOURCE_JS][] = 'js/jquery.multiselect.filter.min.js'; + + $list[static::RESOURCE_CSS][] = 'css/jquery.multiselect.css'; + $list[static::RESOURCE_CSS][] = 'css/jquery.multiselect.filter.css'; + + return $list; + } + + /** + * Prepare attributes + * + * @param array $attrs Field attributes to prepare + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function prepareAttributes(array $attrs) + { + $attrs = parent::prepareAttributes($attrs); + + $attrs['class'] = (empty($attrs['class']) ? '' : $attrs['class'] . ' ') + . 'rich'; + + return $attrs; + } + +} + diff --git a/src/classes/XLite/View/ItemsList/Model/AModel.php b/src/classes/XLite/View/ItemsList/Model/AModel.php index fbe8f460ef..8793da58cc 100644 --- a/src/classes/XLite/View/ItemsList/Model/AModel.php +++ b/src/classes/XLite/View/ItemsList/Model/AModel.php @@ -162,13 +162,13 @@ protected function getSelf() // {{{ Model processing /** - * Get field classes list (only inline-based form fields) + * Get field objects list (only inline-based form fields) * * @return array * @see ____func_see____ * @since 1.0.15 */ - abstract protected function getFieldClasses(); + abstract protected function getFieldObjects(); /** * Define repository name @@ -366,8 +366,8 @@ protected function createInlineFields(array $line, \XLite\Model\AEntity $entity) { $list = array(); - foreach ($this->getCreateFieldClasses() as $class) { - $list[] = $this->getInlineField($class, $entity); + foreach ($this->getCreateFieldClasses() as $object) { + $list[] = $this->prepareInlineField($object, $entity); } return $list; @@ -499,7 +499,7 @@ protected function processUpdate() */ protected function isActiveModelProcessing() { - return $this->hasResults() && $this->getFieldClasses(); + return $this->hasResults() && $this->getFieldObjects(); } /** @@ -513,7 +513,7 @@ protected function validateUpdate() { $validated = true; - foreach ($this->getInlineFields() as $field) { + foreach ($this->prepareInlineFields() as $field) { $validated = $this->validateCell($field) && $validated; } @@ -531,7 +531,7 @@ protected function update() { $count = 0; - foreach ($this->getInlineFields() as $field) { + foreach ($this->prepareInlineFields() as $field) { $count++; $this->saveCell($field); } @@ -566,11 +566,8 @@ protected function processUpdateErrors() */ protected function validateCell(\XLite\View\FormField\Inline\AInline $inline, $key = null) { - $value = $inline->getFieldDataFromRequest($this->getRequestData(), $key); - if (isset($value)) { - $inline->getField()->setValue($value); - } - list($flag, $message) = $inline->getField()->validate(); + $inline->setValueFromRequest($this->getRequestData(), $key); + list($flag, $message) = $inline->validate(); if (!$flag) { $this->addErrorMessage($inline, $message); } @@ -599,7 +596,7 @@ protected function saveCell(\XLite\View\FormField\Inline\AInline $inline) * @see ____func_see____ * @since 1.0.15 */ - protected function getInlineFields() + protected function prepareInlineFields() { if (!isset($this->inlineFields)) { $this->inlineFields = $this->defineInlineFields(); @@ -620,8 +617,9 @@ protected function defineInlineFields() $list = array(); foreach ($this->getPageData() as $entity) { - foreach ($this->getFieldClasses() as $class) { - $list[] = $this->getInlineField($class, $entity); + foreach ($this->getFieldObjects() as $object) { + $this->prepareInlineField($object, $entity); + $list[] = $object; } } @@ -631,16 +629,16 @@ protected function defineInlineFields() /** * Get inline field * - * @param string $class Class - * @param \XLite\Model\AEntity $entity Entity + * @param \XLite\View\FormField\Inline\AInline $field Field + * @param \XLite\Model\AEntity $entity Entity * - * @return \XLite\View\FormField\Inline\AInline + * @return void * @see ____func_see____ * @since 1.0.15 */ - protected function getInlineField($class, \XLite\Model\AEntity $entity) + protected function prepareInlineField(\XLite\View\FormField\Inline\AInline $field, \XLite\Model\AEntity $entity) { - return new $class(array('entity' => $entity, 'itemsList' => $this)); + $field->setWidgetParams(array('entity' => $entity, 'itemsList' => $this)); } // }}} @@ -687,7 +685,7 @@ protected function defineRequestData() */ protected function addErrorMessage(\XLite\View\Inline\AInline $inline, $message) { - $this->errorMessages[] = $inline->getField()->getLabel() . ': ' . $message; + $this->errorMessages[] = $inline->getLabel() . ': ' . $message; } /** @@ -892,6 +890,38 @@ protected function getContainerClass() . ' sessioncell-' . $this->getSessionCell(); } + /** + * Get container attributes + * + * @return array + * @see ____func_see____ + * @since 1.0.23 + */ + protected function getContainerAttributes() + { + return array( + 'class' => $this->getContainerClass(), + ); + } + + /** + * Get container attributes as string + * + * @return string + * @see ____func_see____ + * @since 1.0.23 + */ + protected function getContainerAttributesAsString() + { + $list = array(); + foreach ($this->getContainerAttributes() as $name => $value) { + $list[] = $name . '="' . func_htmlspecialchars($value) . '"'; + } + + return implode(' ', $list); + } + + // }}} // {{{ Line behaviors diff --git a/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php b/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php index c53fe033b2..28ef41d661 100644 --- a/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php +++ b/src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php @@ -104,18 +104,17 @@ protected function defineColumns() { return array( 'sku' => array( - static::COLUMN_NAME => \XLite\Core\Translation::lbl('SKU'), - static::COLUMN_CREATE_CLASS => 'XLite\View\FormField\Inline\Input\Text\Product\SKU', + static::COLUMN_NAME => \XLite\Core\Translation::lbl('SKU'), ), 'name' => array( - static::COLUMN_NAME => \XLite\Core\Translation::lbl('Product Name'), - static::COLUMN_LINK => 'product', - static::COLUMN_CREATE_CLASS => 'XLite\View\FormField\Inline\Input\Text\Product\Name', - static::COLUMN_MAIN => true, + static::COLUMN_NAME => \XLite\Core\Translation::lbl('Product Name'), + static::COLUMN_LINK => 'product', + static::COLUMN_MAIN => true, ), 'price' => array( - static::COLUMN_NAME => \XLite\Core\Translation::lbl('Price'), - static::COLUMN_CLASS => 'XLite\View\FormField\Inline\Input\Text\Price\Product', + static::COLUMN_NAME => \XLite\Core\Translation::lbl('Price'), + static::COLUMN_CLASS => 'XLite\View\FormField\Inline\Input\Text\Price', + static::COLUMN_PARAMS => array('min' => 0), ), 'qty' => array( static::COLUMN_NAME => \XLite\Core\Translation::lbl('Qty'), diff --git a/src/classes/XLite/View/ItemsList/Model/Table.php b/src/classes/XLite/View/ItemsList/Model/Table.php index 938bd13e37..6edae84015 100644 --- a/src/classes/XLite/View/ItemsList/Model/Table.php +++ b/src/classes/XLite/View/ItemsList/Model/Table.php @@ -44,6 +44,7 @@ abstract class Table extends \XLite\View\ItemsList\Model\AModel const COLUMN_CREATE_CLASS = 'createClass'; const COLUMN_MAIN = 'main'; const COLUMN_SERVICE = 'service'; + const COLUMN_PARAMS = 'params'; /** * Columns (local cache) @@ -144,6 +145,7 @@ protected function getColumns() if (!isset($column[static::COLUMN_TEMPLATE]) && !isset($column[static::COLUMN_CLASS])) { $column[static::COLUMN_TEMPLATE] = 'items_list/model/table/field.tpl'; } + $column[static::COLUMN_PARAMS] = isset($column[static::COLUMN_PARAMS]) ? $column[static::COLUMN_PARAMS] : array(); $this->columns[] = $column; } @@ -273,39 +275,81 @@ protected function getColumnValue(array $column, \XLite\Model\AEntity $entity) } /** - * Get field classes list (only inline-based form fields) + * Get field objects list (only inline-based form fields) * * @return array * @see ____func_see____ * @since 1.0.15 */ - protected function getFieldClasses() + protected function getFieldObjects() { $list = array(); foreach ($this->getColumns() as $column) { + $name = $column[static::COLUMN_CODE]; if ( isset($column[static::COLUMN_CLASS]) && is_subclass_of($column[static::COLUMN_CLASS], 'XLite\View\FormField\Inline\AInline') ) { - $list[] = $column[static::COLUMN_CLASS]; + $params = isset($column[static::COLUMN_PARAMS]) ? $column[static::COLUMN_PARAMS] : array(); + $list[] = array( + 'class' => $column[static::COLUMN_CLASS], + 'parameters' => array('fieldName' => $name, 'fieldParams' => $params), + ); } } if ($this->isSwitchable()) { - $list[] = 'XLite\View\FormField\Inline\Input\Checkbox\Switcher\Enabled'; + $list[] = $this->getSwitcherField(); } - if (static::SORT_TYPE_INPUT == $this->getSortableType()) { - $list[] = 'XLite\View\FormField\Inline\Input\Text\Position\OrderBy'; + if (static::SORT_TYPE_NONE != $this->getSortableType()) { + $list[] = $this->getSortField(); + } - } elseif (static::SORT_TYPE_MOVE == $this->getSortableType()) { - $list[] = 'XLite\View\FormField\Inline\Input\Text\Position\Move'; + foreach ($list as $i => $class) { + $list[$i] = new $class['class']($class['parameters']); } return $list; } + /** + * Get switcher field + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getSwitcherField() + { + return array( + 'class' => 'XLite\View\FormField\Inline\Input\Checkbox\Switcher\Enabled', + 'parameters' => array('fieldName' => 'enabled'), + ); + } + + /** + * Get sort field + * + * @return array + * @see ____func_see____ + * @since 1.0.22 + */ + protected function getSortField() + { + return static::SORT_TYPE_INPUT == $this->getSortableType() + ? array( + 'class' => 'XLite\View\FormField\Inline\Input\Text\Position\OrderBy', + 'parameters' => array('fieldName' => 'position'), + ) + : + array( + 'class' => 'XLite\View\FormField\Inline\Input\Text\Position\Move', + 'parameters' => array(), + ); + } + /** * Get create field classes * @@ -318,12 +362,32 @@ protected function getCreateFieldClasses() $list = array(); foreach ($this->getColumns() as $column) { + $name = $column[static::COLUMN_CODE]; + $class = null; if ( isset($column[static::COLUMN_CREATE_CLASS]) && is_subclass_of($column[static::COLUMN_CREATE_CLASS], 'XLite\View\FormField\Inline\AInline') ) { - $list[] = $column[static::COLUMN_CREATE_CLASS]; + $class = $column[static::COLUMN_CREATE_CLASS]; + + } elseif ( + isset($column[static::COLUMN_CLASS]) + && is_subclass_of($column[static::COLUMN_CLASS], 'XLite\View\FormField\Inline\AInline') + ) { + $class = $column[static::COLUMN_CLASS]; } + + if ($class) { + $params = isset($column[static::COLUMN_PARAMS]) ? $column[static::COLUMN_PARAMS] : array(); + $list[] = array( + 'class' => $column[static::COLUMN_CREATE_CLASS], + 'parameters' => array('fieldName' => $name, 'fieldParams' => $params), + ); + } + } + + foreach ($list as $i => $class) { + $list[$i] = new $class['class']($class['parameters']); } return $list; diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index 373d68e250..01e5c9b7f2 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -1096,13 +1096,14 @@ protected function prepareErrorMessage($message, array $data) /** * Check if field is valid and (if needed) set an error message * - * @param array $data Current section data + * @param array $data Current section data + * @param string $section Current section name * * @return void * @see ____func_see____ * @since 1.0.0 */ - protected function validateFields(array $data) + protected function validateFields(array $data, $section) { foreach ($data[self::SECTION_PARAM_FIELDS] as $field) { list($flag, $message) = $field->validate(); @@ -1125,7 +1126,7 @@ protected function getErrorMessages() $this->errorMessages = array(); foreach ($this->getFormFields() as $section => $data) { - $this->validateFields($data); + $this->validateFields($data, $section); } } diff --git a/src/classes/XLite/View/Model/Address/Address.php b/src/classes/XLite/View/Model/Address/Address.php index fd465624c2..a605660eb5 100644 --- a/src/classes/XLite/View/Model/Address/Address.php +++ b/src/classes/XLite/View/Model/Address/Address.php @@ -202,9 +202,9 @@ public function getRequestProfileId() */ public function getProfileId() { - return ($this->getRequestProfileId() && \Xlite\Core\Auth::getInstance()->isAdmin()) + return ($this->getRequestProfileId() && \XLite\Core\Auth::getInstance()->isAdmin()) ? $this->getRequestProfileId() - : \Xlite\Core\Auth::getInstance()->getProfile()->getProfileId(); + : \XLite\Core\Auth::getInstance()->getProfile()->getProfileId(); } /** @@ -392,13 +392,14 @@ protected function prepareDataForMapping() /** * Check if fields are valid * - * @param array $data Current section data + * @param array $data Current section data + * @param string $section Current section name * * @return void * @see ____func_see____ * @since 1.0.0 */ - protected function validateFields(array $data) + protected function validateFields(array $data, $section) { $this->prepareDataToValidate($data); diff --git a/src/skins/admin/en/event_task_progress/body.tpl b/src/skins/admin/en/event_task_progress/body.tpl new file mode 100644 index 0000000000..665bcaf66d --- /dev/null +++ b/src/skins/admin/en/event_task_progress/body.tpl @@ -0,0 +1,23 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Event task progress bar + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.22 + *} + +
+ +

{getEventTitle()}

+
+ {if:isBlockingDriver()} +

{t(#Refresh the page to update the status#)}

+ {else:} +

{t(#Wait#)}

+ {end:} + +
diff --git a/src/skins/admin/en/event_task_progress/controller.js b/src/skins/admin/en/event_task_progress/controller.js new file mode 100644 index 0000000000..d75a78ea05 --- /dev/null +++ b/src/skins/admin/en/event_task_progress/controller.js @@ -0,0 +1,107 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Event task progress bar controller + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.22 + */ + +jQuery().ready( + function () { + + // Non blocking event driver + + var initializeNextStep = function(event, data, bar, eventName) + { + var percent = 0; + + if (data && 'undefined' != typeof(data.percent)) { + bar.progressbar('value', data.percent); + bar.attr('title', data.percent + '%') + percent = data.percent; + } + + if (100 > percent) { + core.post( + URLHandler.buildURL({'target': 'event_task', 'action': 'run', 'event': eventName}), + function(xhr, status, data, valid) { + if (xhr.readyState != 4 || xhr.status != 200 || !valid) { + core.showError('Event task runner internal error'); + } + }, + {}, + {timeout: 600000} + ); + } + } + + jQuery('.progress-bar.noblocking').each( + function () { + + var eventName = jQuery(this).data('event'); + var bar = jQuery('.bar', this); + + core.bind( + 'eventTaskRun', + function (event, data) { + return initializeNextStep(event, data, bar, eventName); + } + ); + + bar.progressbar(); + initializeNextStep(null, {percent: bar.data('percent')}, bar, eventName); + } + ); + + // Blocking event driver + var timer; + var timerTTL = 10000; + var updateProgressBar = function() + { + var o = this; + var bar = jQuery('.bar', this); + var eventName = jQuery(this).data('event'); + + core.get( + URLHandler.buildURL({'target': 'event_task', 'action': 'touch', 'event': eventName}), + function(xhr, status, data) { + if (xhr.readyState != 4 || xhr.status != 200) { + core.showError('Event task touch procedure internal error'); + + } else { + data = jQuery.parseJSON(data); + if (data && 'undefined' != typeof(data.percent)) { + bar.progressbar('value', data.percent); + bar.attr('title', data.percent + '%') + if (100 > data.percent) { + timer = setTimeout(function () { return o.updateProgressBar(); }, timerTTL); + } + + } else { + core.showError('Event task touch procedure internal error'); + } + } + }, + {}, + {timeout: 10000} + ); + } + + jQuery('.progress-bar.blocking').each( + function () { + + var bar = jQuery('.bar', this); + + bar.progressbar(); + bar.progressbar('value', bar.data('percent')); + + this.updateProgressBar = updateProgressBar; + this.updateProgressBar(); + } + ) + } +); diff --git a/src/skins/admin/en/event_task_progress/style.css b/src/skins/admin/en/event_task_progress/style.css new file mode 100644 index 0000000000..5bce53419c --- /dev/null +++ b/src/skins/admin/en/event_task_progress/style.css @@ -0,0 +1,33 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Event task progress bar styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.22 + */ + +.progress-bar h3 { + margin-bottom: 8px; +} + +.progress-bar .bar, +.progress-bar p.note +{ + width: 500px; +} + +.progress-bar .bar { + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + height: 28px; +} + +.progress-bar p.note { + text-align: center; + padding-top: 11px; +} diff --git a/src/skins/admin/en/form_field/form_field.css b/src/skins/admin/en/form_field/form_field.css index 985be17f5b..fcad7b8bdc 100644 --- a/src/skins/admin/en/form_field/form_field.css +++ b/src/skins/admin/en/form_field/form_field.css @@ -28,6 +28,10 @@ input[type="text"].form_field_error { font-size: 0.9em; } +button.ui-multiselect { + margin: 0px; +} + button.ui-multiselect, button.ui-multiselect.ui-state-hover, button.ui-multiselect.ui-state-active @@ -48,10 +52,10 @@ button.ui-state-default span.ui-icon { background: transparent url(../images/multiselect_arrows.png) no-repeat left 3px; } -.ui-multiselect-menu { - -moz-border-radius: 0px; - -webkit-border-radius: 0px; - border-radius: 0px; +.ui-multiselect-menu.ui-corner-all { + -moz-border-radius: 0px 0px 3px 3px; + -webkit-border-radius: 0px 0px 3px 3px; + border-radius: 0px 0px 3px 3px; background: #fff none; } @@ -87,7 +91,9 @@ button.ui-state-default span.ui-icon { color: #456583; } -.ui-multiselect-checkboxes .ui-state-hover { +.ui-multiselect-menu .ui-state-hover, +.ui-multiselect-single .ui-state-hover.ui-state-active +{ border-color: #83a8c7; background: #83a8c7 none; font-weight: normal; @@ -96,6 +102,24 @@ button.ui-state-default span.ui-icon { border-radius: 0px; } +.ui-multiselect-single .ui-state-active { + background: #eaf3fe none; + border-color: #eaf3fe; + font-weight: normal; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} + +.ui-multiselect-checkboxes .ui-state-hover span { + color: #fff; +} + +.ui-multiselect-single .ui-multiselect-checkboxes .ui-state-hover span { + color: #333; +} + + .ui-multiselect-checkboxes label { line-height: 22px; padding-left: 11px; @@ -109,3 +133,40 @@ button.ui-state-default span.ui-icon { font-size: 14px; padding-left: 8px; } + +body div.ui-multiselect-with-filter { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 0px; +} + +body div.ui-multiselect-with-filter .ui-widget-header { + border: 0px none; + background-color: #eaf3fe; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + border-bottom: 1px solid #bbc7d2; +} + +body div.ui-multiselect-with-filter .ui-widget-header .ui-multiselect-filter { + color: #8f8f8f; + font-size: 13px; + padding-top: 5px; + padding-bottom: 3px; + padding-left: 10px; + float: none; +} + +body div.ui-multiselect-with-filter .ui-widget-header .ui-multiselect-filter input { + font-size: 12px; + padding: 5px 3px 4px; + border-color: #949494; + width: 90%; +} + +body div.ui-multiselect-with-filter .ui-widget-header .ui-helper-reset { + display: none; +} + diff --git a/src/skins/admin/en/form_field/image.tpl b/src/skins/admin/en/form_field/image.tpl index dbb197d010..98f7d364fc 100644 --- a/src/skins/admin/en/form_field/image.tpl +++ b/src/skins/admin/en/form_field/image.tpl @@ -23,3 +23,8 @@ objectId="{getObjectId()}" fileObject="{getFileObject()}" fileObjectId="{getFileObjectId()}" /> + +{if:isRemoveButtonVisible()} + + +{end:} diff --git a/src/skins/admin/en/form_field/inline/controller.js b/src/skins/admin/en/form_field/inline/controller.js index 8d8b8f3816..d6a56ed959 100644 --- a/src/skins/admin/en/form_field/inline/controller.js +++ b/src/skins/admin/en/form_field/inline/controller.js @@ -23,9 +23,12 @@ CommonForm.elementControllers.push( this.viewValuePattern = '.view'; var line = field.parents('.line').eq(0); + var list = line.parents('.items-list').eq(0); var row = line.get(0); var inputs = jQuery('.field :input', this); + var vTab = !!list.data('vtab'); + // Get field position into current line this.getPositionIntoLine = function() { @@ -171,7 +174,7 @@ CommonForm.elementControllers.push( var result = true; // Press 'Tab' button - if (9 == event.keyCode) { + if (!vTab && 9 == event.keyCode) { var found = false; var current = this; diff --git a/src/skins/admin/en/form_field/inline/field.tpl b/src/skins/admin/en/form_field/inline/field.tpl index 0a0fadcbb2..1682bf0782 100644 --- a/src/skins/admin/en/form_field/inline/field.tpl +++ b/src/skins/admin/en/form_field/inline/field.tpl @@ -10,4 +10,8 @@ * @since 1.0.15 *} -{field.display()} +{foreach:getFields(),f} +
+ {f.widget.display()} +
+{end:} diff --git a/src/skins/admin/en/form_field/inline/input/text/float.js b/src/skins/admin/en/form_field/inline/input/text/float.js index 539b08f154..3745fb86a3 100644 --- a/src/skins/admin/en/form_field/inline/input/text/float.js +++ b/src/skins/admin/en/form_field/inline/input/text/float.js @@ -19,8 +19,7 @@ CommonForm.elementControllers.push( { var input = jQuery('.field :input', this).eq(0); if (input.length) { - var e = input.data('e'); - input.val(input.get(0).sanitizeValue(input.val(), e ? e : 0)); + input.val(input.get(0).sanitizeValue(input.val(), input)); } } diff --git a/src/skins/admin/en/form_field/inline/input/text/position/move.tpl b/src/skins/admin/en/form_field/inline/input/text/position/move.tpl index fb6d54baae..cdfd8f8c33 100644 --- a/src/skins/admin/en/form_field/inline/input/text/position/move.tpl +++ b/src/skins/admin/en/form_field/inline/input/text/position/move.tpl @@ -10,5 +10,5 @@ * @since 1.0.15 *} -{field.display()} +{singleFieldAsWidget.display()}
diff --git a/src/skins/admin/en/form_field/inline/input/text/price.tpl b/src/skins/admin/en/form_field/inline/input/text/price.tpl index 38ba2e06e9..45b61f44b1 100644 --- a/src/skins/admin/en/form_field/inline/input/text/price.tpl +++ b/src/skins/admin/en/form_field/inline/input/text/price.tpl @@ -10,5 +10,5 @@ * @since 1.0.15 *} -{if:field.currency.getSymbol()}{field.currency.getSymbol():h}{else:}{field.currency.getCode()}{end:} -{getViewValue():h} +{if:currency.getSymbol()}{currency.getSymbol():h}{else:}{currency.getCode()}{end:} +{getViewValue(singleField):h} diff --git a/src/skins/admin/en/form_field/inline/view.tpl b/src/skins/admin/en/form_field/inline/view.tpl index 3690c69184..00bdc58a74 100644 --- a/src/skins/admin/en/form_field/inline/view.tpl +++ b/src/skins/admin/en/form_field/inline/view.tpl @@ -10,4 +10,6 @@ * @since 1.0.15 *} -{getViewValue():h} +{foreach:getFields(),f} + {getViewValue(f):h} +{end:} diff --git a/src/skins/admin/en/form_field/input/checkbox/switcher.js b/src/skins/admin/en/form_field/input/checkbox/switcher.js index c1a3d94bd3..b923db815d 100644 --- a/src/skins/admin/en/form_field/input/checkbox/switcher.js +++ b/src/skins/admin/en/form_field/input/checkbox/switcher.js @@ -20,15 +20,17 @@ CommonForm.elementControllers.push( widget.click( function () { - if (!input.attr('checked')) { - input.attr('checked', 'checked'); - input.get(0).setAttribute('checked', 'checked'); + if (!input.attr('disabled')) { + if (!input.attr('checked')) { + input.attr('checked', 'checked'); + input.get(0).setAttribute('checked', 'checked'); - } else { - input.removeAttr('checked'); - } + } else { + input.removeAttr('checked'); + } - input.change(); + input.change(); + } } ); diff --git a/src/skins/admin/en/form_field/input/text/float.js b/src/skins/admin/en/form_field/input/text/float.js index 99eccd5bec..a148d842bc 100644 --- a/src/skins/admin/en/form_field/input/text/float.js +++ b/src/skins/admin/en/form_field/input/text/float.js @@ -17,28 +17,25 @@ CommonForm.elementControllers.push( this.sanitizeValue = function (value, input) { + if (!input) { + input = jQuery(this); + } + var e = input.data('e'); var dDelim = input.data('decimal-delim'); var tDelim = input.data('thousand-delim'); value = core.stringToNumber(value, dDelim, tDelim); - if (0 < e) { - - value = Math.round(value * Math.pow(10, e)); - - if (0 == value) { - - value = '0' + '.' + (new Array(e + 1).join('0')); - - } else { - - value = value.toString(); - value = value.substr(0, value.length - e) + '.' + value.substr(-1 * e); + if ('undefined' == typeof(e)) { + value = parseFloat(value); + if (isNaN(value)) { + value = 0; } } else { - value = Math.round(value); + var pow = Math.pow(10, e); + value = Math.round(value * pow) / pow; } return value; diff --git a/src/skins/admin/en/form_field/js/multiselect.js b/src/skins/admin/en/form_field/js/multiselect.js index 489e1df9e2..a32d77ac89 100644 --- a/src/skins/admin/en/form_field/js/multiselect.js +++ b/src/skins/admin/en/form_field/js/multiselect.js @@ -16,14 +16,35 @@ CommonElement.prototype.handlers.push( return 0 < this.$element.filter('select.multiselect').length; }, handler: function () { - var options = { minWidth: 300, header: false, selectedList: 2 }; + var options = { minWidth: this.$element.width(), header: false, selectedList: 2 }; if (this.$element.data('text')) { options.selectedText = this.$element.data('text'); } if (this.$element.data('header')) { options.header = true; + + } else if (this.$element.data('filter')) { + options.header = 'close'; + } + + if (this.$element.data('filter')) { + options.classes = 'ui-multiselect-with-filter'; } + this.$element.multiselect(options); + + if (this.$element.data('filter')) { + var options = {placeholder: this.$element.data('filter-placeholder')}; + this.$element.multiselectfilter(options); + jQuery('.ui-multiselect-filter').each( + function () { + if (3 == this.childNodes[0].nodeType) { + this.removeChild(this.childNodes[0]); + } + } + ); + } + } } ); diff --git a/src/skins/admin/en/form_field/js/rich.js b/src/skins/admin/en/form_field/js/rich.js new file mode 100644 index 0000000000..7f1c1c0673 --- /dev/null +++ b/src/skins/admin/en/form_field/js/rich.js @@ -0,0 +1,50 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Multiselect microcontroller + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.19 + */ + +CommonElement.prototype.handlers.push( + { + canApply: function () { + return 0 < this.$element.filter('select.rich').length; + }, + handler: function () { + var options = { minWidth: this.$element.width(), header: false, multiple: false, selectedList: 1 }; + if (this.$element.data('text')) { + options.selectedText = this.$element.data('text'); + } + if (this.$element.data('header')) { + options.header = true; + + } else if (this.$element.data('filter')) { + options.header = 'close'; + } + + if (this.$element.data('filter')) { + options.classes = 'ui-multiselect-with-filter'; + } + + this.$element.multiselect(options); + + if (this.$element.data('filter')) { + var options = {placeholder: this.$element.data('filter-placeholder')}; + this.$element.multiselectfilter(options); + jQuery('.ui-multiselect-filter').each( + function () { + if (3 == this.childNodes[0].nodeType) { + this.removeChild(this.childNodes[0]); + } + } + ); + + } + } + } +); diff --git a/src/skins/admin/en/items_list/items_list.js b/src/skins/admin/en/items_list/items_list.js index 369033c2ad..74fbbfc083 100644 --- a/src/skins/admin/en/items_list/items_list.js +++ b/src/skins/admin/en/items_list/items_list.js @@ -19,6 +19,8 @@ function ItemsList(cell, URLParams, URLAJAXParams) return; } + this.container.get(0).itemsListController = this; + this.cell = cell; this.URLParams = URLParams; this.URLAJAXParams = URLAJAXParams; diff --git a/src/skins/admin/en/items_list/model/table.tpl b/src/skins/admin/en/items_list/model/table.tpl index 466ad1899f..1abe56ce72 100644 --- a/src/skins/admin/en/items_list/model/table.tpl +++ b/src/skins/admin/en/items_list/model/table.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 *} -
+
diff --git a/src/skins/admin/en/items_list/model/table/body.tpl b/src/skins/admin/en/items_list/model/table/body.tpl index f98f5597c4..d248822b06 100644 --- a/src/skins/admin/en/items_list/model/table/body.tpl +++ b/src/skins/admin/en/items_list/model/table/body.tpl @@ -31,7 +31,7 @@ {if:column.template} {else:} - + {end:} diff --git a/src/skins/admin/en/items_list/model/table/parts/move.tpl b/src/skins/admin/en/items_list/model/table/parts/move.tpl index 86ed6f9381..f037125b06 100644 --- a/src/skins/admin/en/items_list/model/table/parts/move.tpl +++ b/src/skins/admin/en/items_list/model/table/parts/move.tpl @@ -10,4 +10,4 @@ * @since 1.0.15 *} - + diff --git a/src/skins/admin/en/items_list/model/table/parts/position.tpl b/src/skins/admin/en/items_list/model/table/parts/position.tpl index cba38c42ef..74f1e31a2c 100644 --- a/src/skins/admin/en/items_list/model/table/parts/position.tpl +++ b/src/skins/admin/en/items_list/model/table/parts/position.tpl @@ -10,4 +10,4 @@ * @since 1.0.15 *} - + diff --git a/src/skins/admin/en/items_list/model/table/parts/switcher.tpl b/src/skins/admin/en/items_list/model/table/parts/switcher.tpl index 339c81ef18..6aed131990 100644 --- a/src/skins/admin/en/items_list/model/table/parts/switcher.tpl +++ b/src/skins/admin/en/items_list/model/table/parts/switcher.tpl @@ -10,4 +10,4 @@ * @since 1.0.15 *} - + diff --git a/src/skins/admin/en/items_list/model/table/style.css b/src/skins/admin/en/items_list/model/table/style.css index ad9a7db2f0..2dd62bb06c 100644 --- a/src/skins/admin/en/items_list/model/table/style.css +++ b/src/skins/admin/en/items_list/model/table/style.css @@ -30,32 +30,37 @@ .items-list-table table.list thead th { color: #8f8f8f; font-weight: normal; - padding: 19px 12px 12px; + padding: 18px 12px 12px; font-size: 14px; text-align: left; border-bottom: 1px solid #d5d5d5; } .items-list-table table.list tbody td { - border-top: 1px solid #e9e9e9; border-bottom: 1px solid #e9e9e9; - padding: 10px 12px 6px; - font-size: 16px; - vertical-align: middle; - line-height: 25px; + padding: 8px 12px 6px; + line-height: 30px; + height: 48px; white-space: nowrap; } +.items-list-table table.list tbody tr.first td { + border-top: 1px solid #e9e9e9; +} + .items-list-table table.list tbody td.main { } +.items-list-table table.list tbody td, .items-list-table table.list tbody td .view, .items-list-table table.list tbody td .view * { - font-size: 16px; + font-size: 14px; } -.items-list-table table.list tbody td * { +.items-list-table table.list tbody td, +.items-list-table table.list tbody td * +{ vertical-align: middle; } @@ -66,19 +71,20 @@ } .items-list-table table.list tbody td.actions.left { - background-position: right 16px; - padding-right: 1px; + background-position: right 15px; + padding-right: 6px; + padding-left: 7px; } .items-list-table table.list tbody td.actions.right { - background-position: left 16px; + background-position: left 15px; padding-right: 6px; } .items-list-table table.list tbody td.actions .action { display: inline-block; padding-right: 2px; - height: 31px; + vertical-align: top; } .items-list-table table.list tbody td.actions .action.next { @@ -138,22 +144,37 @@ opacity: .3; } +.items-list-table table.list tbody .inline-field .field { + line-height: normal; +} + .items-list-table table.list tbody .inline-field .field input, .items-list-table table.list tbody .inline-field .field select, .items-list-table table.list tbody .inline-field .field textarea, .items-list-table table.list tbody .inline-field .field span.text { - font-size: 16px; + font-size: 14px; } .items-list-table table.list tbody .inline-field .field input, .items-list-table table.list tbody .inline-field .field select { - height: 18px; line-height: 18px; } .items-list-table table.list tbody .inline-field .field input { + height: 19px; + padding-top: 5px; + padding-left: 6px; + padding-right: 6px; + font-size: 14px; +} + +.items-list-table table.list tbody .inline-field .field select { + height: 29px; + width: auto; + margin-bottom: -2px; + padding-top: 6px; } .items-list-table table.list tbody .inline-field .table-value { @@ -163,3 +184,10 @@ .items-list-table table.list tbody.no-items td { text-align: center; } + +.items-list-table table.list tbody .field .subfield, +.items-list-table table.list tbody .field .subfield .table-value +{ + display: inline; +} + diff --git a/src/skins/admin/en/modules/CDev/GoSocial/product.tpl b/src/skins/admin/en/modules/CDev/GoSocial/product.tpl index ab36627ce7..3a572617aa 100644 --- a/src/skins/admin/en/modules/CDev/GoSocial/product.tpl +++ b/src/skins/admin/en/modules/CDev/GoSocial/product.tpl @@ -17,7 +17,7 @@
diff --git a/src/skins/common/js/core.form.js b/src/skins/common/js/core.form.js index 06766bc708..35e2b0976c 100644 --- a/src/skins/common/js/core.form.js +++ b/src/skins/common/js/core.form.js @@ -381,7 +381,7 @@ CommonForm.prototype.isChanged = function(onlyVisible) { return 0 < this.getElements().filter( function() { - return this.isChanged(onlyVisible); + return this.commonController ? this.commonController.isChanged(onlyVisible) : false; } ).length; } @@ -850,11 +850,11 @@ CommonElement.prototype.isChanged = function(onlyVisible) || isElement(this.element, 'select') || isElement(this.element, 'textarea') ) { - return !this.isEqualValues(this.element.initialValue, this.element.value, jQuery(this.element)); + return !this.isEqualValues(this.element.initialValue, this.element.value, this.$element); } if (isElement(this.element, 'input') && -1 != jQuery.inArray(this.element.type, ['checkbox', 'radio'])) { - return !this.isEqualValues(this.element.initialValue, this.element.checked, jQuery(this.element)); + return !this.isEqualValues(this.element.initialValue, this.element.checked, this.$element); } } From e2f2436fb0e82c5239f7ca0bcc8f971ef1ccda72 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 16 May 2012 04:38:04 +0400 Subject: [PATCH 025/562] E:0040373 [*] The Doctrine library is updated up to latest version (2.2) --- src/classes/XLite/Model/Address.php | 4 ++-- src/classes/XLite/Model/Order.php | 2 +- src/classes/XLite/Model/Profile.php | 2 +- src/classes/XLite/Model/Repo/ARepo.php | 12 +++--------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/classes/XLite/Model/Address.php b/src/classes/XLite/Model/Address.php index a3aaa37b91..0cf38fc97b 100644 --- a/src/classes/XLite/Model/Address.php +++ b/src/classes/XLite/Model/Address.php @@ -33,8 +33,8 @@ * @see ____class_see____ * @since 1.0.0 * - * @Entity - * @Table (name="profile_addresses", + * @Entity (repositoryClass="\XLite\Model\Repo\Address") + * @Table (name="profile_addresses", * indexes={ * @Index (name="is_billing", columns={"is_billing"}), * @Index (name="is_shipping", columns={"is_shipping"}) diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index b1a4821390..f584852bd3 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -94,7 +94,7 @@ class Order extends \XLite\Model\Base\SurchargeOwner * @see ____var_see____ * @since 1.0.0 * - * @ManyToOne (targetEntity="XLite\Model\Profile", cascade={"persist"}) + * @OneToOne (targetEntity="XLite\Model\Profile", cascade={"all"}) * @JoinColumn (name="profile_id", referencedColumnName="profile_id") */ protected $profile; diff --git a/src/classes/XLite/Model/Profile.php b/src/classes/XLite/Model/Profile.php index fc3999e820..54d7c6180c 100644 --- a/src/classes/XLite/Model/Profile.php +++ b/src/classes/XLite/Model/Profile.php @@ -201,7 +201,7 @@ class Profile extends \XLite\Model\AEntity * @see ____var_see____ * @since 1.0.0 * - * @OneToOne (targetEntity="XLite\Model\Order") + * @OneToOne (targetEntity="XLite\Model\Order") * @JoinColumn (name="order_id", referencedColumnName="order_id") */ protected $order; diff --git a/src/classes/XLite/Model/Repo/ARepo.php b/src/classes/XLite/Model/Repo/ARepo.php index d68b881862..9b81e7b960 100644 --- a/src/classes/XLite/Model/Repo/ARepo.php +++ b/src/classes/XLite/Model/Repo/ARepo.php @@ -1073,20 +1073,14 @@ public function processSchema(array $schema, $type) if (\XLite\Core\Database::SCHEMA_UPDATE == $type || \XLite\Core\Database::SCHEMA_CREATE == $type) { foreach ($this->getDetailedForeignKeys() as $cell) { - if ( - is_array($cell) - && isset($cell['fields']) - && is_array($cell['fields']) - && $cell['fields'] - && isset($cell['referenceRepo']) - && $cell['referenceRepo'] - ) { + if (is_array($cell) && !empty($cell['fields']) && !empty($cell['referenceRepo'])) { + if (!isset($cell['referenceFields']) || !is_array($cell['referenceFields'])) { $cell['referenceFields'] = $cell['fields']; } $pattern = '/(' . $this->_class->getTableName() . '`' - . ' ADD FOREIGN KEY \(`' . implode('`,`', $cell['fields']) . '`\)' + . ' ADD CONSTRAINT \w+ FOREIGN KEY \(`' . implode('`,`', $cell['fields']) . '`\)' . ' REFERENCES `' . $this->_em->getClassMetadata($cell['referenceRepo'])->getTableName() . '`' . ' \(`' . implode('`,`', $cell['referenceFields']) . '`\))\s*(?:.+)?$/Ss'; From 7f2572310092871ed412068cde6e371312859376 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 28 May 2012 21:08:03 +0400 Subject: [PATCH 026/562] [*] Small design changes --- src/skins/admin/en/form_field/form_field.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/skins/admin/en/form_field/form_field.css b/src/skins/admin/en/form_field/form_field.css index e1d5a865ac..20aa3fbcc9 100644 --- a/src/skins/admin/en/form_field/form_field.css +++ b/src/skins/admin/en/form_field/form_field.css @@ -68,8 +68,8 @@ button.ui-state-default span.ui-icon { } .ui-multiselect-checkboxes li { - padding-left: 7px; - padding-right: 9px; + padding-left: 17px; + padding-right: 19px; } .ui-multiselect-checkboxes li.ui-multiselect-optgroup-label { From ead2d37e1e058387bafe63fa61c884d29436b25c Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 30 May 2012 16:27:26 +0400 Subject: [PATCH 027/562] [*] Several changes for zero-total orders on the cart page. --- src/classes/XLite/View/Checkout/Step/AStep.php | 8 ++++---- .../XLite/View/Checkout/Step/Payment.php | 18 +++++++++++++++--- .../XLite/View/Checkout/Step/Shipping.php | 8 ++++---- src/classes/XLite/View/Checkout/Steps.php | 4 ++-- src/skins/default/en/checkout/steps.tpl | 2 +- .../en/shopping_cart/parts/box.estimator.tpl | 2 +- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/classes/XLite/View/Checkout/Step/AStep.php b/src/classes/XLite/View/Checkout/Step/AStep.php index c8cfef3233..a5b4912616 100644 --- a/src/classes/XLite/View/Checkout/Step/AStep.php +++ b/src/classes/XLite/View/Checkout/Step/AStep.php @@ -94,15 +94,15 @@ public function getStepsCollector() } /** - * Check - step is disabled or not + * Check - step is enabled (true) or skipped (false) * * @return boolean * @see ____func_see____ * @since 1.0.0 */ - public function isDisabled() + public function isEnabled() { - return false; + return true; } /** @@ -160,7 +160,7 @@ protected function getStepTemplate() { $path = 'checkout/steps/' . $this->getStepName() . '/'; - if ($this->isDisabled()) { + if (!$this->isEnabled()) { $path .= 'disabled.tpl'; } elseif ($this->isCurrent()) { diff --git a/src/classes/XLite/View/Checkout/Step/Payment.php b/src/classes/XLite/View/Checkout/Step/Payment.php index 2748d13d3c..72dcf0bbee 100644 --- a/src/classes/XLite/View/Checkout/Step/Payment.php +++ b/src/classes/XLite/View/Checkout/Step/Payment.php @@ -68,6 +68,18 @@ public function getTitle() return 'Payment info'; } + /** + * Check - step is enabled (true) or skipped (false) + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isEnabled() + { + return parent::isEnabled() && (!$this->getCart()->isPayed()); + } + /** * Check if step is completed * @@ -164,10 +176,10 @@ public function isDisplayAddressButton() } /** - * Prepare payment method icon - * + * Prepare payment method icon + * * @param string $icon Icon local path - * + * * @return string * @see ____func_see____ * @since 1.0.0 diff --git a/src/classes/XLite/View/Checkout/Step/Shipping.php b/src/classes/XLite/View/Checkout/Step/Shipping.php index 99e71975ba..7f45be55ac 100644 --- a/src/classes/XLite/View/Checkout/Step/Shipping.php +++ b/src/classes/XLite/View/Checkout/Step/Shipping.php @@ -77,7 +77,7 @@ public function getTitle() */ public function isCompleted() { - return $this->isDisabled() + return !$this->isEnabled() || ( $this->getCart()->getProfile() && $this->getCart()->getProfile()->getShippingAddress() @@ -155,15 +155,15 @@ public function isDisplayAddressButton() } /** - * Check - step is disabled or not + * Check - step is enabled (true) or skipped (false) * * @return boolean * @see ____func_see____ * @since 1.0.0 */ - public function isDisabled() + public function isEnabled() { - return parent::isDisabled() || !$this->isShippingEnabled(); + return parent::isEnabled() && $this->isShippingEnabled(); } /** diff --git a/src/classes/XLite/View/Checkout/Steps.php b/src/classes/XLite/View/Checkout/Steps.php index 83eefd875c..f8bab7b34f 100644 --- a/src/classes/XLite/View/Checkout/Steps.php +++ b/src/classes/XLite/View/Checkout/Steps.php @@ -145,9 +145,9 @@ public function isCurrentStep(\XLite\View\Checkout\Step\AStep $step) * @see ____func_see____ * @since 1.0.0 */ - public function isDisabledStep(\XLite\View\Checkout\Step\AStep $step) + public function isEnabledStep(\XLite\View\Checkout\Step\AStep $step) { - return $step->isDisabled(); + return $step->isEnabled(); } /** diff --git a/src/skins/default/en/checkout/steps.tpl b/src/skins/default/en/checkout/steps.tpl index d673eddb3e..d4cb24f4e9 100644 --- a/src/skins/default/en/checkout/steps.tpl +++ b/src/skins/default/en/checkout/steps.tpl @@ -16,7 +16,7 @@ class="step {stepKey}-step {if:isCurrentStep(step)}current{else:}inactive{end:} - {if:isDisabledStep(step)}disabled{end:} + {if:!isEnabledStep(step)}disabled{end:} {if:isPreviousStep(step)}previous{end:} {if:hasLeftArrow(step)}left-arrow{end:} {if:hasRightArrow(step)}right-arrow{end:} diff --git a/src/skins/default/en/shopping_cart/parts/box.estimator.tpl b/src/skins/default/en/shopping_cart/parts/box.estimator.tpl index 38d8702265..d5cea41244 100644 --- a/src/skins/default/en/shopping_cart/parts/box.estimator.tpl +++ b/src/skins/default/en/shopping_cart/parts/box.estimator.tpl @@ -25,7 +25,7 @@ {else:} From e9f76e81b0e2f71aea5ff2b7e9725794393283e8 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 31 May 2012 14:54:48 +0400 Subject: [PATCH 028/562] [+] Zero total orders test is added. [*] Several web-test improvements. --- .dev/tests/PHPUnit/SeleniumTestCase.php | 66 +++++++++++++ .dev/tests/Web/Admin/AAdmin.php | 14 +-- .dev/tests/Web/Customer/ACustomer.php | 17 +--- .dev/tests/Web/Customer/ZeroTotalCheckout.php | 98 +++++++++++++++++++ src/classes/XLite/Model/Cart.php | 5 +- 5 files changed, 172 insertions(+), 28 deletions(-) create mode 100644 .dev/tests/Web/Customer/ZeroTotalCheckout.php diff --git a/.dev/tests/PHPUnit/SeleniumTestCase.php b/.dev/tests/PHPUnit/SeleniumTestCase.php index 7d4a190cff..d9e167bb01 100644 --- a/.dev/tests/PHPUnit/SeleniumTestCase.php +++ b/.dev/tests/PHPUnit/SeleniumTestCase.php @@ -601,16 +601,82 @@ protected function setCustomerURL() $this->setBrowserUrl($this->baseURL); } + /** + * Open the customer area + * + * @param type $shortURL + * @return type + */ protected function openShortCustomerAndWait($shortURL) { return $this->openAndWait(rtrim(SELENIUM_SOURCE_URL, '/') . '/' . $shortURL); } + /** + * Open the admin area + * + * @param type $shortURL + * @return type + */ protected function openShortAdminAndWait($shortURL) { return $this->openAndWait(rtrim(SELENIUM_SOURCE_URL_ADMIN, '/') . '/' . $shortURL); } + /** + * Login procedure to the admin area + * + * @param string $user user name + * @param string $password user password + * + * @return void + * @access protected + * @see ____func_see____ + * @since 1.0.0 + */ + protected function logInAdmin($user = 'rnd_tester@cdev.ru', $password = 'master') + { + $this->openShortAdminAndWait('admin.php'); + + if ($this->isLoggedIn()) { + return; + //$this->logOut(true); + } + + $this->type("//input[@name='login' and @type='text']", $user); + $this->type("//input[@name='password' and @type='password']", $password); + + $this->click("//button[@class='main-button' and @type='submit']"); + + $this->waitForPageToLoad(30000); + } + + /** + * Log in to the customer area + * + * @param string $username ____param_comment____ + * @param string $password ____param_comment____ + * + * @return void + * @see ____func_see____ + * @since 1.0.10 + */ + protected function logInCustomer($username = 'master', $password = 'master') + { + $this->openShortCustomerAndWait('user'); + + if ($this->isLoggedIn()) { + $this->logOut(true); + } + + $this->type('id=edit-name', $username); + $this->type('id=edit-pass', $password); + + $this->submitAndWait('id=user-login'); + + $this->assertTrue($this->isLoggedIn(), 'Check that user is logged in successfully'); + } + /** * PHPUnit default function. * It's not recommended to redefine this method diff --git a/.dev/tests/Web/Admin/AAdmin.php b/.dev/tests/Web/Admin/AAdmin.php index 76adea19a6..af7e943cda 100644 --- a/.dev/tests/Web/Admin/AAdmin.php +++ b/.dev/tests/Web/Admin/AAdmin.php @@ -43,19 +43,7 @@ abstract class XLite_Web_Admin_AAdmin extends XLite_Web_AWeb */ protected function logIn($user = 'rnd_tester@cdev.ru', $password = 'master') { - $this->open('admin.php'); - - if ($this->isLoggedIn()) { - return; - //$this->logOut(true); - } - - $this->type("//input[@name='login' and @type='text']", $user); - $this->type("//input[@name='password' and @type='password']", $password); - - $this->click("//button[@class='main-button' and @type='submit']"); - - $this->waitForPageToLoad(30000); + $this->logInAdmin($user, $password); } /** diff --git a/.dev/tests/Web/Customer/ACustomer.php b/.dev/tests/Web/Customer/ACustomer.php index 130fcc7243..53f95a5781 100644 --- a/.dev/tests/Web/Customer/ACustomer.php +++ b/.dev/tests/Web/Customer/ACustomer.php @@ -30,7 +30,7 @@ require_once __DIR__ . '/../AWeb.php'; /** - * XLite_Web_Customer_ACustomer + * XLite_Web_Customer_ACustomer * * @see ____class_see____ * @since 1.0.10 @@ -49,18 +49,7 @@ abstract class XLite_Web_Customer_ACustomer extends XLite_Web_AWeb */ protected function logIn($username = 'master', $password = 'master') { - $this->open('user'); - - if ($this->isLoggedIn()) { - $this->logOut(true); - } - - $this->type('id=edit-name', $username); - $this->type('id=edit-pass', $password); - - $this->submitAndWait('id=user-login'); - - $this->assertTrue($this->isLoggedIn(), 'Check that user is logged in successfully'); + $this->logInCustomer($username, $password); } /** @@ -219,7 +208,7 @@ protected function resetBrowser() protected function getPaymentMethodIdByName($name) { $pmethod = \XLite\Core\Database::getRepo('XLite\Model\Payment\Method')->findOneBy(array('service_name' => $name)); - + if (!$pmethod) { $this->fail($name . ' payment method is not found'); } diff --git a/.dev/tests/Web/Customer/ZeroTotalCheckout.php b/.dev/tests/Web/Customer/ZeroTotalCheckout.php new file mode 100644 index 0000000000..f9b819f9cd --- /dev/null +++ b/.dev/tests/Web/Customer/ZeroTotalCheckout.php @@ -0,0 +1,98 @@ + + * @copyright Copyright (c) 2010 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + * + * @resource user + * @resource admin_address_book + * @resource order + * @resource product + * @use shipping_method + */ + +require_once __DIR__ . '/ACustomer.php'; + +class XLite_Web_Customer_ZeroTotalCheckout extends XLite_Web_Customer_ACustomer +{ + /** + * PHPUnit default function. + * Redefine this method only if you really need to do so. + * In any other cases redefine the getRequest() one + * + * @return void + * @access protected + * @see ____func_see____ + * @since 1.0.0 + */ + protected function addToCart() + { + $product = \XLite\Core\Database::getRepo('XLite\Model\Product') + ->createQueryBuilder() + ->setMaxResults(1) + ->getQuery() + ->getSingleResult(); + + $this->openAndWait('store/product//product_id-' . $product->getProductId()); + + $this->click("//button[@class='bright add2cart']"); + + $this->waitForLocalCondition( + 'jQuery(".product-details .product-buttons-added .buy-more").length > 0', + 100000, + 'check content reloading' + ); + + return $product; + } + + public function testPayment() + { + $product = $this->addToCart(); + + // Change the product price to 0 (Payment is not required should be) + $this->logInAdmin(); + + $this->openShortAdminAndWait('admin.php?target=product&id=' . $product->getProductId()); + + $this->type('//input[@name="postedData[price]"]', '0'); + + $this->clickAndWait('//button[@type="submit"]'); + + $this->openAndWait('store/checkout'); + + $this->assertElementPresent("//div[@class='step-box' and text()='Payment is not required']"); + + // Change the product price to 1.00 (No "Payment is not required" block should be) + $this->openShortAdminAndWait('admin.php?target=product&id=' . $product->getProductId()); + + $this->type('//input[@name="postedData[price]"]', '1'); + + $this->clickAndWait('//button[@type="submit"]'); + + $this->openAndWait('store/checkout'); + + $this->assertElementNotPresent("//div[@class='step-box' and text()='Payment is not required']"); + } + +} diff --git a/src/classes/XLite/Model/Cart.php b/src/classes/XLite/Model/Cart.php index ee2cf53aeb..b6a3fe20fb 100644 --- a/src/classes/XLite/Model/Cart.php +++ b/src/classes/XLite/Model/Cart.php @@ -108,7 +108,10 @@ public static function getInstance() \XLite\Core\Database::getEM()->flush(); - if (time() - static::RENEW_PERIOD > $cart->getLastRenewDate()) { + if ( + \XLite\Model\Order::STATUS_TEMPORARY == $cart->getStatus() + || ((time() - static::RENEW_PERIOD) > $cart->getLastRenewDate()) + ) { $cart->renew(); } From c23b422319d7a70fea9ab8645f3650649d1575e9 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 4 Jun 2012 01:53:09 +0400 Subject: [PATCH 029/562] [*] Add Pinterest button (GoSocial module) --- .../CDev/GoSocial/View/Button/Pinterest.php | 119 ++++++++++++++++++ .../GoSocial/View/ExternalSDK/Pinterest.php | 50 ++++++++ .../XLite/Module/CDev/GoSocial/install.yaml | 16 ++- .../CDev/GoSocial/button/pinterest.tpl | 15 +++ .../en/modules/CDev/GoSocial/product.css | 9 +- .../modules/CDev/GoSocial/sdk/pinterest.tpl | 13 ++ .../en/modules/CDev/GoSocial/share_bottom.tpl | 15 +++ 7 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php create mode 100644 src/classes/XLite/Module/CDev/GoSocial/View/ExternalSDK/Pinterest.php create mode 100644 src/skins/default/en/modules/CDev/GoSocial/button/pinterest.tpl create mode 100644 src/skins/default/en/modules/CDev/GoSocial/sdk/pinterest.tpl create mode 100644 src/skins/default/en/modules/CDev/GoSocial/share_bottom.tpl diff --git a/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php b/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php new file mode 100644 index 0000000000..e228700496 --- /dev/null +++ b/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php @@ -0,0 +1,119 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\GoSocial\View\Button; + +/** + * Pinterest button + * + * @see ____class_see____ + * @since 1.0.0 + * + * @ListChild (list="product.details.page.info.share.bar", weight="300") + */ +class Pinterest extends \XLite\View\AView +{ + /** + * Button URL + */ + const BUTTON_URL = 'http://pinterest.com/pin/create/button/?'; + + /** + * Return widget default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'modules/CDev/GoSocial/button/pinterest.tpl'; + } + + /** + * Get button attributes + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getButtonAttributes() + { + return array( + 'count-layout' => 'horizontal', + ); + } + + /** + * Get button URL (query part) + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getButtonURL() + { + $query = array(); + foreach ($this->getButtonURLQuery() as $name => $value) { + $query[] = $name . '=' . urlencode($value); + } + + return static::BUTTON_URL . implode('&', $query); + } + + /** + * Get button URL (query part) + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getButtonURLQuery() + { + return array( + 'url' => \XLite::getInstance()->getShopURL($this->getURL()), + 'media' => $this->getProduct()->getImage()->getFrontURL(), + 'description' => $this->getProduct()->getName(), + + ); + } + + /** + * Check if widget is visible + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isVisible() + { + return parent::isVisible() + && $this->getProduct()->getImage()->isExists() + && \XLite\Core\Config::getInstance()->CDev->GoSocial->pinterest_use; + } + +} diff --git a/src/classes/XLite/Module/CDev/GoSocial/View/ExternalSDK/Pinterest.php b/src/classes/XLite/Module/CDev/GoSocial/View/ExternalSDK/Pinterest.php new file mode 100644 index 0000000000..e9f44d62a2 --- /dev/null +++ b/src/classes/XLite/Module/CDev/GoSocial/View/ExternalSDK/Pinterest.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.15 + */ + +namespace XLite\Module\CDev\GoSocial\View\ExternalSDK; + +/** + * Pinterest SDK loader + * + * @see ____class_see____ + * @since 1.0.15 + */ +class Pinterest extends \XLite\View\ExternalSDK\AExternalSDK +{ + /** + * Return widget default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'modules/CDev/GoSocial/sdk/pinterest.tpl'; + } +} + diff --git a/src/classes/XLite/Module/CDev/GoSocial/install.yaml b/src/classes/XLite/Module/CDev/GoSocial/install.yaml index c5b0d386a9..2be699c601 100644 --- a/src/classes/XLite/Module/CDev/GoSocial/install.yaml +++ b/src/classes/XLite/Module/CDev/GoSocial/install.yaml @@ -178,6 +178,20 @@ XLite\Model\Config: translations: - code: en option_name: 'Display the Google+ button on product pages' - + - name: gosocial_sep_5 + category: 'CDev\GoSocial' + type: separator + orderby: 4000 + translations: + - code: en + option_name: 'Pinterest button settings' + - name: pinterest_use + category: 'CDev\GoSocial' + type: checkbox + orderby: 4050 + value: true + translations: + - code: en + option_name: 'Display the Pinterest button on product pages' XLite\Model\LanguageLabel: - { name: Tweet, translations: [{ code: en, label: 'Tweet' }] } diff --git a/src/skins/default/en/modules/CDev/GoSocial/button/pinterest.tpl b/src/skins/default/en/modules/CDev/GoSocial/button/pinterest.tpl new file mode 100644 index 0000000000..ad8e270597 --- /dev/null +++ b/src/skins/default/en/modules/CDev/GoSocial/button/pinterest.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Pinterest button + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} +
+ {t(#Pin It#)} +
+ diff --git a/src/skins/default/en/modules/CDev/GoSocial/product.css b/src/skins/default/en/modules/CDev/GoSocial/product.css index 791cf20102..20f166a4c9 100644 --- a/src/skins/default/en/modules/CDev/GoSocial/product.css +++ b/src/skins/default/en/modules/CDev/GoSocial/product.css @@ -12,7 +12,6 @@ .share { position: relative; - height: 70px; } .share .bar { @@ -20,10 +19,16 @@ width: 113px; } -.share .bar .twitter-share-button { +.share .bar .twitter-share-button, +.share .bar .gplus +{ margin-bottom: 15px; } .share .fb-like { float: left; } + +.share .clear { + clear: both; +} diff --git a/src/skins/default/en/modules/CDev/GoSocial/sdk/pinterest.tpl b/src/skins/default/en/modules/CDev/GoSocial/sdk/pinterest.tpl new file mode 100644 index 0000000000..64cf1dd2a0 --- /dev/null +++ b/src/skins/default/en/modules/CDev/GoSocial/sdk/pinterest.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Pinterest SDK loader + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + + diff --git a/src/skins/default/en/modules/CDev/GoSocial/share_bottom.tpl b/src/skins/default/en/modules/CDev/GoSocial/share_bottom.tpl new file mode 100644 index 0000000000..fca69f5e31 --- /dev/null +++ b/src/skins/default/en/modules/CDev/GoSocial/share_bottom.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Share bottom + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.15 + * + * @ListChild (list="product.details.page.info.share", weight="10000") + *} + +
From bad6705e561bb1a9ba4bc6adef7e35104c9c7f68 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 4 Jun 2012 12:24:42 +0400 Subject: [PATCH 030/562] [*] Add Catalog module --- .../CDev/Catalog/Controller/Customer/Cart.php | 55 ++++++++++++ .../Catalog/Controller/Customer/Order.php | 55 ++++++++++++ .../Catalog/Controller/Customer/OrderList.php | 55 ++++++++++++ .../Module/CDev/Catalog/Drupal/Module.php | 73 +++++++++++++++ .../XLite/Module/CDev/Catalog/Main.php | 86 ++++++++++++++++++ .../CDev/Catalog/Model/Repo/ViewList.php | 74 +++++++++++++++ .../ItemsList/Product/Customer/ACustomer.php | 72 +++++++++++++++ .../Module/CDev/Catalog/View/Minicart.php | 49 ++++++++++ .../CDev/Catalog/View/ProductOptions.php | 89 +++++++++++++++++++ .../Module/CDev/Catalog/View/Tabs/Account.php | 58 ++++++++++++ .../XLite/Module/CDev/Catalog/install.yaml | 18 ++++ .../modules/CDev/Catalog/disable_dragging.js | 32 +++++++ .../en/modules/CDev/Catalog/product.css | 28 ++++++ 13 files changed, 744 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Cart.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Order.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/Controller/Customer/OrderList.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/Drupal/Module.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/Main.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/Model/Repo/ViewList.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/View/ItemsList/Product/Customer/ACustomer.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/View/Minicart.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/View/ProductOptions.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/View/Tabs/Account.php create mode 100644 src/classes/XLite/Module/CDev/Catalog/install.yaml create mode 100644 src/skins/default/en/modules/CDev/Catalog/disable_dragging.js create mode 100644 src/skins/default/en/modules/CDev/Catalog/product.css diff --git a/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Cart.php b/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Cart.php new file mode 100644 index 0000000000..70cd9e95be --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Cart.php @@ -0,0 +1,55 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\Controller\Customer; + +/** + * Cart + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Cart extends \XLite\Controller\Customer\Cart implements \XLite\Base\IDecorator +{ + /** + * Handles the request. + * Parses the request variables if necessary. Attempts to call the specified action function + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function handleRequest() + { + if (\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout) { + $this->redirect($this->buildUrl(\XLite::TARGET_DEFAULT)); + + } else { + parent::handleRequest(); + } + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Order.php b/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Order.php new file mode 100644 index 0000000000..d93106f373 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/Order.php @@ -0,0 +1,55 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\Controller\Customer; + +/** + * Order + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Order extends \XLite\Controller\Customer\Order implements \XLite\Base\IDecorator +{ + /** + * Handles the request. + * Parses the request variables if necessary. Attempts to call the specified action function + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function handleRequest() + { + if (\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout) { + $this->redirect($this->buildUrl('profile')); + + } else { + parent::handleRequest(); + } + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/OrderList.php b/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/OrderList.php new file mode 100644 index 0000000000..f01eff0eea --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/Controller/Customer/OrderList.php @@ -0,0 +1,55 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\Controller\Customer; + +/** + * OrderList + * + * @see ____class_see____ + * @since 1.0.0 + */ +class OrderList extends \XLite\Controller\Customer\OrderList implements \XLite\Base\IDecorator +{ + /** + * Handles the request. + * Parses the request variables if necessary. Attempts to call the specified action function + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function handleRequest() + { + if (\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout) { + $this->redirect($this->buildUrl('profile')); + + } else { + parent::handleRequest(); + } + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/Drupal/Module.php b/src/classes/XLite/Module/CDev/Catalog/Drupal/Module.php new file mode 100644 index 0000000000..492d0d3e99 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/Drupal/Module.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\Drupal; + +/** + * Handler + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Module extends \XLite\Module\CDev\DrupalConnector\Drupal\Module implements \XLite\Base\IDecorator +{ + /** + * Catalog portal to remove + * + * @var array + * @see ____var_see____ + * @since 1.0.23 + */ + protected $catalogToRemove = array( + '\XLite\Controller\Customer\OrderList', + '\XLite\Controller\Customer\Order', + '\XLite\Controller\Customer\Invoice', + ); + + /** + * Register a portal + * + * @param string $url Drupal URL + * @param string $controller Controller class name + * @param string $title Portal title OPTIONAL + * @param integer $type Node type OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function registerPortal($url, $controller, $title = '', $type = MENU_LOCAL_TASK) + { + if ( + !\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout + || !in_array($controller, $this->catalogToRemove) + ) { + parent::registerPortal($url, $controller, $title, $type); + } + } + +} diff --git a/src/classes/XLite/Module/CDev/Catalog/Main.php b/src/classes/XLite/Module/CDev/Catalog/Main.php new file mode 100644 index 0000000000..9cef898aab --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/Main.php @@ -0,0 +1,86 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog; + +/** + * Catalog module main class + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class Main extends \XLite\Module\AModule +{ + /** + * Author name + * + * @return string + * @see ____func_see____ + * @since 1.0.10 + */ + public static function getAuthorName() + { + return 'Creative Development LLC'; + } + + /** + * Module version + * + * @return string + * @see ____func_see____ + * @since 1.0.10 + */ + public static function getMinorVersion() + { + return '0'; + } + + /** + * Module name + * + * @return string + * @see ____func_see____ + * @since 1.0.10 + */ + public static function getModuleName() + { + return 'Catalog'; + } + + /** + * Module description + * + * @return string + * @see ____func_see____ + * @since 1.0.10 + */ + public static function getDescription() + { + return 'Disables checkout and makes your website a plain catalog' + . ' of products which customers can browse but can\'t buy online.'; + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/Model/Repo/ViewList.php b/src/classes/XLite/Module/CDev/Catalog/Model/Repo/ViewList.php new file mode 100644 index 0000000000..dfaf80ce4f --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/Model/Repo/ViewList.php @@ -0,0 +1,74 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\Model\Repo; + +/** + * ViewList + * + * @see ____class_see____ + * @since 1.0.0 + */ +class ViewList extends \XLite\Model\Repo\ViewList implements \XLite\Base\IDecorator +{ + /** + * Templates to hide + * + * @var array + * @see ____var_see____ + * @since 1.0.23 + */ + protected $templatesToHide = array( + 'product/details/parts/common.button-add2cart.tpl', + 'product/details/parts/common.qty.tpl', + 'items_list/product/parts/common.drag-n-drop-handle.tpl', + 'items_list/product/parts/common.button-add2cart.tpl', + 'items_list/product/parts/table.captions.add2cart-button.tpl', + ); + + /** + * Define query builder for findClassList() + * + * @param string $list Class list name + * @param string $zone Current interface name + * + * @return \Doctrine\ORM\QueryBuilder + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineClassListQuery($list, $zone) + { + $qb = parent::defineClassListQuery($list, $zone); + + if (\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout) { + $qb->andWhere($qb->expr()->notIn('v.tpl', $this->templatesToHide)); + } + + return $qb; + } + +} diff --git a/src/classes/XLite/Module/CDev/Catalog/View/ItemsList/Product/Customer/ACustomer.php b/src/classes/XLite/Module/CDev/Catalog/View/ItemsList/Product/Customer/ACustomer.php new file mode 100644 index 0000000000..3adedf1779 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/View/ItemsList/Product/Customer/ACustomer.php @@ -0,0 +1,72 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\View\ItemsList\Product\Customer; + +/** + * ACustomer + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class ACustomer extends \XLite\View\ItemsList\Product\Customer\ACustomer implements \XLite\Base\IDecorator +{ + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/Catalog/product.css'; + + return $list; + } + + /** + * Register JS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + if (\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout) { + $list[] = 'modules/CDev/Catalog/disable_dragging.js'; + } + + return $list; + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/View/Minicart.php b/src/classes/XLite/Module/CDev/Catalog/View/Minicart.php new file mode 100644 index 0000000000..c86b53888e --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/View/Minicart.php @@ -0,0 +1,49 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\View; + +/** + * Minicart + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Minicart extends \XLite\View\Minicart implements \XLite\Base\IDecorator +{ + /** + * Check if widget is visible + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isVisible() + { + return !\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout && parent::isVisible(); + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/View/ProductOptions.php b/src/classes/XLite/Module/CDev/Catalog/View/ProductOptions.php new file mode 100644 index 0000000000..d48329a27b --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/View/ProductOptions.php @@ -0,0 +1,89 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\View; + +/** + * Product options list + * + * @see ____class_see____ + * @since 1.0.0 + * + * @LC_Dependencies ("CDev\ProductOptions") + */ +abstract class ProductOptions extends \XLite\Module\CDev\ProductOptions\View\ProductOptions implements \XLite\Base\IDecorator +{ + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/Catalog/product.css'; + + return $list; + } + + /** + * Get product options + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getOptions() + { + $list = parent::getOptions(); + + foreach ($list as $k => $optionGroup) { + if (\XLite\Module\CDev\ProductOptions\Model\OptionGroup::GROUP_TYPE != $optionGroup->getType()) { + unset($list[$k]); + } + } + + return $list; + } + + /** + * Get template name by option group + * + * @param \XLite\Module\CDev\ProductOptions\Model\OptionGroup $option Option group + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getTemplateNameByOption(\XLite\Module\CDev\ProductOptions\Model\OptionGroup $option) + { + return 'modules/CDev/ProductOptions/display/radio.tpl'; + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/View/Tabs/Account.php b/src/classes/XLite/Module/CDev/Catalog/View/Tabs/Account.php new file mode 100644 index 0000000000..4025fdd6da --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/View/Tabs/Account.php @@ -0,0 +1,58 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Catalog\View\Tabs; + +/** + * Account + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Account extends \XLite\View\Tabs\Account implements \XLite\Base\IDecorator +{ + + /** + * Returns an array(tab) descriptions + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getTabs() + { + $tabs = parent::getTabs(); + + if (\XLite\Core\Config::getInstance()->CDev->Catalog->disable_checkout) { + if (isset($tabs['order_list'])) { + unset($tabs['order_list']); + } + } + + return $tabs; + } +} diff --git a/src/classes/XLite/Module/CDev/Catalog/install.yaml b/src/classes/XLite/Module/CDev/Catalog/install.yaml new file mode 100644 index 0000000000..77c4f1fcff --- /dev/null +++ b/src/classes/XLite/Module/CDev/Catalog/install.yaml @@ -0,0 +1,18 @@ +# vim: set ts=2 sw=2 sts=2 et: +# +# Data dump +# +# @author Creative Development LLC +# @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved +# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +# @link http://www.litecommerce.com/ +# @since 1.0.23 +XLite\Model\Config: + - name: disable_checkout + category: CDev\Catalog + type: checkbox + orderby: 100 + value: Y + translations: + - code: en + option_name: Disable checkout diff --git a/src/skins/default/en/modules/CDev/Catalog/disable_dragging.js b/src/skins/default/en/modules/CDev/Catalog/disable_dragging.js new file mode 100644 index 0000000000..00b511b659 --- /dev/null +++ b/src/skins/default/en/modules/CDev/Catalog/disable_dragging.js @@ -0,0 +1,32 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Disables dragging + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + +function disableDragging() +{ + var draggablePattern = '.products-grid .product, .products-list .product, .products-sidebar .product'; + jQuery(draggablePattern).draggable('disable').removeClass('ui-state-disabled'); +} + +core.bind( + 'load', + function() { + decorate( + 'ProductsListView', + 'postprocess', + function(isSuccess, initial) + { + arguments.callee.previousMethod.apply(this, arguments); + disableDragging(); + } + ) + } +); diff --git a/src/skins/default/en/modules/CDev/Catalog/product.css b/src/skins/default/en/modules/CDev/Catalog/product.css new file mode 100644 index 0000000000..789e0f3665 --- /dev/null +++ b/src/skins/default/en/modules/CDev/Catalog/product.css @@ -0,0 +1,28 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Product page styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.23 + */ + +ul.product-options li input { + display: none; +} + +ul.product-options ul li { + list-style-type: disc; + color: #53769d; +} + +ul.product-options ul { + padding-left: 20px; +} + +ul.product-options ul li label { + vertical-align: middle; +} From 1937a508b313b643713c5e27e2324d2a959cf4cf Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Mon, 4 Jun 2012 18:04:02 +0400 Subject: [PATCH 031/562] E:41521 [!] Bug: Place order button was not enabled. --- src/classes/XLite/View/Checkout/Step/Payment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/View/Checkout/Step/Payment.php b/src/classes/XLite/View/Checkout/Step/Payment.php index 72dcf0bbee..b2ed9a42f2 100644 --- a/src/classes/XLite/View/Checkout/Step/Payment.php +++ b/src/classes/XLite/View/Checkout/Step/Payment.php @@ -92,7 +92,7 @@ public function isCompleted() return $this->getCart()->getProfile() && $this->getCart()->getProfile()->getBillingAddress() && $this->getCart()->getProfile()->getBillingAddress()->isCompleted(\XLite\Model\Address::BILLING) - && $this->getCart()->getPaymentMethod(); + && ($this->getCart()->isPayed() || $this->getCart()->getPaymentMethod()); } /** From b24345fdbb95ca8a76757c0e0a6d8a5f0092c18c Mon Sep 17 00:00:00 2001 From: Vladimir Mityukov Date: Mon, 4 Jun 2012 22:31:24 +0400 Subject: [PATCH 032/562] Started new module: Price beater. --- .../VladimirMityukov/PriceBeater/Main.php | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/classes/XLite/Module/VladimirMityukov/PriceBeater/Main.php diff --git a/src/classes/XLite/Module/VladimirMityukov/PriceBeater/Main.php b/src/classes/XLite/Module/VladimirMityukov/PriceBeater/Main.php new file mode 100644 index 0000000000..9e2ec75c4f --- /dev/null +++ b/src/classes/XLite/Module/VladimirMityukov/PriceBeater/Main.php @@ -0,0 +1,93 @@ + + * @copyright Copyright (c) 2012 Vladimir Mityukov . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @version 0.0.1 + */ + +namespace XLite\Module\VladimirMityukov\PriceBeater; + +/** + * The module offers an ability to purchase at smaller + * price if URL to competitor's website provided. + */ +abstract class Main extends \XLite\Module\AModule +{ + /** + * Return the developer name (company name). + * + * @return string + */ + public static function getAuthorName() + { + return 'Vladimir Mityukov'; + } + + /** + * Return the module display name. + * + * @return string + */ + public static function getModuleName() + { + return 'Price beater'; + } + + /** + * Return the minor module version (revision number). + * + * @return string + */ + public static function getMinorVersion() + { + return '1'; + } + + /** + * Return an URL to the module icon. + * If an empty string is returned "icon.png" from the module directory will be used. + * + * @return string + */ + public static function getIconURL() + { + return ''; + } + + /** + * Return a brief module description. + * + * @return string + */ + public static function getDescription() + { + return 'Provides Price beater functionality.'; + } + + /** + * Return a list of modules the module depends on. + * Each item should be a full module identifier: "\". + * + * @return array + */ + public static function getDependencies() + { + return array(); + } + +} +?> \ No newline at end of file From b801a426ee287b0bc586e1bdcaa1a118f5bff98d Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 5 Jun 2012 12:18:35 +0400 Subject: [PATCH 033/562] E:41521 [!] Place order button was not enabled for no-shipping and no-payment use case. --- .../XLite/View/Checkout/Step/Payment.php | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/classes/XLite/View/Checkout/Step/Payment.php b/src/classes/XLite/View/Checkout/Step/Payment.php index b2ed9a42f2..bca0de7a98 100644 --- a/src/classes/XLite/View/Checkout/Step/Payment.php +++ b/src/classes/XLite/View/Checkout/Step/Payment.php @@ -44,6 +44,14 @@ class Payment extends \XLite\View\Checkout\Step\AStep */ protected $modifier; + /** + * Flag if the cart has been already payed (cache) + * + * @var boolean + */ + protected $isPayedCart; + + /** * Get step name * @@ -77,7 +85,7 @@ public function getTitle() */ public function isEnabled() { - return parent::isEnabled() && (!$this->getCart()->isPayed()); + return parent::isEnabled() && (!$this->isPayedCart()); } /** @@ -89,10 +97,12 @@ public function isEnabled() */ public function isCompleted() { - return $this->getCart()->getProfile() - && $this->getCart()->getProfile()->getBillingAddress() - && $this->getCart()->getProfile()->getBillingAddress()->isCompleted(\XLite\Model\Address::BILLING) - && ($this->getCart()->isPayed() || $this->getCart()->getPaymentMethod()); + return !$this->isEnabled() + || ($this->getCart()->getProfile() + && $this->getCart()->getProfile()->getBillingAddress() + && $this->getCart()->getProfile()->getBillingAddress()->isCompleted(\XLite\Model\Address::BILLING) + && $this->getCart()->getPaymentMethod() + ); } /** @@ -188,4 +198,21 @@ protected function preparePaymentMethodIcon($icon) { return \XLite\Core\Layout::getInstance()->getResourceWebPath($icon, \XLite\Core\Layout::WEB_PATH_OUTPUT_URL); } + + /** + * Return flag if the cart has been already payed + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isPayedCart() + { + if (!isset($this->isPayedCart)) { + + $this->isPayedCart = $this->getCart()->isPayed(); + } + + return $this->isPayedCart; + } } From d67e183d03cc54042cb3c42e440c635113871a15 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 5 Jun 2012 17:20:04 +0400 Subject: [PATCH 034/562] [+] New Currency view model class is added initially. --- .../XLite/View/Model/Currency/Currency.php | 243 ++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 src/classes/XLite/View/Model/Currency/Currency.php diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php new file mode 100644 index 0000000000..a0b17babaa --- /dev/null +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -0,0 +1,243 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View\Model\Address; + +/** + * Currency model widget + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Currency extends \XLite\View\Model\AModel +{ + /** + * Schema of the address section + * TODO: move to the module where this field is required: + * 'address_type' => array( + * self::SCHEMA_CLASS => '\XLite\View\FormField\Select\AddressType', + * self::SCHEMA_LABEL => 'Address type', + * self::SCHEMA_REQUIRED => true, + * ), + * + * @var array + * @see ____var_see____ + * @since 1.0.0 + */ + protected $addressSchema = array( + 'title' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Title', + self::SCHEMA_LABEL => 'Title', + self::SCHEMA_REQUIRED => false, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-title', + ), + 'firstname' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Firstname', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-firstname', + ), + 'lastname' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Lastname', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-lastname', + ), + 'street' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Address', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-street', + ), + 'country_code' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Country', + self::SCHEMA_LABEL => 'Country', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-country', + ), + 'state_id' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\State', + self::SCHEMA_LABEL => 'State', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-state', + ), + 'custom_state' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'State', + self::SCHEMA_REQUIRED => false, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-customer-state', + ), + 'city' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'City', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-city', + ), + 'zipcode' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Zip code', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-zipcode', + ), + 'phone' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Phone', + self::SCHEMA_REQUIRED => true, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-phone', + ), + ); + + /** + * Currency (cache) + * + * @var \XLite\Model\Currency + * @see ____var_see____ + * @since 1.0.0 + */ + protected $currency = null; + + /** + * getAddressSchema + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getAddressSchema() + { + $result = array(); + + $addressId = $this->getAddressId(); + + foreach ($this->addressSchema as $key => $data) { + $result[$addressId . '_' . $key] = $data; + } + + return $result; + } + + /** + * Return fields list by the corresponding schema + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getFormFieldsForSectionDefault() + { + $result = $this->getFieldsBySchema($this->getAddressSchema()); + + // For country <-> state syncronization + $this->setStateSelectorIds($result); + + return $result; + } + + /** + * Returns widget head + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getHead() + { + return 'Currency management page'; + } + + protected function getRequestCurrencyId() + { + return \XLite\Core\Request::getInstance()->currency_id; + } + + protected function getCurrencyId() + { + return $this->getRequestCurrencyId() ?: null; + } + + /** + * This object will be used if another one is not pased + * + * @return \XLite\Model\Currency + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultModelObject() + { + if (!isset($this->currency)) { + + $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->find($this->getCurrencyId()); + } + + return $this->currency; + } + + /** + * Return name of web form widget class + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormClass() + { + return '\XLite\View\Form\Currency\Currency'; + } + + /** + * Return text for the "Submit" button + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getSubmitButtonLabel() + { + return 'Save changes'; + } + + /** + * Return list of the "Button" widgets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormButtons() + { + $result = parent::getFormButtons(); + + $result['submit'] = new \XLite\View\Button\Submit( + array( + \XLite\View\Button\AButton::PARAM_LABEL => $this->getSubmitButtonLabel(), + \XLite\View\Button\AButton::PARAM_STYLE => 'action', + ) + ); + + return $result; + } +} From 7bd9482ccf20b12fb002ed43c897b63dfafe95db Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 5 Jun 2012 17:25:53 +0400 Subject: [PATCH 035/562] E:41496 [!] Bug: Payment methods section was always visible in the order invoices. --- .../admin/en/order/invoice/parts/bottom.methods.payment.tpl | 2 +- .../default/en/order/invoice/parts/bottom.methods.payment.tpl | 2 +- .../mail/en/order/invoice/parts/bottom.methods.payment.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/skins/admin/en/order/invoice/parts/bottom.methods.payment.tpl b/src/skins/admin/en/order/invoice/parts/bottom.methods.payment.tpl index d51e2f90ba..1126ef4db8 100644 --- a/src/skins/admin/en/order/invoice/parts/bottom.methods.payment.tpl +++ b/src/skins/admin/en/order/invoice/parts/bottom.methods.payment.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 * @ListChild (list="invoice.bottom.methods", weight="20") *} -
+... diff --git a/src/skins/admin/en/items_list/order/parts/columns/total.tpl b/src/skins/admin/en/items_list/model/table/order/cell.actions.tpl similarity index 53% rename from src/skins/admin/en/items_list/order/parts/columns/total.tpl rename to src/skins/admin/en/items_list/model/table/order/cell.actions.tpl index c62549b927..f2ffc581a4 100644 --- a/src/skins/admin/en/items_list/order/parts/columns/total.tpl +++ b/src/skins/admin/en/items_list/model/table/order/cell.actions.tpl @@ -1,16 +1,17 @@ {* vim: set ts=2 sw=2 sts=2 et: *} {** - * Item name - * - * @author Creative Development LLC + * Cell actions + * + * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="70") + * @since 1.0.24 + * + * @ListChild (list="itemsList.orders.search.cell.status") *} - +
+ {action.display():h} +
diff --git a/src/skins/admin/en/items_list/order/parts/columns/date.tpl b/src/skins/admin/en/items_list/model/table/order/cell.date.tpl similarity index 55% rename from src/skins/admin/en/items_list/order/parts/columns/date.tpl rename to src/skins/admin/en/items_list/model/table/order/cell.date.tpl index 49233de0d5..28b22a6499 100644 --- a/src/skins/admin/en/items_list/order/parts/columns/date.tpl +++ b/src/skins/admin/en/items_list/model/table/order/cell.date.tpl @@ -1,16 +1,14 @@ {* vim: set ts=2 sw=2 sts=2 et: *} {** - * Item name - * - * @author Creative Development LLC + * Date cell + * + * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="50") + * @since 1.0.24 *} -
+{formatDate(entity.getDate())}. +{formatDayTime(entity.getDate())} diff --git a/src/skins/admin/en/items_list/model/table/order/cell.profile.tpl b/src/skins/admin/en/items_list/model/table/order/cell.profile.tpl new file mode 100644 index 0000000000..66d3ae4a2b --- /dev/null +++ b/src/skins/admin/en/items_list/model/table/order/cell.profile.tpl @@ -0,0 +1,17 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Profile cell + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.24 + *} + +{if:entity.origProfile&entity.profile.getProfileId()=entity.origProfile.getProfileId()} + {getColumnValue(column,entity)} +{else:} + {getColumnValue(column,entity)} +{end:} diff --git a/src/skins/admin/en/items_list/order/parts/header/checkbox.tpl b/src/skins/admin/en/items_list/model/table/order/cell.total.tpl similarity index 50% rename from src/skins/admin/en/items_list/order/parts/header/checkbox.tpl rename to src/skins/admin/en/items_list/model/table/order/cell.total.tpl index d61fa1cc4c..2930cbb516 100644 --- a/src/skins/admin/en/items_list/order/parts/header/checkbox.tpl +++ b/src/skins/admin/en/items_list/model/table/order/cell.total.tpl @@ -1,14 +1,14 @@ {* vim: set ts=2 sw=2 sts=2 et: *} {** - * Column with checkboxes - * - * @author Creative Development LLC + * Total cell + * + * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.header", weight="10") + * @since 1.0.24 *} - +{formatPrice(entity.getTotal(),entity.getCurrency())} +({t(#N it.#,_ARRAY_(#count#^entity.countQuantity()))}) diff --git a/src/skins/admin/en/items_list/order/empty_recent_orders.tpl b/src/skins/admin/en/items_list/model/table/order/empty_recent_orders.tpl similarity index 100% rename from src/skins/admin/en/items_list/order/empty_recent_orders.tpl rename to src/skins/admin/en/items_list/model/table/order/empty_recent_orders.tpl diff --git a/src/skins/admin/en/items_list/model/table/order/style.css b/src/skins/admin/en/items_list/model/table/order/style.css new file mode 100644 index 0000000000..201ffebd49 --- /dev/null +++ b/src/skins/admin/en/items_list/model/table/order/style.css @@ -0,0 +1,27 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Product items lsit styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.15 + */ + +.items-list.orders table.list thead th.total { + text-align: center; +} + +.items-list.orders table.list tbody td.total { + text-align: right; +} + +.items-list.orders table.list tbody tr.completed td, +.items-list.orders table.list tbody tr.completed td span, +.items-list.orders table.list tbody tr.completed td div, +.items-list.orders table.list tbody td span.time +{ + color: #8f8f8f; +} diff --git a/src/skins/admin/en/items_list/model/table/style.css b/src/skins/admin/en/items_list/model/table/style.css index dc5ccb1908..db7d49c602 100644 --- a/src/skins/admin/en/items_list/model/table/style.css +++ b/src/skins/admin/en/items_list/model/table/style.css @@ -200,3 +200,10 @@ display: inline; } +.items-list-table a.block-link { + display: inline-block; + width: 30px; + height: 26px; + text-indent: -5000px; + background: transparent url(images/link-icon.png) no-repeat left top; +} diff --git a/src/skins/admin/en/items_list/order/body.tpl b/src/skins/admin/en/items_list/order/body.tpl deleted file mode 100644 index 8532e3effb..0000000000 --- a/src/skins/admin/en/items_list/order/body.tpl +++ /dev/null @@ -1,27 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Orders list (table variant) - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - *} - -
- + diff --git a/src/skins/admin/en/categories/parts/actions.tpl b/src/skins/admin/en/categories/parts/actions.tpl deleted file mode 100644 index 3bb8b4e997..0000000000 --- a/src/skins/admin/en/categories/parts/actions.tpl +++ /dev/null @@ -1,19 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Category add/modify form actions - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="category.modify.list", weight="10200") - *} - -
- - -
{t(#Availability#)}* - -
{t(#Clean URL#)} 
{t(#Description#)} 
{t(#HTML title ('title' tag)#)} 
- {t(#Image#)} -   - - - -
- - -
{t(#Membership#)}* - -
{t(#Meta description#)} 
{t(#Meta keywords#)} 
{t(#Category name#)}* - -  << {t(#Required field#)} -
{t(#Category page title#)}  - -
 
+ {t(#Payment method#)}: {foreach:order.getActivePaymentTransactions(),t} {t.paymentMethod.getName():h}
diff --git a/src/skins/default/en/order/invoice/parts/bottom.methods.payment.tpl b/src/skins/default/en/order/invoice/parts/bottom.methods.payment.tpl index d51e2f90ba..1126ef4db8 100644 --- a/src/skins/default/en/order/invoice/parts/bottom.methods.payment.tpl +++ b/src/skins/default/en/order/invoice/parts/bottom.methods.payment.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 * @ListChild (list="invoice.bottom.methods", weight="20") *} -
+ {t(#Payment method#)}: {foreach:order.getActivePaymentTransactions(),t} {t.paymentMethod.getName():h}
diff --git a/src/skins/mail/en/order/invoice/parts/bottom.methods.payment.tpl b/src/skins/mail/en/order/invoice/parts/bottom.methods.payment.tpl index d51e2f90ba..1126ef4db8 100644 --- a/src/skins/mail/en/order/invoice/parts/bottom.methods.payment.tpl +++ b/src/skins/mail/en/order/invoice/parts/bottom.methods.payment.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 * @ListChild (list="invoice.bottom.methods", weight="20") *} -
+ {t(#Payment method#)}: {foreach:order.getActivePaymentTransactions(),t} {t.paymentMethod.getName():h}
From 1635452eea0ae127112d5df288219e7895a3ab90 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 6 Jun 2012 02:40:36 +0400 Subject: [PATCH 036/562] S:165106 [+] Clean URLs support has been added --- src/.htaccess | 5 +- src/classes/XLite.php | 46 +++++++- .../XLite/Controller/Customer/ACustomer.php | 15 +-- .../XLite/Controller/Customer/Product.php | 15 +-- src/classes/XLite/Core/CMSConnector.php | 49 +-------- src/classes/XLite/Core/Converter.php | 102 +++++++++++++++++- src/classes/XLite/Model/AEntity.php | 89 ++++----------- .../CDev/DrupalConnector/Drupal/Module.php | 14 +-- 8 files changed, 175 insertions(+), 160 deletions(-) diff --git a/src/.htaccess b/src/.htaccess index 81c077c341..53c0ad089f 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -18,9 +18,8 @@ DirectoryIndex cart.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule "(^|/)\." - [F] - RewriteRule ^(([/_a-z0-9-]+)/)?([_a-z0-9-]+)(/)?$ cart.php?target=category&cleanURLCat=$3 [NC] [L] - RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)\.htm(l)?$ cart.php?target=product&cleanURLProd=$5&cleanURLCat=$4 [NC] [L] + RewriteRule (^|/)\. - [F] + RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)(\.(htm)(l)?)?$ cart.php?url=$5&last=$4&rest=$3&ext=$7 [NC] [L] RewriteBase /~vvs/xlite/src diff --git a/src/classes/XLite.php b/src/classes/XLite.php index d43827f068..f918bc80c6 100644 --- a/src/classes/XLite.php +++ b/src/classes/XLite.php @@ -185,7 +185,7 @@ public static function setController($controller = null) protected static function getTarget() { if (empty(\XLite\Core\Request::getInstance()->target)) { - \XLite\Core\Request::getInstance()->target = static::TARGET_DEFAULT; + \XLite\Core\Request::getInstance()->target = static::dispatchRequest(); } return \XLite\Core\Request::getInstance()->target; @@ -421,8 +421,48 @@ protected function clearDataOnStartup() \XLite\Model\CachingFactory::clearCache(); } + // {{{ Clean URLs support - // ------------------------------ Application versions - + /** + * Dispatch request + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected static function dispatchRequest() + { + $result = static::TARGET_DEFAULT; + + if (LC_USE_CLEAN_URLS && isset(\XLite\Core\Request::getInstance()->url)) { + $result = static::getTargetByCleanURL(); + } + + return $result; + } + + /** + * Return target by clean URL + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected static function getTargetByCleanURL() + { + $tmp = \XLite\Core\Request::getInstance(); + list($target, $params) = \XLite\Core\Converter::parseCleanUrl($tmp->url, $tmp->last, $tmp->rest, $tmp->ext); + + if (!empty($target)) { + $tmp->mapRequest($params); + } + + return $target; + } + + // }}} + + // {{{ Application versions /** * Get application version @@ -474,4 +514,6 @@ final public function checkVersion($version, $operator) { return version_compare($this->getMajorVersion(), $version, $operator); } + + // }}} } diff --git a/src/classes/XLite/Controller/Customer/ACustomer.php b/src/classes/XLite/Controller/Customer/ACustomer.php index 39b77a42f0..5fa4e3ca5b 100644 --- a/src/classes/XLite/Controller/Customer/ACustomer.php +++ b/src/classes/XLite/Controller/Customer/ACustomer.php @@ -154,20 +154,7 @@ protected function addLocationNode($name, $link = null, array $subnodes = null) */ public function getCategoryId() { - $categoryID = parent::getCategoryId(); - - if (LC_USE_CLEAN_URLS && !isset($categoryID)) { - $cleanURL = \XLite\Core\Request::getInstance()->cleanURLCat; - - if (!empty($cleanURL)) { - $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); - $categoryID = $this->category_id = isset($category) ? $category->getCategoryId() : false; - - \XLite\Core\Request::getInstance()->category_id = $categoryID; - } - } - - return $categoryID ?: $this->getRootCategoryId(); + return parent::getCategoryId() ?: $this->getRootCategoryId(); } /** diff --git a/src/classes/XLite/Controller/Customer/Product.php b/src/classes/XLite/Controller/Customer/Product.php index 7094b13712..1a0260f2bd 100644 --- a/src/classes/XLite/Controller/Customer/Product.php +++ b/src/classes/XLite/Controller/Customer/Product.php @@ -132,20 +132,7 @@ protected function getLocation() */ protected function getProductId() { - $productID = \XLite\Core\Request::getInstance()->product_id; - - if (LC_USE_CLEAN_URLS && !isset($productID)) { - $cleanURL = \XLite\Core\Request::getInstance()->cleanURLProd; - - if (!empty($cleanURL)) { - $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); - $productID = $this->product_id = isset($product) ? $product->getProductId() : false; - - \XLite\Core\Request::getInstance()->product_id = $productID; - } - } - - return $productID; + return \XLite\Core\Request::getInstance()->product_id; } /** diff --git a/src/classes/XLite/Core/CMSConnector.php b/src/classes/XLite/Core/CMSConnector.php index 8c61c82a7a..47f274c6a4 100644 --- a/src/classes/XLite/Core/CMSConnector.php +++ b/src/classes/XLite/Core/CMSConnector.php @@ -348,37 +348,7 @@ public function getProfile($cmsUserId) - // -----> FIXME - to revise - - /** - * Check controller access - * FIXME - do not uncomment: this will break the "runFrontController()" functionality - * TODO - code must be refactored - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - public function isAllowed() - { - return true; - - /*$oldController = $this->getController(); - - $this->getApplication()->setController(); - $controller = \XLite\Model\CachingFactory::getObjectFromCallback( - __METHOD__ . '-' . \XLite\Core\Request::getInstance()->target, - $this->getApplication(), - 'getController' - ); - - $result = $controller->checkAccess() - && $this->getViewer()->checkVisibility(); - - $this->getApplication()->setController($oldController); - - return $result;*/ - } + // -----> TODO - to revise /** * Get Clean URL @@ -519,23 +489,6 @@ protected function getProfileDBFields($cmsUserId) ); } - /** - * getProfileWhereCondition - * TODO: remove this method - * - * @param integer $cmsUserId CMS user Id - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getProfileWhereCondition($cmsUserId) - { - return \Includes\Utils\Converter::buildQuery( - $this->getProfileDBFields($cmsUserId), '=', ' AND ', '\'' - ) . ' AND order_id = \'0\''; - } - /** * getCleanURLTargets * diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index 2d1d9cf419..95128c6e16 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -205,7 +205,7 @@ public static function buildFullURL($target = '', $action = '', array $params = * * @param string $target Page identifier OPTIONAL * @param string $action Action to perform OPTIONAL - * @param array $params additional params OPTIONAL + * @param array $params Additional params OPTIONAL * * @return string * @see ____func_see____ @@ -236,6 +236,8 @@ public static function buildCleanURL($target = '', $action = '', array $params = } } + static::buildCleanURLHook($target, $action, $params, $urlParams); + if (!empty($urlParams)) { $result = \Includes\Utils\ConfigParser::getOptions(array('host_details', 'web_dir_wo_slash')); $result .= '/' . implode('/', array_reverse($urlParams)); @@ -244,6 +246,104 @@ public static function buildCleanURL($target = '', $action = '', array $params = return $result; } + /** + * Parse clean URL (//(?:\.(?:l))) + * + * @param string $url Main part of a clean URL + * @param string $last First part before the "url" OPTIONAL + * @param string $rest Part before the "url" and "last" OPTIONAL + * @param string $ext Extension OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + public static function parseCleanUrl($url, $last = '', $rest = '', $ext = '') + { + $target = null; + $params = array(); + + foreach (static::getCleanURLBook($url, $last, $rest, $ext) as $possibleTarget => $class) { + $entity = \XLite\Core\Database::getRepo($class)->findOneByCleanURL($url); + + if (isset($entity)) { + $target = $possibleTarget; + $params[$entity->getUniqueIdentifierName()] = $entity->getUniqueIdentifier(); + } + } + + static::parseCleanURLHook($url, $last, $rest, $ext, $target, $params); + + return array($target, $params); + } + + /** + * Getter + * + * @param string $url Main part of a clean URL + * @param string $last First part before the "url" OPTIONAL + * @param string $rest Part before the "url" and "last" OPTIONAL + * @param string $ext Extension OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected static function getCleanURLBook($url, $last = '', $rest = '', $ext = '') + { + $list = array( + 'product' => '\XLite\Model\Product', + 'category' => '\XLite\Model\Category', + ); + + if ('htm' === $ext) { + unset($list['category']); + } + + return $list; + } + + /** + * Hook for modules + * + * @param string $target Page identifier + * @param string $action Action to perform + * @param array $params Additional params + * @param array &$urlParams Params to prepare + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected static function buildCleanURLHook($target, $action, array $params, array &$urlParams) + { + } + + /** + * Hook for modules + * + * @param string $url Main part of a clean URL + * @param string $last First part before the "url" + * @param string $rest Part before the "url" and "last" + * @param string $ext Extension + * @param string $target Target + * @param array $params Additional params + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected static function parseCleanURLHook($url, $last, $rest, $ext, &$target, array &$params) + { + if ('product' === $target && !empty($last)) { + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findByCleanURL($last); + + if (isset($category)) { + $params['category_id'] = $category->getCategoryId(); + } + } + } + // }}} /** diff --git a/src/classes/XLite/Model/AEntity.php b/src/classes/XLite/Model/AEntity.php index a489d1a6e6..17ca91a90c 100644 --- a/src/classes/XLite/Model/AEntity.php +++ b/src/classes/XLite/Model/AEntity.php @@ -51,15 +51,6 @@ abstract class AEntity extends \XLite\Base\SuperClass */ protected static $cacheEnabled = array(); - /** - * Method names (cache) - * - * @var array - * @see ____var_see____ - * @since 1.0.0 - */ - protected static $methodNames = array(); - /** * Constructor * @@ -92,7 +83,7 @@ public function map(array $data) foreach ($data as $key => $value) { // Map only existing properties with setter methods or direct - $method = 'set' . $this->getMethodName($key); + $method = 'set' . \Includes\Utils\Converter::convertToPascalCase($key); if (method_exists($this, $method)) { @@ -118,7 +109,7 @@ public function map(array $data) public function __get($name) { // Accessor method name - return $this->{'get' . $this->getMethodName($name)}(); + return $this->{'get' . \Includes\Utils\Converter::convertToPascalCase($name)}(); } /** @@ -134,7 +125,7 @@ public function __get($name) public function __set($name, $value) { // Mutator method name - return $this->{'set' . $this->getMethodName($name)}($value); + return $this->{'set' . \Includes\Utils\Converter::convertToPascalCase($name)}($value); } /** @@ -172,25 +163,23 @@ public function getRepository() */ public function checkCache() { - $class = get_called_class(); - - if (!isset(self::$cacheEnabled[$class])) { + $class = get_class($this); + if (!isset(static::$cacheEnabled[$class])) { $repo = $this->getRepository(); - self::$cacheEnabled[$class] = ($repo && is_subclass_of($repo, '\XLite\Model\Repo\ARepo')) + static::$cacheEnabled[$class] = ($repo && is_subclass_of($repo, '\XLite\Model\Repo\ARepo')) ? $repo->hasCacheCells() : false; } - if (self::$cacheEnabled[$class]) { - + if (static::$cacheEnabled[$class]) { $this->getRepository()->deleteCacheByEntity($this); } } /** - * Detach self + * Detach static * * @return void * @see ____func_see____ @@ -259,6 +248,18 @@ public function isPersistent() return (bool) $this->getUniqueIdentifier(); } + /** + * Get entity unique identifier name + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + public function getUniqueIdentifierName() + { + return $this->getRepository()->getPrimaryKeyField(); + } + /** * Get entity unique identifier value * @@ -268,7 +269,7 @@ public function isPersistent() */ public function getUniqueIdentifier() { - return $this->{'get' . $this->getMethodName($this->getRepository()->getPrimaryKeyField())}(); + return $this->{'get' . \Includes\Utils\Converter::convertToPascalCase($this->getUniqueIdentifierName())}(); } /** @@ -354,52 +355,4 @@ public function cloneEntity() public function prepareEntityBeforeCommit($type) { } - - /** - * Call parent method safetly - * - * @param string $property Property name - * @param string $class Current class - * @param string $type Method type (get or set) OPTIONAL - * - * @return mixed - * @see ____func_see____ - * @since 1.0.21 - */ - protected function callParentMethod($property, $class, $type = 'get') - { - $parent = get_parent_class($class); - $method = 'get' . $this->getMethodName($property); - - return method_exists($parent, $method) - ? $parent::$method() - : $this->$property; - } - - /** - * Get method name - * FIXME - to remove - * - * @param string $name Property name - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getMethodName($name) - { - $class = get_called_class(); - - if (!isset(self::$methodNames[$class])) { - - self::$methodNames[$class] = array(); - } - - if (!isset(self::$methodNames[$class][$name])) { - - self::$methodNames[$class][$name] = \XLite\Core\Converter::convertToCamelCase($name); - } - - return self::$methodNames[$class][$name]; - } } diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php index eed3da69c1..744283ed69 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php @@ -358,11 +358,8 @@ public function translateOutboundURL(&$path, array &$options, $originalPath) $path = \Includes\Utils\URLManager::getShopURL('admin.php' . $this->getAdminAreaURLArgs()); $options['external'] = true; - } else { - $url = $this->getHandler()->getDrupalCleanURL($path, $options); - if ($url) { - $path = $url; - } + } elseif ($url = $this->getHandler()->getDrupalCleanURL($path, $options)) { + $path = $url; } } @@ -379,11 +376,8 @@ public function translateOutboundURL(&$path, array &$options, $originalPath) */ public function translateInboundURL(&$path, $originalPath, $pathLanguage) { - if ($path) { - $url = $this->getHandler()->getURLByCleanURL($path); - if ($url) { - $path = $url; - } + if ($path && ($url = $this->getHandler()->getURLByCleanURL($path))) { + $path = $url; } } From dbdc6f29108f78e513f9673d16a30481514b3fea Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 6 Jun 2012 03:27:17 +0400 Subject: [PATCH 037/562] [!] Fixes for the CleanURLs --- .../XLite/Controller/Admin/Product.php | 3 +- src/classes/XLite/Core/Converter.php | 2 +- .../XLite/Core/Validator/{Sku.php => SKU.php} | 51 ++++++++++++------- .../XLite/View/Form/Product/Modify/Single.php | 2 +- 4 files changed, 36 insertions(+), 22 deletions(-) rename src/classes/XLite/Core/Validator/{Sku.php => SKU.php} (65%) diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index 96c61c86af..e518ea775e 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -36,7 +36,7 @@ class Product extends \XLite\Controller\Admin\Base\Catalog { /** - * FIXME- backward compatibility + * Backward compatibility * * @var array * @see ____var_see____ @@ -314,6 +314,7 @@ protected function checkCleanURL($cleanURL) if (!$result) { $entity = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); + // DO NOT use "===" here $result = !isset($entity) || $entity->getProductId() == $this->getProductId(); diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index 95128c6e16..bc053634c9 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -336,7 +336,7 @@ protected static function buildCleanURLHook($target, $action, array $params, arr protected static function parseCleanURLHook($url, $last, $rest, $ext, &$target, array &$params) { if ('product' === $target && !empty($last)) { - $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findByCleanURL($last); + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($last); if (isset($category)) { $params['category_id'] = $category->getCategoryId(); diff --git a/src/classes/XLite/Core/Validator/Sku.php b/src/classes/XLite/Core/Validator/SKU.php similarity index 65% rename from src/classes/XLite/Core/Validator/Sku.php rename to src/classes/XLite/Core/Validator/SKU.php index 73ede94291..1546fc8b35 100644 --- a/src/classes/XLite/Core/Validator/Sku.php +++ b/src/classes/XLite/Core/Validator/SKU.php @@ -35,12 +35,19 @@ */ class SKU extends \XLite\Core\Validator\AValidator { - protected $productId = null; + /** + * Product Id (saved) + * + * @var integer + * @see ____var_see____ + * @since 1.0.0 + */ + protected $productId; /** * Constructor * - * @param integer|null $productid Product identificator + * @param integer $productId Product identificator OPTIONAL * * @return void * @see ____func_see____ @@ -49,51 +56,57 @@ class SKU extends \XLite\Core\Validator\AValidator public function __construct($productId = null) { if (isset($productId)) { - - $this->productId = (int) $productId; + $this->productId = intval($productId); } } - /** * Validate * * @param mixed $data Data * * @return void - * @throws \XLite\Core\Validator\Exception * @see ____func_see____ * @since 1.0.0 */ public function validate($data) { - $data = $this->sanitize($data); + if (0 >= $this->productId) { + $this->throwSKUError(); - $productSKU = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBySku($data); + } else { + $entity = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBySku($this->sanitize($data)); - if ( - $productSKU - && ( - isset($this->productId) && $productSKU->getProductId() !== $this->productId - || !isset($this->productId) - ) - ) { - throw $this->throwError('SKU must be unique'); + if (isset($entity) && $entity->getProductId() !== $this->productId) { + $this->throwSKUError(); + } } } /** * Sanitize * - * @param mixed $data Daa + * @param mixed $data Data * - * @return mixed + * @return string * @see ____func_see____ * @since 1.0.0 */ public function sanitize($data) { - return (string)$data; + return strval($data); } + /** + * Wrapper + * + * @return void + * @throws \XLite\Core\Validator\Exception + * @see ____func_see____ + * @since 1.0.24 + */ + protected function throwSKUError() + { + throw $this->throwError('SKU must be unique'); + } } diff --git a/src/classes/XLite/View/Form/Product/Modify/Single.php b/src/classes/XLite/View/Form/Product/Modify/Single.php index 9ccaf7b621..dd57937eb2 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Single.php @@ -85,7 +85,7 @@ protected function getValidator() */ protected function getProductId() { - return \XLite\Core\Request::getInstance()->id; + return \XLite\Core\Request::getInstance()->product_id; } /** From 2b42b7f6edc6f731886afaa6f0062853b38f0ca4 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 6 Jun 2012 03:30:55 +0400 Subject: [PATCH 038/562] [*] .htaccess fro cleanURLa is restored --- src/.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.htaccess b/src/.htaccess index 53c0ad089f..eab2ce4a0b 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -21,5 +21,5 @@ DirectoryIndex cart.php RewriteRule (^|/)\. - [F] RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)(\.(htm)(l)?)?$ cart.php?url=$5&last=$4&rest=$3&ext=$7 [NC] [L] - RewriteBase /~vvs/xlite/src + RewriteBase ____WEB_DIR____ From 2f5007376d66750de15623aebd6faf9c9c855227 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 6 Jun 2012 03:49:41 +0400 Subject: [PATCH 039/562] [*] .htaccess fro cleanURLa is restored --- src/.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.htaccess b/src/.htaccess index eab2ce4a0b..397492b538 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -21,5 +21,5 @@ DirectoryIndex cart.php RewriteRule (^|/)\. - [F] RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)(\.(htm)(l)?)?$ cart.php?url=$5&last=$4&rest=$3&ext=$7 [NC] [L] - RewriteBase ____WEB_DIR____ + #RewriteBase ____WEB_DIR____ From cb078b7e0f4ae4f6a5469aa2c492a08c5a0d3c07 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 6 Jun 2012 05:57:48 +0400 Subject: [PATCH 040/562] E:0040373 [*] The Doctrine library is updated up to latest version (2.2) --- src/classes/XLite/Core/Doctrine/Annotation/Behavior.php | 3 ++- src/classes/XLite/Core/Doctrine/Annotation/Purpose.php | 3 ++- src/classes/XLite/Core/Validator/{Sku.php => SKU.php} | 0 src/classes/XLite/Model/OrderItem.php | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) rename src/classes/XLite/Core/Validator/{Sku.php => SKU.php} (100%) diff --git a/src/classes/XLite/Core/Doctrine/Annotation/Behavior.php b/src/classes/XLite/Core/Doctrine/Annotation/Behavior.php index ed741b5f45..25d29c39d6 100644 --- a/src/classes/XLite/Core/Doctrine/Annotation/Behavior.php +++ b/src/classes/XLite/Core/Doctrine/Annotation/Behavior.php @@ -32,6 +32,8 @@ * * @see ____class_see____ * @since 1.0.19 + * + * @Annotation */ class Behavior extends \Doctrine\Common\Annotations\Annotation { @@ -44,4 +46,3 @@ class Behavior extends \Doctrine\Common\Annotations\Annotation */ public $list = array(); } - diff --git a/src/classes/XLite/Core/Doctrine/Annotation/Purpose.php b/src/classes/XLite/Core/Doctrine/Annotation/Purpose.php index 39e67e4b6d..c36e126da1 100644 --- a/src/classes/XLite/Core/Doctrine/Annotation/Purpose.php +++ b/src/classes/XLite/Core/Doctrine/Annotation/Purpose.php @@ -32,6 +32,8 @@ * * @see ____class_see____ * @since 1.0.19 + * + * @Annotation */ class Purpose extends \Doctrine\Common\Annotations\Annotation { @@ -53,4 +55,3 @@ class Purpose extends \Doctrine\Common\Annotations\Annotation */ public $source; } - diff --git a/src/classes/XLite/Core/Validator/Sku.php b/src/classes/XLite/Core/Validator/SKU.php similarity index 100% rename from src/classes/XLite/Core/Validator/Sku.php rename to src/classes/XLite/Core/Validator/SKU.php diff --git a/src/classes/XLite/Model/OrderItem.php b/src/classes/XLite/Model/OrderItem.php index de44f1d50f..119e8fcc7f 100644 --- a/src/classes/XLite/Model/OrderItem.php +++ b/src/classes/XLite/Model/OrderItem.php @@ -112,7 +112,7 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner * @XLite\Core\Doctrine\Annotation\Purpose (name="net", source="clear"), * @XLite\Core\Doctrine\Annotation\Purpose (name="display", source="net") * } - * ) + * ) */ protected $price; @@ -134,7 +134,7 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner * @see ____var_see____ * @since 1.0.0 * - * @Column (type="decimal", precision="14", scale="4") + * @Column (type="decimal", precision=14, scale=4) */ protected $discountedSubtotal = 0; From 813fa81dedd37fddd3631ed8b25054159381710d Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 6 Jun 2012 14:25:28 +0400 Subject: [PATCH 041/562] E:42537 [!] Bug: Empty transaction was stored for zero total order. --- src/classes/XLite/Model/Order.php | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index 0f07369a06..e90734daa8 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -1074,8 +1074,11 @@ public function setPaymentMethod($paymentMethod, $value = null) } if (!isset($paymentMethod) || $this->getFirstOpenPaymentTransaction()) { + $transaction = $this->getFirstOpenPaymentTransaction(); + if ($transaction) { + $this->getPaymentTransactions()->removeElement($transaction); $transaction->getPaymentMethod()->getTransactions()->removeElement($transaction); \XLite\Core\Database::getEM()->remove($transaction); @@ -1243,22 +1246,26 @@ protected function addPaymentTransaction(\XLite\Model\Payment\Method $method, $v $value = min($value, $this->getOpenTotal()); } - $transaction = new \XLite\Model\Payment\Transaction(); + // Do not add 0 or <0 transactions. This is for a "Payment not required" case. + if ($value > 0) { - $transaction->setPaymentMethod($method); - $method->addTransactions($transaction); + $transaction = new \XLite\Model\Payment\Transaction(); - \XLite\Core\Database::getEM()->persist($method); + $transaction->setPaymentMethod($method); + $method->addTransactions($transaction); - $this->addPaymentTransactions($transaction); - $transaction->setOrder($this); + \XLite\Core\Database::getEM()->persist($method); - $transaction->setMethodName($method->getServiceName()); - $transaction->setMethodLocalName($method->getName()); - $transaction->setStatus($transaction::STATUS_INITIALIZED); - $transaction->setValue($value); + $this->addPaymentTransactions($transaction); + $transaction->setOrder($this); - \XLite\Core\Database::getEM()->persist($transaction); + $transaction->setMethodName($method->getServiceName()); + $transaction->setMethodLocalName($method->getName()); + $transaction->setStatus($transaction::STATUS_INITIALIZED); + $transaction->setValue($value); + + \XLite\Core\Database::getEM()->persist($transaction); + } } // }}} From ccade73a961c388498e5853bb41775d59ad7e29f Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 6 Jun 2012 15:36:38 +0400 Subject: [PATCH 042/562] [*] Currency management page further changes. --- .../XLite/Controller/Admin/Currency.php | 87 ++++++++++++++ src/classes/XLite/View/Currency.php | 108 ++++++++++++++++++ .../XLite/View/Form/Currency/Currency.php | 66 +++++++++++ .../XLite/View/Model/Currency/Currency.php | 87 ++------------ src/skins/admin/en/currency/body.tpl | 13 +++ src/skins/admin/en/currency/css/style.css | 11 ++ src/skins/admin/en/currency/js/script.js | 12 ++ 7 files changed, 304 insertions(+), 80 deletions(-) create mode 100644 src/classes/XLite/Controller/Admin/Currency.php create mode 100644 src/classes/XLite/View/Currency.php create mode 100644 src/classes/XLite/View/Form/Currency/Currency.php create mode 100644 src/skins/admin/en/currency/body.tpl create mode 100644 src/skins/admin/en/currency/css/style.css create mode 100644 src/skins/admin/en/currency/js/script.js diff --git a/src/classes/XLite/Controller/Admin/Currency.php b/src/classes/XLite/Controller/Admin/Currency.php new file mode 100644 index 0000000000..f04289aadd --- /dev/null +++ b/src/classes/XLite/Controller/Admin/Currency.php @@ -0,0 +1,87 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Controller\Admin; + +/** + * Currency management page controller + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Currency extends \XLite\Controller\Admin\AAdmin +{ + /** + * Return the current page title (for the content area) + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getTitle() + { + return 'Currencies'; + } + + /** + * init + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function init() + { + } + + /** + * Return currencies collection to use + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCurrencies() + { + if (!isset($this->currencies)) { + $this->currencies = \XLite\Core\Database::getRepo('XLite\Model\Currency')->findAll(); + } + + return $this->currencies; + } + + /** + * doActionUpdate + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function doActionUpdate() + { + } +} diff --git a/src/classes/XLite/View/Currency.php b/src/classes/XLite/View/Currency.php new file mode 100644 index 0000000000..a317d3a18f --- /dev/null +++ b/src/classes/XLite/View/Currency.php @@ -0,0 +1,108 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View; + +/** + * Currency management page widget + * + * @see ____class_see____ + * @since 1.0.0 + * + * @ListChild (list="admin.center", zone="admin") + */ +class Currency extends \XLite\View\Dialog +{ + /** + * Return list of targets allowed for this widget + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAllowedTargets() + { + $result = parent::getAllowedTargets(); + $result[] = 'currency'; + + return $result; + } + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + $list[] = $this->getDir() . '/css/style.css'; + + return $list; + } + + /** + * getJSFiles + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + $list[] = $this->getDir() . '/js/script.js'; + + return $list; + } + + /** + * Return title + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getHead() + { + return 'Currency'; + } + + /** + * Return templates directory name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDir() + { + return 'currency'; + } +} diff --git a/src/classes/XLite/View/Form/Currency/Currency.php b/src/classes/XLite/View/Form/Currency/Currency.php new file mode 100644 index 0000000000..0f6032636d --- /dev/null +++ b/src/classes/XLite/View/Form/Currency/Currency.php @@ -0,0 +1,66 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View\Form\Currency; + +/** + * Currency management page form + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Currency extends \XLite\View\Form\AForm +{ + /** + * getDefaultParams + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultParams() + { + $result = parent::getDefaultParams(); + + $result['target'] = \XLite\Core\Request::getInstance()->target; + $result['action'] = 'save'; + + return $result; + } + + /** + * getDefaultClassName + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultClassName() + { + return 'currency-form'; + } +} diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index a0b17babaa..c373536076 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -25,7 +25,7 @@ * @since 1.0.0 */ -namespace XLite\View\Model\Address; +namespace XLite\View\Model\Currency; /** * Currency model widget @@ -48,67 +48,7 @@ class Currency extends \XLite\View\Model\AModel * @see ____var_see____ * @since 1.0.0 */ - protected $addressSchema = array( - 'title' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Title', - self::SCHEMA_LABEL => 'Title', - self::SCHEMA_REQUIRED => false, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-title', - ), - 'firstname' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Firstname', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-firstname', - ), - 'lastname' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Lastname', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-lastname', - ), - 'street' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Address', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-street', - ), - 'country_code' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Country', - self::SCHEMA_LABEL => 'Country', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-country', - ), - 'state_id' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Select\State', - self::SCHEMA_LABEL => 'State', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-state', - ), - 'custom_state' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'State', - self::SCHEMA_REQUIRED => false, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-customer-state', - ), - 'city' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'City', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-city', - ), - 'zipcode' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Zip code', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-zipcode', - ), - 'phone' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Phone', - self::SCHEMA_REQUIRED => true, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-phone', - ), + protected $currencySchema = array( ); /** @@ -121,23 +61,15 @@ class Currency extends \XLite\View\Model\AModel protected $currency = null; /** - * getAddressSchema + * getCurrencySchema * * @return array * @see ____func_see____ * @since 1.0.0 */ - public function getAddressSchema() + public function getCurrencySchema() { - $result = array(); - - $addressId = $this->getAddressId(); - - foreach ($this->addressSchema as $key => $data) { - $result[$addressId . '_' . $key] = $data; - } - - return $result; + return $this->currencySchema; } /** @@ -149,12 +81,7 @@ public function getAddressSchema() */ public function getFormFieldsForSectionDefault() { - $result = $this->getFieldsBySchema($this->getAddressSchema()); - - // For country <-> state syncronization - $this->setStateSelectorIds($result); - - return $result; + return $this->getFieldsBySchema($this->getCurrencySchema()); } /** @@ -166,7 +93,7 @@ public function getFormFieldsForSectionDefault() */ protected function getHead() { - return 'Currency management page'; + return 'Currency'; } protected function getRequestCurrencyId() diff --git a/src/skins/admin/en/currency/body.tpl b/src/skins/admin/en/currency/body.tpl new file mode 100644 index 0000000000..90cb89e193 --- /dev/null +++ b/src/skins/admin/en/currency/body.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * ____file_title____ + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + + \ No newline at end of file diff --git a/src/skins/admin/en/currency/css/style.css b/src/skins/admin/en/currency/css/style.css new file mode 100644 index 0000000000..e2b129fcf7 --- /dev/null +++ b/src/skins/admin/en/currency/css/style.css @@ -0,0 +1,11 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Currency page styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ diff --git a/src/skins/admin/en/currency/js/script.js b/src/skins/admin/en/currency/js/script.js new file mode 100644 index 0000000000..6cc4918099 --- /dev/null +++ b/src/skins/admin/en/currency/js/script.js @@ -0,0 +1,12 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Currency page routines + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + From 8aad7a8f16abdb63e04d8ab4f7a50492c5823988 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Thu, 7 Jun 2012 13:02:26 +0400 Subject: [PATCH 043/562] E:0041553 [*] LC installation script updated: 'disable_functions' requirements was made non-critical. --- src/Includes/install/install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Includes/install/install.php b/src/Includes/install/install.php index 86a3a17b70..9836b9cae1 100644 --- a/src/Includes/install/install.php +++ b/src/Includes/install/install.php @@ -259,7 +259,7 @@ function doCheckRequirements() $checkRequirements['lc_php_disable_functions'] = array( 'title' => xtr('Disabled functions'), - 'critical' => true, + 'critical' => false, ); $checkRequirements['lc_php_magic_quotes_runtime'] = array( @@ -552,7 +552,7 @@ function checkPhpDisableFunctions(&$errorMsg, &$value) if (!empty($list)) { $result = false; $value = substr(@ini_get('disable_functions'), 0, 45) . '...'; - $errorMsg = xtr('Disabled functions discovered (:funclist) that must be enabled', array(':funclist' => implode(', ', $list))); + $errorMsg = xtr('There are disabled functions (:funclist) that may be used by software in some cases and should be enabled', array(':funclist' => implode(', ', $list))); } else { $value = 'none'; @@ -2931,7 +2931,6 @@ function module_check_cfg() 'section' => 'B', 'requirements' => array( 'lc_php_version', - 'lc_php_disable_functions', 'lc_php_magic_quotes_runtime', 'lc_php_memory_limit', 'lc_docblocks_support', @@ -2946,6 +2945,7 @@ function module_check_cfg() 'error_msg' => xtr('Non-critical dependency failed'), 'section' => 'B', 'requirements' => array( + 'lc_php_disable_functions', 'lc_php_file_uploads', 'lc_php_upload_max_filesize', 'lc_php_gdlib', From f96b442acd2d4157b69b684a65f3d5c5193be22a Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Thu, 7 Jun 2012 15:25:16 +0400 Subject: [PATCH 044/562] [!] Test Web/Customer/QuickLook corrected --- .dev/tests/Web/Customer/QuickLook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dev/tests/Web/Customer/QuickLook.php b/.dev/tests/Web/Customer/QuickLook.php index 02920f9a55..ed2d01100e 100644 --- a/.dev/tests/Web/Customer/QuickLook.php +++ b/.dev/tests/Web/Customer/QuickLook.php @@ -658,7 +658,7 @@ protected function switchDisplayMode($mode) * @access protected * @since 1.0.0 */ - protected function waitForAjaxProgress() + protected function waitForAjaxProgress($listSelector = null) { $this->waitForCondition('selenium.isElementPresent("css=.blockUI.block-wait")', 30000, 'Awaiting for progess bar displaying failed'); $this->waitForCondition('!selenium.isElementPresent("css=.blockUI.block-wait")', 30000, 'Awaiting for progess bar hiding failed'); From 630e880965e739ddc6f83b2b0e254e8dc59717ad Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 7 Jun 2012 16:07:46 +0400 Subject: [PATCH 045/562] [*] Small logic changes --- src/Includes/Utils/Converter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Includes/Utils/Converter.php b/src/Includes/Utils/Converter.php index 30b9b4a6b8..c461f6d638 100644 --- a/src/Includes/Utils/Converter.php +++ b/src/Includes/Utils/Converter.php @@ -86,6 +86,10 @@ public static function buildQuery(array $data, $glue = '=', $separator = '&', $q */ public static function parseArgs(array $args, $glue = '=', $quotes = '', $hasParts = true) { + if (!isset($glue)) { + $glue = '='; + } + $result = array(); foreach ($args as $part) { From d3db804180f14f715937e4c3f4f7a8ab573b7219 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 7 Jun 2012 21:27:53 +0400 Subject: [PATCH 046/562] E:0041108 [!] Fix for ItemsList\Model class --- src/classes/XLite/View/ItemsList/Model/AModel.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/classes/XLite/View/ItemsList/Model/AModel.php b/src/classes/XLite/View/ItemsList/Model/AModel.php index fbe8f460ef..f7e7878e3e 100644 --- a/src/classes/XLite/View/ItemsList/Model/AModel.php +++ b/src/classes/XLite/View/ItemsList/Model/AModel.php @@ -874,7 +874,11 @@ protected function getListNameSuffixes() */ protected function buildEntityURL(\XLite\Model\AEntity $entity, array $column) { - return \XLite\Core\Converter::buildURL($column[static::COLUMN_LINK], '', array('id' => $entity->getUniqueIdentifier())); + return \XLite\Core\Converter::buildURL( + $column[static::COLUMN_LINK], + '', + array($entity->getUniqueIdentifierName() => $entity->getUniqueIdentifier()) + ); } /** From ccd0ad28a2c976eb7ee31b3e31cf6138e81688fd Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 7 Jun 2012 22:54:00 +0400 Subject: [PATCH 047/562] E:0041559 [!] Fixes for the CleanURL's --- .../XLite/Controller/Admin/Base/Catalog.php | 70 +++++++++++++------ .../XLite/Controller/Admin/Category.php | 43 ++++-------- .../XLite/Controller/Admin/Product.php | 43 ++++-------- src/classes/XLite/Model/Category.php | 10 +-- src/classes/XLite/Model/Product.php | 8 ++- src/classes/XLite/Model/Repo/ARepo.php | 22 ++++++ 6 files changed, 104 insertions(+), 92 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index cbea5f7db1..2004d64466 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -63,15 +63,13 @@ abstract public function isNew(); abstract protected function getFormClass(); /** - * Check if specified clean URL is unique or not - * - * @param string $cleanURL Clean URL + * Return entity * - * @return boolean + * @return array * @see ____func_see____ - * @since 1.0.21 + * @since 1.0.24 */ - abstract protected function checkCleanURL($cleanURL); + abstract protected function getEntityInfo(); /** * Add new entity @@ -164,23 +162,6 @@ public function getCleanURLPattern() return '/[\w' . static::CLEAN_URL_DEFAULT_SEPARATOR . ']+/S'; } - /** - * Set error - * - * @param string $cleanURL Clean URL - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - protected function setCleanURLError($cleanURL) - { - \XLite\Core\TopMessage::addError( - 'The "{{clean_url}}" clean URL is already defined', - array('clean_url' => $cleanURL) - ); - } - /** * Generate clean URL * @@ -202,6 +183,49 @@ protected function generateCleanURL($name) return $result; } + /** + * Check if specified clean URL is unique or not + * + * @param string $cleanURL Clean URL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function checkCleanURL($cleanURL) + { + if (!($result = empty($cleanURL))) { + list($class, $method) = $this->getEntityInfo(); + + $repo = \XLite\Core\Database::getRepo($class); + $entity = $repo->findOneByCleanURL(substr($cleanURL, 0, $repo->getFieldInfo('cleanURL', 'length'))); + + // DO NOT use "===" here + if (!($result = !isset($entity) || $entity->getUniqueIdentifier() == $this->$method())) { + $this->setCleanURLError($cleanURL); + } + } + + return $result; + } + + /** + * Set error + * + * @param string $cleanURL Clean URL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function setCleanURLError($cleanURL) + { + \XLite\Core\TopMessage::addError( + 'The "{{clean_url}}" clean URL is already defined', + array('clean_url' => $cleanURL) + ); + } + // }}} // {{{ Action handlers diff --git a/src/classes/XLite/Controller/Admin/Category.php b/src/classes/XLite/Controller/Admin/Category.php index fac7e7881d..f19319898f 100644 --- a/src/classes/XLite/Controller/Admin/Category.php +++ b/src/classes/XLite/Controller/Admin/Category.php @@ -72,6 +72,18 @@ protected function getFormClass() return '\XLite\View\Form\Category\Modify\Single'; } + /** + * Return entity + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getEntityInfo() + { + return array('\XLite\Model\Category', 'getCategoryId'); + } + // }}} // {{{ Pages @@ -215,37 +227,6 @@ protected function getPostedData($field = null) // }}} - // {{{ Clean URL routines - - /** - * Check if specified clean URL is unique or not - * - * @param string $cleanURL Clean URL - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - protected function checkCleanURL($cleanURL) - { - $result = empty($cleanURL); - - if (!$result) { - $entity = \XLite\Core\Database::getRepo('\XLite\Model\Category')->findOneByCleanURL($cleanURL); - - // DO NOT use "===" here - $result = !isset($entity) || $entity->getCategoryId() == $this->getCategoryId(); - - if (!$result) { - $this->setCleanURLError($cleanURL); - } - } - - return $result; - } - - // }}} - // {{{ Action handlers /** diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index e518ea775e..5c38e00ad5 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -72,6 +72,18 @@ protected function getFormClass() return '\XLite\View\Form\Product\Modify\Single'; } + /** + * Return entity + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getEntityInfo() + { + return array('\XLite\Model\Product', 'getProductId'); + } + // }}} // {{{ Pages @@ -297,37 +309,6 @@ protected function getPostedData($field = null) // }}} - // {{{ Clean URL routines - - /** - * Check if specified clean URL is unique or not - * - * @param string $cleanURL Clean URL - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - protected function checkCleanURL($cleanURL) - { - $result = empty($cleanURL); - - if (!$result) { - $entity = \XLite\Core\Database::getRepo('\XLite\Model\Product')->findOneByCleanURL($cleanURL); - - // DO NOT use "===" here - $result = !isset($entity) || $entity->getProductId() == $this->getProductId(); - - if (!$result) { - $this->setCleanURLError($cleanURL); - } - } - - return $result; - } - - // }}} - // {{{ Action handlers /** diff --git a/src/classes/XLite/Model/Category.php b/src/classes/XLite/Model/Category.php index c31edfc0cd..62fec95948 100644 --- a/src/classes/XLite/Model/Category.php +++ b/src/classes/XLite/Model/Category.php @@ -35,11 +35,13 @@ * * @Entity (repositoryClass="\XLite\Model\Repo\Category") * @Table (name="categories", + * uniqueConstraints={ + * @UniqueConstraint (name="cleanURL", columns={"cleanURL"}) + * }, * indexes={ * @Index (name="lpos", columns={"lpos"}), * @Index (name="rpos", columns={"rpos"}), - * @Index (name="enabled", columns={"enabled"}), - * @Index (name="cleanURL", columns={"cleanURL"}) + * @Index (name="enabled", columns={"enabled"}) * } * ) */ @@ -98,9 +100,9 @@ class Category extends \XLite\Model\Base\I18n * @see ____var_see____ * @since 1.0.0 * - * @Column (type="string", length="255") + * @Column (type="string", length="255", nullable=true) */ - protected $cleanURL = ''; + protected $cleanURL; /** * Whether to display the category title, or not diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index 1659777fed..9a92e1899a 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -35,12 +35,14 @@ * * @Entity (repositoryClass="\XLite\Model\Repo\Product") * @Table (name="products", + * uniqueConstraints={ + * @UniqueConstraint (name="cleanURL", columns={"cleanURL"}) + * }, * indexes={ * @Index (name="price", columns={"price"}), * @Index (name="sku", columns={"sku"}), * @Index (name="weight", columns={"weight"}), * @Index (name="free_shipping", columns={"free_shipping"}), - * @Index (name="cleanURL", columns={"cleanURL"}), * @Index (name="customerArea", columns={"enabled","arrivalDate"}) * } * ) @@ -130,9 +132,9 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder * @see ____var_see____ * @since 1.0.0 * - * @Column (type="string", length="255", nullable=false) + * @Column (type="string", length="255", nullable=true) */ - protected $cleanURL = ''; + protected $cleanURL; /** * Custom javascript code diff --git a/src/classes/XLite/Model/Repo/ARepo.php b/src/classes/XLite/Model/Repo/ARepo.php index 175abff847..c78f33a94f 100644 --- a/src/classes/XLite/Model/Repo/ARepo.php +++ b/src/classes/XLite/Model/Repo/ARepo.php @@ -755,6 +755,28 @@ public function getPrimaryKeyField() return $this->getClassMetadata()->getSingleIdentifierFieldName(); } + /** + * Return info about model field + * + * @param string $field Field name + * @param string $param Data param OPTIONAL + * + * @return array|mixed + * @see ____func_see____ + * @since 1.0.24 + */ + public function getFieldInfo($field, $param = null) + { + try { + $result = $this->getClassMetadata()->getFieldMapping($field); + + } catch (\Doctrine\ORM\Mapping\MappingException $exception) { + $result = $this->getClassMetadata()->getAssociationMapping($field); + } + + return \Includes\Utils\ArrayManager::getIndex($result, $param, isset($param)); + } + /** * Find one by record * From 999c39e7b42923c2ec1818af6d46db2da2bc5ecb Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 8 Jun 2012 01:20:44 +0400 Subject: [PATCH 048/562] E:0041560 [!] Forced redirect to CleanURLs has been added --- src/classes/XLite.php | 23 +++++++++ src/classes/XLite/Controller/AController.php | 3 +- .../XLite/Controller/Customer/Catalog.php | 34 ++++++++++++++ src/classes/XLite/Core/Converter.php | 27 ++++++++--- src/classes/XLite/Core/Request.php | 47 ++++++++++++++++++- 5 files changed, 124 insertions(+), 10 deletions(-) diff --git a/src/classes/XLite.php b/src/classes/XLite.php index f918bc80c6..441d8d642d 100644 --- a/src/classes/XLite.php +++ b/src/classes/XLite.php @@ -71,6 +71,15 @@ class XLite extends \XLite\Base */ protected static $adminZone = false; + /** + * URL type flag + * + * @var boolean + * @see ____var_see____ + * @since 1.0.24 + */ + protected static $cleanURL = false; + /** * Called controller * @@ -119,6 +128,18 @@ public static function isAdminZone() return static::$adminZone; } + /** + * Check if clean URL used + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public static function isCleanURL() + { + return static::$cleanURL; + } + /** * Ability to provoke cache cleanup (or to prevent it) * @@ -455,6 +476,8 @@ protected static function getTargetByCleanURL() if (!empty($target)) { $tmp->mapRequest($params); + + static::$cleanURL = true; } return $target; diff --git a/src/classes/XLite/Controller/AController.php b/src/classes/XLite/Controller/AController.php index 2e01bbaee4..0df8e2cde6 100644 --- a/src/classes/XLite/Controller/AController.php +++ b/src/classes/XLite/Controller/AController.php @@ -313,7 +313,6 @@ public function setReturnURLParams(array $params) /** * Handles the request. * Parses the request variables if necessary. Attempts to call the specified action function - * FIXME - simplify * * @return void * @see ____func_see____ @@ -1029,7 +1028,7 @@ protected function assignAJAXResponseStatus() } /** - * Preprocessor for no-action ren + * Preprocessor for no-action run * * @return void * @see ____func_see____ diff --git a/src/classes/XLite/Controller/Customer/Catalog.php b/src/classes/XLite/Controller/Customer/Catalog.php index 07592b2b90..ec5ea6ecd2 100644 --- a/src/classes/XLite/Controller/Customer/Catalog.php +++ b/src/classes/XLite/Controller/Customer/Catalog.php @@ -157,6 +157,40 @@ protected function doNoAction() if (!\XLite\Core\Request::getInstance()->isAJAX()) { \XLite\Core\Session::getInstance()->productListURL = $this->getURL(); } + + if (LC_USE_CLEAN_URLS && !\XLite\Core\Request::getInstance()->isAJAX() && $this->isRedirectToCleanURLNeeded()) { + $this->performRedirectToCleanURL(); + } + } + + /** + * Check if redirect to clean URL is needed + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function isRedirectToCleanURLNeeded() + { + return !$this->isRedirectNeeded() && !\XLite::isCleanURL() && $this->getModelObject()->getCleanURL(); + } + + /** + * Redirect to clean URL + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected function performRedirectToCleanURL() + { + $this->setReturnURL( + \XLite\Core\Converter::buildCleanURL( + $this->getTarget(), + '', + \XLite\Core\Request::getInstance()->getGetData() + ) + ); } /** diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index bc053634c9..ffe86daab5 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -168,19 +168,20 @@ public static function getControllerClass($target) public static function buildURL($target = '', $action = '', array $params = array(), $interface = null) { $result = null; + $cuFlag = LC_USE_CLEAN_URLS && !\XLite::isAdminZone(); - if (LC_USE_CLEAN_URLS && !\XLite::isAdminZone()) { + if ($cuFlag) { $result = static::buildCleanURL($target, $action, $params); - } - + } + if (!isset($result)) { - if (!isset($interface)) { + if (!isset($interface) && !$cuFlag) { $interface = \XLite::getInstance()->getScript(); - } - + } + $result = \Includes\Utils\Converter::buildURL($target, $action, $params, $interface); } - + return $result; } @@ -221,6 +222,8 @@ public static function buildCleanURL($target = '', $action = '', array $params = if (isset($product) && $product->getCleanURL()) { $urlParams[] = $product->getCleanURL() . '.html'; + + unset($params['product_id']); } } @@ -234,13 +237,23 @@ public static function buildCleanURL($target = '', $action = '', array $params = } } } + + if (!empty($urlParams)) { + unset($params['category_id']); + } } static::buildCleanURLHook($target, $action, $params, $urlParams); if (!empty($urlParams)) { + unset($params['target']); + $result = \Includes\Utils\ConfigParser::getOptions(array('host_details', 'web_dir_wo_slash')); $result .= '/' . implode('/', array_reverse($urlParams)); + + if (!empty($params)) { + $result .= '?' . http_build_query($params); + } } return $result; diff --git a/src/classes/XLite/Core/Request.php b/src/classes/XLite/Core/Request.php index 18787d6326..ed3caf0346 100644 --- a/src/classes/XLite/Core/Request.php +++ b/src/classes/XLite/Core/Request.php @@ -35,6 +35,9 @@ */ class Request extends \XLite\Base\Singleton { + /** + * Current method + */ const METHOD_CLI = 'cli'; /** @@ -75,7 +78,7 @@ public function mapRequest(array $data = array()) } } else { - $data = array_merge($_GET, $_POST, $_COOKIE); + $data = array_merge($this->getGetData(false), $this->getPostData(false), $this->getCookieData(false)); } } @@ -94,6 +97,48 @@ public function getData() return $this->data; } + /** + * Return data from the $_GET global variable + * + * @param boolean $prepare Flag OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + public function getGetData($prepare = true) + { + return $prepare ? $this->prepare($_GET) : $_GET; + } + + /** + * Return data from the $_POST global variable + * + * @param boolean $prepare Flag OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + public function getPostData($prepare = true) + { + return $prepare ? $this->prepare($_POST) : $_POST; + } + + /** + * Return data from the $_COOKIE global variable + * + * @param boolean $prepare Flag OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + public function getCookieData($prepare = true) + { + return $prepare ? $this->prepare($_COOKIE) : $_COOKIE; + } + /** * Return current request method * From 5631a9d46fc17833bfd2559f0ffee951fb465424 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 8 Jun 2012 01:39:46 +0400 Subject: [PATCH 049/562] [*] Minor code style improvements --- src/classes/XLite/Controller/Customer/Catalog.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/Controller/Customer/Catalog.php b/src/classes/XLite/Controller/Customer/Catalog.php index ec5ea6ecd2..0cdc0ab7d5 100644 --- a/src/classes/XLite/Controller/Customer/Catalog.php +++ b/src/classes/XLite/Controller/Customer/Catalog.php @@ -154,12 +154,12 @@ protected function doNoAction() { parent::doNoAction(); - if (!\XLite\Core\Request::getInstance()->isAJAX()) { + if (!$this->isAJAX()) { \XLite\Core\Session::getInstance()->productListURL = $this->getURL(); - } - if (LC_USE_CLEAN_URLS && !\XLite\Core\Request::getInstance()->isAJAX() && $this->isRedirectToCleanURLNeeded()) { - $this->performRedirectToCleanURL(); + if (LC_USE_CLEAN_URLS && $this->isRedirectToCleanURLNeeded()) { + $this->performRedirectToCleanURL(); + } } } From 62cc075c419f5351b330cc20398da80a03388530 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 10:30:17 +0400 Subject: [PATCH 050/562] [*] Redesign items list's sticky panel --- .../Module/CDev/Sale/View/ItemsListForm.php | 12 ++- .../CDev/Sale/View/SaleSelectedButton.php | 2 +- .../XLite/View/Base/FormStickyPanel.php | 40 +++++++- .../XLite/View/StickyPanel/ItemsListForm.php | 96 +++++++++++++++++- src/skins/admin/en/css/stickyPanel.css | 12 ++- src/skins/admin/en/css/style.css | 92 +++++++++++++++-- src/skins/admin/en/form/panel/body.tpl | 2 +- .../admin/en/images/button_more_arrow.png | Bin 0 -> 398 bytes src/skins/admin/en/images/icon_cancel.png | Bin 0 -> 371 bytes .../items_list/model/additional_buttons.tpl | 16 +++ .../model/table/images/line-separator.png | Bin 175 -> 175 bytes .../items_list/model/table/left_actions.tpl | 2 +- .../items_list/model/table/right_actions.tpl | 1 + .../admin/en/items_list/model/table/style.css | 23 +++-- src/skins/admin/en/js/stickyPanel.js | 37 ++++--- 15 files changed, 292 insertions(+), 43 deletions(-) create mode 100644 src/skins/admin/en/images/button_more_arrow.png create mode 100644 src/skins/admin/en/images/icon_cancel.png create mode 100644 src/skins/admin/en/items_list/model/additional_buttons.tpl diff --git a/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php b/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php index 5c6d2a20f4..0f4b6e739f 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php +++ b/src/classes/XLite/Module/CDev/Sale/View/ItemsListForm.php @@ -36,19 +36,21 @@ abstract class ItemsListForm extends \XLite\View\StickyPanel\Product\Admin\AAdmin implements \XLite\Base\IDecorator { /** - * Get buttons widgets + * Define additional buttons * * @return array * @see ____func_see____ - * @since 1.0.15 + * @since 1.0.24 */ - protected function getButtons() + protected function defineAdditionalButtons() { - $widget = $this->getWidget( + $list = parent::defineAdditionalButtons(); + + $list[] = $this->getWidget( array('disabled' => true), 'XLite\Module\CDev\Sale\View\SaleSelectedButton' ); - return array_merge(array($widget), parent::getButtons()); + return $list; } } diff --git a/src/classes/XLite/Module/CDev/Sale/View/SaleSelectedButton.php b/src/classes/XLite/Module/CDev/Sale/View/SaleSelectedButton.php index 5224ceef51..6ab5f78c62 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/SaleSelectedButton.php +++ b/src/classes/XLite/Module/CDev/Sale/View/SaleSelectedButton.php @@ -105,6 +105,6 @@ protected function getDefaultLabel() */ protected function getClass() { - return parent::getClass() . ' action sale-selected-button'; + return parent::getClass() . ' action link sale-selected-button'; } } diff --git a/src/classes/XLite/View/Base/FormStickyPanel.php b/src/classes/XLite/View/Base/FormStickyPanel.php index 76a453d06b..aecf1f4b3e 100644 --- a/src/classes/XLite/View/Base/FormStickyPanel.php +++ b/src/classes/XLite/View/Base/FormStickyPanel.php @@ -60,20 +60,54 @@ protected function getDir() * Get cell class * * @param integer $idx Button index + * @param string $name Button name * @param \XLite\View\AView $button Button * * @return string * @see ____func_see____ * @since 1.0.16 */ - protected function getCellClass($idx, \XLite\View\AView $button) + protected function getCellClass($idx, $name, \XLite\View\AView $button) { - $classes = array('panel-cell'); + $classes = array('panel-cell', $name); - if (0 == $idx) { + if (1 == $idx) { $classes[] = 'first'; } + if (count($this->getButtons()) == $idx) { + $classes[] = 'last'; + } + + + return implode(' ', $classes); + } + + /** + * Get subcell class (additional buttons) + * + * @param integer $idx Button index + * @param string $name Button name + * @param \XLite\View\AView $button Button + * + * @return string + * @see ____func_see____ + * @since 1.0.16 + */ + protected function getSubcellClass($idx, $name, \XLite\View\AView $button) + { + $classes = array('panel-subcell', $name); + + if (1 == $idx) { + $classes[] = 'first'; + } + + if (count($this->getAdditionalButtons()) == $idx) { + $classes[] = 'last'; + } + + return implode(' ', $classes); } + } diff --git a/src/classes/XLite/View/StickyPanel/ItemsListForm.php b/src/classes/XLite/View/StickyPanel/ItemsListForm.php index 7ee86bd2fe..abd28ea06f 100644 --- a/src/classes/XLite/View/StickyPanel/ItemsListForm.php +++ b/src/classes/XLite/View/StickyPanel/ItemsListForm.php @@ -35,6 +35,24 @@ */ class ItemsListForm extends \XLite\View\Base\FormStickyPanel { + /** + * Buttons list (cache) + * + * @var array + * @see ____var_see____ + * @since 1.0.24 + */ + protected $buttonsList; + + /** + * Additional buttons (cache) + * + * @var array + * @see ____var_see____ + * @since 1.0.24 + */ + protected $additionalButtons; + /** * Get buttons widgets * @@ -44,8 +62,24 @@ class ItemsListForm extends \XLite\View\Base\FormStickyPanel */ protected function getButtons() { - return array( - $this->getWidget( + if (!isset($this->buttonsList)) { + $this->buttonsList = $this->defineButtons(); + } + + return $this->buttonsList; + } + + /** + * Define buttons widgets + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function defineButtons() + { + $list = array( + 'save' => $this->getWidget( array( 'style' => 'action submit', 'label' => \XLite\Core\Translation::lbl('Save changes'), @@ -53,12 +87,68 @@ protected function getButtons() ), 'XLite\View\Button\Submit' ), - $this->getWidget( + 'cancel' => $this->getWidget( array( 'template' => 'items_list/model/cancel.tpl', ) ), ); + + if ($this->getAdditionalButtons()) { + $list['additional'] = $this->getWidget( + array( + 'template' => 'items_list/model/additional_buttons.tpl', + ) + ); + } + + return $list; + } + + /** + * Get additional buttons + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getAdditionalButtons() + { + if (!isset($this->additionalButtons)) { + $this->additionalButtons = $this->defineAdditionalButtons(); + } + + return $this->additionalButtons; + } + + /** + * Define additional buttons + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function defineAdditionalButtons() + { + return array(); + } + + /** + * Get class + * + * @return string + * @see ____func_see____ + * @since 1.0.10 + */ + protected function getClass() + { + $class = parent::getClass(); + + if ($this->getAdditionalButtons()) { + $class = trim($class . ' has-add-buttons'); + } + + return $class; } } diff --git a/src/skins/admin/en/css/stickyPanel.css b/src/skins/admin/en/css/stickyPanel.css index cca8b4da44..f31cae73ee 100644 --- a/src/skins/admin/en/css/stickyPanel.css +++ b/src/skins/admin/en/css/stickyPanel.css @@ -13,20 +13,23 @@ .sticky-panel { position: relative; margin: 0px; + margin-top: 20px; padding: 0px; + overflow: visible; } .centered-box { margin: 0px auto; padding: 0px; height: 100% + overflow: visible; } .sticky-panel .box { top: 0px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; + -moz-border-radius: 9px; + -webkit-border-radius: 9px; + border-radius: 9px; border: 1px solid #cadce8; background: #fff none; box-shadow: 1px 1px 5px silver; @@ -34,7 +37,8 @@ -moz-box-shadow: 1px 1px 5px silver; position: absolute; margin: 0px; - padding: 21px 17px; + padding: 20px 17px; + overflow: visible; } .sticky-panel .box button { diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index a70e38625c..9fee0c3176 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -975,6 +975,38 @@ button.bright:active background-position: center -72px; } +button.link { + border-style: none; + background: transparent none; + padding-left: 0px; + padding-right: 0px; + margin-left: 0px; + margin-right: 0px; +} + +button.link span { + color: #154e9c; + text-decoration: underline; + cursor: pointer; +} + +button.link[disabled="disabled"], +button.link.disabled +{ + background: transparent none; +} + +button.link[disabled="disabled"] span, +button.link.disabled span +{ + color: #8f8f8f; + text-decoration: none; + cursor: default; +} + + + + /* FIXME button.switch-state { background: transparent url(../images/tri_button.png) no-repeat left top; @@ -1778,18 +1810,66 @@ form.list-form { form.list-form .sticky-panel .panel-cell { display: inline-block; - padding-left: 10px; + padding: 0px; } -form.list-form .sticky-panel .panel-cell.first { - padding-left: 0px; +form.list-form .sticky-panel .panel-cell > button { + margin-left: 5px; + margin-right: 5px; +} + +form.list-form .sticky-panel div.cancel, +form.list-form .sticky-panel div.additional +{ + display: block; } form.list-form .sticky-panel a.cancel { - text-decoration: underline; + text-indent: -5000px; + display: block; + background: transparent url(../images/icon_cancel.png) no-repeat left top; + width: 16px; + height: 16px; + position: absolute; + top: 3px; + left: 5px; } form.list-form .sticky-panel a.cancel.disabled { - color: #8f8f8f; - text-decoration: none; + opacity: .5; + cursor: text; +} + +form.list-form .sticky-panel.has-add-buttons .box { + padding-right: 47px; +} + +form.list-form .sticky-panel.has-add-buttons .additional { + position: absolute; + top: 4px; + right: -26px; + width: 58px; + height: 68px; + background: transparent url(../images/button_more_arrow.png) no-repeat left top; + -moz-border-radius: 0px 5px 5px 0px; + -webkit-border-radius: 0px 5px 5px 0px; + border-radius: 0px 5px 5px 0px; + overflow: visible; +} + +form.list-form .sticky-panel.has-add-buttons .additional .additional-buttons { + position: absolute; + top: 10px; + left: 43px; + display: none; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + border: 1px solid #cadce8; + background: #fff none; + padding: 15px; +} + +form.list-form .sticky-panel.has-add-buttons .additional:hover .additional-buttons { + display: block; } diff --git a/src/skins/admin/en/form/panel/body.tpl b/src/skins/admin/en/form/panel/body.tpl index 004404f8e0..3b924bff7d 100644 --- a/src/skins/admin/en/form/panel/body.tpl +++ b/src/skins/admin/en/form/panel/body.tpl @@ -10,4 +10,4 @@ * @since 1.0.15 *} -
{button.display():h}
+
{button.display():h}
diff --git a/src/skins/admin/en/images/button_more_arrow.png b/src/skins/admin/en/images/button_more_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..e39ca29914e41ba49f13fecd86452e586dbff9cf GIT binary patch literal 398 zcmeAS@N?(olHy`uVBq!ia0vp^GC=IY!2~2_Hyw%uQY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrIztFe-SuIEGZ*N~-z%mY;blgRnBQ zwXw3ewlFvI*8}_i^W6Xchy9Wd&lNWN|NoZnTj=mT=zc)JgFY#%tQRX5E^dP|G9Fyr zecrk+M(tjJSd!11*bR>lFVDYU|A(){a8aLkx$Ish6TuSZQYHsNh-pf zMj{e5Of@k_W^=Ig94R^1zmdKI;Vst0Qy{`CIA2c literal 0 HcmV?d00001 diff --git a/src/skins/admin/en/images/icon_cancel.png b/src/skins/admin/en/images/icon_cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..270349e1dfeda06d5eace46a35a2c78eae126efb GIT binary patch literal 371 zcmV-(0gV2MP)orB_h)Z*mNfg&M#H#Lq}I z02GC$K>QAf*@5^VJ_A7F%s~7P8qlC9(}(ikL&eVFGJqB8M35X85c2@B095m5Xzc8R zvM~%`hKeyk*^Ed52Et!~_&5+hMRqDO_zO*Kj7Z)9v3~&ZU1${kK-K^dU;sQWH-7dL RP`&^F002ovPDHLkV1f?Ai_ri8 literal 0 HcmV?d00001 diff --git a/src/skins/admin/en/items_list/model/additional_buttons.tpl b/src/skins/admin/en/items_list/model/additional_buttons.tpl new file mode 100644 index 0000000000..fc3a3aec98 --- /dev/null +++ b/src/skins/admin/en/items_list/model/additional_buttons.tpl @@ -0,0 +1,16 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Additional buttons list + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.24 + *} + +
+
{button.display():h}
+
+ diff --git a/src/skins/admin/en/items_list/model/table/images/line-separator.png b/src/skins/admin/en/items_list/model/table/images/line-separator.png index 2eb50e34c7e19a326e376c676bdd30938ef22062..9247d6b9d81f3f90bf373863ac2e0f48bcca95f1 100644 GIT binary patch delta 58 zcmZ3_xSnx>I2S($8v_HwISsjA6BX?^+1PkQ)!r|3W1X0xFR^mH1jAi>i65`@-hIF}#?8v_Hw_b;`A6BX?^8Cm({H3FZjNKDMomw35Qg5ivl>`CsGnFc^L N44$rjF6*2UngG(Q5QhK& diff --git a/src/skins/admin/en/items_list/model/table/left_actions.tpl b/src/skins/admin/en/items_list/model/table/left_actions.tpl index 4ed2725938..7fdc0f74d7 100644 --- a/src/skins/admin/en/items_list/model/table/left_actions.tpl +++ b/src/skins/admin/en/items_list/model/table/left_actions.tpl @@ -11,4 +11,4 @@ *}
- +
diff --git a/src/skins/admin/en/items_list/model/table/right_actions.tpl b/src/skins/admin/en/items_list/model/table/right_actions.tpl index b9c5336ccd..8122c9e1f7 100644 --- a/src/skins/admin/en/items_list/model/table/right_actions.tpl +++ b/src/skins/admin/en/items_list/model/table/right_actions.tpl @@ -10,4 +10,5 @@ * @since 1.0.15 *} +
diff --git a/src/skins/admin/en/items_list/model/table/style.css b/src/skins/admin/en/items_list/model/table/style.css index 2dd62bb06c..dc5ccb1908 100644 --- a/src/skins/admin/en/items_list/model/table/style.css +++ b/src/skins/admin/en/items_list/model/table/style.css @@ -40,7 +40,6 @@ border-bottom: 1px solid #e9e9e9; padding: 8px 12px 6px; line-height: 30px; - height: 48px; white-space: nowrap; } @@ -64,23 +63,33 @@ vertical-align: middle; } -.items-list-table table.list tbody td.actions { +.items-list-table table.list tbody td.actions .separator { + display: inline-block; + width: 3px; + height: 20px; background-image: url(images/line-separator.png); - background-repeat: no-repeat; - text-align: center; + background-repeat: repeat-y; + background-position: top left; } .items-list-table table.list tbody td.actions.left { - background-position: right 15px; - padding-right: 6px; + padding-right: 0px; padding-left: 7px; } +.items-list-table table.list tbody td.actions.left .separator { + margin-left: 6px; +} + .items-list-table table.list tbody td.actions.right { - background-position: left 15px; + padding-left: 0px; padding-right: 6px; } +.items-list-table table.list tbody td.actions.right .separator { + margin-right: 12px; +} + .items-list-table table.list tbody td.actions .action { display: inline-block; padding-right: 2px; diff --git a/src/skins/admin/en/js/stickyPanel.js b/src/skins/admin/en/js/stickyPanel.js index 428842eec2..c6b16155f3 100644 --- a/src/skins/admin/en/js/stickyPanel.js +++ b/src/skins/admin/en/js/stickyPanel.js @@ -14,15 +14,26 @@ jQuery().ready( jQuery('.sticky-panel').each( function () { + var box = jQuery(this); + // Options - var duration = 400; - var easing = 'linear'; - var delay = 0; - var bottomPadding = 25; - var parentContainerLock = true; + var options = box.data('options') || {}; + + var defaultOptions = { + bottomPadding: 25, + parentContainerLock: true + }; + + jQuery.each( + defaultOptions, + function (key, value) { + if ('undefined' == typeof(options[key])) { + options[key] = value; + } + } + ); // Assemble variables - var box = jQuery(this); var panel = box.find('.box').eq(0); box.height(panel.outerHeight()); @@ -62,17 +73,19 @@ jQuery().ready( var boxScrollTop = box.offset().top; var docScrollTop = doc.scrollTop(); var windowHeight = jQuery(window).height(); - var diff = windowHeight - boxScrollTop + docScrollTop - panelHeight - bottomPadding; + var diff = windowHeight - boxScrollTop + docScrollTop - panelHeight - options.bottomPadding; if (0 > diff) { - if (parentContainerLock && parentContainerTop > (boxScrollTop + diff)) { - diff = parentContainerTop - boxScrollTop; - } + if (options.parentContainerLock && parentContainerTop > (boxScrollTop + diff)) { + panel.css({position: 'absolute', top: parentContainerTop - boxScrollTop}); - panel.delay(delay).animate({top: diff}, duration, easing); + } else if ('fixed' != panel.css('position')) { + panel.css({position: 'fixed', top: windowHeight - panelHeight - options.bottomPadding}); + } } else if (panel.css('top') != '0px') { - panel.delay(delay).animate({top: 0}, duration, easing); + panel.css({position: 'absolute', top: 0}); + } } From 3a73479e55684c43a8b0f7f7fd89dbbbf0f89896 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 13:57:23 +0400 Subject: [PATCH 051/562] [*] Small logic changes --- .../Controller/Admin/S3Migrate.php | 20 +---- .../Core/EventListener/MigrateFromS3.php | 87 +++++++++---------- .../Core/EventListener/MigrateToS3.php | 86 +++++++++--------- .../Module/CDev/AmazonS3Images/Core/S3.php | 65 +++++++------- .../CDev/AmazonS3Images/Model/Base/Image.php | 8 +- .../CDev/AmazonS3Images/View/Migrate.php | 40 +++++---- .../CDev/AmazonS3Images/View/install.yaml | 14 +++ src/classes/XLite/View/EventTaskProgress.php | 36 +++++++- .../admin/en/event_task_progress/body.tpl | 4 +- .../modules/CDev/AmazonS3Images/migrate.tpl | 10 ++- 10 files changed, 202 insertions(+), 168 deletions(-) create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/View/install.yaml diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php index a63ef54dd1..4ea45dfc1f 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/S3Migrate.php @@ -44,15 +44,7 @@ class S3Migrate extends \XLite\Controller\Admin\AAdmin */ protected function doActionMigrateToS3() { - $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateToS3Info')); - if (!$info) { - $info = new \XLite\Model\TmpVar; - $info->setName('migrateToS3Info'); - \XLite\Core\Database::getEM()->persist($info); - } - $info->setValue(serialize(array('position' => 0, 'length' => 0))); - \XLite\Core\Database::getEM()->flush(); - + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->initializeEventState('migrateToS3'); \XLite\Core\EventTask::migrateToS3(); } @@ -65,15 +57,7 @@ protected function doActionMigrateToS3() */ protected function doActionMigrateFromS3() { - $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateFromS3Info')); - if (!$info) { - $info = new \XLite\Model\TmpVar; - $info->setName('migrateFromS3Info'); - \XLite\Core\Database::getEM()->persist($info); - } - $info->setValue(serialize(array('position' => 0, 'length' => 0))); - \XLite\Core\Database::getEM()->flush(); - + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->initializeEventState('migrateFromS3'); \XLite\Core\EventTask::migrateFromS3(); } } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php index aaac43cbec..a32af5efc4 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php @@ -33,59 +33,58 @@ * @see ____class_see____ * @since 1.0.19 */ -class MigrateFromS3 extends \XLite\Core\EventListener\AEventListener +class MigrateFromS3 extends \XLite\Core\EventListener\Base\Countable { - const CHUNK_LENGTH = 100; + const CHUNK_LENGTH = 50; /** - * Handle event (internal, after checking) + * Get event name * - * @param string $name Event name - * @param array $arguments Event arguments OPTIONAL + * @return string + * @see ____func_see____ + * @since 1.0.23 + */ + protected function getEventName() + { + return 'migrateFromS3'; + } + + /** + * Process item + * + * @param mixed $item Item * * @return boolean * @see ____func_see____ - * @since 1.0.19 + * @since 1.0.23 */ - public function handleEvent($name, array $arguments) + protected function processItem($item) { - if (0 < $this->getLength() && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid()) { - - $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateFromS3Info')); - if (!$info) { - $info = new \XLite\Model\TmpVar; - $info->setName('migrateFromS3Info'); - \XLite\Core\Database::getEM()->persist($info); - } - $rec = $info->getValue() ? unserialize($info->getValue()) : array('position' => 0, 'length' => 0); - - if (0 == $rec['length']) { - $rec['length'] = $this->getLength(); - } - - foreach ($this->getChunk() as $image) { - $path = tempnam(LC_DIR_TMP, 'migrate_file'); - file_put_contents($path, $image->getBody()); - - if (file_exists($path)) { - $image->setS3Forbid(true); - if ($image->loadFromLocalFile($path, $image->getFileName() ?: basename($image->getPath()))) { - $rec['position']++; - $info->setValue(serialize($rec)); - \XLite\Core\Database::getEM()->flush(); - } - unlink($path); - } - } + $result = false; - \XLite\Core\Database::getEM()->flush(); + $path = tempnam(LC_DIR_TMP, 'migrate_file'); + file_put_contents($path, $item->getBody()); - if (0 < $this->getLength()) { - \XLite\Core\EventTask::migrateFromS3(); - } + if (file_exists($path)) { + $item->setS3Forbid(true); + $result = $item->loadFromLocalFile($path, $item->getFileName() ?: basename($item->getPath())); + unlink($path); } - return true; + return $result; + } + + /** + * Check step valid state + * + * @return boolean + * @see ____func_see____ + * @since 1.0.23 + */ + protected function isStepValid() + { + return parent::isStepValid() + && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid(); } /** @@ -107,13 +106,13 @@ protected function getLength() } /** - * Get images chunk - * + * Get items + * * @return array * @see ____func_see____ - * @since 1.0.19 + * @since 1.0.23 */ - protected function getChunk() + protected function getItems() { $chunk = array(); diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php index 86013c07cd..3ab5387697 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php @@ -33,58 +33,56 @@ * @see ____class_see____ * @since 1.0.19 */ -class MigrateToS3 extends \XLite\Core\EventListener\AEventListener +class MigrateToS3 extends \XLite\Core\EventListener\Base\Countable { - const CHUNK_LENGTH = 100; + const CHUNK_LENGTH = 50; /** - * Handle event (internal, after checking) + * Get event name * - * @param string $name Event name - * @param array $arguments Event arguments OPTIONAL + * @return string + * @see ____func_see____ + * @since 1.0.23 + */ + protected function getEventName() + { + return 'migrateToS3'; + } + + /** + * Process item + * + * @param mixed $item Item * * @return boolean * @see ____func_see____ - * @since 1.0.19 + * @since 1.0.23 */ - public function handleEvent($name, array $arguments) + protected function processItem($item) { - if (0 < $this->getLength() && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid()) { - - $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateToS3Info')); - if (!$info) { - $info = new \XLite\Model\TmpVar; - $info->setName('migrateToS3Info'); - \XLite\Core\Database::getEM()->persist($info); - } - $rec = $info->getValue() ? unserialize($info->getValue()) : array('position' => 0, 'length' => 0); - - if (0 == $rec['length']) { - $rec['length'] = $this->getLength(); - } - - foreach ($this->getChunk() as $image) { - $path = tempnam(LC_DIR_TMP, 'migrate_file'); - file_put_contents($path, $image->getBody()); - - if (file_exists($path)) { - if ($image->loadFromLocalFile($path, $image->getFileName() ?: basename($image->getPath()))) { - $rec['position']++; - $info->setValue(serialize($rec)); - \XLite\Core\Database::getEM()->flush(); - } - unlink($path); - } - } - - \XLite\Core\Database::getEM()->flush(); + $result = false; + $path = tempnam(LC_DIR_TMP, 'migrate_file'); + file_put_contents($path, $item->getBody()); - if (0 < $this->getLength()) { - \XLite\Core\EventTask::migrateToS3(); - } + if (file_exists($path)) { + $result = $item->loadFromLocalFile($path, $item->getFileName() ?: basename($item->getPath())); + unlink($path); } - return true; + return $result; + } + + /** + * Check step valid state + * + * @return boolean + * @see ____func_see____ + * @since 1.0.23 + */ + protected function isStepValid() + { + return parent::isStepValid() + && \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid(); } /** @@ -106,13 +104,13 @@ protected function getLength() } /** - * Get images chunk - * + * Get items + * * @return array * @see ____func_see____ - * @since 1.0.19 + * @since 1.0.23 */ - protected function getChunk() + protected function getItems() { $chunk = array(); diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php index aa195d5752..6b7307979d 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php @@ -64,33 +64,6 @@ class S3 extends \XLite\Base\Singleton */ protected $urlPrefix; - /** - * Constructor - * - * @return void - * @see ____func_see____ - * @since 1.0.19 - */ - protected function __construct() - { - require_once LC_DIR_CLASSES . '/XLite/Module/CDev/AmazonS3Images/lib/S3.php'; - - $config = \XLite\Core\Config::getInstance()->CDev->AmazonS3Images; - - $this->client = new \S3($config->access_key, $config->secret_key); - \S3::setExceptions(true); - - try { - if (!$this->client->getBucketLocation($config->bucket)) { - $this->client->putBucket($config->bucket); - } - $this->valid = true; - - } catch (\S3Exception $e) { - \XLite\Logger::getInstance()->registerException($e); - } - } - /** * Check valid status * @@ -207,7 +180,10 @@ public function delete($path) { $result = false; try { - $result = $this->client->deleteObject(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $path); + $result = $this->client->deleteObject( + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path + ); } catch (\S3Exception $e) { $result = false; @@ -251,7 +227,11 @@ public function getURL($path) public function isExists($path) { try { - $result = $this->client->getObjectInfo(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $path, false); + $result = $this->client->getObjectInfo( + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path, + false + ); } catch (\S3Exception $e) { $result = false; @@ -292,5 +272,32 @@ public function generateUniquePath($path) return $path; } + /** + * Constructor + * + * @return void + * @see ____func_see____ + * @since 1.0.19 + */ + protected function __construct() + { + require_once LC_DIR_CLASSES . '/XLite/Module/CDev/AmazonS3Images/lib/S3.php'; + + $config = \XLite\Core\Config::getInstance()->CDev->AmazonS3Images; + + $this->client = new \S3($config->access_key, $config->secret_key); + \S3::setExceptions(true); + + try { + if (!$this->client->getBucketLocation($config->bucket)) { + $this->client->putBucket($config->bucket); + } + $this->valid = true; + + } catch (\S3Exception $e) { + \XLite\Logger::getInstance()->registerException($e); + } + } + } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php index 4eddf84426..e5e709354e 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php @@ -64,7 +64,7 @@ abstract class Image extends \XLite\Model\Base\Image implements \XLite\Base\IDec /** * Set S3 forbid * - * @param boolean $flag Flag + * @param boolean $flag Flag OPTIONAL * * @return void * @see ____func_see____ @@ -99,8 +99,8 @@ public function getBody() /** * Read output * - * @param integer $start Start popsition - * @param integer $length Length + * @param integer $start Start popsition OPTIONAL + * @param integer $length Length OPTIONAL * * @return boolean * @see ____func_see____ @@ -116,7 +116,7 @@ public function readOutput($start = null, $length = null) $body = isset($length) ? substr($body, $start, $length) : substr($body, $start); } $result = true; - print $body; + print ($body); } } else { diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php index 62e98c7f22..1cc3afa25d 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php @@ -112,22 +112,26 @@ protected function isVisible() } /** - * Check - migrate started or not + * Get migration process started code * - * @return boolean + * @return string * @see ____func_see____ * @since 1.0.19 */ - protected function isMigrateStarted() + protected function getMigrateStarted() { $result = false; - $repo = \XLite\Core\Database::getRepo('XLite\Model\TmpVar'); - if ( - $repo->findOneBy(array('name' => 'migrateFromS3Info')) - || $repo->findOneBy(array('name' => 'migrateToS3Info')) - ) { - $result = 100 != $this->getPercentMigrate(); + $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateFromS3'); + if ($state && (0 < $state['position'] || 0 == $state['lenght'])) { + $result = 'migrateFromS3'; + } + + if (!$result) { + $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateToS3'); + if ($state && (0 < $state['position'] || 0 == $state['lenght'])) { + $result = 'migrateToS3'; + } } return $result; @@ -144,22 +148,20 @@ protected function getPercentMigrate() { $percent = 0; - $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateFromS3Info')); + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateFromS3'); if ($info) { - $rec = unserialize($info->getValue()); - if (0 < $rec['length']) { - $percent = min(100, round($rec['position'] / $rec['length'] * 100)); + if (0 < $info['length']) { + $percent = min(100, round($info['position'] / $info['length'] * 100)); } } if (!$info || 100 == $percent) { - $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->findOneBy(array('name' => 'migrateToS3Info')); + $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateToS3'); if ($info) { - $rec = unserialize($info->getValue()); - if (0 < $rec['length']) { - $percent = min(100, round($rec['position'] / $rec['length'] * 100)); + if (0 < $info['length']) { + $percent = min(100, round($info['position'] / $info['length'] * 100)); } } } @@ -209,7 +211,7 @@ protected function hasS3Images() */ protected function isMigrateFromS3Visible() { - return !$this->isMigrateStarted() && $this->hasS3Images(); + return !$this->getMigrateStarted() && $this->hasS3Images(); } // }}} @@ -246,7 +248,7 @@ protected function hasNoS3Images() */ protected function isMigrateToS3Visible() { - return !$this->isMigrateStarted() && $this->hasNoS3Images(); + return !$this->getMigrateStarted() && $this->hasNoS3Images(); } // }}} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/install.yaml b/src/classes/XLite/Module/CDev/AmazonS3Images/View/install.yaml new file mode 100644 index 0000000000..ac0584ec68 --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/install.yaml @@ -0,0 +1,14 @@ +# vim: set ts=2 sw=2 sts=2 et: +# +# Data dump +# +# @author Creative Development LLC +# @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved +# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +# @link http://www.litecommerce.com/ +# @since 1.0.24 +XLite\Model\LanguageLabel: + - { name: 'Images are being moved to the file system on your server. Now you can leave this page and open it later to check the progress.', translations: [{ code: en, label: 'Images are being moved to the file system on your server. Now you can leave this page and open it later to check the progress.' }] } + - { name: 'Images are being moved to Amazon S3 servers. Now you can leave this page and open it later to check the progress.', translations: [{ code: en, label: 'Images are being moved to Amazon S3 servers. Now you can leave this page and open it later to check the progress.' }] } + - { name: 'Images are being moved to the file system on your server. If you leave this page the process will be put on hold until you open it in your browser again.', translations: [{ code: en, label: 'Images are being moved to the file system on your server. If you leave this page the process will be put on hold until you open it in your browser again.' }] } + - { name: 'Images are being moved to Amazon S3 servers. If you leave this page the process will be put on hold until you open it in your browser again.', translations: [{ code: en, label: 'Images are being moved to Amazon S3 servers. If you leave this page the process will be put on hold until you open it in your browser again.' }] } diff --git a/src/classes/XLite/View/EventTaskProgress.php b/src/classes/XLite/View/EventTaskProgress.php index 4c1da5ec8b..7cf158c5aa 100644 --- a/src/classes/XLite/View/EventTaskProgress.php +++ b/src/classes/XLite/View/EventTaskProgress.php @@ -38,8 +38,10 @@ class EventTaskProgress extends \XLite\View\AView /** * Widget parameter names */ - const PARAM_EVENT = 'event'; - const PARAM_TITLE = 'title'; + const PARAM_EVENT = 'event'; + const PARAM_TITLE = 'title'; + const PARAM_BLOCKING_NOTE = 'blockingNote'; + const PARAM_NON_BLOCKING_NOTE = 'nonBlockingNote'; /** * Register JS files @@ -85,8 +87,10 @@ protected function defineWidgetParams() parent::defineWidgetParams(); $this->widgetParams += array( - static::PARAM_EVENT => new \XLite\Model\WidgetParam\String('Event name', null), - static::PARAM_TITLE => new \XLite\Model\WidgetParam\String('Progress bar title', null), + static::PARAM_EVENT => new \XLite\Model\WidgetParam\String('Event name', null), + static::PARAM_TITLE => new \XLite\Model\WidgetParam\String('Progress bar title', null), + static::PARAM_BLOCKING_NOTE => new \XLite\Model\WidgetParam\String('Blocking note', null), + static::PARAM_NON_BLOCKING_NOTE => new \XLite\Model\WidgetParam\String('Non-blocking note', null), ); } @@ -179,6 +183,30 @@ protected function isBlockingDriver() return \XLite\Core\EventTask::getInstance()->getDriver()->isBlocking(); } + /** + * Get blocking note + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getBlockingNote() + { + return $this->getParam(static::PARAM_BLOCKING_NOTE); + } + + /** + * Get non-blocking note + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getNonBlockingNote() + { + return $this->getParam(static::PARAM_NON_BLOCKING_NOTE); + } + // }}} } diff --git a/src/skins/admin/en/event_task_progress/body.tpl b/src/skins/admin/en/event_task_progress/body.tpl index 665bcaf66d..d9d88d8b01 100644 --- a/src/skins/admin/en/event_task_progress/body.tpl +++ b/src/skins/admin/en/event_task_progress/body.tpl @@ -15,9 +15,9 @@

{getEventTitle()}

{if:isBlockingDriver()} -

{t(#Refresh the page to update the status#)}

+

{getBlockingNote()}

{else:} -

{t(#Wait#)}

+

{getNonBlockingNote()}

{end:} diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl index dfbc82fc54..b4c5d0899f 100644 --- a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl +++ b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.tpl @@ -38,10 +38,12 @@

-
-

{t(#Migration is in progress#)}

-
-

{t(#Refresh the page to update the migration status#)}

+
+ {if:#migrateFromS3#=getMigrateStarted()} + + {else:} + + {end:}
From b1ebfae629030a123b15f4eb891984e36e8e4a2e Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 14:41:25 +0400 Subject: [PATCH 052/562] [*] Small logic changes --- src/classes/XLite/Module/CDev/Sale/Model/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/Module/CDev/Sale/Model/Product.php b/src/classes/XLite/Module/CDev/Sale/Model/Product.php index d91adc3e04..fdb2fab164 100644 --- a/src/classes/XLite/Module/CDev/Sale/Model/Product.php +++ b/src/classes/XLite/Module/CDev/Sale/Model/Product.php @@ -210,7 +210,7 @@ public function getSalePriceDifference() */ public function getClearPrice() { - return $this->getSalePrice(parent::getListPrice()); + return $this->getSalePrice(); } /** From 25f212c104ed20e58de920862a891bfef615b973 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 14:43:11 +0400 Subject: [PATCH 053/562] [*] Small logic changes --- src/classes/XLite/Module/CDev/Sale/Model/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/Module/CDev/Sale/Model/Product.php b/src/classes/XLite/Module/CDev/Sale/Model/Product.php index d91adc3e04..fdb2fab164 100644 --- a/src/classes/XLite/Module/CDev/Sale/Model/Product.php +++ b/src/classes/XLite/Module/CDev/Sale/Model/Product.php @@ -210,7 +210,7 @@ public function getSalePriceDifference() */ public function getClearPrice() { - return $this->getSalePrice(parent::getListPrice()); + return $this->getSalePrice(); } /** From f4923341e71d491cffac0186f37ac8e088b25dab Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 15:15:52 +0400 Subject: [PATCH 054/562] E:41532 [!] Bug: Link to dashboard has permission limit by root access. Fixed. --- src/classes/XLite/View/TopMenu/Node/Home.php | 68 ++++++++++++++++++++ src/skins/admin/en/top_menu/home/menu.tpl | 15 ----- 2 files changed, 68 insertions(+), 15 deletions(-) create mode 100644 src/classes/XLite/View/TopMenu/Node/Home.php delete mode 100644 src/skins/admin/en/top_menu/home/menu.tpl diff --git a/src/classes/XLite/View/TopMenu/Node/Home.php b/src/classes/XLite/View/TopMenu/Node/Home.php new file mode 100644 index 0000000000..925754ec70 --- /dev/null +++ b/src/classes/XLite/View/TopMenu/Node/Home.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.18 + */ + +namespace XLite\View\TopMenu\Node; + +/** + * Home + * + * @see ____class_see____ + * @since 1.0.18 + * + * @ListChild (list="menus", weight="100", zone="admin") + */ +class Home extends \XLite\View\TopMenu\Node +{ + /** + * Define widget parameters + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineWidgetParams() + { + parent::defineWidgetParams(); + + $this->widgetParams[self::PARAM_TITLE]->setValue(''); + $this->widgetParams[self::PARAM_TARGET]->setValue(\XLite::TARGET_DEFAULT); + $this->widgetParams[self::PARAM_CLASS]->setValue('home'); + } + + /** + * Check ACL permissions + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + protected function checkACL() + { + return true; + } +} + diff --git a/src/skins/admin/en/top_menu/home/menu.tpl b/src/skins/admin/en/top_menu/home/menu.tpl deleted file mode 100644 index 376d636dc7..0000000000 --- a/src/skins/admin/en/top_menu/home/menu.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * "Home" link - * - * @author Creative Development LLC - * @copyright Copyright (c) 2010 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * - * @ListChild (list="menus", weight="100") - *} - - From 1b7f21eb9c33a967db3a38dd10e1b09ab6fac959 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 15:47:00 +0400 Subject: [PATCH 055/562] E:41533 [!] Bug: Admin can not remove all roles from another admin. Fixed. --- .../XLite/View/Model/Profile/AdminMain.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/classes/XLite/View/Model/Profile/AdminMain.php b/src/classes/XLite/View/Model/Profile/AdminMain.php index 61a0947cce..d1b666865a 100644 --- a/src/classes/XLite/View/Model/Profile/AdminMain.php +++ b/src/classes/XLite/View/Model/Profile/AdminMain.php @@ -418,17 +418,16 @@ protected function setModelProperties(array $data) $data['roles'] = array(); } - if (isset($data['roles']) && is_array($data['roles'])) { - - $model = $this->getModelObject(); + $model = $this->getModelObject(); - // Remove old links - foreach ($model->getRoles() as $role) { - $role->getProfiles()->removeElement($model); - } - $model->getRoles()->clear(); + // Remove old links + foreach ($model->getRoles() as $role) { + $role->getProfiles()->removeElement($model); + } + $model->getRoles()->clear(); - // Add new links + // Add new links + if (isset($data['roles']) && is_array($data['roles'])) { foreach ($data['roles'] as $rid) { $role = \XLite\Core\Database::getRepo('XLite\Model\Role')->find($rid); if ($role) { From c6633588903bba783b992217c7ab3accc46f4f99 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 16:34:15 +0400 Subject: [PATCH 056/562] E:41540 [!] Bug: Select form field translate all values even if values are already translated. Fixed. --- .../Bestsellers/View/FormField/Select/Menu.php | 4 ++-- .../View/Admin/FeaturedProductsLook.php | 6 +++--- .../View/FormField/Select/UseCustomOpenGraph.php | 4 ++-- .../View/FormField/Select/TrackingType.php | 6 +++--- .../CDev/Sale/View/FormField/Select/Menu.php | 4 ++-- .../CDev/VAT/View/FormField/LabelModeSelector.php | 6 +++--- .../View/FormField/Select/ChangeFrequency.php | 14 +++++++------- .../XLite/View/FormField/Select/AccessLevel.php | 8 +++++++- .../XLite/View/FormField/Select/AccountStatus.php | 5 ++++- .../XLite/View/FormField/Select/AddressType.php | 4 ++-- .../XLite/View/FormField/Select/OrderStatus.php | 4 ++++ .../View/FormField/Select/SubcategoriesLook.php | 4 ++-- .../XLite/View/FormField/Select/TestLiveMode.php | 4 ++-- src/classes/XLite/View/FormField/Select/Title.php | 6 +++--- .../XLite/View/FormField/Select/WeightUnit.php | 8 ++++---- src/classes/XLite/View/FormField/Select/YesNo.php | 4 ++-- src/skins/admin/en/form_field/select.tpl | 4 ++-- 17 files changed, 54 insertions(+), 41 deletions(-) diff --git a/src/classes/XLite/Module/CDev/Bestsellers/View/FormField/Select/Menu.php b/src/classes/XLite/Module/CDev/Bestsellers/View/FormField/Select/Menu.php index c12689d0cf..da029e368e 100644 --- a/src/classes/XLite/Module/CDev/Bestsellers/View/FormField/Select/Menu.php +++ b/src/classes/XLite/Module/CDev/Bestsellers/View/FormField/Select/Menu.php @@ -45,8 +45,8 @@ class Menu extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - '1' => 'a side box', - '0' => 'the main column', + '1' => static::t('a side box'), + '0' => static::t('the main column'), ); } } diff --git a/src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProductsLook.php b/src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProductsLook.php index 27f4fc1162..3413615cb0 100644 --- a/src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProductsLook.php +++ b/src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProductsLook.php @@ -45,9 +45,9 @@ class FeaturedProductsLook extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - 'list' => 'List', - 'grid' => 'Grid', - 'table' => 'Table', + 'list' => static::t('List'), + 'grid' => static::t('Grid'), + 'table' => static::t('Table'), ); } } diff --git a/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php b/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php index 7bf1d1b066..0cf29a5f61 100644 --- a/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php +++ b/src/classes/XLite/Module/CDev/GoSocial/View/FormField/Select/UseCustomOpenGraph.php @@ -45,8 +45,8 @@ class UseCustomOpenGraph extends \XLite\View\FormField\Select\ASelect protected function getDefaultOptions() { return array( - false => 'Autogenerated', - true => 'Custom', + false => static::t('Autogenerated'), + true => static::t('Custom'), ); } diff --git a/src/classes/XLite/Module/CDev/GoogleAnalytics/View/FormField/Select/TrackingType.php b/src/classes/XLite/Module/CDev/GoogleAnalytics/View/FormField/Select/TrackingType.php index cd44549e3d..c056ce6cf2 100644 --- a/src/classes/XLite/Module/CDev/GoogleAnalytics/View/FormField/Select/TrackingType.php +++ b/src/classes/XLite/Module/CDev/GoogleAnalytics/View/FormField/Select/TrackingType.php @@ -45,9 +45,9 @@ class TrackingType extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - '1' => 'A single domain', - '2' => 'One domain with multiple subdomains', - '3' => 'Multiple top-level domains', + '1' => static::t('A single domain'), + '2' => static::t('One domain with multiple subdomains'), + '3' => static::t('Multiple top-level domains'), ); } } diff --git a/src/classes/XLite/Module/CDev/Sale/View/FormField/Select/Menu.php b/src/classes/XLite/Module/CDev/Sale/View/FormField/Select/Menu.php index 3c96c81bca..f337a1918f 100644 --- a/src/classes/XLite/Module/CDev/Sale/View/FormField/Select/Menu.php +++ b/src/classes/XLite/Module/CDev/Sale/View/FormField/Select/Menu.php @@ -45,8 +45,8 @@ class Menu extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - '1' => 'a side box', - '0' => 'the main column', + '1' => static::t('a side box'), + '0' => static::t('the main column'), ); } } diff --git a/src/classes/XLite/Module/CDev/VAT/View/FormField/LabelModeSelector.php b/src/classes/XLite/Module/CDev/VAT/View/FormField/LabelModeSelector.php index abfc14d57a..a26039c2ee 100644 --- a/src/classes/XLite/Module/CDev/VAT/View/FormField/LabelModeSelector.php +++ b/src/classes/XLite/Module/CDev/VAT/View/FormField/LabelModeSelector.php @@ -52,9 +52,9 @@ class LabelModeSelector extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - self::DO_NOT_DISPLAY => 'Never', - self::PRODUCT_DETAILS => 'On product details only', - self::ALL_CATALOG => 'On all catalog pages', + static::DO_NOT_DISPLAY => static::t('Never'), + static::PRODUCT_DETAILS => static::t('On product details only'), + static::ALL_CATALOG => static::t('On all catalog pages'), ); } } diff --git a/src/classes/XLite/Module/CDev/XMLSitemap/View/FormField/Select/ChangeFrequency.php b/src/classes/XLite/Module/CDev/XMLSitemap/View/FormField/Select/ChangeFrequency.php index 6a0253f818..7cfb32ab69 100644 --- a/src/classes/XLite/Module/CDev/XMLSitemap/View/FormField/Select/ChangeFrequency.php +++ b/src/classes/XLite/Module/CDev/XMLSitemap/View/FormField/Select/ChangeFrequency.php @@ -45,13 +45,13 @@ class ChangeFrequency extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - 'always' => 'always', - 'hourly' => 'hourly', - 'daily' => 'daily', - 'weekly' => 'weekly', - 'monthly' => 'monthly', - 'yearly' => 'yearly', - 'never' => 'never', + 'always' => static::t('always'), + 'hourly' => static::t('hourly'), + 'daily' => static::t('daily'), + 'weekly' => static::t('weekly'), + 'monthly' => static::t('monthly'), + 'yearly' => static::t('yearly'), + 'never' => static::t('never'), ); } } diff --git a/src/classes/XLite/View/FormField/Select/AccessLevel.php b/src/classes/XLite/View/FormField/Select/AccessLevel.php index b3186bb3da..673f757900 100644 --- a/src/classes/XLite/View/FormField/Select/AccessLevel.php +++ b/src/classes/XLite/View/FormField/Select/AccessLevel.php @@ -54,7 +54,13 @@ class AccessLevel extends \XLite\View\FormField\Select\Regular */ protected function getDefaultOptions() { - return \XLite\Core\Auth::getInstance()->getUserTypesRaw(); + $list = \XLite\Core\Auth::getInstance()->getUserTypesRaw(); + + foreach ($list as $k => $v) { + $list[$i] = static::t($v); + } + + return $list; } /** diff --git a/src/classes/XLite/View/FormField/Select/AccountStatus.php b/src/classes/XLite/View/FormField/Select/AccountStatus.php index 0347358944..7c7e56b92c 100644 --- a/src/classes/XLite/View/FormField/Select/AccountStatus.php +++ b/src/classes/XLite/View/FormField/Select/AccountStatus.php @@ -54,6 +54,9 @@ class AccountStatus extends \XLite\View\FormField\Select\Regular */ protected function getDefaultOptions() { - return array('E' => 'Enabled', 'D' => 'Disabled'); + return array( + 'E' => static::t('Enabled'), + 'D' => static::t('Disabled'), + ); } } diff --git a/src/classes/XLite/View/FormField/Select/AddressType.php b/src/classes/XLite/View/FormField/Select/AddressType.php index 0750e3b86c..6be56a4c1f 100644 --- a/src/classes/XLite/View/FormField/Select/AddressType.php +++ b/src/classes/XLite/View/FormField/Select/AddressType.php @@ -45,8 +45,8 @@ class AddressType extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - 'R' => 'Residential', - 'C' => 'Commercial', + 'R' => static::t('Residential'), + 'C' => static::t('Commercial'), ); } } diff --git a/src/classes/XLite/View/FormField/Select/OrderStatus.php b/src/classes/XLite/View/FormField/Select/OrderStatus.php index e5b17637c9..1a370bc468 100644 --- a/src/classes/XLite/View/FormField/Select/OrderStatus.php +++ b/src/classes/XLite/View/FormField/Select/OrderStatus.php @@ -133,6 +133,10 @@ protected function getDefaultOptions() unset($list[\XLite\Model\Order::STATUS_TEMPORARY]); unset($list[\XLite\Model\Order::STATUS_INPROGRESS]); + foreach ($list as $k => $v) { + $list[$k] = static::t($v); + } + return $list; } diff --git a/src/classes/XLite/View/FormField/Select/SubcategoriesLook.php b/src/classes/XLite/View/FormField/Select/SubcategoriesLook.php index ecade397ff..180412fc32 100644 --- a/src/classes/XLite/View/FormField/Select/SubcategoriesLook.php +++ b/src/classes/XLite/View/FormField/Select/SubcategoriesLook.php @@ -45,8 +45,8 @@ class SubcategoriesLook extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - 'list' => 'List', - 'icons' => 'Icons', + 'list' => static::t('List'), + 'icons' => static::t('Icons'), ); } } diff --git a/src/classes/XLite/View/FormField/Select/TestLiveMode.php b/src/classes/XLite/View/FormField/Select/TestLiveMode.php index d501771dfc..a8299925f6 100644 --- a/src/classes/XLite/View/FormField/Select/TestLiveMode.php +++ b/src/classes/XLite/View/FormField/Select/TestLiveMode.php @@ -51,8 +51,8 @@ class TestLiveMode extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - self::LIVE => 'Live', - self::TEST => 'Test', + static::LIVE => static::t('Live'), + static::TEST => static::t('Test'), ); } } diff --git a/src/classes/XLite/View/FormField/Select/Title.php b/src/classes/XLite/View/FormField/Select/Title.php index 6764ea325c..f28ad935b6 100644 --- a/src/classes/XLite/View/FormField/Select/Title.php +++ b/src/classes/XLite/View/FormField/Select/Title.php @@ -45,9 +45,9 @@ class Title extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - 'Mr.' => 'Mr.', - 'Ms.' => 'Ms.', - 'Mrs.' => 'Mrs.', + 'Mr.' => static::t('Mr.'), + 'Ms.' => static::t('Ms.'), + 'Mrs.' => static::t('Mrs.'), ); } } diff --git a/src/classes/XLite/View/FormField/Select/WeightUnit.php b/src/classes/XLite/View/FormField/Select/WeightUnit.php index d573693f35..359d887610 100644 --- a/src/classes/XLite/View/FormField/Select/WeightUnit.php +++ b/src/classes/XLite/View/FormField/Select/WeightUnit.php @@ -61,10 +61,10 @@ protected function getDefaultAttributes() protected function getDefaultOptions() { return array( - 'lbs' => 'LB', - 'oz' => 'OZ', - 'kg' => 'KG', - 'g' => 'G', + 'lbs' => static::t('LB'), + 'oz' => static::t('OZ'), + 'kg' => static::t('KG'), + 'g' => static::t('G'), ); } } diff --git a/src/classes/XLite/View/FormField/Select/YesNo.php b/src/classes/XLite/View/FormField/Select/YesNo.php index 453d53fc85..e2b6219d92 100644 --- a/src/classes/XLite/View/FormField/Select/YesNo.php +++ b/src/classes/XLite/View/FormField/Select/YesNo.php @@ -51,8 +51,8 @@ class YesNo extends \XLite\View\FormField\Select\Regular protected function getDefaultOptions() { return array( - self::YES => 'Yes', - self::NO => 'No', + static::YES => static::t('Yes'), + static::NO => static::t('No'), ); } } diff --git a/src/skins/admin/en/form_field/select.tpl b/src/skins/admin/en/form_field/select.tpl index 47df5a9e53..dd1dfbb08b 100644 --- a/src/skins/admin/en/form_field/select.tpl +++ b/src/skins/admin/en/form_field/select.tpl @@ -15,13 +15,13 @@ {foreach:getOptions(),optionGroupIdx,optionGroup} {foreach:optionGroup.options,optionValue,optionLabel} - + {end:} {end:} {else:} {foreach:getOptions(),optionValue,optionLabel} - + {end:} {end:} From bd75a6cacd76a7832784ee1a012564647fee7100 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 16:44:37 +0400 Subject: [PATCH 057/562] E:41541 [!] Bug: Multiselect form field has fixed height. Fixed. --- src/skins/admin/en/form_field/js/multiselect.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/skins/admin/en/form_field/js/multiselect.js b/src/skins/admin/en/form_field/js/multiselect.js index 7574711ee6..483e7db3cd 100644 --- a/src/skins/admin/en/form_field/js/multiselect.js +++ b/src/skins/admin/en/form_field/js/multiselect.js @@ -16,7 +16,12 @@ CommonElement.prototype.handlers.push( return 0 < this.$element.filter('select.multiselect').length; }, handler: function () { - var options = { minWidth: this.$element.width(), header: false, selectedList: 2, height: 250 }; + var options = { + minWidth: this.$element.width(), + header: false, + selectedList: 2, + height: 10 < this.$element.find('options').length ? 250 : 'auto' + }; if (this.$element.data('text')) { options.selectedText = this.$element.data('text'); } From 7e3315d99660ad5adccbdbd76d68ee563fd32fc1 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 8 Jun 2012 21:41:05 +0400 Subject: [PATCH 058/562] E:41544 [!] Bug: The role with the permission "Root access" could be removed from the last administrator. Fixed. --- src/classes/XLite/Model/Repo/Profile.php | 60 +++++++++++++++++++ src/classes/XLite/Model/Repo/Role.php | 1 + .../XLite/View/Model/Profile/AdminMain.php | 40 ++++++++++++- 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Model/Repo/Profile.php b/src/classes/XLite/Model/Repo/Profile.php index 64ab22eeed..c1f042b61b 100644 --- a/src/classes/XLite/Model/Repo/Profile.php +++ b/src/classes/XLite/Model/Repo/Profile.php @@ -42,6 +42,8 @@ class Profile extends \XLite\Model\Repo\ARepo const SEARCH_ORDER_ID = 'order_id'; const SEARCH_REFERER = 'referer'; const SEARCH_MEMBERSHIP = 'membership'; + const SEARCH_ROLES = 'roles'; + const SEARCH_PERMISSIONS = 'permissions'; const SEARCH_LANGUAGE = 'language'; const SEARCH_PATTERN = 'pattern'; const SEARCH_PHONE = 'phone'; @@ -290,6 +292,8 @@ protected function getHandlingSearchParams() self::SEARCH_ORDER_ID, self::SEARCH_REFERER, self::SEARCH_MEMBERSHIP, + self::SEARCH_PERMISSIONS, + self::SEARCH_ROLES, self::SEARCH_LANGUAGE, self::SEARCH_PATTERN, self::SEARCH_PHONE, @@ -495,6 +499,62 @@ protected function prepareCndMembership(\Doctrine\ORM\QueryBuilder $queryBuilder } } + /** + * Search condition by role(s) + * + * @param \Doctrine\ORM\QueryBuilder $queryBuilder QueryBuilder instance + * @param mixed $value Searchable value + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function prepareCndRoles(\Doctrine\ORM\QueryBuilder $queryBuilder, $value) + { + if (!empty($value)) { + if (!is_array($value)) { + $value = array($value); + } + + $ids = array(); + foreach ($value as $id) { + if ($id) { + $ids = is_object($id) ? $id->getId() : $id; + } + } + + if ($ids) { + $keys = \XLite\Core\Database::buildInCondition($queryBuilder, $ids, 'rid'); + $queryBuilder->linkInner('p.roles') + ->andWhere('roles.id IN (' . implode(', ', $keys) . ')'); + } + } + } + + /** + * Search condition by permission(s) + * + * @param \Doctrine\ORM\QueryBuilder $queryBuilder QueryBuilder instance + * @param mixed $value Searchable value + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function prepareCndPermissions(\Doctrine\ORM\QueryBuilder $queryBuilder, $value) + { + if (!empty($value)) { + if (!is_array($value)) { + $value = array($value); + } + + $keys = \XLite\Core\Database::buildInCondition($queryBuilder, $value, 'perm'); + $queryBuilder->linkInner('p.roles') + ->linkInner('roles.permissions') + ->andWhere('permissions.code IN (' . implode(', ', $keys) . ')'); + } + } + /** * prepareCndLanguage * diff --git a/src/classes/XLite/Model/Repo/Role.php b/src/classes/XLite/Model/Repo/Role.php index c71dd6f437..f3ebd0de03 100644 --- a/src/classes/XLite/Model/Repo/Role.php +++ b/src/classes/XLite/Model/Repo/Role.php @@ -116,6 +116,7 @@ protected function defineFindOneRootQuery() return $this->createQueryBuilder('r') ->linkInner('r.permissions') ->andWhere('permissions.code = :root') + ->setMaxResults(1) ->setParameter('root', \XLite\Model\Role\Permission::ROOT_ACCESS); } } diff --git a/src/classes/XLite/View/Model/Profile/AdminMain.php b/src/classes/XLite/View/Model/Profile/AdminMain.php index d1b666865a..58342ad81c 100644 --- a/src/classes/XLite/View/Model/Profile/AdminMain.php +++ b/src/classes/XLite/View/Model/Profile/AdminMain.php @@ -402,11 +402,15 @@ protected function setModelProperties(array $data) if ( isset($data['access_level']) && \XLite\Core\Auth::getInstance()->getAdminAccessLevel() == $data['access_level'] - && 1 == \XLite\Core\Database::getRepo('XLite\Model\Role')->count() + && $this->needSetRootAccess($this->getModelObject()) ) { $rootRole = \XLite\Core\Database::getRepo('XLite\Model\Role')->findOneRoot(); if ($rootRole) { - $data['roles'] = array($rootRole->getId()); + if (!is_array($data['roles'])) { + $data['roles'] = array(); + } + + $data['roles'][] = $rootRole->getId(); } } @@ -444,6 +448,38 @@ protected function setModelProperties(array $data) parent::setModelProperties($data); } + /** + * Check - need set root access or not + * + * @param \XLite\Model\Profile $profile Profile + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function needSetRootAccess(\XLite\Model\Profile $profile) + { + if ($profile->getProfileId()) { + $cnd = new \XLite\Core\CommonCell; + $cnd->permissions = \XLite\Model\Role\Permission::ROOT_ACCESS; + $onlyOneRootAdmin = false; + $i = 0; + foreach (\XLite\Core\Database::getRepo('XLite\Model\Profile')->search($cnd) as $p) { + $i++; + if ($profile->getProfileId() == $p->getProfileId()) { + $onlyOneRootAdmin = true; + } + } + + if ($i > 1) { + $onlyOneRootAdmin = false; + } + } + + return 1 == \XLite\Core\Database::getRepo('XLite\Model\Role')->count() + || $onlyOneRootAdmin; + } + /** * Prepare request data for mapping profile object * From da1fa442d05272027a92cc74b49f271a54b9186e Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Sun, 10 Jun 2012 11:57:33 +0400 Subject: [PATCH 059/562] E:41577 [!] Bug: Child templates (view list mechanism) assembled incorrectly if LC has some substitution skins. Fixed. --- .../Plugin/Templates/Plugin/ViewLists/Main.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php b/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php index fff2b5da9f..6d37e1c609 100644 --- a/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php +++ b/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php @@ -243,10 +243,17 @@ protected function prepareListChildTemplates(array $list) } $index = \Includes\Utils\ArrayManager::getArraysArrayFieldValues($hash, static::PREPARED_SKIN_NAME); - $index = call_user_func_array('array_merge', $index); - $index = call_user_func_array('array_merge', $index); + unset($hash); - $list = \Includes\Utils\ArrayManager::filterByKeys($list, array_values($index)); + $ids = array(); + foreach ($index as $interface => $tpls) { + foreach ($tpls as $tpl => $indexes) { + $ids = array_merge($ids, $indexes); + } + } + unset($index); + + $list = \Includes\Utils\ArrayManager::filterByKeys($list, $ids); } return $list; From 81e38ad871ec7e74fb59e5d4d9833287a4a890ee Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Sun, 10 Jun 2012 12:02:43 +0400 Subject: [PATCH 060/562] E:41577 [!] Bug: Child templates (view list mechanism) assembled incorrectly if LC has some substitution skins. Fixed. --- .../Plugin/Templates/Plugin/ViewLists/Main.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php b/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php index fff2b5da9f..6d37e1c609 100644 --- a/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php +++ b/src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php @@ -243,10 +243,17 @@ protected function prepareListChildTemplates(array $list) } $index = \Includes\Utils\ArrayManager::getArraysArrayFieldValues($hash, static::PREPARED_SKIN_NAME); - $index = call_user_func_array('array_merge', $index); - $index = call_user_func_array('array_merge', $index); + unset($hash); - $list = \Includes\Utils\ArrayManager::filterByKeys($list, array_values($index)); + $ids = array(); + foreach ($index as $interface => $tpls) { + foreach ($tpls as $tpl => $indexes) { + $ids = array_merge($ids, $indexes); + } + } + unset($index); + + $list = \Includes\Utils\ArrayManager::filterByKeys($list, $ids); } return $list; From a177419bd022a0c6b7c38720aadde33fc0c98719 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Mon, 11 Jun 2012 09:49:50 +0400 Subject: [PATCH 061/562] [*] StickyPanel widget refactoring. [*] Currency edit page further changes. --- .../XLite/Controller/Admin/Currency.php | 29 +++--- .../XLite/View/Form/Currency/Currency.php | 2 +- .../View/FormField/Select/CurrencyFormat.php | 62 +++++++++++++ src/classes/XLite/View/Model/AModel.php | 54 ++++++++--- .../XLite/View/Model/Currency/Currency.php | 89 ++++++++++++++----- .../XLite/View/StickyPanel/Currency.php | 59 ++++++++++++ src/skins/admin/en/currency/body.tpl | 9 +- src/skins/admin/en/currency/css/style.css | 13 +++ src/skins/admin/en/model/body.tpl | 3 +- .../en/top_menu/settings/parts/currency.tpl | 15 ++++ src/skins/default/en/model/body.tpl | 3 +- 11 files changed, 283 insertions(+), 55 deletions(-) create mode 100644 src/classes/XLite/View/FormField/Select/CurrencyFormat.php create mode 100644 src/classes/XLite/View/StickyPanel/Currency.php create mode 100644 src/skins/admin/en/top_menu/settings/parts/currency.tpl diff --git a/src/classes/XLite/Controller/Admin/Currency.php b/src/classes/XLite/Controller/Admin/Currency.php index f04289aadd..f159af3afe 100644 --- a/src/classes/XLite/Controller/Admin/Currency.php +++ b/src/classes/XLite/Controller/Admin/Currency.php @@ -35,18 +35,6 @@ */ class Currency extends \XLite\Controller\Admin\AAdmin { - /** - * Return the current page title (for the content area) - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - public function getTitle() - { - return 'Currencies'; - } - /** * init * @@ -75,13 +63,26 @@ public function getCurrencies() } /** - * doActionUpdate + * Modify currency action * * @return void * @see ____func_see____ * @since 1.0.0 */ - protected function doActionUpdate() + protected function doActionModify() + { + $this->getModelForm()->performAction('modify'); + } + + /** + * Class name for the \XLite\View\Model\ form + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModelFormClass() { + return '\XLite\View\Model\Currency\Currency'; } } diff --git a/src/classes/XLite/View/Form/Currency/Currency.php b/src/classes/XLite/View/Form/Currency/Currency.php index 0f6032636d..07f5344bd0 100644 --- a/src/classes/XLite/View/Form/Currency/Currency.php +++ b/src/classes/XLite/View/Form/Currency/Currency.php @@ -47,7 +47,7 @@ protected function getDefaultParams() $result = parent::getDefaultParams(); $result['target'] = \XLite\Core\Request::getInstance()->target; - $result['action'] = 'save'; + $result['action'] = 'modify'; return $result; } diff --git a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php new file mode 100644 index 0000000000..6c952e8e8a --- /dev/null +++ b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php @@ -0,0 +1,62 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View\FormField\Select; + +/** + * Currency format selector + * + * @see ____class_see____ + * @since 1.0.0 + */ +class CurrencyFormat extends \XLite\View\FormField\Select\Regular +{ + /** + * Currency format variants + */ + const FORMAT_SPACE_DOT = '1 999.99'; + const FORMAT_COMMA_DOT = '1,999.99'; + const FORMAT_SPACE_COMMA = '1 999,99'; + const FORMAT_DOT_COMMA = '1.999,99'; + + /** + * Get default options list + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultOptions() + { + return array( + static::FORMAT_SPACE_DOT => static::FORMAT_SPACE_DOT, + static::FORMAT_COMMA_DOT => static::FORMAT_COMMA_DOT, + static::FORMAT_SPACE_COMMA => static::FORMAT_SPACE_COMMA, + static::FORMAT_DOT_COMMA => static::FORMAT_DOT_COMMA, + ); + } +} diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index 373d68e250..ea80348df4 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -544,6 +544,30 @@ protected function useBodyTemplate() return $this->getParam(self::PARAM_USE_BODY_TEMPLATE) ? true : parent::useBodyTemplate(); } + /** + * Flag if the panel widget for buttons is used + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function useButtonPanel() + { + return !is_null($this->getButtonPanelClass()); + } + + /** + * Return class of button panel widget + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getButtonPanelClass() + { + return null; + } + /** * Add (if required) an additional part to the form name * @@ -792,7 +816,7 @@ protected function postprocessErrorAction() /** * Rollback model if data validation failed - * + * * @return void * @see ____func_see____ * @since 1.0.18 @@ -1060,6 +1084,10 @@ protected function getSectionFieldValues($section) /** * Return list of the "Button" widgets + * Do not use this method if you want sticky buttons panel. + * The sticky buttons panel class has the buttons definition already. + * + * TODO: Maybe we should move it to the StickyPanel classes family? * * @return array * @see ____func_see____ @@ -1308,7 +1336,7 @@ protected function prepareDataForMapping() { $data = $this->getRequestData(); - // Remove fields in the $exludedFields list from the data for mapping + // Remove fields in the $excludedFields list from the data for mapping if (!empty($this->excludedFields)) { foreach ($data as $key => $value) { if (in_array($key, $this->excludedFields)) { @@ -1346,10 +1374,10 @@ protected function getFormName() /** * Display view sublist - * + * * @param string $suffix List usffix * @param array $arguments List arguments - * + * * @return void * @see ____func_see____ * @since 1.0.13 @@ -1362,7 +1390,7 @@ protected function displayViewSubList($suffix, array $arguments = array()) $class = $match[1] . '.' . $match[2] . '.' . $class; } $class = strtolower($class); - + $list = 'crud.' . $class . '.' . $suffix; $arguments = $this->assembleViewSubListArguments($suffix, $arguments); @@ -1371,11 +1399,11 @@ protected function displayViewSubList($suffix, array $arguments = array()) } /** - * Assemble biew sublist arguments - * + * Assemble biew sublist arguments + * * @param string $suffix List suffix * @param array $arguments Arguments - * + * * @return array * @see ____func_see____ * @since 1.0.13 @@ -1389,8 +1417,8 @@ protected function assembleViewSubListArguments($suffix, array $arguments) } /** - * Get container class - * + * Get container class + * * @return string * @see ____func_see____ * @since 1.0.18 @@ -1401,12 +1429,12 @@ protected function getContainerClass() } /** - * Get item class - * + * Get item class + * * @param integer $index Item index * @param integer $length items list length * @param \XLite\View\FormField\AFormField $field Current item - * + * * @return string * @see ____func_see____ * @since 1.0.13 diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index c373536076..1e1926e8c2 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -35,20 +35,41 @@ */ class Currency extends \XLite\View\Model\AModel { + const DEFAULT_CURRENCY = 'USD'; + /** - * Schema of the address section - * TODO: move to the module where this field is required: - * 'address_type' => array( - * self::SCHEMA_CLASS => '\XLite\View\FormField\Select\AddressType', - * self::SCHEMA_LABEL => 'Address type', - * self::SCHEMA_REQUIRED => true, - * ), + * Schema of the currency section * * @var array * @see ____var_see____ * @since 1.0.0 */ protected $currencySchema = array( + 'currency_id' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Currency', + self::SCHEMA_LABEL => 'Store currency', + self::SCHEMA_REQUIRED => false, + ), + 'name' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Name', + self::SCHEMA_REQUIRED => true, + ), + 'format' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyFormat', + self::SCHEMA_LABEL => 'Format', + self::SCHEMA_REQUIRED => true, + ), + 'prefix' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Prefix', + self::SCHEMA_REQUIRED => false, + ), + 'suffix' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', + self::SCHEMA_LABEL => 'Suffix', + self::SCHEMA_REQUIRED => false, + ), ); /** @@ -85,22 +106,24 @@ public function getFormFieldsForSectionDefault() } /** - * Returns widget head + * Return currency identificator from the request * * @return string * @see ____func_see____ * @since 1.0.0 */ - protected function getHead() - { - return 'Currency'; - } - protected function getRequestCurrencyId() { return \XLite\Core\Request::getInstance()->currency_id; } + /** + * Return currency identificator for the current model of the form + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ protected function getCurrencyId() { return $this->getRequestCurrencyId() ?: null; @@ -117,7 +140,14 @@ protected function getDefaultModelObject() { if (!isset($this->currency)) { - $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->find($this->getCurrencyId()); + if (is_null($this->getCurrencyId())) { + + $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->findOneBy(array('code' => static::DEFAULT_CURRENCY)); + + } else { + + $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->find($this->getCurrencyId()); + } } return $this->currency; @@ -148,23 +178,34 @@ protected function getSubmitButtonLabel() } /** - * Return list of the "Button" widgets + * Return class of button panel widget + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getButtonPanelClass() + { + return 'XLite\View\StickyPanel\Currency'; + } + + /** + * prepareDataForMapping * * @return array * @see ____func_see____ * @since 1.0.0 */ - protected function getFormButtons() + protected function prepareDataForMapping() { - $result = parent::getFormButtons(); + $data = parent::prepareDataForMapping(); - $result['submit'] = new \XLite\View\Button\Submit( - array( - \XLite\View\Button\AButton::PARAM_LABEL => $this->getSubmitButtonLabel(), - \XLite\View\Button\AButton::PARAM_STYLE => 'action', - ) - ); + if (isset($data['format'])) { + + + unset($data['format']); + } - return $result; + return $data; } } diff --git a/src/classes/XLite/View/StickyPanel/Currency.php b/src/classes/XLite/View/StickyPanel/Currency.php new file mode 100644 index 0000000000..07d44950ad --- /dev/null +++ b/src/classes/XLite/View/StickyPanel/Currency.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.15 + */ + +namespace XLite\View\StickyPanel; + +/** + * Panel for Currency management form. + * + * @see ____class_see____ + * @since 1.1.0 + */ +class Currency extends \XLite\View\Base\FormStickyPanel +{ + /** + * Get buttons widgets + * + * @return array + * @see ____func_see____ + * @since 1.0.15 + */ + protected function getButtons() + { + return array( + $this->getWidget( + array( + 'style' => 'action submit', + 'label' => \XLite\Core\Translation::lbl('Save changes'), + 'disabled' => false, + ), + 'XLite\View\Button\Submit' + ), + ); + } +} + diff --git a/src/skins/admin/en/currency/body.tpl b/src/skins/admin/en/currency/body.tpl index 90cb89e193..ca2db31bad 100644 --- a/src/skins/admin/en/currency/body.tpl +++ b/src/skins/admin/en/currency/body.tpl @@ -10,4 +10,11 @@ * @since 1.0.0 *} - \ No newline at end of file +
+
    +
  • {t(#Example#)}:
  • +
  • +
+
+ + diff --git a/src/skins/admin/en/currency/css/style.css b/src/skins/admin/en/currency/css/style.css index e2b129fcf7..6ff1bd4e57 100644 --- a/src/skins/admin/en/currency/css/style.css +++ b/src/skins/admin/en/currency/css/style.css @@ -9,3 +9,16 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 */ + +.model-properties { + margin-bottom: 100px; + width: 500px; +} + +.model-properties .sticky-panel { + margin: 50px 0px 0px 150px; +} + +.model-properties div.default-section { + float: none; +} \ No newline at end of file diff --git a/src/skins/admin/en/model/body.tpl b/src/skins/admin/en/model/body.tpl index 828bb43944..138692be9e 100644 --- a/src/skins/admin/en/model/body.tpl +++ b/src/skins/admin/en/model/body.tpl @@ -17,7 +17,8 @@
- + +
diff --git a/src/skins/admin/en/top_menu/settings/parts/currency.tpl b/src/skins/admin/en/top_menu/settings/parts/currency.tpl new file mode 100644 index 0000000000..b6220a90c4 --- /dev/null +++ b/src/skins/admin/en/top_menu/settings/parts/currency.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Currency management page link + * + * @author Creative Development LLC + * @copyright Copyright (c) 2010 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * + * @ListChild (list="menu.settings", weight="400") + *} + + diff --git a/src/skins/default/en/model/body.tpl b/src/skins/default/en/model/body.tpl index e797ddcb9f..f555e87de3 100644 --- a/src/skins/default/en/model/body.tpl +++ b/src/skins/default/en/model/body.tpl @@ -17,7 +17,8 @@ - + + From 3c98b188e91c6007f0575cc087d02764cede52ee Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 11:07:40 +0400 Subject: [PATCH 062/562] [*] ProductOptions module updated: upgrade hook added for v.1.0.12 --- .../upgrade/1.0/12/post_rebuild.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php diff --git a/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php b/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php new file mode 100644 index 0000000000..2853e58869 --- /dev/null +++ b/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php @@ -0,0 +1,45 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.12 + */ + +return function() +{ + // Insert price modifier + $repo = \XLite\Core\Database::getRepo('XLite\Model\MoneyModificator'); + + $data = array( + 'class' => 'XLite\\Module\\CDev\\ProductOptions\\Logic\\OptionSurcharge', + 'validator' => 'isApply', + 'purpose' => 'net', + 'position' => 100, + ); + + $modifier = new \XLite\Model\MoneyModificator(); + $modifier->map($data); + + \XLite\Core\Database::getEM()->persist($modifier); + \XLite\Core\Database::getEM()->flush(); +}; From 37e8a47c9b607f49ddae85aaa7f404f0f037ffca Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 12:00:32 +0400 Subject: [PATCH 063/562] [*] VAT module updated: upgrade hook added --- .../CDev/VAT/upgrade/1.0/5/post_rebuild.php | 54 +++++++++++++++++++ .../CDev/VAT/upgrade/1.0/5/post_rebuild.yaml | 30 +++++++++++ 2 files changed, 84 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.php create mode 100644 src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.yaml diff --git a/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.php b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.php new file mode 100644 index 0000000000..75455c54a9 --- /dev/null +++ b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.12 + */ + +return function() +{ + // Load data from yaml file + $yamlFile = __DIR__ . LC_DS . 'post_rebuild.yaml'; + + if (\Includes\Utils\FileManager::isFileReadable($yamlFile)) { + \XLite\Core\Database::getInstance()->loadFixturesFromYaml($yamlFile); + } + + // Update weight of order modifier + $orderModifier = \XLite\Core\Database::getRepo('XLite\Model\Order\Modifier')->findOneBy('class' => '\\XLite\\Module\\CDev\\VAT\\Logic\\Order\\Modifier\\Tax'); + + $orderModifierData = array( + 'class' => '\\XLite\\Module\\CDev\\VAT\\Logic\\Order\\Modifier\\Tax', + 'weight' => 1000, + ); + + if (!$orderModifier) { + $orderModifier = new XLite\Model\Order\Modifier(); + } + + $orderModifier->map($orderModifierData); + + \XLite\Core\Database::getEM()->persist($orderModifier); + + \XLite\Core\Database::getEM()->flush(); +}; diff --git a/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.yaml b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.yaml new file mode 100644 index 0000000000..d19a3ec88d --- /dev/null +++ b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.yaml @@ -0,0 +1,30 @@ +# vim: set ts=2 sw=2 sts=2 et: +# +# Taxes module install data +# +# @author Creative Development LLC +# @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved +# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +# @link http://www.litecommerce.com/ +# @since 1.0.12 + +XLite\Model\MoneyModificator: + - class: XLite\Module\CDev\VAT\Logic\IncludedVAT + validator: isApply + purpose: net + position: 1000 + - class: XLite\Module\CDev\VAT\Logic\ExcludedVAT + validator: isApply + purpose: display + position: 1000 + +XLite\Model\Config: + - { name: display_prices_including_vat, category: 'CDev\VAT', type: checkbox, value: 'Y', orderby: 100, translations: [{ code: en, option_name: 'Display prices in catalog including VAT' }] } + - { name: display_inc_vat_label, category: 'CDev\VAT', type: text, value: 'Y', orderby: 110, translations: [{ code: en, option_name: 'Display ''inc/ex VAT'' labels next to prices', option_comment: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the catalog pages as it must be clear for customers.' }] } + +XLite\Model\LanguageLabel: + - { name: "After you enable this tax it will be included in product prices", translations: [{ code: en, label: "After you enable this tax it will be included in product prices. This means that it will not be shown as separate surcharge during checkout." }] } + - { name: 'incl.VAT', translations: [{ code: en, label: 'including.{{name}}' }] } + - { name: 'excl.VAT', translations: [{ code: en, label: 'excluding.{{name}}' }] } + - { name: "Select the membership level and area. for which product prices, including VAT, are defined by the shop administrator", translations: [{ code: en, label: "Select the membership level and area, for which product prices, including VAT, are defined by the shop administrator. The included VAT will be subtracted and then recalculated for customers from other locations or having a different membership level.

If your prices are defined excluding VAT, select the membership level and the area with a 0% VAT rate defined below (or with no applicable rate)." }] } + From 5585b9965ea89376a67025c434e301e06711c723 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 12:05:21 +0400 Subject: [PATCH 064/562] [*] Prepared VAT module v.1.0.6 --- src/classes/XLite/Module/CDev/VAT/Main.php | 2 +- .../XLite/Module/CDev/VAT/upgrade/1.0/{5 => 6}/post_rebuild.php | 0 .../Module/CDev/VAT/upgrade/1.0/{5 => 6}/post_rebuild.yaml | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename src/classes/XLite/Module/CDev/VAT/upgrade/1.0/{5 => 6}/post_rebuild.php (100%) rename src/classes/XLite/Module/CDev/VAT/upgrade/1.0/{5 => 6}/post_rebuild.yaml (100%) diff --git a/src/classes/XLite/Module/CDev/VAT/Main.php b/src/classes/XLite/Module/CDev/VAT/Main.php index 7e9529100d..d9b8d8de70 100644 --- a/src/classes/XLite/Module/CDev/VAT/Main.php +++ b/src/classes/XLite/Module/CDev/VAT/Main.php @@ -56,7 +56,7 @@ public static function getAuthorName() */ public static function getMinorVersion() { - return '5'; + return '6'; } /** diff --git a/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.php b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php similarity index 100% rename from src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.php rename to src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php diff --git a/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.yaml b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.yaml similarity index 100% rename from src/classes/XLite/Module/CDev/VAT/upgrade/1.0/5/post_rebuild.yaml rename to src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.yaml From a3a27eac4a6ecdbec73e7ff7409dec7341fc9ddc Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 12:06:20 +0400 Subject: [PATCH 065/562] [*] ProductOptions module: upgrade hook (1.0.12) improved --- .../upgrade/1.0/12/post_rebuild.php | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php b/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php index 2853e58869..62809c502c 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php @@ -30,16 +30,21 @@ // Insert price modifier $repo = \XLite\Core\Database::getRepo('XLite\Model\MoneyModificator'); - $data = array( - 'class' => 'XLite\\Module\\CDev\\ProductOptions\\Logic\\OptionSurcharge', - 'validator' => 'isApply', - 'purpose' => 'net', - 'position' => 100, - ); + $isModifierExists = $repo->findOneBy(array('class' => 'XLite\\Module\\CDev\\ProductOptions\\Logic\\OptionSurcharge')); - $modifier = new \XLite\Model\MoneyModificator(); - $modifier->map($data); + if (!$isModifierExists) { - \XLite\Core\Database::getEM()->persist($modifier); - \XLite\Core\Database::getEM()->flush(); + $data = array( + 'class' => 'XLite\\Module\\CDev\\ProductOptions\\Logic\\OptionSurcharge', + 'validator' => 'isApply', + 'purpose' => 'net', + 'position' => 100, + ); + + $modifier = new \XLite\Model\MoneyModificator(); + $modifier->map($data); + + \XLite\Core\Database::getEM()->persist($modifier); + \XLite\Core\Database::getEM()->flush(); + } }; From 901f9e44b8f33db709d311a378417a37a66ca384 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 12:33:58 +0400 Subject: [PATCH 066/562] [!] VAT module v.1.0.6: upgrade hook fixed --- .../XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php index 75455c54a9..465b4534a5 100644 --- a/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php +++ b/src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php @@ -35,7 +35,8 @@ } // Update weight of order modifier - $orderModifier = \XLite\Core\Database::getRepo('XLite\Model\Order\Modifier')->findOneBy('class' => '\\XLite\\Module\\CDev\\VAT\\Logic\\Order\\Modifier\\Tax'); + $orderModifier = \XLite\Core\Database::getRepo('XLite\Model\Order\Modifier') + ->findOneBy(array('class' => '\\XLite\\Module\\CDev\\VAT\\Logic\\Order\\Modifier\\Tax')); $orderModifierData = array( 'class' => '\\XLite\\Module\\CDev\\VAT\\Logic\\Order\\Modifier\\Tax', From 535db40a5517358829d0805eeeea092d78796337 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Mon, 11 Jun 2012 12:44:46 +0400 Subject: [PATCH 067/562] [*] Currency edit page. further changes. --- .../View/FormField/Select/CurrencyFormat.php | 74 +++++++++++++++++++ src/classes/XLite/View/Model/AModel.php | 2 +- .../XLite/View/Model/Address/Address.php | 2 +- .../XLite/View/Model/Currency/Currency.php | 50 +++++++++++++ .../XLite/View/StickyPanel/Currency.php | 7 +- .../XLite/View/StickyPanel/ItemsListForm.php | 26 +++---- src/skins/admin/en/css/style.css | 21 +++--- 7 files changed, 155 insertions(+), 27 deletions(-) diff --git a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php index 6c952e8e8a..301a268ae9 100644 --- a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php +++ b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php @@ -43,6 +43,80 @@ class CurrencyFormat extends \XLite\View\FormField\Select\Regular const FORMAT_SPACE_COMMA = '1 999,99'; const FORMAT_DOT_COMMA = '1.999,99'; + /** + * Default format + */ + const FORMAT_DEFAULT = self::FORMAT_SPACE_DOT; + + /** + * Format -> thousand, decimal delimiters associations + * + * @var array + */ + protected static $delimiters = array( + self::FORMAT_SPACE_DOT => array(' ', '.'), + self::FORMAT_COMMA_DOT => array(',', '.'), + self::FORMAT_SPACE_COMMA => array(' ', ','), + self::FORMAT_DOT_COMMA => array('.', ','), + ); + + /** + * Thousand, decimal -> format associations + * + * @var array + */ + protected static $formats = array( + ' ' => array( + '.' => self::FORMAT_SPACE_DOT, + ',' => self::FORMAT_SPACE_COMMA, + ), + '.' => array( + ',' => self::FORMAT_DOT_COMMA + ), + ',' => array( + '.' => self::FORMAT_COMMA_DOT + ), + ); + + /** + * Return thousand and decimal delimiters array for a given format + * + * @param string $format + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getDelimiters($format = self::FORMAT_DEFAULT) + { + return isset(static::$delimiters[$format]) ? static::$delimiters[$format] : static::$delimiters[static::FORMAT_DEFAULT]; + } + + /** + * Return a format for thousand, decimal delimiters + * + * @param string $thousandDelimiter + * @param string $decimalDelimiter + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getFormat($thousandDelimiter, $decimalDelimiter) + { + $format = static::FORMAT_DEFAULT; + + if (isset(static::$formats[$thousandDelimiter])) { + + if (isset(static::$formats[$thousandDelimiter][$decimalDelimiter])) { + + $format = static::$formats[$thousandDelimiter][$decimalDelimiter]; + } + } + + return $format; + } + /** * Get default options list * diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index 3cdb45d029..2565472931 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -583,7 +583,7 @@ protected function composeFieldName($name) } /** - * Perform some operations when creating fiels list by schema + * Perform some operations when creating fields list by schema * * @param string $name Node name * @param array $data Field description diff --git a/src/classes/XLite/View/Model/Address/Address.php b/src/classes/XLite/View/Model/Address/Address.php index a605660eb5..b951795efc 100644 --- a/src/classes/XLite/View/Model/Address/Address.php +++ b/src/classes/XLite/View/Model/Address/Address.php @@ -151,7 +151,7 @@ public function getFormFieldsForSectionDefault() { $result = $this->getFieldsBySchema($this->getAddressSchema()); - // For country <-> state syncronization + // For country <-> state synchronization $this->setStateSelectorIds($result); return $result; diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index 1e1926e8c2..41f4b3e3b4 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -35,6 +35,9 @@ */ class Currency extends \XLite\View\Model\AModel { + /** + * Default currency to use if no currency in request is provided + */ const DEFAULT_CURRENCY = 'USD'; /** @@ -202,10 +205,57 @@ protected function prepareDataForMapping() if (isset($data['format'])) { + $data = $data + $this->getFormatInfo($data); unset($data['format']); } return $data; } + + /** + * Return format value of currency for format selector (depends on thousand and decimal delimiters) + * + * @param array $data + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormatInfo(array $data) + { + $result = array(); + + list( + $result['thousandDelimiter'], + $result['decimalDelimiter'] + )= \XLite\View\FormField\Select\CurrencyFormat::getDelimiters($data['format']); + + return $result; + } + + /** + * Retrieve property from the model object + * + * @param mixed $name Field/property name + * + * @return mixed + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModelObjectValue($name) + { + $value = parent::getModelObjectValue($name); + + if ('format' == $name) { + + $value = \XLite\View\FormField\Select\CurrencyFormat::getFormat( + $this->getModelObjectValue('thousandDelimiter'), + $this->getModelObjectValue('decimalDelimiter') + ); + } + + return $value; + } + } diff --git a/src/classes/XLite/View/StickyPanel/Currency.php b/src/classes/XLite/View/StickyPanel/Currency.php index 07d44950ad..e823a7c2ac 100644 --- a/src/classes/XLite/View/StickyPanel/Currency.php +++ b/src/classes/XLite/View/StickyPanel/Currency.php @@ -45,7 +45,7 @@ class Currency extends \XLite\View\Base\FormStickyPanel protected function getButtons() { return array( - $this->getWidget( + 'save' => $this->getWidget( array( 'style' => 'action submit', 'label' => \XLite\Core\Translation::lbl('Save changes'), @@ -53,6 +53,11 @@ protected function getButtons() ), 'XLite\View\Button\Submit' ), + 'cancel' => $this->getWidget( + array( + 'template' => 'items_list/model/cancel.tpl', + ) + ), ); } } diff --git a/src/classes/XLite/View/StickyPanel/ItemsListForm.php b/src/classes/XLite/View/StickyPanel/ItemsListForm.php index abd28ea06f..cf9ae05eeb 100644 --- a/src/classes/XLite/View/StickyPanel/ItemsListForm.php +++ b/src/classes/XLite/View/StickyPanel/ItemsListForm.php @@ -3,9 +3,9 @@ /** * LiteCommerce - * + * * NOTICE OF LICENSE - * + * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: @@ -13,11 +13,11 @@ * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to licensing@litecommerce.com so we can send you a copy immediately. - * + * * PHP version 5.3.0 - * + * * @category LiteCommerce - * @author Creative Development LLC + * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ @@ -28,8 +28,8 @@ namespace XLite\View\StickyPanel; /** - * Panel form items list-based form - * + * Panel form items list-based form + * * @see ____class_see____ * @since 1.0.15 */ @@ -37,7 +37,7 @@ class ItemsListForm extends \XLite\View\Base\FormStickyPanel { /** * Buttons list (cache) - * + * * @var array * @see ____var_see____ * @since 1.0.24 @@ -46,7 +46,7 @@ class ItemsListForm extends \XLite\View\Base\FormStickyPanel /** * Additional buttons (cache) - * + * * @var array * @see ____var_see____ * @since 1.0.24 @@ -106,8 +106,8 @@ protected function defineButtons() } /** - * Get additional buttons - * + * Get additional buttons + * * @return array * @see ____func_see____ * @since 1.0.24 @@ -122,8 +122,8 @@ protected function getAdditionalButtons() } /** - * Define additional buttons - * + * Define additional buttons + * * @return array * @see ____func_see____ * @since 1.0.24 diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index 9fee0c3176..7df35e85a0 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -1808,23 +1808,23 @@ form.list-form { width: auto; } -form.list-form .sticky-panel .panel-cell { +.sticky-panel .panel-cell { display: inline-block; padding: 0px; } -form.list-form .sticky-panel .panel-cell > button { +.sticky-panel .panel-cell > button { margin-left: 5px; margin-right: 5px; } -form.list-form .sticky-panel div.cancel, -form.list-form .sticky-panel div.additional +.sticky-panel div.cancel, +.sticky-panel div.additional { display: block; } -form.list-form .sticky-panel a.cancel { +.sticky-panel a.cancel { text-indent: -5000px; display: block; background: transparent url(../images/icon_cancel.png) no-repeat left top; @@ -1835,16 +1835,16 @@ form.list-form .sticky-panel a.cancel { left: 5px; } -form.list-form .sticky-panel a.cancel.disabled { +.sticky-panel a.cancel.disabled { opacity: .5; cursor: text; } -form.list-form .sticky-panel.has-add-buttons .box { +.sticky-panel.has-add-buttons .box { padding-right: 47px; } -form.list-form .sticky-panel.has-add-buttons .additional { +sticky-panel.has-add-buttons .additional { position: absolute; top: 4px; right: -26px; @@ -1857,9 +1857,8 @@ form.list-form .sticky-panel.has-add-buttons .additional { overflow: visible; } -form.list-form .sticky-panel.has-add-buttons .additional .additional-buttons { +.sticky-panel.has-add-buttons .additional .additional-buttons { position: absolute; - top: 10px; left: 43px; display: none; -moz-border-radius: 5px; @@ -1870,6 +1869,6 @@ form.list-form .sticky-panel.has-add-buttons .additional .additional-buttons { padding: 15px; } -form.list-form .sticky-panel.has-add-buttons .additional:hover .additional-buttons { +.sticky-panel.has-add-buttons .additional:hover .additional-buttons { display: block; } From ddca1f6318337cc0b29191f9b38092b37bc29b9a Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 14:26:09 +0400 Subject: [PATCH 068/562] [*] ProductOptions module version updated to 1.0.13 --- src/classes/XLite/Module/CDev/ProductOptions/Main.php | 2 +- .../CDev/ProductOptions/upgrade/1.0/{12 => 13}/post_rebuild.php | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/{12 => 13}/post_rebuild.php (100%) diff --git a/src/classes/XLite/Module/CDev/ProductOptions/Main.php b/src/classes/XLite/Module/CDev/ProductOptions/Main.php index 51568bd719..f7bdb4c965 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/Main.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/Main.php @@ -56,7 +56,7 @@ public static function getAuthorName() */ public static function getMinorVersion() { - return '12'; + return '13'; } /** diff --git a/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php b/src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/13/post_rebuild.php similarity index 100% rename from src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/12/post_rebuild.php rename to src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/13/post_rebuild.php From b0520235cc58e3b866a8582619c8be47a44fceba Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 11 Jun 2012 14:52:02 +0400 Subject: [PATCH 069/562] [*] restoredb updated: Catalog module is disabled by default --- src/restoredb | 1 + 1 file changed, 1 insertion(+) diff --git a/src/restoredb b/src/restoredb index 2f4d1f5039..2f0f405587 100755 --- a/src/restoredb +++ b/src/restoredb @@ -180,6 +180,7 @@ $disabledModules = array(); $disabledModules['CDev'] = array( 'JoomlaConnector', 'Taxes', + 'Catalog' ); if (!R_INSTALL_SITE && !R_INSTALL_SITEADMIN) { From 83b3369aa58ee5bb22b177208d0b3777cab1baad Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Mon, 11 Jun 2012 15:58:32 +0400 Subject: [PATCH 070/562] [*] Currency edit page further changes. --- .../XLite/Controller/Admin/Currency.php | 12 +++ src/classes/XLite/View/Currency.php | 12 --- src/classes/XLite/View/CurrencyViewInfo.php | 95 +++++++++++++++++++ .../View/FormField/Select/CurrencyRich.php | 55 +++++++++++ .../XLite/View/Model/Currency/Currency.php | 6 +- src/skins/admin/en/currency/body.tpl | 7 +- src/skins/admin/en/currency/css/style.css | 13 +++ src/skins/admin/en/currency/js/script.js | 29 ++++++ .../admin/en/currency_view_info/body.tpl | 25 +++++ .../admin/en/currency_view_info/css/style.css | 12 +++ .../admin/en/currency_view_info/js/script.js | 30 ++++++ 11 files changed, 275 insertions(+), 21 deletions(-) create mode 100644 src/classes/XLite/View/CurrencyViewInfo.php create mode 100644 src/classes/XLite/View/FormField/Select/CurrencyRich.php create mode 100644 src/skins/admin/en/currency_view_info/body.tpl create mode 100644 src/skins/admin/en/currency_view_info/css/style.css create mode 100644 src/skins/admin/en/currency_view_info/js/script.js diff --git a/src/classes/XLite/Controller/Admin/Currency.php b/src/classes/XLite/Controller/Admin/Currency.php index f159af3afe..076c5dc494 100644 --- a/src/classes/XLite/Controller/Admin/Currency.php +++ b/src/classes/XLite/Controller/Admin/Currency.php @@ -46,6 +46,18 @@ public function init() { } + /** + * Return the current page title (for the content area) + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getTitle() + { + return 'Currency'; + } + /** * Return currencies collection to use * diff --git a/src/classes/XLite/View/Currency.php b/src/classes/XLite/View/Currency.php index a317d3a18f..bbc0862d73 100644 --- a/src/classes/XLite/View/Currency.php +++ b/src/classes/XLite/View/Currency.php @@ -82,18 +82,6 @@ public function getJSFiles() return $list; } - /** - * Return title - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getHead() - { - return 'Currency'; - } - /** * Return templates directory name * diff --git a/src/classes/XLite/View/CurrencyViewInfo.php b/src/classes/XLite/View/CurrencyViewInfo.php new file mode 100644 index 0000000000..810a8aa3ea --- /dev/null +++ b/src/classes/XLite/View/CurrencyViewInfo.php @@ -0,0 +1,95 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View; + +/** + * Currency management page widget + * + * @see ____class_see____ + * @since 1.0.0 + * + */ +class CurrencyViewInfo extends \XLite\View\Dialog +{ + /** + * Return list of targets allowed for this widget + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAllowedTargets() + { + $result = parent::getAllowedTargets(); + $result[] = 'currency'; + + return $result; + } + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + $list[] = $this->getDir() . '/css/style.css'; + + return $list; + } + + /** + * getJSFiles + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + $list[] = $this->getDir() . '/js/script.js'; + + return $list; + } + + /** + * Return templates directory name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDir() + { + return 'currency_view_info'; + } +} diff --git a/src/classes/XLite/View/FormField/Select/CurrencyRich.php b/src/classes/XLite/View/FormField/Select/CurrencyRich.php new file mode 100644 index 0000000000..2c422570ea --- /dev/null +++ b/src/classes/XLite/View/FormField/Select/CurrencyRich.php @@ -0,0 +1,55 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View\FormField\Select; + +/** + * Currencies list + * + * @see ____class_see____ + * @since 1.0.1 + */ +class CurrencyRich extends \XLite\View\FormField\Select\Base\Rich +{ + /** + * getDefaultOptions + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getDefaultOptions() + { + $list = array(); + + foreach (\XLite\Core\Database::getRepo('XLite\Model\Currency')->findAllSortedByName() as $currency) { + $list[$currency->getCurrencyId()] = $currency->getName(); + } + + return $list; + } +} diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index 41f4b3e3b4..9493732828 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -49,19 +49,19 @@ class Currency extends \XLite\View\Model\AModel */ protected $currencySchema = array( 'currency_id' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Currency', + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyRich', self::SCHEMA_LABEL => 'Store currency', self::SCHEMA_REQUIRED => false, ), 'name' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Name', - self::SCHEMA_REQUIRED => true, + self::SCHEMA_REQUIRED => false, ), 'format' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyFormat', self::SCHEMA_LABEL => 'Format', - self::SCHEMA_REQUIRED => true, + self::SCHEMA_REQUIRED => false, ), 'prefix' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', diff --git a/src/skins/admin/en/currency/body.tpl b/src/skins/admin/en/currency/body.tpl index ca2db31bad..726dc3b2fe 100644 --- a/src/skins/admin/en/currency/body.tpl +++ b/src/skins/admin/en/currency/body.tpl @@ -10,11 +10,6 @@ * @since 1.0.0 *} -
-
    -
  • {t(#Example#)}:
  • -
  • -
-
+ diff --git a/src/skins/admin/en/currency/css/style.css b/src/skins/admin/en/currency/css/style.css index 6ff1bd4e57..688a5210b2 100644 --- a/src/skins/admin/en/currency/css/style.css +++ b/src/skins/admin/en/currency/css/style.css @@ -21,4 +21,17 @@ .model-properties div.default-section { float: none; +} + +.currency-form .table-label label { + font-size: 14px; + color: #456583; +} + +.currency-form .table-value { + padding-left: 15px; +} + +.currency-form .table li.input { + padding: 10px 0px; } \ No newline at end of file diff --git a/src/skins/admin/en/currency/js/script.js b/src/skins/admin/en/currency/js/script.js index 6cc4918099..8be571d042 100644 --- a/src/skins/admin/en/currency/js/script.js +++ b/src/skins/admin/en/currency/js/script.js @@ -10,3 +10,32 @@ * @since 1.0.0 */ +function CurrencyManageForm() +{ + this.callback(); +} + +CurrencyManageForm.prototype.patternCurrencyViewInfo = '.currency-view-info *'; + +CurrencyManageForm.prototype.callback = function () +{ + var obj = this; + + jQuery('#currency-id').change(function () { + document.location = URLHandler.buildURL({'target': 'currency', 'currency_id': jQuery(this).val()}); + }); + + jQuery('#format').change(function() { + jQuery(obj.patternCurrencyViewInfo).trigger('formatCurrencyChange', [jQuery(this).val()]); + }).trigger('change'); + + jQuery('#prefix').change(function() { + jQuery(obj.patternCurrencyViewInfo).trigger('prefixCurrencyChange', [jQuery(this).val()]); + }).trigger('change'); + + jQuery('#suffix').change(function() { + jQuery(obj.patternCurrencyViewInfo).trigger('suffixCurrencyChange', [jQuery(this).val()]); + }).trigger('change'); + +} + diff --git a/src/skins/admin/en/currency_view_info/body.tpl b/src/skins/admin/en/currency_view_info/body.tpl new file mode 100644 index 0000000000..9ae2edd9e9 --- /dev/null +++ b/src/skins/admin/en/currency_view_info/body.tpl @@ -0,0 +1,25 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * ____file_title____ + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +
+
    +
  • {t(#Example#)}:
  • +
  • +
      +
    • +
    • +
    • +
    +
  • +
+
+ diff --git a/src/skins/admin/en/currency_view_info/css/style.css b/src/skins/admin/en/currency_view_info/css/style.css new file mode 100644 index 0000000000..060078da99 --- /dev/null +++ b/src/skins/admin/en/currency_view_info/css/style.css @@ -0,0 +1,12 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Currency page styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + diff --git a/src/skins/admin/en/currency_view_info/js/script.js b/src/skins/admin/en/currency_view_info/js/script.js new file mode 100644 index 0000000000..655a4e6c09 --- /dev/null +++ b/src/skins/admin/en/currency_view_info/js/script.js @@ -0,0 +1,30 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Currency page routines + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + +function CurrencyViewInfo() +{ + this.callback(); +} + +CurrencyViewInfo.prototype.callback = function () +{ + jQuery('.currency-view-info .currency .format').bind('formatCurrencyChange', function(e, value) {jQuery(this).html(value);}); + + jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(value);}); + + jQuery('.currency-view-info .currency .suffix').bind('suffixCurrencyChange', function(e, value) {jQuery(this).html(value);}); +} + +// View must be loaded before the currency manage form controller +core.autoload(CurrencyViewInfo); + +core.autoload(CurrencyManageForm); \ No newline at end of file From afb7446bd68ee18f25fcce231ec11e74b52f3c0c Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 12 Jun 2012 04:00:43 +0400 Subject: [PATCH 071/562] E:41522 [!] Bug: The administrator can create a role with the HTML tag in the name. Fixed. --- .../XLite/Module/CDev/UserPermissions/View/Model/Role.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php index de084ef274..d88699f201 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php @@ -156,6 +156,10 @@ protected function setModelProperties(array $data) unset($data['enabled']); } + if (!empty($data['name'])) { + $data['name'] = strip_tags($data['name']); + } + parent::setModelProperties($data); $model = $this->getModelObject(); From bd0eee979ece9e12a0ad18af8ec97e858b11d55d Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 12 Jun 2012 04:14:51 +0400 Subject: [PATCH 072/562] E:41580 [!] Bug: Typo in classes/XLite/View/FormField/Select/AccessLevel.php Fixed. --- src/classes/XLite/View/FormField/Select/AccessLevel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/View/FormField/Select/AccessLevel.php b/src/classes/XLite/View/FormField/Select/AccessLevel.php index 673f757900..c70487cef2 100644 --- a/src/classes/XLite/View/FormField/Select/AccessLevel.php +++ b/src/classes/XLite/View/FormField/Select/AccessLevel.php @@ -57,7 +57,7 @@ protected function getDefaultOptions() $list = \XLite\Core\Auth::getInstance()->getUserTypesRaw(); foreach ($list as $k => $v) { - $list[$i] = static::t($v); + $list[$k] = static::t($v); } return $list; From b0a4c3ec88e796c6009b9004bf85baef10a9e444 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 13 Jun 2012 12:12:58 +0400 Subject: [PATCH 073/562] [*] Currency edit page. Design integration. --- src/classes/XLite/View/Container.php | 12 +++++++++ src/classes/XLite/View/CurrencyViewInfo.php | 12 +++++++++ .../XLite/View/Model/Currency/Currency.php | 12 +++++++++ src/skins/admin/en/common/dialog.tpl | 2 +- src/skins/admin/en/currency/body.tpl | 4 +-- src/skins/admin/en/currency/css/style.css | 27 +++++++++++++++++-- src/skins/admin/en/currency/js/script.js | 8 +++--- .../admin/en/currency_view_info/css/style.css | 24 +++++++++++++++++ 8 files changed, 92 insertions(+), 9 deletions(-) diff --git a/src/classes/XLite/View/Container.php b/src/classes/XLite/View/Container.php index 2b85f3b74a..43f1b3a2a7 100644 --- a/src/classes/XLite/View/Container.php +++ b/src/classes/XLite/View/Container.php @@ -83,6 +83,18 @@ protected function getBodyTemplate() return 'body.tpl'; } + /** + * Return specific CSS class for dialog wrapper + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDialogCSSClass() + { + return 'dialog-content'; + } + /** * Return current template * diff --git a/src/classes/XLite/View/CurrencyViewInfo.php b/src/classes/XLite/View/CurrencyViewInfo.php index 810a8aa3ea..1e9c331f95 100644 --- a/src/classes/XLite/View/CurrencyViewInfo.php +++ b/src/classes/XLite/View/CurrencyViewInfo.php @@ -92,4 +92,16 @@ protected function getDir() { return 'currency_view_info'; } + + /** + * Return specific CSS class for dialog wrapper + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDialogCSSClass() + { + return parent::getDialogCSSClass() . ' currency-view-info-dialog'; + } } diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index 9493732828..dbeff6481e 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -168,6 +168,18 @@ protected function getFormClass() return '\XLite\View\Form\Currency\Currency'; } + /** + * Return specific CSS class for dialog wrapper + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDialogCSSClass() + { + return parent::getDialogCSSClass() . ' currency-model-form-dialog'; + } + /** * Return text for the "Submit" button * diff --git a/src/skins/admin/en/common/dialog.tpl b/src/skins/admin/en/common/dialog.tpl index c9386070dd..501a289127 100644 --- a/src/skins/admin/en/common/dialog.tpl +++ b/src/skins/admin/en/common/dialog.tpl @@ -12,6 +12,6 @@

{t(head)}

-
+
diff --git a/src/skins/admin/en/currency/body.tpl b/src/skins/admin/en/currency/body.tpl index 726dc3b2fe..c747ab2677 100644 --- a/src/skins/admin/en/currency/body.tpl +++ b/src/skins/admin/en/currency/body.tpl @@ -9,7 +9,7 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 *} + + - - diff --git a/src/skins/admin/en/currency/css/style.css b/src/skins/admin/en/currency/css/style.css index 688a5210b2..aa823d7f3f 100644 --- a/src/skins/admin/en/currency/css/style.css +++ b/src/skins/admin/en/currency/css/style.css @@ -10,6 +10,15 @@ * @since 1.0.0 */ +.dialog-content { + width: 750px; +} + +.dialog-content.currency-model-form-dialog { + width: 500px; + float: left; +} + .model-properties { margin-bottom: 100px; width: 500px; @@ -24,14 +33,28 @@ } .currency-form .table-label label { - font-size: 14px; + font-size: 16px; color: #456583; } .currency-form .table-value { - padding-left: 15px; + padding-left: 35px; } .currency-form .table li.input { padding: 10px 0px; +} + +.currency-id-value button span { + font-size: 14px; +} + +.model-properties .prefix-value input[type="text"], + .model-properties .suffix-value input[type="text"] +{ + width: 50px; +} + +.model-properties .format-value select { + width: 100px; } \ No newline at end of file diff --git a/src/skins/admin/en/currency/js/script.js b/src/skins/admin/en/currency/js/script.js index 8be571d042..b94ea86d38 100644 --- a/src/skins/admin/en/currency/js/script.js +++ b/src/skins/admin/en/currency/js/script.js @@ -29,13 +29,13 @@ CurrencyManageForm.prototype.callback = function () jQuery(obj.patternCurrencyViewInfo).trigger('formatCurrencyChange', [jQuery(this).val()]); }).trigger('change'); - jQuery('#prefix').change(function() { + jQuery('#prefix').keyup(function(event) { jQuery(obj.patternCurrencyViewInfo).trigger('prefixCurrencyChange', [jQuery(this).val()]); - }).trigger('change'); + }).trigger('keyup'); - jQuery('#suffix').change(function() { + jQuery('#suffix').keyup(function(event) { jQuery(obj.patternCurrencyViewInfo).trigger('suffixCurrencyChange', [jQuery(this).val()]); - }).trigger('change'); + }).trigger('keyup'); } diff --git a/src/skins/admin/en/currency_view_info/css/style.css b/src/skins/admin/en/currency_view_info/css/style.css index 060078da99..70538ae875 100644 --- a/src/skins/admin/en/currency_view_info/css/style.css +++ b/src/skins/admin/en/currency_view_info/css/style.css @@ -10,3 +10,27 @@ * @since 1.0.0 */ +.dialog-content.currency-view-info-dialog { + width: 200px; + float: right; + background-color: #f1f1f1; + padding: 25px; +} + +.currency-view-info ul.value-view { + list-style: none; +} + +.currency-view-info ul.value-view li { + float: left; + color: #333333; + font-size: 20px; +} + +.currency-view-info li.title { + font-size: 16px; + color: #8f8f8f; + margin: 0px 0px 5px 0px; +} + + From 87235d2cd9e1e887a9807a269e66c5910ce6f797 Mon Sep 17 00:00:00 2001 From: svowl Date: Wed, 13 Jun 2012 17:22:26 +0400 Subject: [PATCH 074/562] [!] Tests corrected --- .dev/tests/Classes/Module/CDev/VAT/Model/ATax.php | 15 --------------- .dev/tests/PHPUnit/TestCase.php | 10 ++++++++-- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.dev/tests/Classes/Module/CDev/VAT/Model/ATax.php b/.dev/tests/Classes/Module/CDev/VAT/Model/ATax.php index 0a2d19a9cb..0938b46dd0 100644 --- a/.dev/tests/Classes/Module/CDev/VAT/Model/ATax.php +++ b/.dev/tests/Classes/Module/CDev/VAT/Model/ATax.php @@ -149,21 +149,6 @@ public static function setUpBeforeClass() self::prepareData(); } - /** - * tearDownAfterClass - * - * @return void - * @see ____func_see____ - * @since 1.0.24 - */ - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - - parent::doRestoreDb(); - } - - /** * prepareData * diff --git a/.dev/tests/PHPUnit/TestCase.php b/.dev/tests/PHPUnit/TestCase.php index 41e163f8f3..0601b4f61b 100644 --- a/.dev/tests/PHPUnit/TestCase.php +++ b/.dev/tests/PHPUnit/TestCase.php @@ -570,10 +570,16 @@ protected function doMakeBackup($path) * @see ____func_see____ * @since 1.0.0 */ - protected function doRestoreDb($path = null, $drop = true) + protected function doRestoreDb($path = null, $drop = true, $doNotAssert = false) { $message = ''; - $this->assertTrue(xlite_restore_sql_from_backup($path, false, $drop, $message), $message); + + $result = xlite_restore_sql_from_backup($path, false, $drop, $message); + + if (!$doNotAssert) { + $this->assertTrue($result, $message); + } + \Includes\Utils\FileManager::copyRecursive(LC_DIR . '/.dev/tests/images', LC_DIR_IMAGES); } From 91cf045092e4fafb9581b66ea102a02a130edf77 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 13 Jun 2012 17:28:10 +0400 Subject: [PATCH 075/562] [*] Currency edit page. further changes. --- .../XLite/Controller/Admin/Currency.php | 15 +++++++ .../Module/CDev/RuTranslation/install.yaml | 4 +- src/classes/XLite/View/Model/AModel.php | 2 +- .../XLite/View/Model/Currency/Currency.php | 43 +++---------------- src/sql/xlite_data.yaml | 6 +-- 5 files changed, 28 insertions(+), 42 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Currency.php b/src/classes/XLite/Controller/Admin/Currency.php index 076c5dc494..c45c21da39 100644 --- a/src/classes/XLite/Controller/Admin/Currency.php +++ b/src/classes/XLite/Controller/Admin/Currency.php @@ -44,6 +44,21 @@ class Currency extends \XLite\Controller\Admin\AAdmin */ public function init() { + if (isset(\XLite\Core\Request::getInstance()->currency_id)) { + + $currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->find(\XLite\Core\Request::getInstance()->currency_id); + + if ($currency) { + + $shopCurrency = \XLite\Core\Database::getRepo('XLite\Model\Config') + ->findOneBy(array('name' => 'shop_currency', 'category' => 'General')); + + \XLite\Core\Database::getRepo('XLite\Model\Config')->update( + $shopCurrency, + array('value' => $currency->getCurrencyId()) + ); + } + } } /** diff --git a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml index 2ada2c7df3..4ca0bab25d 100644 --- a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml @@ -1,7 +1,7 @@ # vim: set ts=2 sw=2 sts=2 et: -# +# # Translation data (RU) -# +# # @author Creative Development LLC # @copyright Copyright (c) 2012 Creative Development LLC . All rights reserved # @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index 2565472931..f5b6a7d80e 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -187,7 +187,7 @@ abstract class AModel extends \XLite\View\Dialog protected $excludedFields = array(); /** - * This object will be used if another one is not pased + * This object will be used if another one is not passed * * @return \XLite\Model\AEntity * @see ____func_see____ diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index dbeff6481e..b4ca0df39b 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -49,9 +49,10 @@ class Currency extends \XLite\View\Model\AModel */ protected $currencySchema = array( 'currency_id' => array( - self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyRich', - self::SCHEMA_LABEL => 'Store currency', - self::SCHEMA_REQUIRED => false, + self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyRich', + self::SCHEMA_LABEL => 'Store currency', + self::SCHEMA_REQUIRED => false, + self::SCHEMA_ATTRIBUTES => array('data-filter' => '1'), ), 'name' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', @@ -109,31 +110,7 @@ public function getFormFieldsForSectionDefault() } /** - * Return currency identificator from the request - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getRequestCurrencyId() - { - return \XLite\Core\Request::getInstance()->currency_id; - } - - /** - * Return currency identificator for the current model of the form - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getCurrencyId() - { - return $this->getRequestCurrencyId() ?: null; - } - - /** - * This object will be used if another one is not pased + * This object will be used if another one is not passed * * @return \XLite\Model\Currency * @see ____func_see____ @@ -143,14 +120,8 @@ protected function getDefaultModelObject() { if (!isset($this->currency)) { - if (is_null($this->getCurrencyId())) { - - $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->findOneBy(array('code' => static::DEFAULT_CURRENCY)); - - } else { - - $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency')->find($this->getCurrencyId()); - } + $this->currency = \XLite\Core\Database::getRepo('XLite\Model\Currency') + ->find(\XLite\Core\Config::getInstance()->General->shop_currency); } return $this->currency; diff --git a/src/sql/xlite_data.yaml b/src/sql/xlite_data.yaml index 3874f2ddcf..07a65a49c6 100644 --- a/src/sql/xlite_data.yaml +++ b/src/sql/xlite_data.yaml @@ -30,7 +30,7 @@ XLite\Model\Config: - { name: customer_presentation, category: General, type: separator, orderby: 200, translations: [{ code: en, option_name: 'Customer Zone settings' }] } - { name: customer_security, category: Security, type: checkbox, value: N, translations: [{ code: en, option_name: 'Use HTTPS in the Customer Zone (for login, Checkout and profile pages)' }] } - { name: date_format, category: General, type: 'XLite\View\FormField\Select\DateFormat', orderby: 660, value: '%b %e, %Y', translations: [{ code: en, option_name: 'Date format' }] } - - { name: decimal_delim, category: General, type: 'XLite\View\FormField\Select\DecimalPart', orderby: 650, value: ., translations: [{ code: en, option_name: 'Currency decimal separator' }] } + - { name: decimal_delim, category: General, type: 'XLite\View\FormField\Select\DecimalPart', orderby: 650, value: ., translations: [{ code: en, option_name: 'Decimal separator for float values' }] } - { name: default_country, category: General, type: country, orderby: 310, value: US, translations: [{ code: en, option_name: 'Default country in the registration form' }] } - { name: default_language, category: General, orderby: 330, value: en } - { name: default_offline_payment, category: Payments, type: text, translations: [{ code: en, option_name: 'Payment method to be assumed in case of zero order totals' }] } @@ -64,7 +64,7 @@ XLite\Model\Config: - { name: recent_orders, category: General, type: 'XLite\View\FormField\Input\Text\Integer', orderby: 440, value: '10', widgetParameters: { min: 1 }, translations: [{ code: en, option_name: 'The number of orders in the recent order list' }] } - { name: redirect_to_cart, category: General, type: checkbox, orderby: 300, value: N, translations: [{ code: en, option_name: 'Redirect customer to cart when adding a product' }] } - { name: shop_closed, category: General, type: checkbox, orderby: 110, value: N, translations: [{ code: en, option_name: 'Check this to close the shop temporarily' }] } - - { name: shop_currency, category: General, type: currency, orderby: 605, value: 840, translations: [{ code: en, option_name: 'Shop currency' }] } + - { name: shop_currency, category: General, type: '', orderby: 605, value: 840, translations: [{ code: en, option_name: 'Shop currency' }] } - { name: site_administrator, category: Company, type: 'XLite\View\FormField\Input\Text\Email', orderby: 460, value: bit-bucket@x-cart.com, translations: [{ code: en, option_name: 'Site administrator e-mail' }] } - { name: smtp_password, category: Email, type: text, orderby: 160, translations: [{ code: en, option_name: Password }] } - { name: smtp_security, category: Email, type: 'XLite\View\FormField\Select\SMTPSecurity', orderby: 170, value: no, translations: [{ code: en, option_name: 'Secure connection' }] } @@ -75,7 +75,7 @@ XLite\Model\Config: - { name: start_year, category: Company, type: 'XLite\View\FormField\Input\Text\PastYear', orderby: 380, value: 2012, translations: [{ code: en, option_name: 'Year when store started its operation' }] } - { name: subcategories_look, category: General, type: 'XLite\View\FormField\Select\SubcategoriesLook', orderby: 220, value: icons, translations: [{ code: en, option_name: 'Category listings format' }] } - { name: support_department, category: Company, type: 'XLite\View\FormField\Input\Text\Email', orderby: 490, value: bit-bucket@x-cart.com, translations: [{ code: en, option_name: 'HelpDesk/Support service e-mail' }] } - - { name: thousand_delim, category: General, type: 'XLite\View\FormField\Select\ThousandDelimiter', orderby: 640, translations: [{ code: en, option_name: 'Currency thousands separator' }] } + - { name: thousand_delim, category: General, type: 'XLite\View\FormField\Select\ThousandDelimiter', orderby: 640, translations: [{ code: en, option_name: 'Thousands separator for float values' }] } - { name: time_format, category: General, type: 'XLite\View\FormField\Select\TimeFormat', orderby: 670, value: '%H:%M', translations: [{ code: en, option_name: 'Time format' }] } - { name: time_zone, category: General, type: 'XLite\View\FormField\Select\TimeZone', orderby: 680, translations: [{ code: en, option_name: 'Time zone' }] } - { name: unit_presentation, category: General, type: separator, orderby: 600, translations: [{ code: en, option_name: 'Units of measurement' }] } From e4ac95672b568db1eee980bcc5ece3186b9ac47c Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 13 Jun 2012 17:40:09 +0400 Subject: [PATCH 076/562] E:0041562 [!] Fix for empty Clean URLs [!] Fixes for the UNIT-tests related to Clean URLs --- .dev/tests/Classes/Model/Category.php | 1 - .../Model/Repo/sql/category/restore.sql | 126 +++++++++--------- .../Classes/Model/Repo/sql/category/setup.sql | 18 +-- .../Model/Repo/sql/product/restore.sql | 126 +++++++++--------- .../Classes/Model/Repo/sql/product/setup.sql | 14 +- src/classes/XLite/Model/Base/Catalog.php | 69 ++++++++++ src/classes/XLite/Model/Category.php | 16 +-- src/classes/XLite/Model/Product.php | 16 +-- 8 files changed, 213 insertions(+), 173 deletions(-) create mode 100644 src/classes/XLite/Model/Base/Catalog.php diff --git a/.dev/tests/Classes/Model/Category.php b/.dev/tests/Classes/Model/Category.php index a9213a68f2..ace1364487 100644 --- a/.dev/tests/Classes/Model/Category.php +++ b/.dev/tests/Classes/Model/Category.php @@ -29,7 +29,6 @@ class XLite_Tests_Model_Category extends XLite_Tests_TestCase 'lpos' => 100, 'rpos' => 200, 'enabled' => true, - 'cleanURL' => 'testCategory', 'show_title' => true, ); diff --git a/.dev/tests/Classes/Model/Repo/sql/category/restore.sql b/.dev/tests/Classes/Model/Repo/sql/category/restore.sql index ef5c66fd77..0ffbe10334 100644 --- a/.dev/tests/Classes/Model/Repo/sql/category/restore.sql +++ b/.dev/tests/Classes/Model/Repo/sql/category/restore.sql @@ -46,69 +46,69 @@ INSERT INTO `xlite_category_translations` (label_id, code, id, name, description INSERT INTO `xlite_category_translations` (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (107,'en',1002,'Apparel','Category-1','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,NULL, 0, 0); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (1,'en',4003,'Planet Express Babydoll','','','','',''); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (2,'en',4004,'Digital Angel','','','','',''); diff --git a/.dev/tests/Classes/Model/Repo/sql/category/setup.sql b/.dev/tests/Classes/Model/Repo/sql/category/setup.sql index 6671bae8a8..1d25c5c423 100644 --- a/.dev/tests/Classes/Model/Repo/sql/category/setup.sql +++ b/.dev/tests/Classes/Model/Repo/sql/category/setup.sql @@ -45,15 +45,15 @@ INSERT INTO xlite_category_translations (label_id, code, id, name, description, INSERT INTO xlite_category_translations (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (7,'en',14019,'','','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',1,'0.32',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0, NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0, NULL, '', 0, 0, 0); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (1,'en',15090,'Apple','
Apple
\n

The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family Rosaceae. It is one of the most widely cultivated tree fruits. The tree is small and deciduous, reaching 3 to 12 metres (9.8 to 39 ft) tall, with a broad, often densely twiggy crown. The leaves are alternately arranged simple ovals 5 to 12 cm long and 3–6 centimetres (1.2–2.4 in) broad on a 2 to 5 centimetres (0.79 to 2.0 in) petiole with an acute tip, serrated margin and a slightly downy underside. Blossoms are produced in spring simultaneously with the budding of the leaves. The flowers are white with a pink tinge that gradually fades, five petaled, and 2.5 to 3.5 centimetres (0.98 to 1.4 in) in diameter. The fruit matures in autumn, and is typically 5 to 9 centimetres (2.0 to 3.5 in) diameter. The center of the fruit contains five carpels arranged in a five-point star, each carpel containing one to three seeds.

\n

The tree originated from Central Asia, where its wild ancestor is still found today. There are more than 7,500 known cultivars of apples resulting in a range of desired characteristics. Cultivars vary in their yield and the ultimate size of the tree, even when grown on the same rootstock.

\n

vAt least 55 million tonnes of apples were grown worldwide in 2005, with a value of about $10 billion. China produced about 35% of this total. The United States is the second leading producer, with more than 7.5% of the world production. Turkey, France, Italy, and Iran are also among the leading apple exporters.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (2,'en',16281,'Radish','
Radish
\n

The radish (Raphanus sativus) is an edible root vegetable of the Brassicaceae family that was domesticated in Europe in pre-Roman times. They are grown and consumed throughout the world. Radishes have numerous varieties, varying in size, color and duration of required cultivation time. There are some radishes that are grown for their seeds; oilseed radishes are grown, as the name implies, for oil production.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); diff --git a/.dev/tests/Classes/Model/Repo/sql/product/restore.sql b/.dev/tests/Classes/Model/Repo/sql/product/restore.sql index 317f91eb9f..f92f2809c0 100644 --- a/.dev/tests/Classes/Model/Repo/sql/product/restore.sql +++ b/.dev/tests/Classes/Model/Repo/sql/product/restore.sql @@ -45,69 +45,69 @@ INSERT INTO `xlite_category_translations` (label_id, code, id, name, description INSERT INTO `xlite_category_translations` (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (106,'en',4002,'RC Toys','','','',''); INSERT INTO `xlite_category_translations` (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (107,'en',1002,'Apparel','Category-1','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,'', 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,'', 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4003,'19.99','00001',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4004,'18.99','00002',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4009,'29.99','00007',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4030,'11.99','00028',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4031,'7.99','00029',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4013,'29.99','00011',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4059,'39.95','00057',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4016,'12.99','00014',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4022,'5.99','00020',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4021,'24.99','00019',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4012,'7.99','00010',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4042,'19.99','00040',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4045,'11.99','00043',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4043,'5.99','00041',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159702,'39.99','00094',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4049,'9.99','00047',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4005,'18.99','00003',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4008,'18.99','00006',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4010,'19.99','00008',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4007,'15.99','00005',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4006,'15.99','00004',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (3002,'17.99','00000',1,'0.32',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (159704,'59.99','00095',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4052,'29.99','00050',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4056,'39.99','00054',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4054,'24.99','00052',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4038,'49.99','00036',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4033,'24.99','00031',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4026,'34.99','00024',1,'2.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4050,'19.99','00048',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4053,'39.99','00051',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4055,'474.99','00053',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4051,'29.99','00049',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4046,'19.99','00044',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4047,'9.99','00045',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4048,'19.99','00046',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4039,'14.99','00037',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4040,'19.99','00038',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4041,'19.99','00039',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4044,'19.99','00042',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4035,'12.99','00033',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4034,'7.99','00032',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4027,'4.99','00025',1,'0.05',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4020,'9.99','00018',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4011,'49.00','00009',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4014,'39.99','00012',1,'2.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4017,'24.99','00015',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4018,'14.99','00016',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4028,'13.99','00026',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4029,'5.99','00027',1,'0.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4057,'4.95','00055',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4036,'4.95','00034',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4061,'0.49','00059',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4015,'24.99','00013',1,'2.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4023,'9.99','00021',1,'0.08',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4032,'9.99','00030',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4025,'5.99','00023',1,'1.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4019,'8.99','00017',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4024,'34.99','00022',1,'1.50',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4060,'6.50','00058',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4058,'34.95','00056',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4062,'49.95','00060',1,'0.00',0,NULL, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `arrivalDate`, `date`) VALUES (4063,'5.95','00061',1,'0.00',0,NULL, 0, 0); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (1,'en',4003,'Planet Express Babydoll','','','','',''); INSERT INTO xlite_product_translations (label_id, code, id, name, description, brief_description, meta_tags, meta_desc, meta_title) VALUES (2,'en',4004,'Digital Angel','','','','',''); diff --git a/.dev/tests/Classes/Model/Repo/sql/product/setup.sql b/.dev/tests/Classes/Model/Repo/sql/product/setup.sql index 7cbc84e609..12f979b495 100644 --- a/.dev/tests/Classes/Model/Repo/sql/product/setup.sql +++ b/.dev/tests/Classes/Model/Repo/sql/product/setup.sql @@ -30,15 +30,15 @@ INSERT INTO xlite_category_translations (label_id, code, id, name, description, INSERT INTO xlite_category_translations (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (2,'en',14015,'Fruit','

In botany, a fruit is the ripened ovary, together with its seeds, of a flowering plant. In cuisine, when discussing fruit as food, the term usually refers to just those plant fruits that are sweet and fleshy, examples of which would be plum, apple, and orange. However, a great many common vegetables, as well as nuts and grains, are the fruit of the plants they come from. Fruits that might not be considered such in a culinary context include gourds (e.g. squash and pumpkin), maize, tomatoes, and green peppers. These are fruits to a botanist, but are generally treated as vegetables in cooking. Some spices, such as allspice and nutmeg, are fruits. Rarely, culinary \"fruits\" are not fruits in the botanical sense, such as rhubarb in which only the sweet leaf petiole is edible.

\n

The term false fruit is sometimes applied to a fruit, like the fig (a multiple-accessory fruit) or to a plant structure that resembles a fruit but is not derived from a flower or flowers. Some gymnosperms, such as yew, have fleshy arils that resemble fruits and some junipers have berry-like, fleshy cones.

\n','','',''); INSERT INTO xlite_category_translations (label_id, code, id, name, description, meta_tags, meta_desc, meta_title) VALUES (3,'en',14009,'Vegetables','

Vegetable is a nutritional and culinary term denoting any part of a plant that is commonly consumed by humans as food, but is not regarded as a culinary fruit, nut, herb, spice, or grain. In common usage, vegetables include the leaves (e.g. lettuce), stems (asparagus), and roots (carrot) of various plants. But the term can also encompass non-sweet fruits such as seed-pods (beans), cucumbers, squashes, pumpkins, tomatoes, avocadoes, green peppers, etc.; even some seeds (peas and beans) that are easily softened by soaking.

\n','','',''); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15090,'1.99','00000',1,'0.32',0,NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16281,'1.15','00007',1,'0.31',0,NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16280,'3.45','00006',1,'0.55',0,NULL, '', 0, 0, 0); INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (16282,'1.12','00008',1,'0.35',0,'test','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15121,'5.99','00004',1,'0.32',0,NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15123,'1.99','00005',1,'0.32',0,NULL, '', 0, 0, 0); INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15068,'2.99','00003',0,'0.32',0,'disabled','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,'','', 0, 0, 0); -INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,'','', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15091,'8.99','00002',1,'0.32',0,NULL, '', 0, 0, 0); +INSERT INTO `xlite_products` (`product_id`, `price`, `sku`, `enabled`, `weight`, `free_shipping`, `cleanURL`, `javascript`, `arrivalDate`, `date`, `marketPrice`) VALUES (15067,'2.49','00001',1,'0.32',0,NULL, '', 0, 0, 0); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (1,'en',15090,'Apple','
Apple
\n

The apple is the pomaceous fruit of the apple tree, species Malus domestica in the rose family Rosaceae. It is one of the most widely cultivated tree fruits. The tree is small and deciduous, reaching 3 to 12 metres (9.8 to 39 ft) tall, with a broad, often densely twiggy crown. The leaves are alternately arranged simple ovals 5 to 12 cm long and 3–6 centimetres (1.2–2.4 in) broad on a 2 to 5 centimetres (0.79 to 2.0 in) petiole with an acute tip, serrated margin and a slightly downy underside. Blossoms are produced in spring simultaneously with the budding of the leaves. The flowers are white with a pink tinge that gradually fades, five petaled, and 2.5 to 3.5 centimetres (0.98 to 1.4 in) in diameter. The fruit matures in autumn, and is typically 5 to 9 centimetres (2.0 to 3.5 in) diameter. The center of the fruit contains five carpels arranged in a five-point star, each carpel containing one to three seeds.

\n

The tree originated from Central Asia, where its wild ancestor is still found today. There are more than 7,500 known cultivars of apples resulting in a range of desired characteristics. Cultivars vary in their yield and the ultimate size of the tree, even when grown on the same rootstock.

\n

vAt least 55 million tonnes of apples were grown worldwide in 2005, with a value of about $10 billion. China produced about 35% of this total. The United States is the second leading producer, with more than 7.5% of the world production. Turkey, France, Italy, and Iran are also among the leading apple exporters.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); INSERT INTO `xlite_product_translations` (`label_id`, `code`, `id`, `name`, `description`, `brief_description`, `meta_tags`, `meta_desc`, `meta_title`) VALUES (2,'en',16281,'Radish','
Radish
\n

The radish (Raphanus sativus) is an edible root vegetable of the Brassicaceae family that was domesticated in Europe in pre-Roman times. They are grown and consumed throughout the world. Radishes have numerous varieties, varying in size, color and duration of required cultivation time. There are some radishes that are grown for their seeds; oilseed radishes are grown, as the name implies, for oil production.

\n

 

\n
From Wikipedia, the free encyclopedia
','','','',''); diff --git a/src/classes/XLite/Model/Base/Catalog.php b/src/classes/XLite/Model/Base/Catalog.php new file mode 100644 index 0000000000..71834f82c8 --- /dev/null +++ b/src/classes/XLite/Model/Base/Catalog.php @@ -0,0 +1,69 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.24 + */ + +namespace XLite\Model\Base; + +/** + * Abstract catalog model + * + * @see ____class_see____ + * @since 1.0.0 + * + * @MappedSuperclass + * @HasLifecycleCallbacks + */ +abstract class Catalog extends \XLite\Model\Base\I18n +{ + /** + * Clean URL + * + * @var string + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="string", length="255", unique=true, nullable=true) + */ + protected $cleanURL; + + /** + * Lifecycle callback + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + * + * @PrePersist + * @PreUpdate + */ + public function prepareBeforeSave() + { + // http://bugtracker.litecommerce.com/view.php?id=41562 + if ('' === $this->getCleanURL() || false === $this->getCleanURL()) { + $this->setCleanURL(null); + } + } +} diff --git a/src/classes/XLite/Model/Category.php b/src/classes/XLite/Model/Category.php index 62fec95948..db825cbb96 100644 --- a/src/classes/XLite/Model/Category.php +++ b/src/classes/XLite/Model/Category.php @@ -35,9 +35,6 @@ * * @Entity (repositoryClass="\XLite\Model\Repo\Category") * @Table (name="categories", - * uniqueConstraints={ - * @UniqueConstraint (name="cleanURL", columns={"cleanURL"}) - * }, * indexes={ * @Index (name="lpos", columns={"lpos"}), * @Index (name="rpos", columns={"rpos"}), @@ -45,7 +42,7 @@ * } * ) */ -class Category extends \XLite\Model\Base\I18n +class Category extends \XLite\Model\Base\Catalog { /** * Node unique ID @@ -93,17 +90,6 @@ class Category extends \XLite\Model\Base\I18n */ protected $enabled = true; - /** - * Node clean (SEO-friendly) URL - * - * @var string - * @see ____var_see____ - * @since 1.0.0 - * - * @Column (type="string", length="255", nullable=true) - */ - protected $cleanURL; - /** * Whether to display the category title, or not * diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index 0c1680ed6f..523e3b49e7 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -35,9 +35,6 @@ * * @Entity (repositoryClass="\XLite\Model\Repo\Product") * @Table (name="products", - * uniqueConstraints={ - * @UniqueConstraint (name="cleanURL", columns={"cleanURL"}) - * }, * indexes={ * @Index (name="price", columns={"price"}), * @Index (name="sku", columns={"sku"}), @@ -48,7 +45,7 @@ * ) * @HasLifecycleCallbacks */ -class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrderItem +class Product extends \XLite\Model\Base\Catalog implements \XLite\Model\Base\IOrderItem { /** * Product unique ID @@ -125,17 +122,6 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder */ protected $free_shipping = false; - /** - * Clean URL - * - * @var string - * @see ____var_see____ - * @since 1.0.0 - * - * @Column (type="string", length="255", nullable=true) - */ - protected $cleanURL; - /** * Custom javascript code * From c16e162e73d70e2d1e3fbf37f7329914b02220ca Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Wed, 13 Jun 2012 17:48:31 +0400 Subject: [PATCH 077/562] [*] Minor layout correction for the "Market price" on product details page --- src/skins/default/en/modules/CDev/MarketPrice/style.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/skins/default/en/modules/CDev/MarketPrice/style.css b/src/skins/default/en/modules/CDev/MarketPrice/style.css index 8d00a5bd7e..7ff76357ec 100644 --- a/src/skins/default/en/modules/CDev/MarketPrice/style.css +++ b/src/skins/default/en/modules/CDev/MarketPrice/style.css @@ -28,9 +28,6 @@ ul.products.products-sidebar .product-list-market-price { } div.product-details-market-price { - display: inline-block; - margin-top: 10px; - margin-bottom: -15px; } div.product-details-market-price div.text { From fd3dc0a9d8e54b9f6a447405e331bcd4bef384bb Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 14 Jun 2012 15:28:30 +0400 Subject: [PATCH 078/562] E:41584 [*] Images transfer process improved. --- .../XLite/Module/CDev/AmazonS3Images/View/Migrate.php | 4 ++-- src/skins/admin/en/event_task_progress/controller.js | 8 ++++++++ src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php index 1cc3afa25d..56b2a98c91 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php @@ -123,13 +123,13 @@ protected function getMigrateStarted() $result = false; $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateFromS3'); - if ($state && (0 < $state['position'] || 0 == $state['lenght'])) { + if ($state && ((0 < $state['position'] && $state['position'] < $state['length']) || 0 == $state['length'])) { $result = 'migrateFromS3'; } if (!$result) { $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateToS3'); - if ($state && (0 < $state['position'] || 0 == $state['lenght'])) { + if ($state && ((0 < $state['position'] && $state['position'] < $state['length']) || 0 == $state['length'])) { $result = 'migrateToS3'; } } diff --git a/src/skins/admin/en/event_task_progress/controller.js b/src/skins/admin/en/event_task_progress/controller.js index d75a78ea05..e4cb9efd16 100644 --- a/src/skins/admin/en/event_task_progress/controller.js +++ b/src/skins/admin/en/event_task_progress/controller.js @@ -22,6 +22,7 @@ jQuery().ready( if (data && 'undefined' != typeof(data.percent)) { bar.progressbar('value', data.percent); bar.attr('title', data.percent + '%') + bar.trigger('changePercent'); percent = data.percent; } @@ -36,6 +37,9 @@ jQuery().ready( {}, {timeout: 600000} ); + + } else { + bar.trigger('complete'); } } @@ -77,8 +81,12 @@ jQuery().ready( if (data && 'undefined' != typeof(data.percent)) { bar.progressbar('value', data.percent); bar.attr('title', data.percent + '%') + bar.trigger('changePercent'); if (100 > data.percent) { timer = setTimeout(function () { return o.updateProgressBar(); }, timerTTL); + + } else { + bar.trigger('complete'); } } else { diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js index ebf451f897..154004d1cf 100644 --- a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js +++ b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js @@ -16,6 +16,11 @@ jQuery().ready( function () { jQuery(this).progressbar({value: jQuery(this).data('percent')}); } + ).bind( + 'complete', + function() { + self.location.reload(); + } ); } ); From f228debd5dfb97eaaa6abcad4652c3c1a1e2c9f4 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 14 Jun 2012 15:35:27 +0400 Subject: [PATCH 079/562] E:41589 [!] Bug: AWS secret key did not displayed into settings page. Fixed. --- .../Module/CDev/AmazonS3Images/install.yaml | 2 +- .../XLite/View/FormField/Input/Password.php | 15 +----- .../XLite/View/FormField/Input/Secure.php | 50 +++++++++++++++++++ 3 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 src/classes/XLite/View/FormField/Input/Secure.php diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml b/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml index 549409ef6c..31f16b1e2c 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml @@ -18,7 +18,7 @@ XLite\Model\Config: option_name: AWS access key - name: secret_key category: CDev\AmazonS3Images - type: 'XLite\View\FormField\Input\Password' + type: 'XLite\View\FormField\Input\Secure' orderby: 200 value: '' translations: diff --git a/src/classes/XLite/View/FormField/Input/Password.php b/src/classes/XLite/View/FormField/Input/Password.php index c64c36cd43..9d13c3e3ea 100644 --- a/src/classes/XLite/View/FormField/Input/Password.php +++ b/src/classes/XLite/View/FormField/Input/Password.php @@ -34,21 +34,8 @@ * @see ____class_see____ * @since 1.0.0 */ -class Password extends \XLite\View\FormField\Input\Base\String +class Password extends \XLite\View\FormField\Input\Secure { - /** - * Return field type - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - public function getFieldType() - { - return self::FIELD_TYPE_PASSWORD; - } - - /** * setCommonAttributes * diff --git a/src/classes/XLite/View/FormField/Input/Secure.php b/src/classes/XLite/View/FormField/Input/Secure.php new file mode 100644 index 0000000000..c97cfa1f79 --- /dev/null +++ b/src/classes/XLite/View/FormField/Input/Secure.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View\FormField\Input; + + +/** + * Secure input + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Secure extends \XLite\View\FormField\Input\Base\String +{ + /** + * Return field type + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getFieldType() + { + return self::FIELD_TYPE_PASSWORD; + } +} From 16d139fa8b77144bf84c6f1670ed1cdacd955609 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 14 Jun 2012 16:52:56 +0400 Subject: [PATCH 080/562] [*] Currency edit page. further changes. --- .../View/FormField/Select/CurrencyFormat.php | 110 ++++++++++++++++-- .../XLite/View/Model/Currency/Currency.php | 5 + src/skins/admin/en/currency/js/script.js | 5 +- .../admin/en/currency_view_info/body.tpl | 5 +- .../admin/en/currency_view_info/js/script.js | 8 +- 5 files changed, 120 insertions(+), 13 deletions(-) diff --git a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php index 301a268ae9..1b96c847f1 100644 --- a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php +++ b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php @@ -35,13 +35,23 @@ */ class CurrencyFormat extends \XLite\View\FormField\Select\Regular { + /** + * Parameters name for a widget + */ + const PARAM_E = 'param_exp'; + + /** + * Exp. part replace element in format + */ + const FORMAT_EXP = 'e'; + /** * Currency format variants */ - const FORMAT_SPACE_DOT = '1 999.99'; - const FORMAT_COMMA_DOT = '1,999.99'; - const FORMAT_SPACE_COMMA = '1 999,99'; - const FORMAT_DOT_COMMA = '1.999,99'; + const FORMAT_SPACE_DOT = '1 999.e'; + const FORMAT_COMMA_DOT = '1,999.e'; + const FORMAT_SPACE_COMMA = '1 999,e'; + const FORMAT_DOT_COMMA = '1.999,e'; /** * Default format @@ -117,6 +127,55 @@ public static function getFormat($thousandDelimiter, $decimalDelimiter) return $format; } + /** + * Return formatted element string + * + * @param string $elem + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function formatElement($elem) + { + return 0 == $this->getE() + ? substr($elem, 0, -2) + : str_replace(static::FORMAT_EXP, str_repeat('9', $this->getE()), $elem); + } + + /** + * Set widget params + * + * @param array $params Handler params + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function setWidgetParams(array $params) + { + parent::setWidgetParams($params); + + foreach ($this->getWidgetParams() as $name => $param) { + if (static::PARAM_OPTIONS == $name) { + $param->setValue($this->getFormatOptions()); + break; + } + } + } + + /** + * Return exp. part number for a selector + * + * @return integer + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getE() + { + return $this->getParam(static::PARAM_E); + } + /** * Get default options list * @@ -126,11 +185,44 @@ public static function getFormat($thousandDelimiter, $decimalDelimiter) */ protected function getDefaultOptions() { - return array( - static::FORMAT_SPACE_DOT => static::FORMAT_SPACE_DOT, - static::FORMAT_COMMA_DOT => static::FORMAT_COMMA_DOT, - static::FORMAT_SPACE_COMMA => static::FORMAT_SPACE_COMMA, - static::FORMAT_DOT_COMMA => static::FORMAT_DOT_COMMA, + return array(); + } + + /** + * Get options list + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFormatOptions() + { + return array_unique( + array_map( + array($this, 'formatElement'), + array( + static::FORMAT_SPACE_DOT => static::FORMAT_SPACE_DOT, + static::FORMAT_COMMA_DOT => static::FORMAT_COMMA_DOT, + static::FORMAT_SPACE_COMMA => static::FORMAT_SPACE_COMMA, + static::FORMAT_DOT_COMMA => static::FORMAT_DOT_COMMA, + ) + ) + ); + } + + /** + * Define widget params + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineWidgetParams() + { + parent::defineWidgetParams(); + + $this->widgetParams += array( + static::PARAM_E => new \XLite\Model\WidgetParam\Int('Exp part', 2), ); } } diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index b4ca0df39b..bf31e7777e 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -94,6 +94,11 @@ class Currency extends \XLite\View\Model\AModel */ public function getCurrencySchema() { + $e = $this->getDefaultModelObject()->getE(); + + $this->currencySchema['format'][\XLite\View\FormField\Select\CurrencyFormat::PARAM_E] = $e; + $this->currencySchema['format'][static::SCHEMA_ATTRIBUTES] = array('data-e' => $e); + return $this->currencySchema; } diff --git a/src/skins/admin/en/currency/js/script.js b/src/skins/admin/en/currency/js/script.js index b94ea86d38..b98db7b1f6 100644 --- a/src/skins/admin/en/currency/js/script.js +++ b/src/skins/admin/en/currency/js/script.js @@ -26,7 +26,10 @@ CurrencyManageForm.prototype.callback = function () }); jQuery('#format').change(function() { - jQuery(obj.patternCurrencyViewInfo).trigger('formatCurrencyChange', [jQuery(this).val()]); + jQuery(obj.patternCurrencyViewInfo).trigger( + 'formatCurrencyChange', + [jQuery(this).val(), jQuery(this).data('e')] + ); }).trigger('change'); jQuery('#prefix').keyup(function(event) { diff --git a/src/skins/admin/en/currency_view_info/body.tpl b/src/skins/admin/en/currency_view_info/body.tpl index 9ae2edd9e9..69ab0f6856 100644 --- a/src/skins/admin/en/currency_view_info/body.tpl +++ b/src/skins/admin/en/currency_view_info/body.tpl @@ -13,13 +13,14 @@
  • {t(#Example#)}:
  • -
  • +
  • +
- + diff --git a/src/skins/admin/en/currency_view_info/js/script.js b/src/skins/admin/en/currency_view_info/js/script.js index 655a4e6c09..468a873c74 100644 --- a/src/skins/admin/en/currency_view_info/js/script.js +++ b/src/skins/admin/en/currency_view_info/js/script.js @@ -17,7 +17,13 @@ function CurrencyViewInfo() CurrencyViewInfo.prototype.callback = function () { - jQuery('.currency-view-info .currency .format').bind('formatCurrencyChange', function(e, value) {jQuery(this).html(value);}); + jQuery('.currency-view-info .currency.currency-zero .format').bind('formatCurrencyChange', function(e, value, exp) { + if (0 == exp) { + jQuery(this).html(value.replace(/[\.,]e/g, '')); + } else { + jQuery(this).html(value.replace(/e/g, new Array(exp + 1).join('0'))); + } + }); jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(value);}); From 8c8c44ae6a6f567c9f31d84d0235d6a4ccd01e45 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 14 Jun 2012 18:15:01 +0400 Subject: [PATCH 081/562] E:41591 [*] Add resized icon support (Amazon S3 images) --- src/classes/XLite/Model/Base/Image.php | 152 +++++++++++++----- .../Module/CDev/AmazonS3Images/Core/S3.php | 92 ++++++++++- .../CDev/AmazonS3Images/Model/Base/Image.php | 115 +++++++++++++ 3 files changed, 317 insertions(+), 42 deletions(-) diff --git a/src/classes/XLite/Model/Base/Image.php b/src/classes/XLite/Model/Base/Image.php index 0fefa7d6c4..ea36bee57c 100644 --- a/src/classes/XLite/Model/Base/Image.php +++ b/src/classes/XLite/Model/Base/Image.php @@ -102,47 +102,6 @@ public function getFrontURL() return (!$this->getRepository()->isCheckImage() || $this->checkImageHash()) ? parent::getFrontURL() : null; } - /** - * Get resized image URL - * - * @param integer $width Width limit OPTIONAL - * @param integer $height Height limit OPTIONAL - * - * @return array (new width + new height + URL) - * @see ____func_see____ - * @since 1.0.0 - */ - public function getResizedURL($width = null, $height = null) - { - $size = ($width ?: 'x') . '.' . ($height ?: 'x'); - $name = $this->getId() . '.' . $this->getExtension(); - $path = $this->getRepository()->getFileSystemCacheRoot($size) . $name; - - $url = \XLite::getInstance()->getShopURL( - $this->getRepository()->getWebCacheRoot($size) . '/' . $name, - \XLite\Core\Request::getInstance()->isHTTPS() - ); - - if (\Includes\Utils\FileManager::isFile($path) && $this->getDate() < filemtime($path)) { - list($newWidth, $newHeight) = \XLite\Core\ImageOperator::getCroppedDimensions( - $this->getWidth(), - $this->getHeight(), - $width, - $height - ); - - } else { - $operator = new \XLite\Core\ImageOperator($this); - list($newWidth, $newHeight, $result) = $operator->resizeDown($width, $height); - - if (false === $result || !\Includes\Utils\FileManager::write($path, $operator->getImage())) { - $url = $this->getURL(); - } - } - - return array($newWidth, $newHeight, $url); - } - /** * Check - image hash is equal data from DB or not * @@ -243,4 +202,115 @@ protected function renewByPath($path) return $result; } + + // {{{ Resized icons + + /** + * Get resized image URL + * + * @param integer $width Width limit OPTIONAL + * @param integer $height Height limit OPTIONAL + * + * @return array (new width + new height + URL) + * @see ____func_see____ + * @since 1.0.0 + */ + public function getResizedURL($width = null, $height = null) + { + $size = ($width ?: 'x') . '.' . ($height ?: 'x'); + $name = $this->getId() . '.' . $this->getExtension(); + $path = $this->getResizedPath($size, $name); + + $url = $this->getResizedPublicURL($size, $name); + + if ($this->isResizedIconAvailable($path)) { + list($newWidth, $newHeight) = \XLite\Core\ImageOperator::getCroppedDimensions( + $this->getWidth(), + $this->getHeight(), + $width, + $height + ); + + } else { + $result = $this->resizeIcon($width, $height, $path); + if ($result) { + list($newWidth, $newHeight) = $result; + + } else { + $url = $this->getURL(); + } + } + + return array($newWidth, $newHeight, $url); + } + + /** + * Get resized file system path + * + * @param string $size Size prefix + * @param string $name File name + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getResizedPath($size, $name) + { + return $this->getRepository()->getFileSystemCacheRoot($size) . $name; + } + + /** + * Get resized file public URL + * + * @param string $size Size prefix + * @param string $name File name + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getResizedPublicURL($size, $name) + { + return \XLite::getInstance()->getShopURL( + $this->getRepository()->getWebCacheRoot($size) . '/' . $name, + \XLite\Core\Request::getInstance()->isHTTPS() + ); + } + + /** + * Check - resized icon is available or not + * + * @param string $path Resized image path + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function isResizedIconAvailable($path) + { + return \Includes\Utils\FileManager::isFile($path) && $this->getDate() < filemtime($path); + } + + /** + * Resize icon + * + * @param integer $width Destination width + * @param integer $height Destination height + * @param string $path Write path + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function resizeIcon($width, $height, $path) + { + $operator = new \XLite\Core\ImageOperator($this); + list($newWidth, $newHeight, $result) = $operator->resizeDown($width, $height); + + return false !== $result && \Includes\Utils\FileManager::write($path, $operator->getImage()) + ? array($newWidth, $newHeight) + : null; + } + + // }}} } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php index 6b7307979d..eccc5146fa 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php @@ -157,7 +157,10 @@ public function copy($from, $to, array $httpHeaders = array()) public function read($path) { try { - $result = $this->client->getObject(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $path); + $result = $this->client->getObject( + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path + ); } catch (\S3Exception $e) { $result = false; @@ -193,6 +196,93 @@ public function delete($path) return $result; } + /** + * Delete directory + * + * @param string $path Short path + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function deleteDirectory($path) + { + $result = false; + try { + foreach ($this->readDirectory($path) as $k => $v) { + $this->client->deleteObject(\XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, $k); + } + $result = $this->delete($path); + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + + return $result; + } + + /** + * Read directory + * + * @param string $path Short path + * + * @return array + * @see ____func_see____ + * @since 1.0.19 + */ + public function readDirectory($path) + { + try { + $result = $this->client->getObject( + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path + ); + + } catch (\S3Exception $e) { + $result = array(); + \XLite\Logger::getInstance()->registerException($e); + } + + return $result; + } + + /** + * Check - path is directory or not + * + * @param string $path Short path + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function isDir($path) + { + $result = false; + try { + $result = $this->client->getObjectInfo( + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path + ); + + if (is_array($result)) { + $result = $result['type'] == 'binary/octet-stream'; + + } else { + $result = (bool)$this->client->getBucket( + \XLite\Core\Config::getInstance()->CDev->AmazonS3Images->bucket, + $path + ); + } + + } catch (\S3Exception $e) { + $result = false; + \XLite\Logger::getInstance()->registerException($e); + } + + return $result; + } + /** * Get URL by short path * diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php index e5e709354e..94640e8cb0 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php @@ -43,6 +43,17 @@ abstract class Image extends \XLite\Model\Base\Image implements \XLite\Base\IDec const IMAGES_NAMESPACE = 'images'; + /** + * S3 icons cache + * + * @var array + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="array", nullable=true) + */ + protected $s3icons = array(); + /** * AWS S3 client * @@ -271,6 +282,12 @@ public function removeFile($path = null) { if (self::STORAGE_S3 == $this->getStorageType()) { $this->getS3()->delete($this->getStoragePath($path)); + if ($this->getId()) { + $dir = $this->getStoragePath('icon/' . $this->getId()); + if ($this->getS3()->isDir($dir)) { + $this->getS3()->deleteDirectory($dir); + } + } } else { parent::removeFile($path); @@ -380,4 +397,102 @@ protected function generateS3Path($path = null) } // }}} + + // {{{ Resize icon + + /** + * Get resized file system path + * + * @param string $size Size prefix + * @param string $name File name + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getResizedPath($size, $name) + { + return $this->getS3() + ? $this->generateS3Path('icon/' . $this->getId() . '/' . $size . '.' . $this->getExtension()) + : parent::getResizedPath($size, $name); + } + + /** + * Get resized file public URL + * + * @param string $size Size prefix + * @param string $name File name + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getResizedPublicURL($size, $name) + { + return $this->getS3() + ? $this->getS3()->getURL($this->getResizedPath($size, $name)) + : parent::getResizedPublicURL($size, $name); + } + + /** + * Check - resized icon is available or not + * + * @param string $path Resized image path + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function isResizedIconAvailable($path) + { + $icons = $this->getS3Icons(); + + return ($this->getS3() && $icons) + ? !empty($icons[$path]) + : parent::isResizedIconAvailable($path); + } + + /** + * Resize icon + * + * @param integer $width Destination width + * @param integer $height Destination height + * @param string $path Write path + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + protected function resizeIcon($width, $height, $path) + { + $result = null; + + if ($this->getS3()) { + $operator = new \XLite\Core\ImageOperator($this); + list($newWidth, $newHeight, $r) = $operator->resizeDown($width, $height); + + if (false !== $r) { + $basename = $this->getFileName() ?: basename($this->getPath()); + $headers = array( + 'Content-Type' => $this->getMime(), + 'Content-Disposition' => 'inline; filename="' . $basename . '"', + ); + + if ($this->getS3()->write($path, $operator->getImage(), $headers)) { + $icons = $this->getS3Icons(); + $icons[$path] = true; + $this->setS3Icons($icons); + \XLite\Core\Database::getEM()->flush(); + $result = array($newWidth, $newHeight); + } + } + + } else { + $result = parent::resizeIcon($width, $height, $path); + } + + return $result; + } + + // }}} } From e89bc8ede14be5f58158e7e18fecd9cda4290556 Mon Sep 17 00:00:00 2001 From: "Sergei V. Fundaev" Date: Thu, 14 Jun 2012 18:03:56 +0300 Subject: [PATCH 082/562] E:0041260 [*] New labels have been translated. --- .../XLite/Module/CDev/DeTranslation/Main.php | 4 +- .../Module/CDev/DeTranslation/install.yaml | 164 +++++++- .../XLite/Module/CDev/FrTranslation/Main.php | 8 +- .../Module/CDev/FrTranslation/install.yaml | 166 +++++++- .../XLite/Module/CDev/RuTranslation/Main.php | 8 +- .../Module/CDev/RuTranslation/install.yaml | 380 ++++++++++++------ 6 files changed, 578 insertions(+), 152 deletions(-) diff --git a/src/classes/XLite/Module/CDev/DeTranslation/Main.php b/src/classes/XLite/Module/CDev/DeTranslation/Main.php index 52f4e5a107..09c360a7ce 100644 --- a/src/classes/XLite/Module/CDev/DeTranslation/Main.php +++ b/src/classes/XLite/Module/CDev/DeTranslation/Main.php @@ -73,7 +73,7 @@ public static function getModuleName() */ public static function getMinorVersion() { - return '1'; + return '2'; } /** @@ -104,7 +104,7 @@ public static function runBuildCacheHandler() $language->setEnabled(true); \XLite\Core\Database::getRepo('\XLite\Model\Language')->update($language); - + \XLite\Core\TopMessage::addInfo( 'The X language has been added and enabled successfully', array('language' => $language->getName()), diff --git a/src/classes/XLite/Module/CDev/DeTranslation/install.yaml b/src/classes/XLite/Module/CDev/DeTranslation/install.yaml index aa6b522421..7053405a9a 100644 --- a/src/classes/XLite/Module/CDev/DeTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/DeTranslation/install.yaml @@ -14,6 +14,8 @@ XLite\Model\Language: XLite\Model\Config: directives: { addModel: 'XLite\Model\ConfigTranslation' } + - { name: 'add_on_mode', category: 'General', translations: [{ code: 'de', option_name: 'Kassenbetriebsart' }] } + - { name: 'add_on_mode_page', category: 'General', translations: [{ code: 'de', option_name: 'Kassenbetriebsart - Hauptseite' }] } - { name: 'admin_presentation', category: 'General', translations: [{ code: 'de', option_name: 'Adminbereich Einstellungen' }] } - { name: 'admin_security', category: 'Security', translations: [{ code: 'de', option_name: 'HTTPS im Adminbereich verwenden' }] } - { name: 'anonymous', category: 'Shipping', translations: [{ code: 'de', option_name: 'Die vorgegebene Kundenlieferadresse' }] } @@ -47,6 +49,7 @@ XLite\Model\Config: - { name: 'direct_product_url', category: 'General', translations: [{ code: 'de', option_name: 'Direkter URL-Zugriff zu den Artikeln der deaktivierten Kategorien' }] } - { name: 'display_check_number', category: 'General', translations: [{ code: 'de', option_name: 'Die Prüfzahl für die eCheck-Zahlungsart zeigen' }] } - { name: 'drupal_root_url', category: 'CDev\DrupalConnector', translations: [{ code: 'de', option_name: 'JS und CSS Ressourcen in der Drupal 6.x Art herabsetzen' }] } + - { name: 'enable_anon_checkout', category: 'General', translations: [{ code: 'de', option_name: 'Anonymer Checkout aktivieren' }] } - { name: 'enable_init_order_notif', category: 'Email', translations: [{ code: 'de', option_name: 'Die Bestelldaten zum Vertrieb, nach der Auftragserteilung, mailen' }] } - { name: 'enable_init_order_notif_customer', category: 'Email', translations: [{ code: 'de', option_name: 'Die Bestelldaten zu den Kunden, nach der Auftragserteilung, mailen' }] } - { name: 'fb_admins', category: 'CDev\GoSocial', translations: [{ code: 'de', option_name: 'Facebook-Administratoren', option_comment: 'Die durch Komma getrennte Liste der Facebooknutzer-ID der Seitenadministratoren. Tragen Sie mindest Ihre Facebook-ID ein.' }] } @@ -83,6 +86,7 @@ XLite\Model\Config: - { name: 'minimal_order_amount', category: 'General', translations: [{ code: 'de', option_name: 'Minimale erlaubte Gesamtsumme' }] } - { name: 'number_of_bestsellers', category: 'CDev\Bestsellers', translations: [{ code: 'de', option_name: 'Die Produktmenge in der Bestsellerliste' }] } - { name: 'operation_presentation', category: 'General', translations: [{ code: 'de', option_name: 'Verwaltung und Betrieb' }] } + - { name: 'order_starting_number', category: 'General', translations: [{ code: 'de', option_name: 'Initiale Bestellnummer' }] } - { name: 'orders_department', category: 'Company', translations: [{ code: 'de', option_name: 'Verkaufsabteilung EMail' }] } - { name: 'orders_per_page', category: 'General', translations: [{ code: 'de', option_name: 'Bestellungen pro Seite' }] } - { name: 'product_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'de', option_name: 'Die Häufigkeit für die Produktlseite ändern' }] } @@ -93,10 +97,11 @@ XLite\Model\Config: - { name: 'recent_orders', category: 'General', translations: [{ code: 'de', option_name: 'Das Auftragsvolumen in der neuesten Bestellliste' }] } - { name: 'redirect_to_cart', category: 'General', translations: [{ code: 'de', option_name: 'Nach der Produktauswahl, ein Kunde zum Warenkorb umleiten' }] } - { name: 'sale_enabled', category: 'CDev\Sale', translations: [{ code: 'de', option_name: 'Der Block "Güterangebot" im Internet-Schaufenster anzeigen' }] } - - { name: 'sale_max_count_in_block', category: 'CDev\Sale', translations: [{ code: 'de', option_name: 'Die Höchstzahl der im Block "Güterangebot" zu zeigenden Artikel', option_comment: 'Die Höchstzahl der im Block "Güterangebot" anzuzeigenden Artikel. Geben Sie 0 an, um alle Artikel im Block anzuzeigen. Die Einstellungen des Drupal-Blocks können diese Option überschreiben (wenn der Drupal-Verbinder Modul aktiviert ist).' }] } - - { name: 'sale_menu', category: 'CDev\Sale', translations: [{ code: 'de', option_name: 'Anzeige des Blocks "Güterangebot" in', option_comment: 'Die Einstellungen des Drupal-Blocks können diese Option überschreiben (wenn der Drupal-Verbinder Modul aktiviert ist)' }] } + - { name: 'sale_max_count_in_block', category: 'CDev\Sale', translations: [{ code: 'de', option_name: 'Die Höchstzahl der im Block "Güterangebot" zu zeigenden Artikel', option_comment: 'Die Höchstzahl der im Block "Güterangebot" anzuzeigenden Artikel. Geben Sie 0 ein, um alle Artikel im Block anzuzeigen. Die Drupal-Einstellungen können diese Option überschreiben (wenn das Modul DrupalConnector aktiviert ist).' }] } + - { name: 'sale_menu', category: 'CDev\Sale', translations: [{ code: 'de', option_name: 'Anzeige des Blocks "Güterangebot" in', option_comment: 'Die Drupal-Einstellungen können diese Option überschreiben (wenn das Modul DrupalConnector aktiviert ist)' }] } - { name: 'shop_closed', category: 'General', translations: [{ code: 'de', option_name: 'Markieren, um den Shop vorübergehend zu schließen' }] } - { name: 'shop_currency', category: 'General', translations: [{ code: 'de', option_name: 'Shopwährung' }] } + - { name: 'show_thumbnails', category: 'General', translations: [{ code: 'de', option_name: 'Miniaturansichten in der Produktliste zeigen' }] } - { name: 'site_administrator', category: 'Company', translations: [{ code: 'de', option_name: 'Webseitenverwalter-E-Mail' }] } - { name: 'smtp_password', category: 'Email', translations: [{ code: 'de', option_name: 'Passwort' }] } - { name: 'smtp_security', category: 'Email', translations: [{ code: 'de', option_name: 'Sichere Verbindung' }] } @@ -124,6 +129,34 @@ XLite\Model\Config: - { name: 'weight_unit', category: 'General', translations: [{ code: 'de', option_name: 'Gewichtseinheit' }] } - { name: 'welcome_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'de', option_name: 'Die Häufigkeit für die Anfangsseite ändern' }] } - { name: 'welcome_priority', category: 'CDev\XMLSitemap', translations: [{ code: 'de', option_name: 'Priorität für die Anfangsseite', option_comment: 'Der Wert soll sich von 0 bis 1 bewegen' }] } + - { name: 'ttl', category: 'CDev\Egoods', translations: [{ code: 'de', option_name: 'Die Downloadlinklebensdauer (Tage)', option_comment: 'Geben 0 ein für der unbegrenzte Zugriff' }] } + - { name: 'attempts_limit', category: 'CDev\Egoods', translations: [{ code: 'de', option_name: 'Das Downloadlimits (pro bestellten Artikel)', option_comment: 'Geben 0 ein für der unbegrenzte Zugriff' }] } + - { name: 'sep_product_advisor_na', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Einstellungen des Blocks "Neues"' }] } + - { name: 'na_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Funktion "Neues" im Katalog aktivieren' }] } + - { name: 'na_max_days', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Anzahl vom Tage die Artikel sind als "Neues" markiert', option_comment: 'Geben einen Wert ungleich Null ein; anderenfalls wird "30 Tagen" verwendet' }] } + - { name: 'na_max_count_in_full_list', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die auf der vollständigen Neues-Liste anzuzeigende Höchstzahl der Artikel', option_comment: 'Limitiert die Gesamtzahl der Artikel, die angezeigt sind, sooft ein Kunde den Link "Alle Neues" im Block "Neues" klickt. Geben 0 ein für der unbegrenzte Zugriff.' }] } + - { name: 'na_mark_with_label', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Neue Artikel im Produktkatalog markieren', option_comment: 'Markiert alle Artikel auf allen Produktliste (außer die "Neues" Listen) mit dem Kennzeichen "Neu!"' }] } + - { name: 'na_show_in_sidebar', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Block "Neues" auf der Seitenleiste anzeigen (anders im Zentrum)' }] } + - { name: 'na_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Höchstzahl der Artikel im Block "Neues"', option_comment: 'Bestimmt die Höchstzahl der Artikel, die im Block "Neues" angezeigt werden. Geben einen Wert ungleich Null ein; anderenfalls wird 3 Artikel angezeigt. Wenn der eingegebene Wert weniger als die Gesamtzahl der Artikel auf der vollständigen "Neues" Liste ist, wird dieser Wert benutzt. Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'na_from_current_category', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Nur neue Artikel der angeschauten Kategorie anzeigen', option_comment: 'Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'sep_product_advisor_cs', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Einstellungen des Blocks "Demnächst verfügbar"' }] } + - { name: 'cs_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Block "Demnächst verfügbar" aktivieren' }] } + - { name: 'cs_mark_with_label', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die demnächst verfügbaren Artikeln im Produktkatalog markieren', option_comment: 'Markiert alle demnächst verfügbaren Artikeln auf allen Produktliste (außer die "Demnächst verfügbar" Listen) mit dem Kennzeichen "demnächst verfügbar"' }] } + - { name: 'cs_display_date', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Tag des Wareneingangs auf der Produktseite anzeigen' }] } + - { name: 'cs_from_current_category', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Nur "Demnächst verfügbar"-Artikel der angeschauten Kategorie anzeigen', option_comment: 'Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'cs_show_in_sidebar', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Block "Demnächst verfügbar" auf der Seitenleiste anzeigen (anders im Zentrum)', option_comment: 'Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'cs_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Höchstzahl der Artikel im Block "Demnächst verfügbar"', option_comment: 'Bestimmt die Höchstzahl der Artikel, die im Block "Demnächst verfügbar" angezeigt werden. Geben einen Wert ungleich Null ein; anderenfalls wird 3 Artikel angezeigt. Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'sep_product_advisor_rv', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Einstellungen des Bloks "Letztens gesehen"' }] } + - { name: 'rv_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Block "Letztens gesehen" in Produktkatalog anzeigen' }] } + - { name: 'rv_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Höchstzahl der Artikel im Block "Letzten gesehen"', option_comment: 'Bestimmt die Höchstzahl der Artikel, die im Block "Letztens gesehen" angezeigt werden. Geben 0 ein für der unbegrenzte Zugriff. Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'sep_product_advisor_cbb', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Einstellungen des Blocks "wer diesen Artikel gekauft hat, hat auch jenen gekauft"' }] } + - { name: 'cbb_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Block im Produktkatalog anzeigen' }] } + - { name: 'cbb_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Höchstzahl der Artikel im Block', option_comment: 'Bestimmt die Höchstzahl der Artikel, die im Block "wer diesen Artikel gekauft hat, hat auch jenen gekauft" angezeigt werden. Geben einen Wert ungleich Null ein; anderenfalls wird 3 Artikel angezeigt. Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'sep_product_advisor_cvb', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Einstellungen des Blocks "wer diesen Artikel angesehen hat, hat auch jenen gekauft"' }] } + - { name: 'cvb_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Den Block im Produktkatalog anzeigen' }] } + - { name: 'cvb_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'de', option_name: 'Die Höchstzahl der Artikel im Block', option_comment: 'Bestimmt die Höchstzahl der Artikel, die im Block "wer diesen Artikel angesehen hat, hat auch jenen gekauft" angezeigt werden. Geben einen Wert ungleich Null ein; anderenfalls wird 3 Artikel angezeigt. Die Drupal-Einstellungen können diese Option überschreiben, wenn das Modul DrupalConnector aktiviert ist.' }] } + - { name: 'display_prices_including_vat', category: 'CDev\VAT', translations: [{ code: 'de', option_name: 'Die Preise inklusive MwSt. im Produktkatalog zeigen' }] } + - { name: 'display_inc_vat_label', category: 'CDev\VAT', translations: [{ code: 'de', option_name: 'Die Bezeichnung "inkl. MwSt/exkl. MwSt" bei den Preisen zeigen', option_comment: 'Ist diese Option aktiviert, haben alle Preise im Produktkatalog ein Kennzeichen "inkl. MwSt/exkl. MwSt" je nachdem, ob alle Preise sind inklusiv der Mehrwertsteuer oder nicht. Wenn Sie wünschen dieses Kennzeichen nicht zeigen, sollen Sie die VAT-Informationen auf einigen Produktkatalog-Seiten geben, weil, ob die Preise sind inklusiv der Mehrwertsteuer oder nicht, soll allen Kunden klar sein' }] } XLite\Model\LanguageLabel: directives: { addModel: 'XLite\Model\LanguageLabelTranslation' } @@ -699,6 +732,7 @@ XLite\Model\LanguageLabel: - { name: 'Safe mode', translations: [{ code: 'de', label: 'Abgesichert Modus ' }] } - { name: 'Safe mode access key', translations: [{ code: 'de', label: 'Der Zugriffsschlüssel des abgesicherten Modus ' }] } - { name: 'Sale', translations: [{ code: 'de', label: 'Ausverkauf' }] } + - { name: 'sale', translations: [{ code: 'de', label: 'Ausverkauf' }] } - { name: 'Sale price', translations: [{ code: 'de', label: 'Verkaufspreis' }] } - { name: 'Sales', translations: [{ code: 'de', label: 'Vertrieb' }] } - { name: 'Sales tax', translations: [{ code: 'de', label: 'Verkaufssteuer' }] } @@ -904,7 +938,7 @@ XLite\Model\LanguageLabel: - { name: 'Title', translations: [{ code: 'de', label: 'Titel' }] } - { name: 'To fix this problem, do the following: 3 points', translations: [{ code: 'de', label: 'Um die Problem zu lösen, sollten Sie folgendes tun:
  • stellen Sie sicher, dass Ihr Hosting-Provider hat HTTPS aktiviert;
  • verifizieren Sie die HTTPS-Einstellungen (der Parameter "https_host" in der Datei "etc/config.php" smuss gültig sein);
  • laden Sie dieser Teite neu
' }] } - { name: 'To get the format of the import data you can export your products to a file', translations: [{ code: 'de', label: 'Um das Importdatenformat zu erhalten, können Sie die Artikel zu einer Datei exportieren, und den Dateiformat ansehen.' }] } - - { name: 'To place the order please accept Terms and Conditions', translations: [{ code: 'de', label: 'Um eine Bestellung aufzugeben, nehmen Sie die Geschäftsbedingungen an' }] } + - { name: 'To place the order please accept Terms and Conditions', translations: [{ code: 'de', label: 'Um eine Bestellung aufzugeben, akzeptieren Sie die Geschäftsbedingungen' }] } - { name: 'To place the order please complete the previous steps first', translations: [{ code: 'de', label: 'Um eine Bestellung aufzugeben, zuerst führen Sie die erste Schritt aus' }] } - { name: 'To recover your password, please type in the valid e-mail address you use as a login', translations: [{ code: 'de', label: 'Um Passwort wiederherzustellen, geben Sie Ihre korrekte Email-Adresse ein, die Sie als Log-in verwenden.' }] } - { name: 'To restore the images stored in the file system you have to copy them from the archive to the LiteCommerce catalog', translations: [{ code: 'de', label: 'Um, die Bilder im Dateisystem abgespeichert, wiederherzustellen, sollten Sie die Bilder vom Archiv zum LiteCommerce-Katalog kopieren, unter Berücksichtigung der Katalogstruktur.' }] } @@ -937,10 +971,10 @@ XLite\Model\LanguageLabel: - { name: 'Update profile', translations: [{ code: 'de', label: 'Profil aktualizieren' }] } - { name: 'Updates are available', translations: [{ code: 'de', label: 'Verfügbare Verbesserungen ' }] } - { name: 'Updates for the LC core and/or installed modules are available', translations: [{ code: 'de', label: 'Verfügbare Verbesserungen für den LC-Kern und/oder installierte Module ' }] } - - { name: 'Updates for your version', translations: [{ code: 'de', label: 'Verbesserungen für Ihre LC-Version' }] } + - { name: 'Updates for your version ({{version}})', translations: [{ code: 'de', label: 'Verbesserungen für Ihre LC-Version ({{version}})' }] } - { name: 'Upgrade', translations: [{ code: 'de', label: 'Upgrade' }] } - { name: 'Upgrade core', translations: [{ code: 'de', label: 'LC-Kern upgraden' }] } - - { name: 'Upgrade to version', translations: [{ code: 'de', label: 'Upgrade auf Version' }] } + - { name: 'Upgrade to version {{version}}', translations: [{ code: 'de', label: 'Upgrade auf Version {{version}}' }] } - { name: 'Upload', translations: [{ code: 'de', label: 'Hochladen' }] } - { name: 'Upload add-on', translations: [{ code: 'de', label: 'Add-on hochladen' }] } - { name: 'Upload and restore', translations: [{ code: 'de', label: 'Hochladen und umspeichern' }] } @@ -1068,17 +1102,17 @@ XLite\Model\LanguageLabel: - { name: 'Order', translations: [{ code: 'de', label: 'Bestellung' }] } - { name: 'Order details', translations: [{ code: 'de', label: 'Bestellinformationen' }] } - { name: 'Username verified. The password will be sent to your e-mail after the order is placed', translations: [{ code: 'de', label: 'Der Benutzername ist überprüft worden. Das Passwort wird an Ihre E-Mail Adresse gesendet werden, nachdem die Bestellung aufgegeben wird. ' }] } - - { name: 'License key has been successfully verified for "{{name}}" module by "{{author}}" author', translations: [{ code: 'de', label: 'Der Lizenzschlüssel des Moduls "{{name}}" ist erfolgreich überprüft worden vom Autor "{{author}}".' }] } + - { name: 'License key has been successfully verified for "{{name}}" module by "{{author}}" author', translations: [{ code: 'de', label: 'Der Lizenzschlüssel des Moduls "{{name}}" ist erfolgreich vom Autor "{{author}} überprüft worden".' }] } - { name: 'Response from marketplace is not received', translations: [{ code: 'de', label: 'Keine Rückmeldung ist vom Marktplatz erhalten worden' }] } - { name: 'Response from marketplace: ', translations: [{ code: 'de', label: 'Die Rückmeldung vom Marktplatz' }] } - { name: 'All products on sale', translations: [{ code: 'de', label: 'Alle Produkte zum Ausverkauf' }] } - { name: 'Old price', translations: [{ code: 'de', label: 'Der alte Preis ' }] } - - { name: 'Search for modules', translations: [{ code: 'de', label: 'Der Name des gesuchten Modul' }] } - - { name: 'Warning! There is not enough product items in stock to process the order', translations: [{ code: 'de', label: 'Hinweis! Die Produktmenge auf Lager ist nicht genug, um die Bestellung zu bearbeiten.' }] } + - { name: 'Search for modules', translations: [{ code: 'de', label: 'Modulsuche' }] } + - { name: 'Warning! There is not enough product items in stock to process the order', translations: [{ code: 'de', label: 'Hinweis! Der Warenbestand ist nicht genug, um die Bestellung zu bearbeiten. ' }] } - { name: 'Dear', translations: [{ code: 'de', label: 'Sehr geehrte(r)' }] } - - { name: 'Products information has been successfully updated', translations: [{ code: 'de', label: 'Die Produktinformation ist erfolgreich aktualisiert worden.' }] } - - { name: 'Are you sure you wish to delete the selected zones?', translations: [{ code: 'de', label: 'Sind Sie sicher, dass Sie den gewählten Zonen löschen möchten?' }] } - - { name: 'It is impossible to edit some user profile fields because your store currently works as an integration with Drupal and shares users with Drupal. Modifying these fields is possible via Drupal administrator interface.', translations: [{ code: 'de', label: 'Es ist unmöglich, einige Felder des Benutzerprofile zu ändern, weil Ihr Shop als eine Drupal-Integration funktioniert und Die Benutzer mit Drupal teilt. Diese Felder können im Drupal-Admin-Bereich geändert werden.' }] } + - { name: 'Products information has been successfully updated', translations: [{ code: 'de', label: 'Die Produktinformation ist erfolgreich aktualisiert worden. ' }] } + - { name: 'Are you sure you wish to delete the selected zones?', translations: [{ code: 'de', label: 'Sind Sie sicher, dass Sie die gewählten Zonen löschen möchten?' }] } + - { name: 'It is impossible to edit some user profile fields because your store currently works as an integration with Drupal and shares users with Drupal. Modifying these fields is possible via Drupal administrator interface.', translations: [{ code: 'de', label: 'Es ist unmöglich einige Benutzerprofilfelder zu ändern, denn der Shop funktioniert jetzt als die Drupal-Integration und teilt die Benutzer mit Drupal. Das Verändern diese Felder ist im Drupal-Adminbereich möglich.' }] } - { name: 'Test email configuration', translations: [{ code: 'de', label: 'E-Mail-Konfigurierung test' }] } - { name: 'From email', translations: [{ code: 'de', label: 'Anschrift des Absenders' }] } - { name: 'To email', translations: [{ code: 'de', label: 'Anschrift des Empfängers' }] } @@ -1086,3 +1120,111 @@ XLite\Model\LanguageLabel: - { name: 'Send test email', translations: [{ code: 'de', label: 'Einen Test-Email senden' }] } - { name: 'not installed', translations: [{ code: 'de', label: 'Nicht installiert' }] } - { name: 'Install', translations: [{ code: 'de', label: 'Installieren' }] } + - { name: 'Drupal frontend', translations: [{ code: 'de', label: 'Drupal-Frontend' }] } + - { name: 'Return to Drupal', translations: [{ code: 'de', label: 'Zurück zu Drupal' }] } + - { name: 'Username or e-mail', translations: [{ code: 'de', label: 'Benutzername oder E-Mail' }] } + - { name: 'View update log', translations: [{ code: 'de', label: 'Das Update-Protokoll ansehen' }] } + - { name: 'Do not close this page!', translations: [{ code: 'de', label: 'Schließen Sie diese Seite nicht!' }] } + - { name: 'Disable suspicious modules', translations: [{ code: 'de', label: 'Die verdächtigen Module deaktivieren' }] } + - { name: 'Disable all modules in the system', translations: [{ code: 'de', label: 'Alle Module des Systems deaktivieren' }] } + - { name: 'soft reset', translations: [{ code: 'de', label: 'Soft Reset' }] } + - { name: 'hard reset', translations: [{ code: 'de', label: 'Hard Reset' }] } + - { name: 'Restore last backup', translations: [{ code: 'de', label: 'Das aktuellste Backup wiederherstellen' }] } + - { name: 'should be performed manually', translations: [{ code: 'de', label: 'sollte manuell ausgeführt werden' }] } + - { name: 'Updated components', translations: [{ code: 'de', label: 'Upgedated Komponenten' }] } + - { name: 'The upgrade is completed. Please, do not close this page until you check your web site and check that everything works properly', translations: [{ code: 'de', label: 'Das Upgrade ist beendet. Bitte, schließen Sie diese Seite nicht, bis Sie den Shop prüfen und sichergehen, dass Der Shop richtig arbeitet.' }] } + - { name: 'Yes, I agree with License agreement', translations: [{ code: 'de', label: 'Lizenzvereinbarung akzeptieren' }] } + - { name: 'Logged as', translations: [{ code: 'de', label: 'Angemeldet als' }] } + - { name: 'Added to cart', translations: [{ code: 'de', label: 'zum Warenkorb hinzugefügt' }] } + - { name: 'Click to unblock', translations: [{ code: 'de', label: 'Klicken für Entblockung' }] } + - { name: 'Activate your paid module license', translations: [{ code: 'de', label: 'Die bezahlte Softwaremodul-Lizenz aktivieren' }] } + - { name: 'Promotions', translations: [{ code: 'de', label: 'Verkaufsaktion' }] } + - { name: 'Discount', translations: [{ code: 'de', label: 'Rabatt' }] } + - { name: 'Coupons', translations: [{ code: 'de', label: 'Rabatt-Coupons' }] } + - { name: 'Add discount', translations: [{ code: 'de', label: 'Rabatt gewähren' }] } + - { name: 'Volume discounts', translations: [{ code: 'de', label: 'Volumenrabatte ' }] } + - { name: 'New discount coupon', translations: [{ code: 'de', label: 'Neuer Rabatt-Coupon' }] } + - { name: 'Display prices in catalog including VAT', translations: [{ code: 'de', label: 'Die Preise inklusive MwSt. im Produktkatalog zeigen' }] } + - { name: 'Display ''inc/ex VAT'' labels next to prices', translations: [{ code: 'de', label: 'Die Bezeichnung "inkl. MwSt/exkl. MwSt" bei den Preisen zeigen' }] } + - { name: 'On product details only', translations: [{ code: 'de', label: 'Nur auf der Produktdaten-Seite' }] } + - { name: 'On all catalog pages', translations: [{ code: 'de', label: 'Auf allen Produktkatalog-Seiten' }] } + - { name: 'Secure connection cannot be established.', translations: [{ code: 'de', label: 'Die sichere Verbindung kann nicht aufgebaut werden' }] } + - { name: 'Have a discount coupon?', translations: [{ code: 'de', label: 'Sie haben bereits einen Rabatt-Coupon?' }] } + - { name: 'Enter coupon code', translations: [{ code: 'de', label: 'Geben Sie die Abzugskennziffer ein' }] } + - { name: 'There is no such a coupon, please check the spelling: X', translations: [{ code: 'de', label: 'Es gibt hier keinen solchen Rabatt-Coupon, bitte, prüfen Sie die Rechtschreibung:"{{code}}"' }] } + - { name: 'Date: newest first', translations: [{ code: 'de', label: 'Datum: vom Neuen zum Alten' }] } + - { name: 'Date: oldest first', translations: [{ code: 'de', label: 'Datum: vom Alten zum Neuen' }] } + - { name: 'LiteCommerce core version', translations: [{ code: 'de', label: 'Die Litecommerce-Kern-Version' }] } + - { name: 'Thank you for your order FOOTER', translations: [{ code: 'de', label: 'Vielen Dank für Ihre Bestellung in unserem Shop! Bitte, kommen Sie wieder bald!' }] } + - { name: 'Get X off for order amount over Y', translations: [{ code: 'de', label: 'Erhalten Sie {{X}} Skonto vom Bestellbetrag über {{Y}} ' }] } + - { name: 'Have more coupons', translations: [{ code: 'de', label: 'Sie haben mehr Rabatt-Coupons' }] } + - { name: 'Have more coupons?', translations: [{ code: 'de', label: 'Sie haben mehr Rabatt-Coupons?' }] } + - { name: 'Limit number of uses', translations: [{ code: 'de', label: 'Die Anzahl von Benutzungen befristen ' }] } + - { name: 'Maximum number of uses', translations: [{ code: 'de', label: 'Die Maximalzahl von Benutzungen' }] } + - { name: 'Maximum order subtotal must be greater than minimum order subtotal', translations: [{ code: 'de', label: 'Die höchste Zwischensumme muss größer als die minimale Zwischensumme sein' }] } + - { name: 'Maximum order subtotal the coupon can be applied to', translations: [{ code: 'de', label: 'Die höchste Zwischensumme, für welcher ein Rabatt-Coupon verwendet wird' }] } + - { name: 'Minimum order subtotal must be less than maximum order subtotal', translations: [{ code: 'de', label: 'Die minimale Zwischensumme muss weniger als die höchste Zwischensumme sein' }] } + - { name: 'Moneybookers Quick Checkout enables you to take direct payment from credit cards, debit cards and over 60 other local payment options in over 200 countries as well as the Moneybookers eWallet.', translations: [{ code: 'de', label: 'Moneybookers Quick Checkout ermöglicht direkteZahlungsannahme von Kreditkarten, Debitkarten und mehr als 60 anderen örtlichen Zahlungsarten in über 200 Ländern inklusive Moneybookers-eWallet. Die wettbewerbsintensiv Service-Raten erscheinen auf der Moneybookers-Website www.moneybookers.com' }] } + - { name: 'New arrivals', translations: [{ code: 'de', label: 'Neuankömmlinge' }] } + - { name: 'New!', translations: [{ code: 'de', label: 'Neue!' }] } + - { name: 'No modules found for search_string', translations: [{ code: 'de', label: 'Keine Module gefunden über \"{{search_string}}\"' }] } + - { name: 'Occurred X add product events', translations: [{ code: 'de', label: 'Das Hinzufügen der {{new}} Artikel ist vorgekommen' }] } + - { name: 'Occurred X add product events and Y update product events', translations: [{ code: 'de', label: 'Das Hinzufügen der {{new}} Artikel ist vorgekommen und das Update der {{old}} Artikel ist vorgekommen' }] } + - { name: 'Occurred Y update product events', translations: [{ code: 'de', label: 'Das Update der {{old}} Artikel ist vorgekommen' }] } + - { name: 'Period end date must be later than period start date', translations: [{ code: 'de', label: 'Das Enddatum des Zeitraums muss später als das Anfangsdatum des Zeitraums sein.' }] } + - { name: 'Period start date must be sooner than period end date', translations: [{ code: 'de', label: 'Das Anfangsdatum des Zeitraums muss früher als das Enddatum des Zeitraums sein' }] } + - { name: 'Recently viewed', translations: [{ code: 'de', label: 'Letztens gesehen' }] } + - { name: 'To have access to the International payment network of Moneybookers please register here for a free account if you don''t have one yet.', translations: [{ code: 'de', label: 'Bitte eröffnen Sie Ihr Gratis-Moneybookers-Konto here, um den vollen Access zum internationalen Moneybookers-Bezahlnetzwerk zu bekommen.' }] } + - { name: 'To use the coupon, your order subtotal must be at least X', translations: [{ code: 'de', label: 'Der Rabatt-Coupon ist verwendbar, wenn die Zwischensumme mindest {{min}} ist.' }] } + - { name: 'To use the coupon, your order subtotal must be between X and Y', translations: [{ code: 'de', label: 'Der Rabatt-Coupon ist verwendbar, wenn die Zwischensumme zwischen {{min}} und {{max}} ist.' }] } + - { name: 'To use the coupon, your order subtotal must not exceed Y', translations: [{ code: 'de', label: 'Der Rabatt-Coupon ist verwendbar, wenn die Zwischensumme nicht größer als {{max}} ist.' }] } + - { name: 'X product(s) has been created', translations: [{ code: 'de', label: '{{count}} Artikel sind hinzugefügt worden' }] } + - { name: 'X product(s) has been removed', translations: [{ code: 'de', label: '{{count}} Artikel sind gelöscht worden' }] } + - { name: 'You have already used the coupon', translations: [{ code: 'de', label: 'Sie haben das Rabatt-Coupon schon verwendet.' }] } + - { name: 'You have sent a request for activation on the X.', translations: [{ code: 'de', label: 'Sie haben einen Gesuch auf Eingabe {{date}} am eingereicht. Bitte, beachten Sie, dass die Verifikation kann 72 Stunden dauern. Moneybookers wird kontaktieren Sie, sobald die Verifikation beendet ist. Nach der Aufnahme, wird Moneybookers Sie in die neue Sektion "Merchant Tools" im Ihren Moneybookers-Account einlassen. Bitte wählen Sie ein Geheimwort (anders als Ihr Passwort) und geben Sie das Wort in der nachstehend aufgeführte Sektion um mit Moneybookers zu verbinden. Das geheimwort ist der letzte Aktivierungsschritt. Das Geheimwort verschlüsselt Ihre Zahlungen. Nach der erfolgreichen Eingabe, sind Sie bereit alle Moneybookers-Direktzahlungsoptionen zu benutzen.' }] } + - { name: 'Your order has been processed', translations: [{ code: 'de', label: 'Ihre Bestellung #{{id}} ist bearbeitet worden.' }] } + - { name: 'Your order has failed', translations: [{ code: 'de', label: 'Ihre Bestellung #{{id}} hat gescheitert.' }] } + - { name: 'excl.VAT', translations: [{ code: 'de', label: 'exkl. {{name}}' }] } + - { name: 'incl.VAT', translations: [{ code: 'de', label: 'inkl. {{name}}' }] } + - { name: 'percent X off', translations: [{ code: 'de', label: 'der Rabatt von {{percent}} %' }] } + - { name: 'X entities has been created', translations: [{ code: 'de', label: '{{count}} Rabatte sind hinzugefügt worden' }] } + - { name: 'X entities has been removed', translations: [{ code: 'de', label: '{{count}} Rabatte sind gelöscht worden' }] } + - { name: 'All customers', translations: [{ code: 'de', label: 'Alle Kunden' }] } + - { name: 'Comment', translations: [{ code: 'de', label: 'Kommentar' }] } + - { name: 'This comment will be visisble to shop administrators only', translations: [{ code: 'de', label: 'Der Kommentar wird nur zum Shop-Administrator einsehbar sein' }] } + - { name: 'Discount type', translations: [{ code: 'de', label: 'Rabatttyp' }] } + - { name: 'Discount amount', translations: [{ code: 'de', label: 'Minderungsbetrag' }] } + - { name: 'Active from', translations: [{ code: 'de', label: 'Aktiv von' }] } + - { name: 'Active till', translations: [{ code: 'de', label: 'Aktiv bis' }] } + - { name: 'Subtotal range (begin)', translations: [{ code: 'de', label: 'Umfang von der Zwischensumme (Beginn)' }] } + - { name: 'Subtotal range (end)', translations: [{ code: 'de', label: 'Umfang von der Zwischensumme (Ende)' }] } + - { name: 'Limit the number of uses', translations: [{ code: 'de', label: 'Die Anzahl der Verwendungen begrenzen' }] } + - { name: 'Memberships', translations: [{ code: 'de', label: 'Mitgliedschaften' }] } + - { name: 'Date when customers can start using the coupon', translations: [{ code: 'de', label: 'Der Anfangstermin des Rabatt-Coupon' }] } + - { name: 'Date when the coupon expires', translations: [{ code: 'de', label: 'Das Auslaufdatum des Rabatt-Coupon' }] } + - { name: 'Minimum order subtotal the coupon can be applied to', translations: [{ code: 'de', label: 'Die Mindest-Zwischensumme, auf der ein Rabatt-Coupon angewendet kann' }] } + - { name: 'Coupon discount can be limited to these product classes', translations: [{ code: 'de', label: 'Der Rabatt-Coupon kann auf diese Produktklassen begrenzt werden' }] } + - { name: 'Coupon discount can be limited to customers with these membership levels', translations: [{ code: 'de', label: 'Der Rabatt-Coupon kann auf die Kunden, die diese Mitgliedschaften haben, begrenzt werden' }] } + - { name: 'The maximum number of uses', translations: [{ code: 'de', label: 'Die Höchstzahl der Verwendungen' }] } + - { name: 'Uses left', translations: [{ code: 'de', label: 'Verwendungen übrig' }] } + - { name: 'Uses count', translations: [{ code: 'de', label: 'Auszählung der Verwendungen' }] } + - { name: 'Coupon code', translations: [{ code: 'de', label: 'die Abzugskennziffer' }] } + - { name: 'X coupon(s) has been removed', translations: [{ code: 'de', label: '{{count}} Rabatt-Coupon(s) ist (sind) gelöscht worden' }] } + - { name: 'X coupon(s) has been created', translations: [{ code: 'de', label: '{{count}} Rabatt-Coupon(s) ist (sind) hinzugefügt worden' }] } + - { name: 'The coupon has been added', translations: [{ code: 'de', label: 'Der Rabatt-Coupon ist erfolgreich hinzugefügt worden.' }] } + - { name: 'The coupon has been applied to your order', translations: [{ code: 'de', label: 'Der Rabatt-Coupon ist erfolgreich auf Ihrer Bestellung anwendet worden' }] } + - { name: 'Coupon discount', translations: [{ code: 'de', label: 'Das Rabatt mittels eines Rabatt-Coupon' }] } + - { name: '$ off', translations: [{ code: 'de', label: '$ Rabatt' }] } + - { name: 'Coming soon', translations: [{ code: 'de', label: 'Demnächst verfügbar' }] } + - { name: 'All newest products', translations: [{ code: 'de', label: 'Alle neuesten Artikel' }] } + - { name: 'All upcoming products', translations: [{ code: 'de', label: 'Alle künftigen Artikel' }] } + - { name: 'Customers who bought this product also bought', translations: [{ code: 'de', label: 'Die Kunden, die diesen Artikel gekauft haben, haben auch diesen erworben ' }] } + - { name: 'Customers who viewed this product bought', translations: [{ code: 'de', label: 'Die Kunden, die diesen Artikel angesehen haben, haben auch diesen gekauft ' }] } + - { name: 'An upgrade is a dangerous process that may result in a crashed website. It is strongly recommended to create a full back up of your shop (the code and the database) and download it to a local computer before proceeding to the next step.', translations: [{ code: 'de', label: 'Das Upgrade ist ein gefährlicher Prozess, der zum Absturz führen kann. Es wird dringend empfohlen, dass Sie ein vollständiger Backup machen (des Codes und der datenbank), und ihn zum Computer downloaden, vor dem nächsten Schritt.' }] } + - { name: 'After the upgrade is completed please check your website. If you find that the site is inoperative, please try to do the following', translations: [{ code: 'de', label: 'Nachdem das Upgrade beendet ist, bitte prüfen Sie die Website. Wenn die Website nicht funktioniert, unternehmen Sie die folgenden Schritte ' }] } + - { name: 'Please save the soft reset and hard reset links so that you can use them later in case the website crash happens', translations: [{ code: 'de', label: 'Bitte speichern Sie die Hard-Reset- und Soft-Reset-Links, um sie später zu benutzen, falls die Website abstürzt.' }] } + - { name: 'Create a backup', translations: [{ code: 'de', label: 'Ein Back-up erstellen' }] } + - { name: 'Downloaded components', translations: [{ code: 'de', label: 'Heruntergeladene Komponenten' }] } + - { name: 'If there are some critical errors occured you can do the following', translations: [{ code: 'de', label: 'Wenn einige kritischer Fehler entstehen, unternehmen Sie die folgenden Schritte ' }] } + - { name: 'Loading...', translations: [{ code: 'de', label: 'Ladevorgang' }] } + - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'de', label: 'Ist diese Option aktiviert, haben alle Preise im Produktkatalog eine Bezeichnung "inkl. MwSt/exkl. MwSt" je nachdem, ob alle Preise sind inklusiv der Mehrwertsteuer oder nicht. Wenn Sie wünschen diese Bezeichnung nicht zeigen, sollen Sie die VAT-Informationen auf einigen Produktkatalog-Seiten geben, weil, ob die Preise sind inklusiv der Mehrwertsteuer oder nicht, soll allen Kunden klar sein.' }] } \ No newline at end of file diff --git a/src/classes/XLite/Module/CDev/FrTranslation/Main.php b/src/classes/XLite/Module/CDev/FrTranslation/Main.php index 3d52f0bec1..561f9b99b8 100644 --- a/src/classes/XLite/Module/CDev/FrTranslation/Main.php +++ b/src/classes/XLite/Module/CDev/FrTranslation/Main.php @@ -73,7 +73,7 @@ public static function getModuleName() */ public static function getMinorVersion() { - return '1'; + return '2'; } /** @@ -109,9 +109,9 @@ public static function runBuildCacheHandler() 'The X language has been added and enabled successfully', array('language' => $language->getName()), $language->getCode() - ); - } - + ); + } + \XLite\Core\Translation::getInstance()->reset(); } else { diff --git a/src/classes/XLite/Module/CDev/FrTranslation/install.yaml b/src/classes/XLite/Module/CDev/FrTranslation/install.yaml index c6d0325ae7..c1c2bdc2bd 100644 --- a/src/classes/XLite/Module/CDev/FrTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/FrTranslation/install.yaml @@ -14,6 +14,8 @@ XLite\Model\Language: XLite\Model\Config: directives: { addModel: 'XLite\Model\ConfigTranslation' } + - { name: 'add_on_mode', category: 'General', translations: [{ code: 'fr', option_name: 'Travailler en mode "bureau des commandes"' }] } + - { name: 'add_on_mode_page', category: 'General', translations: [{ code: 'fr', option_name: 'Page principale du bureau des commandes' }] } - { name: 'admin_presentation', category: 'General', translations: [{ code: 'fr', option_name: 'Paramètres de la zone d''Administrateur' }] } - { name: 'admin_security', category: 'Security', translations: [{ code: 'fr', option_name: 'Utilisez HTTPS dans la zone d''administrateur' }] } - { name: 'anonymous', category: 'Shipping', translations: [{ code: 'fr', option_name: 'Adresse de livraison client par défaut' }] } @@ -47,6 +49,7 @@ XLite\Model\Config: - { name: 'direct_product_url', category: 'General', translations: [{ code: 'fr', option_name: 'Autoriser l''accès par URL direct aux produits des catégories désactivées' }] } - { name: 'display_check_number', category: 'General', translations: [{ code: 'fr', option_name: 'Afficher le numéro de chèque pour méthode de paiement eCheck' }] } - { name: 'drupal_root_url', category: 'CDev\DrupalConnector', translations: [{ code: 'fr', option_name: 'URL racine de l''installation Drupal' }] } + - { name: 'enable_anon_checkout', category: 'General', translations: [{ code: 'fr', option_name: 'Autoriser la vérification sans inscription' }] } - { name: 'enable_init_order_notif', category: 'Email', translations: [{ code: 'fr', option_name: 'Envoyer les détails de commande au service commercial après le passage de commande' }] } - { name: 'enable_init_order_notif_customer', category: 'Email', translations: [{ code: 'fr', option_name: 'Envoyer les détails de commande aux clients après le passage des commandes' }] } - { name: 'fb_admins', category: 'CDev\GoSocial', translations: [{ code: 'fr', option_name: 'Administrateurs de Facebook', option_comment: 'La liste des ID utilisateur Facebook des administrateurs de page au format séparé par des virgules. Incluez au moins votre ID utilisateur Facebook.' }] } @@ -83,6 +86,7 @@ XLite\Model\Config: - { name: 'minimal_order_amount', category: 'General', translations: [{ code: 'fr', option_name: 'Total minimal autorisé de la commande' }] } - { name: 'number_of_bestsellers', category: 'CDev\Bestsellers', translations: [{ code: 'fr', option_name: 'Nombre de produits dans la liste des meilleures ventes' }] } - { name: 'operation_presentation', category: 'General', translations: [{ code: 'fr', option_name: 'Opération et maintenance' }] } + - { name: 'order_starting_number', category: 'General', translations: [{ code: 'fr', option_name: 'Numéro de commande initial' }] } - { name: 'orders_department', category: 'Company', translations: [{ code: 'fr', option_name: 'E-mail du service commercial' }] } - { name: 'orders_per_page', category: 'General', translations: [{ code: 'fr', option_name: 'Commandes par page' }] } - { name: 'product_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'fr', option_name: 'Changer la fréquence d''actualisation de page de produit' }] } @@ -97,6 +101,7 @@ XLite\Model\Config: - { name: 'sale_menu', category: 'CDev\Sale', translations: [{ code: 'fr', option_name: 'Afficher la page "Produits en vente" bloc', option_comment: 'Drupal paramètres de bloc peuvent remplacer cette option (lorsque le module DrupalConnector est activé).' }] } - { name: 'shop_closed', category: 'General', translations: [{ code: 'fr', option_name: 'Cochez pour fermer le magasin temporairement' }] } - { name: 'shop_currency', category: 'General', translations: [{ code: 'fr', option_name: 'Devise de magasin' }] } + - { name: 'show_thumbnails', category: 'General', translations: [{ code: 'fr', option_name: 'Afficher les vignettes dans la liste des produits' }] } - { name: 'site_administrator', category: 'Company', translations: [{ code: 'fr', option_name: 'E-mail de l''administrateur du site' }] } - { name: 'smtp_password', category: 'Email', translations: [{ code: 'fr', option_name: 'Mot de passe' }] } - { name: 'smtp_security', category: 'Email', translations: [{ code: 'fr', option_name: 'Connection sécurisée' }] } @@ -124,6 +129,34 @@ XLite\Model\Config: - { name: 'weight_unit', category: 'General', translations: [{ code: 'fr', option_name: 'Unité de poids ' }] } - { name: 'welcome_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'fr', option_name: 'Changer la fréquence d''actualisation de page d''accueil' }] } - { name: 'welcome_priority', category: 'CDev\XMLSitemap', translations: [{ code: 'fr', option_name: 'Priorité à la page d''accueil', option_comment: 'La valeur doit être comprise entre 0 et 1.' }] } + - { name: 'ttl', category: 'CDev\Egoods', translations: [{ code: 'fr', option_name: 'Durée de vie de lien de téléchargement (jours)', option_comment: 'définissez zéro pour accès illimité' }] } + - { name: 'attempts_limit', category: 'CDev\Egoods', translations: [{ code: 'fr', option_name: 'Téléchargements limite (pour 1 article commandé)', option_comment: 'définissez zéro pour accès illimité' }] } + - { name: 'sep_product_advisor_na', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Les paramètres de section "Les nouveautés" ' }] } + - { name: 'na_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Activer la "Nouveautés" fonctionnalité dans le catalogue' }] } + - { name: 'na_max_days', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre de jours pour considérer les produits marqués comme nouveautés', option_comment: 'Spécifiez une valeur différente de zéro, sinon 30 jours sera utilisé par défaut.' }] } + - { name: 'na_max_count_in_full_list', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre maximal de produits à afficher dans la liste des nouveautés ', option_comment: 'Limite le nombre total de produits qui peuvent être affichés lorsque l''utilisateur clique sur le "Tous les nouveautés" dans la "Nouveautés" section. Laissez 0 pour aucune limite.' }] } + - { name: 'na_mark_with_label', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Marquer nouveaux produits dans le catalogue', option_comment: 'Marquer nouveaux produits sur toutes les listes de produits (sauf "Nouveautés» listes) avec le "Nouveau!" label.' }] } + - { name: 'na_show_in_sidebar', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher section "Nouveautés" dans l''encadré (sinon dans la zone centrale)' }] } + - { name: 'na_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre maximal de produits à afficher dans section "Nouveautés"', option_comment: 'Définit le nombre maximum de produits qui peuvent être affichés dans la section "Nouveautés". Spécifiez une valeur différente de zéro, sinon, 3 produits seront affichés par défaut. Si la valeur spécifiée est inférieure à la quantité totale de produits sur la liste complète des nouveautés, cette valeur sera utilisée. Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé).' }] } + - { name: 'na_from_current_category', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher seulement les nouveaux produits qui viennent d'' être revus par client dans une catégorie particulière', option_comment: 'Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé ).' }] } + - { name: 'sep_product_advisor_cs', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Les paramètres de section "Les articles à venir bientôt"' }] } + - { name: 'cs_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Activer la fonctionnalité "Les articles à venir bientôt" dans le catalogue' }] } + - { name: 'cs_mark_with_label', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Marquer les produits à venir dans le catalogue', option_comment: 'Marquer les produits à venir dans toutes les listes de produits (à l''exception de listes "Les produits à venir ") avec le label "Coming soon ...".' }] } + - { name: 'cs_display_date', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher la date d''arrivée sur les pages des détails du produit' }] } + - { name: 'cs_from_current_category', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher dans la section "Les articles à venir bientôt" uniquement des produits qui viennent d'' être revus par client dans une catégorie particulière', option_comment: 'Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé ).' }] } + - { name: 'cs_show_in_sidebar', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher section "Les articles à venir bientôt" dans l''encadré (sinon dans la zone centrale)', option_comment: 'Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé ).' }] } + - { name: 'cs_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre maximal de produits à afficher dans section "Les articles à venir bientôt"', option_comment: 'Définit le nombre maximum de produits qui peuvent être affichés dans la section "Les produits à venir". Spécifiez une valeur différente de zéro, sinon, 3 produits seront affichés par défaut. Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé).' }] } + - { name: 'sep_product_advisor_rv', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Les paramètres de section "Vus récemment"' }] } + - { name: 'rv_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher la section "Vus récemment" dans le catalogue' }] } + - { name: 'rv_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre maximal de produits à afficher dans section "Vus récemment"', option_comment: 'Définit la quantité maximale de produits qui peuvent être affichés dans la section "Récemment vus". Laissez 0 pour aucune limite. Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé).' }] } + - { name: 'sep_product_advisor_cbb', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Les paramètres de section "Les clients qui ont acheté ce produit ont aussi commandé"' }] } + - { name: 'cbb_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher la section dans le catalogue' }] } + - { name: 'cbb_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre maximal de produits à afficher dans la section', option_comment: 'Définit le nombre maximum de produits qui peuvent être affichés dans la section "Les clients qui ont acheté ce produit ont aussi commandé". Spécifiez une valeur différente de zéro, sinon, 3 produits seront affichés par défaut. Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé).' }] } + - { name: 'sep_product_advisor_cvb', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Les paramètres de section "Les clients qui ont vu ce produit ont aussi vu"' }] } + - { name: 'cvb_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Afficher la section dans le catalogue' }] } + - { name: 'cvb_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'fr', option_name: 'Nombre maximal de produits à afficher dans la section', option_comment: 'Définit le nombre maximum de produits qui peuvent être affichés dans la section "Les clients qui ont vu ce produit ont aussi vu". Spécifiez une valeur différente de zéro, sinon, 3 produits seront affichés par défaut. Drupal paramètres peuvent remplacer cette option (lorsque DrupalConnector module est activé).' }] } + - { name: 'display_prices_including_vat', category: 'CDev\VAT', translations: [{ code: 'fr', option_name: 'Afficher les prix dans le catalogue, y compris la TVA' }] } + - { name: 'display_inc_vat_label', category: 'CDev\VAT', translations: [{ code: 'fr', option_name: 'Afficher "TTC/TVA non comprise" labels à côté des prix', option_comment: 'Si cette option est cochée tous les prix dans le catalogue seront affichés avec le label "TTC" ou "TVA non comprise" selon que la TVA est incluse dans le prix ou non. Si vous ne choisissez pas afficher ce label, il vous faut placer des informations à ce sujet quelque part sur les pages du catalogue comme cela doît être clair pour les clients.' }] } XLite\Model\LanguageLabel: directives: { addModel: 'XLite\Model\LanguageLabelTranslation' } @@ -699,6 +732,7 @@ XLite\Model\LanguageLabel: - { name: 'Safe mode', translations: [{ code: 'fr', label: 'Mode sans échec' }] } - { name: 'Safe mode access key', translations: [{ code: 'fr', label: 'Clé d''accès pour le mode sans échec' }] } - { name: 'Sale', translations: [{ code: 'fr', label: 'Vente' }] } + - { name: 'sale', translations: [{ code: 'fr', label: 'Vente' }] } - { name: 'Sale price', translations: [{ code: 'fr', label: 'Prix de vente' }] } - { name: 'Sales', translations: [{ code: 'fr', label: 'Ventes' }] } - { name: 'Sales tax', translations: [{ code: 'fr', label: 'Taxe de vente' }] } @@ -937,10 +971,10 @@ XLite\Model\LanguageLabel: - { name: 'Update profile', translations: [{ code: 'fr', label: 'Actualiser le profil' }] } - { name: 'Updates are available', translations: [{ code: 'fr', label: 'Les mises à jour sont disponibles' }] } - { name: 'Updates for the LC core and/or installed modules are available', translations: [{ code: 'fr', label: 'Il y a des mises à jour des modules installés et/ou de noyau LC' }] } - - { name: 'Updates for your version', translations: [{ code: 'fr', label: 'Mises à jour pour votre version' }] } + - { name: 'Updates for your version ({{version}})', translations: [{ code: 'fr', label: 'Mises à jour pour votre version ({{version}})' }] } - { name: 'Upgrade', translations: [{ code: 'fr', label: 'Mettre à jour' }] } - { name: 'Upgrade core', translations: [{ code: 'fr', label: 'Mettre à jour le noyau' }] } - - { name: 'Upgrade to version', translations: [{ code: 'fr', label: 'Mettre à niveau vers la version' }] } + - { name: 'Upgrade to version {{version}}', translations: [{ code: 'fr', label: 'Mettre à niveau vers la version {{version}}' }] } - { name: 'Upload', translations: [{ code: 'fr', label: 'Télécharger' }] } - { name: 'Upload add-on', translations: [{ code: 'fr', label: 'Télécharger le module' }] } - { name: 'Upload and restore', translations: [{ code: 'fr', label: 'Télécharger et restaurer' }] } @@ -1073,16 +1107,124 @@ XLite\Model\LanguageLabel: - { name: 'Response from marketplace: ', translations: [{ code: 'fr', label: 'Réponse de marché:' }] } - { name: 'All products on sale', translations: [{ code: 'fr', label: 'Tous produits en vente' }] } - { name: 'Old price', translations: [{ code: 'fr', label: 'Ancien prix' }] } - - { name: 'Search for modules', translations: [{ code: 'fr', label: 'Le nom du module souhaité' }] } - - { name: 'Warning! There is not enough product items in stock to process the order', translations: [{ code: 'fr', label: 'Attention! Il n''y a pas assez de points produits en stock pour traiter l''ordre' }] } - - { name: 'Dear', translations: [{ code: 'fr', label: 'cher' }] } - - { name: 'Products information has been successfully updated', translations: [{ code: 'fr', label: 'Produits d''information a été mis à jour' }] } + - { name: 'Search for modules', translations: [{ code: 'fr', label: 'Nom du module souhaité' }] } + - { name: 'Warning! There is not enough product items in stock to process the order', translations: [{ code: 'fr', label: 'Attention! La quantité d''articles du produit en stock n''est pas suffisant pour traiter la commande' }] } + - { name: 'Dear', translations: [{ code: 'fr', label: 'Cher' }] } + - { name: 'Products information has been successfully updated', translations: [{ code: 'fr', label: 'Les informations sur le produit ont été mis à jour avec succès.' }] } - { name: 'Are you sure you wish to delete the selected zones?', translations: [{ code: 'fr', label: 'Etes-vous sûr de vouloir supprimer les zones sélectionnées?' }] } - - { name: 'It is impossible to edit some user profile fields because your store currently works as an integration with Drupal and shares users with Drupal. Modifying these fields is possible via Drupal administrator interface.', translations: [{ code: 'fr', label: 'Il est impossible de modifier certains champs du profil utilisateur, car votre magasin travaille actuellement comme une intégration avec Drupal et les utilisateurs des actions avec Drupal. La modification de ces champs est possible via l''interface administrateur de Drupal.' }] } - - { name: 'Test email configuration', translations: [{ code: 'fr', label: 'Configuration de la messagerie d''essai' }] } - - { name: 'From email', translations: [{ code: 'fr', label: 'De email' }] } - - { name: 'To email', translations: [{ code: 'fr', label: 'Pour envoyer un courriel' }] } - - { name: 'Email body', translations: [{ code: 'fr', label: 'corps de l''email' }] } - - { name: 'Send test email', translations: [{ code: 'fr', label: 'Envoyer un email de test' }] } + - { name: 'It is impossible to edit some user profile fields because your store currently works as an integration with Drupal and shares users with Drupal. Modifying these fields is possible via Drupal administrator interface.', translations: [{ code: 'fr', label: 'Il est impossible de modifier certains champs des profils utilisateur, car votre magasin travaille présentement au mode d''intégration avec Drupal et a les utilisateurs communs avec Drupal. La modification de ces champs est possible via l''interface administrateur de Drupal.' }] } + - { name: 'Test email configuration', translations: [{ code: 'fr', label: 'Vérifier l''adresse e-mail' }] } + - { name: 'From email', translations: [{ code: 'fr', label: 'E-mail de l''expéditeur' }] } + - { name: 'To email', translations: [{ code: 'fr', label: 'E-mail de destinataire' }] } + - { name: 'Email body', translations: [{ code: 'fr', label: 'Corps du message' }] } + - { name: 'Send test email', translations: [{ code: 'fr', label: 'Envoyer un courriel test' }] } - { name: 'not installed', translations: [{ code: 'fr', label: 'pas installé' }] } - { name: 'Install', translations: [{ code: 'fr', label: 'Installer' }] } + - { name: 'Drupal frontend', translations: [{ code: 'fr', label: 'Interface Drupal ' }] } + - { name: 'Return to Drupal', translations: [{ code: 'fr', label: 'Retour à Drupal ' }] } + - { name: 'Username or e-mail', translations: [{ code: 'fr', label: 'Nom d''utilisateur ou e-mail' }] } + - { name: 'View update log', translations: [{ code: 'fr', label: 'Consulter le protocole de mise à jour' }] } + - { name: 'Do not close this page!', translations: [{ code: 'fr', label: 'Ne fremez pas la page!' }] } + - { name: 'Disable suspicious modules', translations: [{ code: 'fr', label: 'Désactiver des modules suspects.' }] } + - { name: 'Disable all modules in the system', translations: [{ code: 'fr', label: 'Désactiver tous les modules dans le système.' }] } + - { name: 'soft reset', translations: [{ code: 'fr', label: 'Réinitialisation partielle' }] } + - { name: 'hard reset', translations: [{ code: 'fr', label: 'Redémarrage à froid' }] } + - { name: 'Restore last backup', translations: [{ code: 'fr', label: 'Restituer la dernière sauvegarde' }] } + - { name: 'should be performed manually', translations: [{ code: 'fr', label: 'doit être effectué manuellement' }] } + - { name: 'Updated components', translations: [{ code: 'fr', label: 'Composants mis à jour' }] } + - { name: 'The upgrade is completed. Please, do not close this page until you check your web site and check that everything works properly', translations: [{ code: 'fr', label: 'La mise à jour est achevée' }] } + - { name: 'Yes, I agree with License agreement', translations: [{ code: 'fr', label: 'Oui, j''accepte le contrat de licence' }] } + - { name: 'Logged as', translations: [{ code: 'fr', label: 'Connecté comme' }] } + - { name: 'Added to cart', translations: [{ code: 'fr', label: 'Ajouté au panier' }] } + - { name: 'Click to unblock', translations: [{ code: 'fr', label: 'Cliquez pour débloquer' }] } + - { name: 'Activate your paid module license', translations: [{ code: 'fr', label: 'Activer la licence du module payé' }] } + - { name: 'Promotions', translations: [{ code: 'fr', label: 'Promotions' }] } + - { name: 'Discount', translations: [{ code: 'fr', label: 'Rabais' }] } + - { name: 'Coupons', translations: [{ code: 'fr', label: 'Coupons' }] } + - { name: 'Add discount', translations: [{ code: 'fr', label: 'Ajouter le rabais' }] } + - { name: 'Volume discounts', translations: [{ code: 'fr', label: 'Rabais de volume' }] } + - { name: 'New discount coupon', translations: [{ code: 'fr', label: 'Nouveaux bons de réduction' }] } + - { name: 'Display prices in catalog including VAT', translations: [{ code: 'fr', label: 'Afficher les prix dans le catalogue, y compris la TVA' }] } + - { name: 'Display ''inc/ex VAT'' labels next to prices', translations: [{ code: 'fr', label: 'Afficher "TTC/TVA non comprise" labels à côté des prix' }] } + - { name: 'On product details only', translations: [{ code: 'fr', label: 'Dans les détails de produit seulement' }] } + - { name: 'On all catalog pages', translations: [{ code: 'fr', label: 'Sur toutes les pages du catalogue' }] } + - { name: 'Secure connection cannot be established.', translations: [{ code: 'fr', label: 'Connexion sécurisée ne peut pas être établie.' }] } + - { name: 'Have a discount coupon?', translations: [{ code: 'fr', label: 'Avez un bon de réduction?' }] } + - { name: 'Enter coupon code', translations: [{ code: 'fr', label: 'Entrez le code du bon de réduction' }] } + - { name: 'There is no such a coupon, please check the spelling: X', translations: [{ code: 'fr', label: 'Il n''y a pas de tel coupon, vérifier l''orthographe, s''il vous plaît: "{{code}}"' }] } + - { name: 'Date: newest first', translations: [{ code: 'fr', label: 'Date: du plus récent au plus ancien' }] } + - { name: 'Date: oldest first', translations: [{ code: 'fr', label: 'Date: du plus ancien au plus récent' }] } + - { name: 'LiteCommerce core version', translations: [{ code: 'fr', label: 'Version du noyau Litecommerce' }] } + - { name: 'Thank you for your order FOOTER', translations: [{ code: 'fr', label: 'Merci pour votre commande faite avec notre système d''achat.
Bonne visite et à bientôt!' }] } + - { name: 'Get X off for order amount over Y', translations: [{ code: 'fr', label: 'Obtenez {{X}} de rabais pour montant de commande plus que {{Y}}' }] } + - { name: 'Have more coupons', translations: [{ code: 'fr', label: 'Vous avez encore des bons de réduction' }] } + - { name: 'Have more coupons?', translations: [{ code: 'fr', label: 'Avez -vous encore des bons de réduction' }] } + - { name: 'Limit number of uses', translations: [{ code: 'fr', label: 'Limiter le nombre d''utilisations' }] } + - { name: 'Maximum number of uses', translations: [{ code: 'fr', label: 'Le nombre maximum d''utilisations' }] } + - { name: 'Maximum order subtotal must be greater than minimum order subtotal', translations: [{ code: 'fr', label: 'Le maximum total partiel de commande doit dépasser le minimum total partiel de commande' }] } + - { name: 'Maximum order subtotal the coupon can be applied to', translations: [{ code: 'fr', label: 'Le maximum total partiel d''ordre dont un bon de rabais peut être appliqué ' }] } + - { name: 'Minimum order subtotal must be less than maximum order subtotal', translations: [{ code: 'fr', label: 'Le minimum total partiel de commande doit être inférieur au maximum total partiel de commande' }] } + - { name: 'Moneybookers Quick Checkout enables you to take direct payment from credit cards, debit cards and over 60 other local payment options in over 200 countries as well as the Moneybookers eWallet.', translations: [{ code: 'fr', label: ' Moneybookers Quick checkout vous permets d''accepter le paiment directement des cartes de crédit, cartes de débit et plus de 60 options de paiement locales dans plus de 200 pays ainsi que Moneybookers eWallet. La tarification très concurrentielle pour ce service est publiée sur le site de Moneybookers www.moneybookers.com' }] } + - { name: 'New arrivals', translations: [{ code: 'fr', label: 'Les nouveautés' }] } + - { name: 'New!', translations: [{ code: 'fr', label: 'Nouveau' }] } + - { name: 'No modules found for search_string', translations: [{ code: 'fr', label: 'Aucun module trouvé pour \"{{search_string}}\"' }] } + - { name: 'Occurred X add product events', translations: [{ code: 'fr', label: '{{new}} articles viennent d''être ajoutés' }] } + - { name: 'Occurred X add product events and Y update product events', translations: [{ code: 'fr', label: '{{new}} articles viennent d''être ajoutés et {{old}} articles viennent d''être mis à jour ' }] } + - { name: 'Occurred Y update product events', translations: [{ code: 'fr', label: '{{old}} articles viennent d''être mis à jour' }] } + - { name: 'Period end date must be later than period start date', translations: [{ code: 'fr', label: 'La date de fin de période doit être postérieure à la date de début de période' }] } + - { name: 'Period start date must be sooner than period end date', translations: [{ code: 'fr', label: 'La date de debut de période doit être antérieure à la date de fin de période' }] } + - { name: 'Recently viewed', translations: [{ code: 'fr', label: 'Vus récemment' }] } + - { name: 'To have access to the International payment network of Moneybookers please register here for a free account if you don''t have one yet.', translations: [{ code: 'fr', label: 'Pour avoir accès au réseau de paiement international de Moneybookers vous inscrivez-vous, s''il vous plaît ici pour un compte gratuit si vous ne l''avez pas encore.' }] } + - { name: 'To use the coupon, your order subtotal must be at least X', translations: [{ code: 'fr', label: 'Le bon de rabais peut être utilisé si le sous-total de votre commande est d''au moins {{min}}' }] } + - { name: 'To use the coupon, your order subtotal must be between X and Y', translations: [{ code: 'fr', label: 'Le bon de rabais peut être utilisé si le sous-total de votre commande est compris entre {{min}} et {{max}}' }] } + - { name: 'To use the coupon, your order subtotal must not exceed Y', translations: [{ code: 'fr', label: 'Le bon de rabais peut être utilisé si le sous-total de votre commande ne dépasse pas {{min}}' }] } + - { name: 'X product(s) has been created', translations: [{ code: 'fr', label: '{{count}} produits ont été créés' }] } + - { name: 'X product(s) has been removed', translations: [{ code: 'fr', label: '{{count}} produits ont été supprimés' }] } + - { name: 'You have already used the coupon', translations: [{ code: 'fr', label: 'Vous avez déjà utilisé le bon de rabais' }] } + - { name: 'You have sent a request for activation on the X.', translations: [{ code: 'fr', label: 'Vous avez envoyé une demande d''activation à {{date}}. Le processus de vérification d''utilisation Moneybookers Quick Checkout peut prendre jusqu''à 72 heures. Vous serez contacté par Moneybookers lorsque le processus de vérification est achevé. Après l''activation, Moneybookers vous gagnerez accès à une nouvelle section dans votre compte Moneybookers, elle s''appèl Merchant Tools. Veuillez choisir un mot secret dans cette section (PAS le même que votre mot de passe) et l''entrez dans la section ci-dessous pour vous connecter à Moneybookers. Le mot secret est la dernière étape de votre processus d''activation, il encrypte vos paiements en toute sécurité. Après la présentation succès, vous êtes prêt à utiliser toutes les options de paiement direct de Moneybookers.' }] } + - { name: 'Your order has been processed', translations: [{ code: 'fr', label: 'Votre commande #{{id}} a été traitée.' }] } + - { name: 'Your order has failed', translations: [{ code: 'fr', label: 'Votre commande #{{id}} a échoué ou a été rejetée par l''administration du magasin.' }] } + - { name: 'excl.VAT', translations: [{ code: 'fr', label: 'excluant. {{name}}' }] } + - { name: 'incl.VAT', translations: [{ code: 'fr', label: 'incluant. {{name}}' }] } + - { name: 'percent X off', translations: [{ code: 'fr', label: '{{percent}}% de réduction' }] } + - { name: 'X entities has been created', translations: [{ code: 'fr', label: '{{count}} rabais ont été créés' }] } + - { name: 'X entities has been removed', translations: [{ code: 'fr', label: '{{count}} rabais ont été supprimés' }] } + - { name: 'All customers', translations: [{ code: 'fr', label: 'Tous les clients' }] } + - { name: 'Comment', translations: [{ code: 'fr', label: 'Commentaire' }] } + - { name: 'This comment will be visisble to shop administrators only', translations: [{ code: 'fr', label: 'Ce commentaire sera visisble aux administrateurs de magasin seulement' }] } + - { name: 'Discount type', translations: [{ code: 'fr', label: 'Type de rabais' }] } + - { name: 'Discount amount', translations: [{ code: 'fr', label: 'Montant du rabais' }] } + - { name: 'Active from', translations: [{ code: 'fr', label: 'Actif à partir de' }] } + - { name: 'Active till', translations: [{ code: 'fr', label: 'Actif jusqu''à' }] } + - { name: 'Subtotal range (begin)', translations: [{ code: 'fr', label: 'Gamme de sous-total (commencent)' }] } + - { name: 'Subtotal range (end)', translations: [{ code: 'fr', label: 'Gamme de sous-total (fin)' }] } + - { name: 'Limit the number of uses', translations: [{ code: 'fr', label: 'Limiter le nombre d''utilisations' }] } + - { name: 'Memberships', translations: [{ code: 'fr', label: 'Adhésions' }] } + - { name: 'Date when customers can start using the coupon', translations: [{ code: 'fr', label: 'Jour lors les clients peuvent commencer à utiliser le bon de rabais' }] } + - { name: 'Date when the coupon expires', translations: [{ code: 'fr', label: 'Jour lors le bon de rabais expire' }] } + - { name: 'Minimum order subtotal the coupon can be applied to', translations: [{ code: 'fr', label: 'Le minimal sous-total de commande dont le bon de rabais peut être appliqué' }] } + - { name: 'Coupon discount can be limited to these product classes', translations: [{ code: 'fr', label: 'Le bon de rabais peut être limité aux catégories de produits suivantes' }] } + - { name: 'Coupon discount can be limited to customers with these membership levels', translations: [{ code: 'fr', label: 'Le bon de rabais peut être limité aux groupes de clients suivants' }] } + - { name: 'The maximum number of uses', translations: [{ code: 'fr', label: 'Le nombre maximum d''utilisations' }] } + - { name: 'Uses left', translations: [{ code: 'fr', label: 'Utilisations reste' }] } + - { name: 'Uses count', translations: [{ code: 'fr', label: 'Le nombre d''utilisations' }] } + - { name: 'Coupon code', translations: [{ code: 'fr', label: 'Code de bon de rabais' }] } + - { name: 'X coupon(s) has been removed', translations: [{ code: 'fr', label: '{{count}} bons de rabais ont été enlevés' }] } + - { name: 'X coupon(s) has been created', translations: [{ code: 'fr', label: '{{count}} bons de rabais ont été créés' }] } + - { name: 'The coupon has been added', translations: [{ code: 'fr', label: 'Le bon de rabais a été ajouté' }] } + - { name: 'The coupon has been applied to your order', translations: [{ code: 'fr', label: 'Le bon de rabais a été appliqué à votre commande' }] } + - { name: 'Coupon discount', translations: [{ code: 'fr', label: 'La réduction de bon de rabais' }] } + - { name: '$ off', translations: [{ code: 'fr', label: '$ de rabais' }] } + - { name: 'Coming soon', translations: [{ code: 'fr', label: 'Les articles à venir bientôt' }] } + - { name: 'All newest products', translations: [{ code: 'fr', label: 'Tous produits les plus récents' }] } + - { name: 'All upcoming products', translations: [{ code: 'fr', label: 'Tous les produits à venir' }] } + - { name: 'Customers who bought this product also bought', translations: [{ code: 'fr', label: 'Les clients qui ont acheté ce produit ont aussi commandé' }] } + - { name: 'Customers who viewed this product bought', translations: [{ code: 'fr', label: 'Les clients qui ont vu ce produit ont aussi vu' }] } + - { name: 'An upgrade is a dangerous process that may result in a crashed website. It is strongly recommended to create a full back up of your shop (the code and the database) and download it to a local computer before proceeding to the next step.', translations: [{ code: 'fr', label: 'Une mise à niveau peut entraîner un site écrasé. Il est fortement recommandé de créer une sauvegarde complète de votre magasin (le code et la base de données) et le télécharger sur un ordinateur local avant de procéder à l''étape suivante.' }] } + - { name: 'After the upgrade is completed please check your website. If you find that the site is inoperative, please try to do the following', translations: [{ code: 'fr', label: 'Après la mise à niveau est terminée vérifiez votre site web, s''il vous plaît. Si vous trouvez le site inopérant, essayer de faire ce qui suit s''il vous plaît.' }] } + - { name: 'Please save the soft reset and hard reset links so that you can use them later in case the website crash happens', translations: [{ code: 'fr', label: 'S''il vous plaît enregistrez les liens de réinitialisation partielle et de redémarrage à froid afin que vous puissiez les utiliser plus tard en cas de faillite du site .' }] } + - { name: 'Create a backup', translations: [{ code: 'fr', label: 'Créez une copie de sauvegarde' }] } + - { name: 'Downloaded components', translations: [{ code: 'fr', label: 'Components téléchargés' }] } + - { name: 'If there are some critical errors occured you can do the following', translations: [{ code: 'fr', label: 'Si il y a quelques erreurs critiques, vous pouvez effectuer les opérations suivantes' }] } + - { name: 'Loading...', translations: [{ code: 'fr', label: 'Téléchargement...' }] } + - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'fr', label: 'Si cette option est cochée tous les prix dans le catalogue seront affichés avec le label "TTC" ou "TVA non comprise" selon que la TVA est incluse dans le prix ou non. Si vous ne choisissez pas afficher ce label, il vous faut placer des informations à ce sujet quelque part sur les pages du catalogue comme cela doît être clair pour les clients.' }] } \ No newline at end of file diff --git a/src/classes/XLite/Module/CDev/RuTranslation/Main.php b/src/classes/XLite/Module/CDev/RuTranslation/Main.php index e852c4ed67..abecc62e4b 100644 --- a/src/classes/XLite/Module/CDev/RuTranslation/Main.php +++ b/src/classes/XLite/Module/CDev/RuTranslation/Main.php @@ -73,7 +73,7 @@ public static function getModuleName() */ public static function getMinorVersion() { - return '1'; + return '2'; } /** @@ -109,9 +109,9 @@ public static function runBuildCacheHandler() 'The X language has been added and enabled successfully', array('language' => $language->getName()), $language->getCode() - ); - } - + ); + } + \XLite\Core\Translation::getInstance()->reset(); } else { diff --git a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml index 2ada2c7df3..e0df81c650 100644 --- a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml @@ -14,6 +14,8 @@ XLite\Model\Language: XLite\Model\Config: directives: { addModel: 'XLite\Model\ConfigTranslation' } + - { name: 'add_on_mode', category: 'General', translations: [{ code: 'ru', option_name: 'Работать в режиме Ñтола заказов' }] } + - { name: 'add_on_mode_page', category: 'General', translations: [{ code: 'ru', option_name: 'Ð“Ð»Ð°Ð²Ð½Ð°Ñ Ñтраница режима Ñтола заказов' }] } - { name: 'admin_presentation', category: 'General', translations: [{ code: 'ru', option_name: 'Параметры панели ÐдминиÑтрированиÑ' }] } - { name: 'admin_security', category: 'Security', translations: [{ code: 'ru', option_name: 'ИÑпользовать HTTPS в панели админиÑтрированиÑ' }] } - { name: 'anonymous', category: 'Shipping', translations: [{ code: 'ru', option_name: 'ÐÐ´Ñ€ÐµÑ Ð¿Ð¾ÐºÑƒÐ¿Ð°Ñ‚ÐµÐ»Ñ Ð¿Ð¾ умолчанию' }] } @@ -40,28 +42,29 @@ XLite\Model\Config: - { name: 'date_format', category: 'General', translations: [{ code: 'ru', option_name: 'Формат даты' }] } - { name: 'decimal_delim', category: 'General', translations: [{ code: 'ru', option_name: 'Разделитель дробной чаÑти валюты' }] } - { name: 'default_country', category: 'General', translations: [{ code: 'ru', option_name: 'Страна по умолчанию в региÑтрационной форме' }] } - - { name: 'default_offline_payment', category: 'Payments', translations: [{ code: 'ru', option_name: 'Метод оплаты иÑпользуемый Ð´Ð»Ñ Ð·Ð°ÐºÐ°Ð·Ð¾Ð² Ñ Ð½ÑƒÐ»ÐµÐ²Ð¾Ð¹ Ñуммой' }] } + - { name: 'default_offline_payment', category: 'Payments', translations: [{ code: 'ru', option_name: 'Метод оплаты, иÑпользуемый Ð´Ð»Ñ Ð·Ð°ÐºÐ°Ð·Ð¾Ð² Ñ Ð½ÑƒÐ»ÐµÐ²Ð¾Ð¹ Ñуммой' }] } - { name: 'default_purchase_limit', category: 'General', translations: [{ code: 'ru', option_name: 'Ограничение покупки по умолчанию' }] } - { name: 'default_select_payment', category: 'Payments', translations: [{ code: 'ru', option_name: 'Метод оплаты по умолчанию' }] } - { name: 'default_zipcode', category: 'General', translations: [{ code: 'ru', option_name: 'Почтовый Ð¸Ð½Ð´ÐµÐºÑ Ð¿Ð¾ умолчанию (региÑÑ‚Ñ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ñ„Ð¾Ñ€Ð¼Ð°)' }] } - - { name: 'direct_product_url', category: 'General', translations: [{ code: 'ru', option_name: 'Разрешить прÑмой доÑтуп по URL к продуктам в выключеных категориÑÑ…' }] } + - { name: 'direct_product_url', category: 'General', translations: [{ code: 'ru', option_name: 'Разрешить прÑмой доÑтуп по URL к товарам в выключеных категориÑÑ…' }] } - { name: 'display_check_number', category: 'General', translations: [{ code: 'ru', option_name: 'Показывать номер чека Ð´Ð»Ñ Ð¼ÐµÑ‚Ð¾Ð´Ð° оплаты eCheck' }] } - { name: 'drupal_root_url', category: 'CDev\DrupalConnector', translations: [{ code: 'ru', option_name: 'Корневой URL уÑтановки Drupal' }] } + - { name: 'enable_anon_checkout', category: 'General', translations: [{ code: 'ru', option_name: 'Разрешить оплату без региÑтрации' }] } - { name: 'enable_init_order_notif', category: 'Email', translations: [{ code: 'ru', option_name: 'ОтправлÑть данные о заказе на E-mail отдела продаж, поÑле Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð°' }] } - - { name: 'enable_init_order_notif_customer', category: 'Email', translations: [{ code: 'ru', option_name: 'ОтправлÑть данные о заказе на E-mail клиента, поÑле Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð°' }] } + - { name: 'enable_init_order_notif_customer', category: 'Email', translations: [{ code: 'ru', option_name: 'ОтправлÑть данные о заказе на E-mail клиента поÑле Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð°' }] } - { name: 'fb_admins', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'ÐдминиÑтраторы Facebook', option_comment: 'СпиÑок идентификаторов пользователей админиÑтраторов Ñтраниц Facebook, разделенный запÑтыми. Включите, по крайней мере, Ñвой ÑобÑтвенный Facebook ID.' }] } - - { name: 'fb_app_id', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Facebook Application ID', option_comment: 'Facebook Platform application ID, который управлÑет Ñтраницами вашего Ñайта. Ð’Ñ‹ можете получить Ñтот ID поÑетив Ñтраницу по адреÑу https://developers.facebook.com/apps/

Вам необходимо указать значение Ñтого полÑ, чтобы:
  • ÑтатиÑтика вашего Ñайта поÑвилаÑÑŒ в панели Facebook Insights
  • включить Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¼Ð¾Ð´ÐµÑ€Ð°Ñ‚Ð¾Ñ€Ð° в Facebook - позволÑющий модерировать коментарии вÑех ваших продуктов одновременно
' }] } + - { name: 'fb_app_id', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Facebook Application ID', option_comment: 'Facebook Platform application ID, который управлÑет Ñтраницами вашего Ñайта. Ð’Ñ‹ можете получить Ñтот ID, поÑетив Ñтраницу по адреÑу https://developers.facebook.com/apps/

Вам необходимо указать значение Ñтого полÑ, чтобы:
  • ÑтатиÑтика вашего Ñайта поÑвилаÑÑŒ в панели Facebook Insights
  • включить Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¼Ð¾Ð´ÐµÑ€Ð°Ñ‚Ð¾Ñ€Ð° в Facebook - позволÑющий модерировать коментарии вÑех ваших товаров одновременно
' }] } - { name: 'fb_app_namespace', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Facebook Application Namespace', option_comment: 'Укажите то же Ñамое проÑтранÑтво имен приложениÑ, которое вы ввели при наÑтройке вашего приложение Facebook Platform.' }] } - { name: 'fb_comments_num_posts', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'КоличеÑтво Ñообщений Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° вкладке по умолчанию' }] } - - { name: 'fb_comments_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Отображать вкладку Facebook Comments на Ñтранице продукта', option_comment: 'Ð”Ð»Ñ Ð¼Ð¾Ð´ÐµÑ€Ð°Ñ†Ð¸Ð¸ коментариев укажите ваш Facebook User ID в поле ÐдминиÑтраторы Facebook.
Ð”Ð»Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñа модерации в Facebook''е, позволÑющего модерировать вÑе коментарии продуктов одновременно, укажите ваш ID Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Facebook в поле Facebook Application ID.' }] } + - { name: 'fb_comments_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Отображать вкладку Facebook Comments на Ñтранице товара', option_comment: 'Ð”Ð»Ñ Ð¼Ð¾Ð´ÐµÑ€Ð°Ñ†Ð¸Ð¸ коментариев укажите Ñвой Facebook User ID в поле ÐдминиÑтраторы Facebook.
Ð”Ð»Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñа модерации в Facebook''е, позволÑющего модерировать вÑе коментарии товаров одновременно, укажите Ñвой ID Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Facebook в поле Facebook Application ID.' }] } - { name: 'fb_like_layout', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Стиль отображениÑ', option_comment: 'СущеÑтвует три варианта:
  • standard - отображает Ñоциальный текÑÑ‚ Ñправа от кнопки под фотографией друга
  • button - показывает общее количеÑтво Like''ов Ñправа от кнопки
  • box - показывает общее количеÑтво Like''ов над кнопкой.
' }] } - - { name: 'fb_like_send_button', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Пказывать кнопку Send вмеÑте Ñ ÐºÐ½Ð¾Ð¿ÐºÐ¾Ð¹ Like', option_comment: 'Кнопка Send позволÑет клиенту отправить Ñообщение Ñ ÑÑылкой на Ñтраницу продукта группе на Facebook к которой он принадлежит, или друзьÑм на Facebook.' }] } + - { name: 'fb_like_send_button', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Пказывать кнопку Send вмеÑте Ñ ÐºÐ½Ð¾Ð¿ÐºÐ¾Ð¹ Like', option_comment: 'Кнопка Send позволÑет клиенту отправлÑть Ñообщение Ñ ÑÑылкой на Ñтраницу товара группе на Facebook, к которой он принадлежит, или друзьÑм на Facebook.' }] } - { name: 'fb_like_show_faces', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать иконки профайлов под кнопкой Like', option_comment: 'Фотографии пользователей отображаютÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ в Ñтандартном Ñтиле.' }] } - - { name: 'fb_like_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Пказывать, кнопку Like на Ñтраницах продуктов', option_comment: 'Кнопка Like позволÑет клиенту обмениватьÑÑ ÑÑылками понравившихÑÑ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð¾Ð² Ñ Ð´Ñ€ÑƒÐ·ÑŒÑми на Facebook.' }] } + - { name: 'fb_like_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Пказывать, кнопку Like на Ñтраницах товаров', option_comment: 'Кнопка Like позволÑет клиенту обмениватьÑÑ ÑÑылками понравившихÑÑ Ñ‚Ð¾Ð²Ð°Ñ€Ð¾Ð² Ñ Ð´Ñ€ÑƒÐ·ÑŒÑми на Facebook.' }] } - { name: 'fb_like_verb', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Ðазвание кнопки Like' }] } - - { name: 'featured_products_look', category: 'CDev\FeaturedProducts', translations: [{ code: 'ru', option_name: 'Вид рекомендуемых продуктов' }] } + - { name: 'featured_products_look', category: 'CDev\FeaturedProducts', translations: [{ code: 'ru', option_name: 'Вид рекомендуемых товаров' }] } - { name: 'form_id_protection', category: 'Security', translations: [{ code: 'ru', option_name: 'Включить ÑиÑтему защиты веб-форм админиÑтраторÑкой зоны' }] } - - { name: 'full_customer_security', category: 'Security', translations: [{ code: 'ru', option_name: 'КлиентÑÐºÐ°Ñ Ð·Ð¾Ð½Ð° поÑноÑтью на HTTPS' }] } + - { name: 'full_customer_security', category: 'Security', translations: [{ code: 'ru', option_name: 'КлиентÑÐºÐ°Ñ Ð·Ð¾Ð½Ð° полноÑтью на HTTPS' }] } - { name: 'ga_account', category: 'CDev\GoogleAnalytics', translations: [{ code: 'ru', option_name: 'Web Property ID' }] } - { name: 'ga_tracking_type', category: 'CDev\GoogleAnalytics', translations: [{ code: 'ru', option_name: 'Что отÑлеживаетÑÑ' }] } - { name: 'gosocial_sep_1', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'ÐаÑтройки Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Facebook' }] } @@ -69,7 +72,7 @@ XLite\Model\Config: - { name: 'gosocial_sep_21', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Параметры Facebook Comments' }] } - { name: 'gosocial_sep_3', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'ÐаÑтройки кнопки Tweet' }] } - { name: 'gosocial_sep_4', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Параметры кнопки Google +' }] } - - { name: 'gplus_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать кнопку Google + на Ñтраницах продуктов' }] } + - { name: 'gplus_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать кнопку Google + на Ñтраницах товаров' }] } - { name: 'location_address', category: 'Company', translations: [{ code: 'ru', option_name: 'ÐдреÑ' }] } - { name: 'location_city', category: 'Company', translations: [{ code: 'ru', option_name: 'Город' }] } - { name: 'location_country', category: 'Company', translations: [{ code: 'ru', option_name: 'Страна' }] } @@ -81,22 +84,24 @@ XLite\Model\Config: - { name: 'maximal_order_amount', category: 'General', translations: [{ code: 'ru', option_name: 'МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñумма заказа' }] } - { name: 'minify_resources', category: 'CDev\DrupalConnector', translations: [{ code: 'ru', option_name: 'Минимизировать JS и CSS реÑурÑÑ‹ в Ñтиле 6.x Drupal' }] } - { name: 'minimal_order_amount', category: 'General', translations: [{ code: 'ru', option_name: 'ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñумма заказа' }] } - - { name: 'number_of_bestsellers', category: 'CDev\Bestsellers', translations: [{ code: 'ru', option_name: 'КоличеÑтво продуктов в ÑпиÑке лидеров продаж' }] } + - { name: 'number_of_bestsellers', category: 'CDev\Bestsellers', translations: [{ code: 'ru', option_name: 'КоличеÑтво товаров в ÑпиÑке лидеров продаж' }] } - { name: 'operation_presentation', category: 'General', translations: [{ code: 'ru', option_name: 'ОбÑлуживание и работа' }] } + - { name: 'order_starting_number', category: 'General', translations: [{ code: 'ru', option_name: 'Ðачинать нумерацию заказов Ñ' }] } - { name: 'orders_department', category: 'Company', translations: [{ code: 'ru', option_name: 'E-mail отдела продаж' }] } - { name: 'orders_per_page', category: 'General', translations: [{ code: 'ru', option_name: 'Заказов на Ñтраницу' }] } - - { name: 'product_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'ru', option_name: 'ЧаÑтота Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтраницы Продуктов' }] } - - { name: 'product_priority', category: 'CDev\XMLSitemap', translations: [{ code: 'ru', option_name: 'Приоритет Ð´Ð»Ñ Ñтраницы Продуктов', option_comment: ' Значение должно быть в пределах: от 0 до 1.' }] } - - { name: 'products_per_page', category: 'General', translations: [{ code: 'ru', option_name: 'Продуктов на Ñтранице категории' }] } - - { name: 'products_per_page_admin', category: 'General', translations: [{ code: 'ru', option_name: 'Продуктов на Ñтраницу' }] } + - { name: 'product_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'ru', option_name: 'ЧаÑтота Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтраницы Товаров' }] } + - { name: 'product_priority', category: 'CDev\XMLSitemap', translations: [{ code: 'ru', option_name: 'Приоритет Ð´Ð»Ñ Ñтраницы Товаров', option_comment: ' Значение должно быть в пределах: от 0 до 1.' }] } + - { name: 'products_per_page', category: 'General', translations: [{ code: 'ru', option_name: 'Товаров на Ñтранице категории' }] } + - { name: 'products_per_page_admin', category: 'General', translations: [{ code: 'ru', option_name: 'Товаров на Ñтраницу' }] } - { name: 'proxy', category: 'Security', translations: [{ code: 'ru', option_name: 'HTTPS прокÑи' }] } - { name: 'recent_orders', category: 'General', translations: [{ code: 'ru', option_name: 'КоличеÑтво заказов в ÑпиÑке поÑледних заказов' }] } - - { name: 'redirect_to_cart', category: 'General', translations: [{ code: 'ru', option_name: 'ПеренаправлÑть клиента поÑле Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð° в корзину ' }] } - - { name: 'sale_enabled', category: 'CDev\Sale', translations: [{ code: 'ru', option_name: 'Показывать "Продукты на раÑпродаже" в магазине' }] } - - { name: 'sale_max_count_in_block', category: 'CDev\Sale', translations: [{ code: 'ru', option_name: 'МакÑимальное количеÑтво продуктов, которое будет отображатьÑÑ Ð² блоке "Продукты на раÑпродаже"', option_comment: 'МакÑимальное количеÑтво продуктов, которые будут отображатьÑÑ Ð² блоке Продукты на раÑпродаже. УÑтановите нулевое значение, чтобы отобразить вÑе продукты в блоке. ÐаÑтройки блока Drupal могут изменить Ñту опцию (когда модуль DrupalConnector включен).' }] } - - { name: 'sale_menu', category: 'CDev\Sale', translations: [{ code: 'ru', option_name: 'Отображать блок "Продукты на раÑпродаже" в', option_comment: 'ÐаÑтройки блока Drupal могут изменить Ñту опцию (когда модуль DrupalConnector включен).' }] } + - { name: 'redirect_to_cart', category: 'General', translations: [{ code: 'ru', option_name: 'ПеренаправлÑть клиента поÑле Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð° в корзину ' }] } + - { name: 'sale_enabled', category: 'CDev\Sale', translations: [{ code: 'ru', option_name: 'Показывать "Товары на раÑпродаже" в магазине' }] } + - { name: 'sale_max_count_in_block', category: 'CDev\Sale', translations: [{ code: 'ru', option_name: 'МакÑимальное количеÑтво товаров, которое будет отображатьÑÑ Ð² блоке "Товары на раÑпродаже"', option_comment: 'МакÑимальное количеÑтво товаров, которые будут отображатьÑÑ Ð² блоке Товары на раÑпродаже. УÑтановите нулевое значение, чтобы отобразить вÑе товары в блоке. ÐаÑтройки блока Drupal могут изменить Ñту опцию (когда модуль DrupalConnector включен).' }] } + - { name: 'sale_menu', category: 'CDev\Sale', translations: [{ code: 'ru', option_name: 'Отображать блок "Товары на раÑпродаже" в', option_comment: 'ÐаÑтройки блока Drupal могут изменить Ñту опцию (еÑли модуль DrupalConnector включен).' }] } - { name: 'shop_closed', category: 'General', translations: [{ code: 'ru', option_name: 'Временно закрыть магазин' }] } - { name: 'shop_currency', category: 'General', translations: [{ code: 'ru', option_name: 'Валюта магазина' }] } + - { name: 'show_thumbnails', category: 'General', translations: [{ code: 'ru', option_name: 'Показывать кртинки в ÑпиÑке товаров' }] } - { name: 'site_administrator', category: 'Company', translations: [{ code: 'ru', option_name: 'E-mail админиÑтратора Ñайта' }] } - { name: 'smtp_password', category: 'Email', translations: [{ code: 'ru', option_name: 'Пароль' }] } - { name: 'smtp_security', category: 'Email', translations: [{ code: 'ru', option_name: 'БезопаÑтное Ñоединение' }] } @@ -111,9 +116,9 @@ XLite\Model\Config: - { name: 'time_format', category: 'General', translations: [{ code: 'ru', option_name: 'Формат времени' }] } - { name: 'time_zone', category: 'General', translations: [{ code: 'ru', option_name: 'Ð’Ñ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð·Ð¾Ð½Ð°' }] } - { name: 'tweet_hashtag', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Пказывать Hashtag в кнопке Tweet и в текÑте ÑтатуÑа твита (опционально)' }] } - - { name: 'tweet_recommend', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Ð˜Ð¼Ñ ÑƒÑ‡ÐµÑ‚Ð½Ð¾Ð¹ запиÑи пользователÑ, ÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾Ñле отправки Tweet (опционально)', option_comment: ' Twitter будет предлагать клиентам Ñледовать Ñтому пользователю, когда они отправÑÑ‚ твит при помощью кнопки Tweet.' }] } - - { name: 'tweet_show_count', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать количеÑтво твитов в кнопке Tweet', option_comment: 'Поле Ñчетчика показывает, Ñколько раз Ñтраница продукта была затвитана в Твиттере.' }] } - - { name: 'tweet_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать кнопку Tweet на Ñтранице опиÑÐ°Ð½Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð°', option_comment: 'Кнопка Tweet позволÑет пользователÑм легко и быÑтро обмениватьÑÑ ÑÑылками Ñтраницы продукта Ñ Ð¸Ñ… поÑледователÑми в Twitter.' }] } + - { name: 'tweet_recommend', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Ð˜Ð¼Ñ ÑƒÑ‡ÐµÑ‚Ð½Ð¾Ð¹ запиÑи Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð´Ð»Ñ ÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾Ñле отправки Tweet (опционально)', option_comment: ' Twitter будет предлагать клиентам Ñледовать Ñтому пользователю, когда они отправÑÑ‚ твит при помощью кнопки Tweet.' }] } + - { name: 'tweet_show_count', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать количеÑтво твитов в кнопке Tweet', option_comment: 'Поле Ñчетчика показывает, Ñколько раз Ñтраница товара была затвитана в Твиттере.' }] } + - { name: 'tweet_use', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Показывать кнопку Tweet на Ñтранице опиÑÐ°Ð½Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð°', option_comment: 'Кнопка Tweet позволÑет пользователÑм легко и быÑтро обмениватьÑÑ ÑÑылками на Ñтраницы товаров Ñо Ñвоими поÑледователÑми в Twitter.' }] } - { name: 'tweet_via', category: 'CDev\GoSocial', translations: [{ code: 'ru', option_name: 'Ð˜Ð¼Ñ ÑƒÑ‡ÐµÑ‚Ð½Ð¾Ð¹ запиÑи пользователÑ, автора Tweet (опционально)' }] } - { name: 'unit_presentation', category: 'General', translations: [{ code: 'ru', option_name: 'Единица измерениÑ' }] } - { name: 'use_smtp', category: 'Email', translations: [{ code: 'ru', option_name: 'ИÑпользовать SMTP Ñервер' }] } @@ -124,12 +129,40 @@ XLite\Model\Config: - { name: 'weight_unit', category: 'General', translations: [{ code: 'ru', option_name: 'Единица веÑа' }] } - { name: 'welcome_changefreq', category: 'CDev\XMLSitemap', translations: [{ code: 'ru', option_name: 'ЧаÑтота Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð³Ð»Ð°Ð²Ð½Ð¾Ð¹ Ñтраницы' }] } - { name: 'welcome_priority', category: 'CDev\XMLSitemap', translations: [{ code: 'ru', option_name: 'Приоритет Ð´Ð»Ñ Ð³Ð»Ð°Ð²Ð½Ð¾Ð¹ Ñтраницы', option_comment: ' Значение должно быть в пределах: от 0 до 1.' }] } + - { name: 'ttl', category: 'CDev\Egoods', translations: [{ code: 'ru', option_name: 'Ð’Ñ€ÐµÐ¼Ñ Ð¶Ð¸Ð·Ð½Ð¸ ÑÑылки (дней)', option_comment: 'Укажите 0 Ð´Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ð¹' }] } + - { name: 'attempts_limit', category: 'CDev\Egoods', translations: [{ code: 'ru', option_name: 'Ограничение Ñкачиваний (на 1 купленый товар)', option_comment: 'Укажите 0 Ð´Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ð¹' }] } + - { name: 'sep_product_advisor_na', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Параметры блока "Ðовые поÑтуплениÑ"' }] } + - { name: 'na_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Включить блок "Ðовые поÑтуплениÑ"' }] } + - { name: 'na_max_days', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'КоличеÑтво дней, в течение которых продукты ÑчитаютÑÑ Ð½Ð¾Ð²Ñ‹Ð¼Ð¸', option_comment: 'Укажите значение отличное от нулÑ; иначе будет иÑпользовано Ñтандартное значение 30 дней' }] } + - { name: 'na_max_count_in_full_list', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'МакÑимальное количеÑтво товаров, которое будет отображатьÑÑ Ð² блоке "Ðовые поÑтуплениÑ"', option_comment: 'Ограничивает общее количеÑтво товаров, которые могут быть показаны покупателю по ÑÑылке "Ð’Ñе новые поÑтуплениÑ". 0 - Ð´Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ð¹.' }] } + - { name: 'na_mark_with_label', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Отмечать новые продукты в каталоге', option_comment: 'Отмечает вÑе новые товары во вÑех ÑпиÑках товаров (иÑÐºÐ»ÑŽÑ‡Ð°Ñ "Ðовые поÑтуплениÑ") отметкой "Ðовые!".' }] } + - { name: 'na_show_in_sidebar', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать блок "Ðовые поÑтуплениÑ" на боковой панели (иначе в центральной чаÑти)' }] } + - { name: 'na_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'МакÑимальное чиÑло товаров в блоке "Ðовые поÑтуплениÑ"', option_comment: 'ОпределÑет макÑимальное чиÑло товаров, показываемых в блоке "Ðовые поÑтуплениÑ". Укажите значение отличное от нулÑ; 3 товара отображаютÑÑ Ð¿Ð¾ умолчанию. Указанное значение будет иÑпользовано в том Ñлучае, еÑли оно меньше общего чиÑла товаров в ÑпиÑке товаров. Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector")' }] } + - { name: 'na_from_current_category', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать в блоке "Ðовые поÑтуплениÑ" только товары из категории, проÑматриваемой покупателем', option_comment: 'Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector")' }] } + - { name: 'sep_product_advisor_cs', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Параметры блока "Скоро в продаже"' }] } + - { name: 'cs_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Включить блок "Скоро в продаже"' }] } + - { name: 'cs_mark_with_label', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Отмечать поÑтупающие продукты в каталоге', option_comment: 'Отметить ожидаемые товары во вÑех ÑпиÑках товаров (иÑÐºÐ»ÑŽÑ‡Ð°Ñ "Скоро в продаже") отметкой "Скоро...".' }] } + - { name: 'cs_display_date', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать дату поÑÑ‚ÑƒÐ¿Ð»ÐµÐ½Ð¸Ñ Ð² продажу на Ñтранице продукта' }] } + - { name: 'cs_from_current_category', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать в блоке "Скоро в продаже" только товары из категории, проÑматриваемой покупателем', option_comment: 'Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector")' }] } + - { name: 'cs_show_in_sidebar', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать блок "Скоро в продаже" на боковой панели (иначе в центральной чаÑти)', option_comment: 'Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector")' }] } + - { name: 'cs_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'МакÑимальное чиÑло товаров в блоке "Скоро в продаже"', option_comment: 'ОпределÑет макÑимальное количеÑтво товаров, отображаемоых в блоке "Скоро в продаже". Укажите значение отличное от нулÑ; иначе, иÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию - 3 продукта. Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector").' }] } + - { name: 'sep_product_advisor_rv', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Пареметры блока "Ð’Ñ‹ Ñмотрели"' }] } + - { name: 'rv_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать блок "Ð’Ñ‹ Ñмотрели" в каталоге' }] } + - { name: 'rv_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'МакÑимальное чиÑло товаров в блоке "Ð’Ñ‹ Ñмотрели"', option_comment: 'ОпределÑет макÑимальное количеÑтво товаров, отображаемых в блоке "Ð’Ñ‹ Ñмотрели". 0 - Ð´Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ð¹. Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector").' }] } + - { name: 'sep_product_advisor_cbb', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Параметры блока "Покупатели, купившие Ñтот товар, также купили"' }] } + - { name: 'cbb_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать блок в каталоге' }] } + - { name: 'cbb_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'МакÑимальное чиÑло товаров в блоке', option_comment: 'ОпределÑет макÑимальное количеÑтво товаров, отображаемых в блоке "Покупатели, купившие Ñтот товар, также купили". Укажите значение отличное от нулÑ; иначе, иÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию - 3 продукта. Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector").' }] } + - { name: 'sep_product_advisor_cvb', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Параметры блока "Покупатели, Ñмотревшие Ñтот товар, также купили"' }] } + - { name: 'cvb_enabled', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'Показывать блок в каталоге' }] } + - { name: 'cvb_max_count_in_block', category: 'CDev\ProductAdvisor', translations: [{ code: 'ru', option_name: 'МакÑимальное чиÑло товаров в блоке', option_comment: 'ОпределÑет макÑимальное количеÑтво товаров, отображаемых в блоке "Покупатели, Ñмотревшие Ñтот товар, также купили". Укажите значение отличное от нулÑ; иначе, иÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию - 3 продукта. Параметры блока "Drupal" могут перекрывать Ñту опцию (еÑли включен модуль "DrupalConnector").' }] } + - { name: 'display_prices_including_vat', category: 'CDev\VAT', translations: [{ code: 'ru', option_name: 'Отображать в каталоге цены Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ ÐДС' }] } + - { name: 'display_inc_vat_label', category: 'CDev\VAT', translations: [{ code: 'ru', option_name: 'Показывать метку "включаÑ/без ÐДС" Ñ€Ñдом Ñ Ñ†ÐµÐ½Ð°Ð¼Ð¸', option_comment: 'ЕÑли Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, у каждой цены в каталоге будет значок "Ñ ÐДС" или "без ÐДС", в завиÑимоÑти от того, включен ли налог в цену или нет. ЕÑли вы не хотите, чтобы такой значок отображалÑÑ Ñ€Ñдом Ñ Ñ†ÐµÐ½Ð°Ð¼Ð¸ в каталоге, информацию об ÐДС нужно размеÑтить на какой-нибудь другой Ñтранице каталога, Ñ‚.к. покупателÑм должно быть понÑтно, включен налог в цену или нет.' }] } XLite\Model\LanguageLabel: directives: { addModel: 'XLite\Model\LanguageLabelTranslation' } - - { name: '_X items_ in bag', translations: [{ code: 'ru', label: '{{count}} продуктов в корзине' }] } + - { name: '_X items_ in bag', translations: [{ code: 'ru', label: '{{count}} товаров в корзине' }] } - { name: '-- No categories --', translations: [{ code: 'ru', label: '-- Ðет категорий ---' }] } - - { name: '"X product" options', translations: [{ code: 'ru', label: 'Опции продукта "{{product}}"' }] } + - { name: '"X product" options', translations: [{ code: 'ru', label: 'Опции товара "{{product}}"' }] } - { name: 'A new customer? Enter your e-mail', translations: [{ code: 'ru', label: 'Впервые покупаете у наÑ? Укажите ваш e-mail' }] } - { name: 'Absolute', translations: [{ code: 'ru', label: 'Единица' }] } - { name: 'Access information', translations: [{ code: 'ru', label: 'Данные Ð´Ð»Ñ Ð´Ð¾Ñтупа' }] } @@ -142,7 +175,7 @@ XLite\Model\LanguageLabel: - { name: 'Add', translations: [{ code: 'ru', label: 'Добавить' }] } - { name: 'Add category', translations: [{ code: 'ru', label: 'Добавить категорию' }] } - { name: 'Add child', translations: [{ code: 'ru', label: 'Добавить дочернюю категорию' }] } - - { name: 'Add featured products', translations: [{ code: 'ru', label: 'Добавить рекомендуемые продукты' }] } + - { name: 'Add featured products', translations: [{ code: 'ru', label: 'Добавить рекомендуемые товары' }] } - { name: 'Add file', translations: [{ code: 'ru', label: 'Добавить файл' }] } - { name: 'Add image', translations: [{ code: 'ru', label: 'Добавить изображение' }] } - { name: 'Add language', translations: [{ code: 'ru', label: 'Добавить Ñзык' }] } @@ -157,8 +190,8 @@ XLite\Model\LanguageLabel: - { name: 'Add new option', translations: [{ code: 'ru', label: 'Добавить новую опцию' }] } - { name: 'Add new option group', translations: [{ code: 'ru', label: 'Добавить новую группу опций' }] } - { name: 'Add new state', translations: [{ code: 'ru', label: 'Добавить новый штат' }] } - - { name: 'Add Product', translations: [{ code: 'ru', label: 'Добавить продукт' }] } - - { name: 'Add product', translations: [{ code: 'ru', label: 'Добавить продукт' }] } + - { name: 'Add Product', translations: [{ code: 'ru', label: 'Добавить товар' }] } + - { name: 'Add product', translations: [{ code: 'ru', label: 'Добавить товар' }] } - { name: 'Add shipping method', translations: [{ code: 'ru', label: 'Добавить метод доÑтавки' }] } - { name: 'Add subcategory', translations: [{ code: 'ru', label: 'Добавить подкатегорию' }] } - { name: 'Add to Bag', translations: [{ code: 'ru', label: 'Добавить в корзину' }] } @@ -177,8 +210,8 @@ XLite\Model\LanguageLabel: - { name: 'Administration Zone', translations: [{ code: 'ru', label: 'Панель управлениÑ' }] } - { name: 'Administrator', translations: [{ code: 'ru', label: 'ÐдминиÑтратор' }] } - { name: 'Administrator panel', translations: [{ code: 'ru', label: 'Панель админиÑтратора' }] } - - { name: 'Administrator Zone settings', translations: [{ code: 'ru', label: 'Параметры ÐдминиÑтративной зоны' }] } - - { name: 'After you enable this tax it will be included in product prices', translations: [{ code: 'ru', label: 'ПоÑле активации налог будет включен в цены продуктов' }] } + - { name: 'Administrator Zone settings', translations: [{ code: 'ru', label: 'Параметры зоны админиÑтратора' }] } + - { name: 'After you enable this tax it will be included in product prices', translations: [{ code: 'ru', label: 'ПоÑле активации налог будет включен в цены товаров. Это означает, что он не будет показыватьÑÑ Ð² виде дополнительной наценки во Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¿Ð»Ð°Ñ‚Ñ‹.' }] } - { name: 'All', translations: [{ code: 'ru', label: 'Ð’Ñе' }] } - { name: 'All add-ons', translations: [{ code: 'ru', label: 'Ð’Ñе дополнениÑ' }] } - { name: 'All membership levels', translations: [{ code: 'ru', label: 'Ð’Ñе группы' }] } @@ -189,13 +222,13 @@ XLite\Model\LanguageLabel: - { name: 'Already have an account?', translations: [{ code: 'ru', label: 'Уже зарегиÑтрировалиÑÑŒ у наÑ?' }] } - { name: 'Already installed', translations: [{ code: 'ru', label: 'Уже уÑтановлено' }] } - { name: 'Alternative text', translations: [{ code: 'ru', label: 'Ðльтернативный текÑÑ‚' }] } - - { name: 'Alternatively, upload file sqldump.sql.php to the var/backup/ sub-directory click on the "Restore from server" button', translations: [{ code: 'ru', label: 'Ðльтернативный ÑпоÑоб: загрузите файл Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ sqldump.sql.php в директорию var/backup/ (поддиректорию директории, в которой уÑтановлен LiteCommerce на Веб Ñервере) и нажмите "ВоÑÑтановить Ñ Ñервера". ПоÑле того, как процеÑÑ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½, можно удалить файл, нажав "Удалить SQL файл".' }] } + - { name: 'Alternatively, upload file sqldump.sql.php to the var/backup/ sub-directory click on the "Restore from server" button', translations: [{ code: 'ru', label: 'Ðльтернативный ÑпоÑоб: загрузите файл Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ sqldump.sql.php в директорию var/backup/ (поддиректорию директории, в которой уÑтановлен LiteCommerce на Веб-Ñервере) и нажмите "ВоÑÑтановить Ñ Ñервера". ПоÑле того, как процеÑÑ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½, можно удалить файл, нажав "Удалить SQL файл".' }] } - { name: 'Amount: high to low', translations: [{ code: 'ru', label: 'КоличеÑтво:по убыванию' }] } - { name: 'Amount: low to high', translations: [{ code: 'ru', label: 'КоличеÑтво:по возраÑтанию' }] } - { name: 'and', translations: [{ code: 'ru', label: 'и' }] } - { name: 'Another state', translations: [{ code: 'ru', label: 'Другое' }] } - { name: 'Any membership level', translations: [{ code: 'ru', label: 'Ð›ÑŽÐ±Ð°Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð°' }] } - - { name: 'Any product class', translations: [{ code: 'ru', label: 'Любой клаÑÑ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð¾Ð²' }] } + - { name: 'Any product class', translations: [{ code: 'ru', label: 'Любой клаÑÑ Ñ‚Ð¾Ð²Ð°Ñ€Ð¾Ð²' }] } - { name: 'Any zone', translations: [{ code: 'ru', label: 'Ð›ÑŽÐ±Ð°Ñ Ð·Ð¾Ð½Ð°' }] } - { name: 'Apply destination', translations: [{ code: 'ru', label: 'Применить адреÑ' }] } - { name: 'Apply price', translations: [{ code: 'ru', label: 'Применить цену' }] } @@ -220,7 +253,7 @@ XLite\Model\LanguageLabel: - { name: 'Back up database', translations: [{ code: 'ru', label: 'Сохранить базу' }] } - { name: 'Backup', translations: [{ code: 'ru', label: 'Резервное копирование' }] } - { name: 'Backup/Restore', translations: [{ code: 'ru', label: 'Резервное копирование / ВоÑÑтановление' }] } - - { name: 'Based on these patterns, different shipping rate formulas can be defined for different order weight and price ranges and quantities of items. Ranges cannot overlap.', translations: [{ code: 'ru', label: 'Различные варианты ÑтоимоÑти доÑтавки могут быть раÑÑчитаны по формуле на оÑнове приведенных ниже интервалов включающих Ñледующие параметры заказа: Ð²ÐµÑ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð¾Ð², цена продуктов и количеÑтво продуктов. Интервалы не могут переÑекатьÑÑ.' }] } + - { name: 'Based on these patterns, different shipping rate formulas can be defined for different order weight and price ranges and quantities of items. Ranges cannot overlap.', translations: [{ code: 'ru', label: 'Различные варианты ÑтоимоÑти доÑтавки могут быть раÑÑчитаны по формуле на оÑнове приведенных ниже интервалов, включающих Ñледующие параметры заказа: Ð²ÐµÑ Ñ‚Ð¾Ð²Ð°Ñ€Ð¾Ð², цены товаров и количеÑтво товаров. Интервалы не могут переÑекатьÑÑ.' }] } - { name: 'BEGIN - END of TOTAL', translations: [{ code: 'ru', label: '{{begin}}{{end}} из {{total}}' }] } - { name: 'Benchmark completed in ', translations: [{ code: 'ru', label: 'ТеÑÑ‚ производительноÑти выполнен за' }] } - { name: 'Bestsellers', translations: [{ code: 'ru', label: 'Лидеры продаж' }] } @@ -232,7 +265,7 @@ XLite\Model\LanguageLabel: - { name: 'Browse server', translations: [{ code: 'ru', label: 'Ðа Ñервере' }] } - { name: 'Buy more', translations: [{ code: 'ru', label: 'Купить еще' }] } - { name: 'by', translations: [{ code: 'ru', label: 'от' }] } - - { name: 'Cache rebuild is already started, please wait', translations: [{ code: 'ru', label: 'ПереÑтройка кÑша уже запущена, пожалуйÑта подождите' }] } + - { name: 'Cache rebuild is already started, please wait', translations: [{ code: 'ru', label: 'ПереÑтройка кÑша уже запущена, пожалуйÑта, подождите' }] } - { name: 'Calculate rates', translations: [{ code: 'ru', label: 'РаÑÑчитать ÑтоимоÑть' }] } - { name: 'Can''t connect to the Modules Marketplace server', translations: [{ code: 'ru', label: 'Ðевозможно подключитьÑÑ Ðº Ñерверу МаркетплейÑ' }] } - { name: 'Cancel', translations: [{ code: 'ru', label: 'Отмена' }] } @@ -251,7 +284,7 @@ XLite\Model\LanguageLabel: - { name: 'Change payment info', translations: [{ code: 'ru', label: 'Изменить данные плательщика' }] } - { name: 'Change shipping info', translations: [{ code: 'ru', label: 'Изменить данные получателÑ' }] } - { name: 'Check all', translations: [{ code: 'ru', label: 'Отметить вÑе' }] } - - { name: 'Checking integrity, please wait...', translations: [{ code: 'ru', label: 'Проверка целоÑтноÑти, пожалуйÑта подождите...' }] } + - { name: 'Checking integrity, please wait...', translations: [{ code: 'ru', label: 'Проверка целоÑтноÑти, пожалуйÑта, подождите...' }] } - { name: 'Checkout', translations: [{ code: 'ru', label: 'Оплата' }] } - { name: 'Choose file', translations: [{ code: 'ru', label: 'Выберите файл' }] } - { name: 'Choose method', translations: [{ code: 'ru', label: 'Выбрать метод' }] } @@ -298,7 +331,7 @@ XLite\Model\LanguageLabel: - { name: 'Declined', translations: [{ code: 'ru', label: 'Отклонен' }] } - { name: 'Default', translations: [{ code: 'ru', label: 'По умолчанию' }] } - { name: 'Default for customer zone and can not disabled or deleted', translations: [{ code: 'ru', label: 'Зона по умолчанию не может быть отключена или удалена' }] } - - { name: 'Default for customer zone and cannot be disabled or deleted', translations: [{ code: 'ru', label: 'ИÑпользуетÑÑ Ð¿Ð¾ умолчанию Ð´Ð»Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ñкой зоны Ð½ÐµÐ»ÑŒÐ·Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒ или удалить' }] } + - { name: 'Default for customer zone and cannot be disabled or deleted', translations: [{ code: 'ru', label: 'ИÑпользуетÑÑ Ð¿Ð¾ умолчанию Ð´Ð»Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ñкой зоны, Ð½ÐµÐ»ÑŒÐ·Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒ или удалить' }] } - { name: 'Default zone (all addresses)', translations: [{ code: 'ru', label: 'Зона по умлчанию (вÑе адреÑа)' }] } - { name: 'Define classes', translations: [{ code: 'ru', label: 'Определить клаÑÑÑ‹' }] } - { name: 'Delete', translations: [{ code: 'ru', label: 'Удалить' }] } @@ -313,7 +346,7 @@ XLite\Model\LanguageLabel: - { name: 'Delete this address?', translations: [{ code: 'ru', label: 'Удалить Ñтот адреÑ?' }] } - { name: 'Delivery', translations: [{ code: 'ru', label: 'ДоÑтавка' }] } - { name: 'Delivery methods', translations: [{ code: 'ru', label: 'Методы доÑтавки' }] } - - { name: 'Depending on the size of your data file, importing may take some time.', translations: [{ code: 'ru', label: 'Ð’ завиÑимоÑти от размера фала, импорт может занимать продолжительное времÑ.' }] } + - { name: 'Depending on the size of your data file, importing may take some time.', translations: [{ code: 'ru', label: 'Ð’ завиÑимоÑти от размера файла, импорт может занимать продолжительное времÑ.' }] } - { name: 'Description', translations: [{ code: 'ru', label: 'ОпиÑание' }] } - { name: 'Descriptions of various rate types are provided below', translations: [{ code: 'ru', label: 'ОпиÑÐ°Ð½Ð¸Ñ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð½Ñ‹Ñ… типов Ñтавок приведены ниже:' }] } - { name: 'Destination zone', translations: [{ code: 'ru', label: 'Зона назначениÑ' }] } @@ -346,7 +379,7 @@ XLite\Model\LanguageLabel: - { name: 'Enable', translations: [{ code: 'ru', label: 'Включить' }] } - { name: 'Enabled', translations: [{ code: 'ru', label: 'Включено' }] } - { name: 'enabled', translations: [{ code: 'ru', label: 'включено' }] } - - { name: 'Enter a correct email', translations: [{ code: 'ru', label: 'Введите корректный E-mail' }] } + - { name: 'Enter a correct email', translations: [{ code: 'ru', label: 'Введите верный E-mail' }] } - { name: 'Enter a negative number', translations: [{ code: 'ru', label: 'Введите отрицательное чиÑло' }] } - { name: 'Enter a number', translations: [{ code: 'ru', label: 'Введите чило' }] } - { name: 'Enter a positive number', translations: [{ code: 'ru', label: 'Введите положительное чиÑло' }] } @@ -363,13 +396,13 @@ XLite\Model\LanguageLabel: - { name: 'Exception', translations: [{ code: 'ru', label: 'ИÑключение' }] } - { name: 'Expand the functionality of your store by installing and using add-on modules', translations: [{ code: 'ru', label: 'УÑтановите и иÑпользуйте дополнительные модули, чтобы раÑширить возможноÑти Ñвоего магазина' }] } - { name: 'Export', translations: [{ code: 'ru', label: 'ЭкÑпорт' }] } - - { name: 'Export products', translations: [{ code: 'ru', label: 'ЭкÑпорт продуктов' }] } + - { name: 'Export products', translations: [{ code: 'ru', label: 'ЭкÑпорт товаров' }] } - { name: 'Failed', translations: [{ code: 'ru', label: 'Ðе прошел' }] } - - { name: 'Failed to add detailed image', translations: [{ code: 'ru', label: 'ÐеудалоÑÑŒ добавить детальную картинку' }] } - - { name: 'Failed to add the attachment', translations: [{ code: 'ru', label: 'ÐеудалоÑÑŒ добавить вложение.' }] } - - { name: 'Failed to add the attachment. The file download is forbidden', translations: [{ code: 'ru', label: 'ÐеудалоÑÑŒ добавить вложение. Загрузка файла запрещена.' }] } + - { name: 'Failed to add detailed image', translations: [{ code: 'ru', label: 'Ðе удалоÑÑŒ добавить детальную картинку' }] } + - { name: 'Failed to add the attachment', translations: [{ code: 'ru', label: 'Ðе удалоÑÑŒ добавить вложение.' }] } + - { name: 'Failed to add the attachment. The file download is forbidden', translations: [{ code: 'ru', label: 'Ðе удалоÑÑŒ добавить вложение. Загрузка файла запрещена.' }] } - { name: 'Failed/Declined', translations: [{ code: 'ru', label: 'Ðе прошел/Отклонен' }] } - - { name: 'Featured products', translations: [{ code: 'ru', label: 'Рекомендуемые продукты' }] } + - { name: 'Featured products', translations: [{ code: 'ru', label: 'Рекомендуемые товары' }] } - { name: 'Field is required!', translations: [{ code: 'ru', label: 'ОбÑзательное поле' }] } - { name: 'File size exceeds the maximum size', translations: [{ code: 'ru', label: 'Превышен макÑимально допуÑтимый размер файла {{size}}' }] } - { name: 'File title', translations: [{ code: 'ru', label: 'Ðазвание файла' }] } @@ -413,14 +446,14 @@ XLite\Model\LanguageLabel: - { name: 'HTTPS check', translations: [{ code: 'ru', label: 'Проверка HTTPS' }] } - { name: 'I accept Terms and Conditions', translations: [{ code: 'ru', label: 'Я принимаю УcÐ»Ð¾Ð²Ð¸Ñ Ð¸ÑпользованиÑ' }] } - { name: 'Identity', translations: [{ code: 'ru', label: 'ИдентификациÑ' }] } - - { name: 'If the product is assigned to multiple classes, only the first tax rate with the highest priority will be applied to it.', translations: [{ code: 'ru', label: 'ЕÑли продукт входит в неÑколько клаÑÑов, только Ð¿ÐµÑ€Ð²Ð°Ñ Ñтавка налога Ñ Ð½Ð°Ð¸Ð²Ñ‹Ñшим приоритетом будет применена к нему.' }] } + - { name: 'If the product is assigned to multiple classes, only the first tax rate with the highest priority will be applied to it.', translations: [{ code: 'ru', label: 'ЕÑли товар входит в неÑколько клаÑÑов, только Ð¿ÐµÑ€Ð²Ð°Ñ Ñтавка налога Ñ Ð½Ð°Ð¸Ð²Ñ‹Ñшим приоритетом будет применена к нему.' }] } - { name: 'If you already have an account, you can authenticate yourself by filling in the form below. The fields which are marked with * are mandatory', translations: [{ code: 'ru', label: 'ЕÑли у Ð²Ð°Ñ ÑƒÐ¶Ðµ еÑть ÑƒÑ‡ÐµÑ‚Ð½Ð°Ñ Ð·Ð°Ð¿Ð¸Ñть, вы можете подтвердить владение аккаунтом, заполнив форму ниже. ОбÑзательные Ð¿Ð¾Ð»Ñ Ð¾Ñ‚Ð¼ÐµÑ‡ÐµÐ½Ñ‹ звездочкой.' }] } - { name: 'If you choose the second option, you can download the file from the server later on and delete it from the server by clicking on the ''Delete SQL file'' button.', translations: [{ code: 'ru', label: 'ЕÑли вы вибираете второй вариант, вы можете Ñкачать файл Ñ Ñервера позже и удалить его Ñ Ñервера, нажав ''Удалить SQL файл''.' }] } - { name: 'If you do not have an account, you can easily', translations: [{ code: 'ru', label: 'ЕÑли у Ð²Ð°Ñ ÐµÑ‰Ðµ нет учетной запиÑи, вы можете легко' }] } - { name: 'If you don''t have a moneybookers account yet, please sign up for a free moneybookers account at: http://www.moneybookers.com', translations: [{ code: 'ru', label: 'ЕÑли у Ð²Ð°Ñ ÐµÑ‰Ðµ нет аккаунта moneybookers, пожалуйÑта Ñоздайте беÑплатный аккаунт: http://www.moneybookers.com' }] } - { name: 'If you have a license key for a commercial module, you can enter it here to register the purchase of the appropriate module.', translations: [{ code: 'ru', label: 'ЕÑли у Ð²Ð°Ñ ÐµÑть лицензионный ключ к коммерчеÑкому модулю, введите его здеÑÑŒ Ð´Ð»Ñ Ñ€ÐµÐ³Ð¸Ñтрации покупки модулÑ' }] } - - { name: 'If you have a plugin in the .tar format, you can install it by uploading it here', translations: [{ code: 'ru', label: 'ЕÑли у Ð²Ð°Ñ ÐµÑть дополнение в .tar формате, вы можете уÑтановить его загрузив в Ñтой форме.' }] } - - { name: 'If you store product images in the database, they are included in the SQL dump file', translations: [{ code: 'ru', label: 'ЕÑли в вашем магазине Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ…Ñ€Ð°Ð½ÑÑ‚ÑÑ Ð² БД, они автоматичеÑки включаютÑÑ Ð² SQL дамп. ЕÑли Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð¾Ð² хранÑÑ‚ÑÑ Ð² файловой ÑиÑтеме, они не входÑÑ‚ в дамп. Ð”Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð¹ копии изображений, их нужно Ñкачать непоÑредÑтвенно Ñ Ñервера.' }] } + - { name: 'If you have a plugin in the .tar format, you can install it by uploading it here', translations: [{ code: 'ru', label: 'ЕÑли у Ð²Ð°Ñ ÐµÑть дополнение в .tar формате, вы можете уÑтановить его загрузив в Ñтой форме' }] } + - { name: 'If you store product images in the database, they are included in the SQL dump file', translations: [{ code: 'ru', label: 'ЕÑли в вашем магазине Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ…Ñ€Ð°Ð½ÑÑ‚ÑÑ Ð² БД, они автоматичеÑки включаютÑÑ Ð² SQL дамп. ЕÑли Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð¾Ð² хранÑÑ‚ÑÑ Ð² файловой ÑиÑтеме, они не входÑÑ‚ в дамп. Ð”Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð¹ копии изображений, их нужно Ñкачать непоÑредÑтвенно Ñ Ñервера.' }] } - { name: 'Image', translations: [{ code: 'ru', label: 'Изображение' }] } - { name: 'Image border will not be displayed in customer''s frontend', translations: [{ code: 'ru', label: 'Рамка Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ð¸Ñ Ð½Ðµ будет отображатьÑÑ Ð² клиентÑкой чаÑти магазина' }] } - { name: 'Image X', translations: [{ code: 'ru', label: 'Изображение #{{index}}' }] } @@ -430,7 +463,7 @@ XLite\Model\LanguageLabel: - { name: 'Import in progress', translations: [{ code: 'ru', label: 'ВыполнÑетÑÑ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚' }] } - { name: 'Import mechanism does not know the field of X and it can not be imported', translations: [{ code: 'ru', label: 'ÐеизвеÑтное поле ''{{name}}'', Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñтого Ð¿Ð¾Ð»Ñ Ð½Ðµ могут быть импортированы.' }] } - { name: 'Import/Export', translations: [{ code: 'ru', label: 'Импорт/ЭкÑпорт' }] } - - { name: 'Importing will overwrite the existing product information. This operation connot be undone.', translations: [{ code: 'ru', label: 'Ð’ процеÑÑе импорта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ ÑущеÑтвующих продуктах будет перепиÑана. Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°.' }] } + - { name: 'Importing will overwrite the existing product information. This operation connot be undone.', translations: [{ code: 'ru', label: 'Ð’ процеÑÑе импорта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ ÑущеÑтвующих товарах будет перепиÑана. Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°.' }] } - { name: 'In category', translations: [{ code: 'ru', label: 'Ð’ категории' }] } - { name: 'in description', translations: [{ code: 'ru', label: 'в опиÑании' }] } - { name: 'In stock', translations: [{ code: 'ru', label: 'Ð’ наличии' }] } @@ -449,7 +482,7 @@ XLite\Model\LanguageLabel: - { name: 'invalid module ID passed: "{{moduleId}}"', translations: [{ code: 'ru', label: 'передан неверный ID модулÑ: "{{moduleId}}"' }] } - { name: 'Inventory status', translations: [{ code: 'ru', label: 'СоÑтоÑние запаÑов' }] } - { name: 'Inventory tracking', translations: [{ code: 'ru', label: 'Контроль оÑтатков' }] } - - { name: 'Inventory tracking for this product is', translations: [{ code: 'ru', label: 'Контроль оÑтатков Ñтого продукта' }] } + - { name: 'Inventory tracking for this product is', translations: [{ code: 'ru', label: 'Контроль оÑтатков Ñтого товара' }] } - { name: 'Invoice X', translations: [{ code: 'ru', label: 'Счет â„–{{id}}' }] } - { name: 'is available', translations: [{ code: 'ru', label: 'доÑтупна' }] } - { name: 'Item description', translations: [{ code: 'ru', label: 'ОпиÑание' }] } @@ -519,7 +552,7 @@ XLite\Model\LanguageLabel: - { name: 'Module has been successfully installed', translations: [{ code: 'ru', label: 'Модуль уÑпешно уÑтановлен' }] } - { name: 'module version "{{module_version}}" is not equal to the core one ("{{core_version}}")', translations: [{ code: 'ru', label: 'верÑÐ¸Ñ Ð¼Ð¾Ð´ÑƒÐ»Ñ "{{module_version}}" не ÑоответÑтвует верÑии Ñдра ("{{core_version}}")' }] } - { name: 'Modules Marketplace', translations: [{ code: 'ru', label: 'МаркетплейÑ' }] } - - { name: 'More add-ons', translations: [{ code: 'ru', label: 'Ещё модули' }] } + - { name: 'More add-ons', translations: [{ code: 'ru', label: 'Ещё дополнениÑ' }] } - { name: 'More details', translations: [{ code: 'ru', label: 'Подробнее' }] } - { name: 'Most Popular', translations: [{ code: 'ru', label: 'Ðаиболее популÑрные' }] } - { name: 'Most Rated', translations: [{ code: 'ru', label: 'Больше вÑего голоÑов' }] } @@ -538,15 +571,15 @@ XLite\Model\LanguageLabel: - { name: 'never', translations: [{ code: 'ru', label: 'никогда' }] } - { name: 'Never', translations: [{ code: 'ru', label: 'Ðикогда' }] } - { name: 'New access key will also be sent to the Site administrator''s email address', translations: [{ code: 'ru', label: 'Ðовый код доÑтупа будет также выÑлан на E-mail Ð°Ð´Ñ€ÐµÑ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратора магазина' }] } - - { name: 'New product class', translations: [{ code: 'ru', label: 'Ðовый клаÑÑ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°' }] } - - { name: 'New product has been added successfully', translations: [{ code: 'ru', label: 'Ðовый продукт уÑпешно добавлен' }] } + - { name: 'New product class', translations: [{ code: 'ru', label: 'Ðовый клаÑÑ Ñ‚Ð¾Ð²Ð°Ñ€Ð°' }] } + - { name: 'New product has been added successfully', translations: [{ code: 'ru', label: 'Ðовый товар уÑпешно добавлен' }] } - { name: 'New rate', translations: [{ code: 'ru', label: 'ÐÐ¾Ð²Ð°Ñ Ñтавка' }] } - { name: 'New user profile has been registered:', translations: [{ code: 'ru', label: 'Ðовый пользователь уÑпешно зарегиÑтрирован:' }] } - { name: 'New zone has been created successfully', translations: [{ code: 'ru', label: 'ÐÐ¾Ð²Ð°Ñ Ð·Ð¾Ð½Ð° уÑпешно Ñоздана' }] } - { name: 'Newest', translations: [{ code: 'ru', label: 'Самые новые' }] } - { name: 'Next', translations: [{ code: 'ru', label: 'След' }] } - { name: 'Next page', translations: [{ code: 'ru', label: 'Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница' }] } - - { name: 'Next product', translations: [{ code: 'ru', label: 'Следующий продукт' }] } + - { name: 'Next product', translations: [{ code: 'ru', label: 'Следующий товар' }] } - { name: 'No', translations: [{ code: 'ru', label: 'Ðет' }] } - { name: 'No featured products defined for this category', translations: [{ code: 'ru', label: 'Ð’ данной категории нет рекомендуемых товаров' }] } - { name: 'No items found.', translations: [{ code: 'ru', label: 'Ðичего найдено' }] } @@ -562,7 +595,7 @@ XLite\Model\LanguageLabel: - { name: 'not available for sale', translations: [{ code: 'ru', label: 'не продаетÑÑ' }] } - { name: 'Not finished', translations: [{ code: 'ru', label: 'Ðезавершен' }] } - { name: 'Not numeric', translations: [{ code: 'ru', label: 'Ðе чиÑло' }] } - - { name: 'not ready to download packs. Please, try again', translations: [{ code: 'ru', label: 'невозможно загрузить пакеты обновлениÑ. Попробуйте еще раз' }] } + - { name: 'not ready to download packs. Please, try again', translations: [{ code: 'ru', label: 'Ðевозможно загрузить пакеты обновлениÑ. Попробуйте еще раз' }] } - { name: 'Note', translations: [{ code: 'ru', label: 'Примечание' }] } - { name: 'Notes', translations: [{ code: 'ru', label: 'ПримечаниÑ' }] } - { name: 'of', translations: [{ code: 'ru', label: 'из' }] } @@ -608,7 +641,7 @@ XLite\Model\LanguageLabel: - { name: 'Per weight unit markup ($)', translations: [{ code: 'ru', label: 'Ðадбавка за единицу веÑа ($)' }] } - { name: 'Percent', translations: [{ code: 'ru', label: 'Процент' }] } - { name: 'Percent markup', translations: [{ code: 'ru', label: 'ÐŸÑ€Ð¾Ñ†ÐµÐ½Ñ‚Ð½Ð°Ñ Ð½Ð°Ð´Ð±Ð°Ð²ÐºÐ°' }] } - - { name: 'Percent off', translations: [{ code: 'ru', label: 'ÐŸÑ€Ð¾Ñ†ÐµÐ½Ñ‚Ð½Ð°Ñ Ñкидка' }] } + - { name: 'Percent off', translations: [{ code: 'ru', label: 'Скидка' }] } - { name: 'Perform order search', translations: [{ code: 'ru', label: 'ПоиÑк заказов' }] } - { name: 'Performance', translations: [{ code: 'ru', label: 'ПроизводительноÑть' }] } - { name: 'Personal info', translations: [{ code: 'ru', label: 'ПерÑональные данные' }] } @@ -619,7 +652,7 @@ XLite\Model\LanguageLabel: - { name: 'Please enable JavaScript in your web browser.', translations: [{ code: 'ru', label: 'ПожалуйÑта, включите JavaScript в браузере.' }] } - { name: 'Please identify yourself', translations: [{ code: 'ru', label: 'ПожалуйÑта, войдите в ÑиÑтему' }] } - { name: 'Please note that some of these modules are definitely incompatible with the upcoming upgrade and will be disabled in order to prevent the system crash', translations: [{ code: 'ru', label: 'Ðекоторые модули полноÑтью неÑовмеÑтимы Ñ Ð¿Ñ€ÐµÐ´ÑтоÑщим обновлением и будут отключены во избежание отказа ÑиÑтемы.' }] } - - { name: 'Please run the benchmark test in order to estimate your server performance', translations: [{ code: 'ru', label: 'ПожалуйÑта запуÑтите теÑÑ‚ чтобы оценить производительноÑть вашего Ñервера' }] } + - { name: 'Please run the benchmark test in order to estimate your server performance', translations: [{ code: 'ru', label: 'ПожалуйÑта, запуÑтите теÑÑ‚, чтобы оценить производительноÑть вашего Ñервера' }] } - { name: 'Please select one', translations: [{ code: 'ru', label: 'ПожалуйÑта, выберите' }] } - { name: 'Please specify a pattern to find the required labels', translations: [{ code: 'ru', label: 'ПожалуйÑта, введите текÑÑ‚ иÑкомой метки' }] } - { name: 'Please specify text labels for each language', translations: [{ code: 'ru', label: 'ПожалуйÑта, задайте метки Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ Ñзыка. ЕÑли вы не укажете значение Ð´Ð»Ñ ÐºÐ°ÐºÐ¾Ð³Ð¾-либо Ñзыка, будет иÑпользовано значение {{language}} Ñзыка.' }] } @@ -629,7 +662,7 @@ XLite\Model\LanguageLabel: - { name: 'Position', translations: [{ code: 'ru', label: 'ПозициÑ' }] } - { name: 'Prev', translations: [{ code: 'ru', label: 'Пред' }] } - { name: 'Previous page', translations: [{ code: 'ru', label: 'ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница' }] } - - { name: 'Previous product', translations: [{ code: 'ru', label: 'Предыдущие продукт' }] } + - { name: 'Previous product', translations: [{ code: 'ru', label: 'Предыдущие товар' }] } - { name: 'Price', translations: [{ code: 'ru', label: 'Цена' }] } - { name: 'Price modifier', translations: [{ code: 'ru', label: 'Модификатор цены' }] } - { name: 'Price: high to low', translations: [{ code: 'ru', label: 'Цена: по убыванию' }] } @@ -639,28 +672,28 @@ XLite\Model\LanguageLabel: - { name: 'Priority', translations: [{ code: 'ru', label: 'Приоритет' }] } - { name: 'Processed', translations: [{ code: 'ru', label: 'Обработан' }] } - { name: 'Processed/Completed', translations: [{ code: 'ru', label: 'Обработан/Завершен' }] } - - { name: 'Product added to bag', translations: [{ code: 'ru', label: 'Продукт добавлен в корзину' }] } - - { name: 'Product class', translations: [{ code: 'ru', label: 'КлаÑÑ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°' }] } - - { name: 'Product classes', translations: [{ code: 'ru', label: 'КлаÑÑÑ‹ продуктов' }] } - - { name: 'Product has been added to cart', translations: [{ code: 'ru', label: 'Продукт добавлен в корзину' }] } - - { name: 'Product images', translations: [{ code: 'ru', label: 'Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°' }] } - - { name: 'Product info', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ продукте' }] } - - { name: 'Product info has been updated successfully', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ продукте уÑпешно изменена' }] } + - { name: 'Product added to bag', translations: [{ code: 'ru', label: 'Товар добавлен в корзину' }] } + - { name: 'Product class', translations: [{ code: 'ru', label: 'КлаÑÑ Ñ‚Ð¾Ð²Ð°Ñ€Ð°' }] } + - { name: 'Product classes', translations: [{ code: 'ru', label: 'КлаÑÑÑ‹ товаров' }] } + - { name: 'Product has been added to cart', translations: [{ code: 'ru', label: 'Товар добавлен в корзину' }] } + - { name: 'Product images', translations: [{ code: 'ru', label: 'Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð°' }] } + - { name: 'Product info', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ товаре' }] } + - { name: 'Product info has been updated successfully', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ товаре уÑпешно изменена' }] } - { name: 'Product is out of stock', translations: [{ code: 'ru', label: 'Ðет в наличии' }] } - - { name: 'Product Name', translations: [{ code: 'ru', label: 'Ðазвание продукта' }] } - - { name: 'Product name', translations: [{ code: 'ru', label: 'Ðазвание продукта' }] } - - { name: 'Product on sale', translations: [{ code: 'ru', label: 'Продукт на раÑпродаже' }] } - - { name: 'Product options', translations: [{ code: 'ru', label: 'Опции продукта' }] } - - { name: 'Product page title', translations: [{ code: 'ru', label: 'Заголовок Ñтраницы продукта' }] } + - { name: 'Product Name', translations: [{ code: 'ru', label: 'Ðазвание товара' }] } + - { name: 'Product name', translations: [{ code: 'ru', label: 'Ðазвание товара' }] } + - { name: 'Product on sale', translations: [{ code: 'ru', label: 'Товар на раÑпродаже' }] } + - { name: 'Product options', translations: [{ code: 'ru', label: 'Опции товара' }] } + - { name: 'Product page title', translations: [{ code: 'ru', label: 'Заголовок Ñтраницы товара' }] } - { name: 'Product prices are defined including this tax calculated for', translations: [{ code: 'ru', label: 'Цены заданы Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ налога, раÑчитанного длÑ' }] } - - { name: 'Product SKU', translations: [{ code: 'ru', label: 'Код продукта' }] } + - { name: 'Product SKU', translations: [{ code: 'ru', label: 'Код товара' }] } - { name: 'Product Title', translations: [{ code: 'ru', label: 'Заголовок' }] } - - { name: 'Products', translations: [{ code: 'ru', label: 'Продукты' }] } - - { name: 'Products in bag', translations: [{ code: 'ru', label: 'Продуктов в корзине' }] } - - { name: 'Products with low inventory', translations: [{ code: 'ru', label: 'Продуктов Ñ Ð¼Ð°Ð»ÐµÐ½ÑŒÐºÐ¸Ð¼ оÑтатком' }] } + - { name: 'Products', translations: [{ code: 'ru', label: 'Товары' }] } + - { name: 'Products in bag', translations: [{ code: 'ru', label: 'Товары в корзине' }] } + - { name: 'Products with low inventory', translations: [{ code: 'ru', label: 'Товаров Ñ Ð¼Ð°Ð»ÐµÐ½ÑŒÐºÐ¸Ð¼ оÑтатком' }] } - { name: 'Profile has been created successfully', translations: [{ code: 'ru', label: 'Профиль уÑпешно Ñоздан' }] } - { name: 'Profile has been deleted successfully', translations: [{ code: 'ru', label: 'Профиль уÑпешно Ñоздан' }] } - - { name: 'Profile has been updated successfully', translations: [{ code: 'ru', label: 'Данные профайла уÑпешно обновлены' }] } + - { name: 'Profile has been updated successfully', translations: [{ code: 'ru', label: 'Данные Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ ÑƒÑпешно обновлены' }] } - { name: 'Profile settings', translations: [{ code: 'ru', label: 'Параметры профилÑ' }] } - { name: 'Properties', translations: [{ code: 'ru', label: 'СвойÑтва' }] } - { name: 'proxy', translations: [{ code: 'ru', label: 'HTTPS прокÑи' }] } @@ -685,12 +718,12 @@ XLite\Model\LanguageLabel: - { name: 'Registered', translations: [{ code: 'ru', label: 'ЗарегиÑтрирован' }] } - { name: 'Remove', translations: [{ code: 'ru', label: 'Удалить' }] } - { name: 'required', translations: [{ code: 'ru', label: 'обÑзательно' }] } - - { name: 'Required field X is not defined or empty', translations: [{ code: 'ru', label: 'Ошибка ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°. ОбÑзательное поле ''{{name}}'' не определено или не заполено.' }] } + - { name: 'Required field X is not defined or empty', translations: [{ code: 'ru', label: 'Ошибка ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð°. ОбÑзательное поле ''{{name}}'' не определено или не заполено.' }] } - { name: 'Rerun benchmark', translations: [{ code: 'ru', label: 'ПерезапуÑтить теÑÑ‚' }] } - { name: 'Restore', translations: [{ code: 'ru', label: 'ВоÑÑтановление' }] } - { name: 'Restore database', translations: [{ code: 'ru', label: 'ВоÑÑтановить базу' }] } - { name: 'Restore from server', translations: [{ code: 'ru', label: 'ВоÑÑтановить Ñ Ñервера' }] } - - { name: 'Return to admin interface.', translations: [{ code: 'ru', label: 'ВернутьÑÑ Ð² панель админиÑтрированиÑ.' }] } + - { name: 'Return to admin interface.', translations: [{ code: 'ru', label: 'ВернутьÑÑ Ð² панель админиÑтрированиÑ' }] } - { name: 'Review statistics on various aspects of your store''s operation', translations: [{ code: 'ru', label: 'Обзор ÑтатиÑтичеÑких данных о различных аÑпектах работы магазина' }] } - { name: 'Root category', translations: [{ code: 'ru', label: 'Ð“Ð»Ð°Ð²Ð½Ð°Ñ ÐºÐ°Ñ‚ÐµÐ³Ð¾Ñ€Ð¸Ñ' }] } - { name: 'Root Level', translations: [{ code: 'ru', label: 'Корневой уровень' }] } @@ -699,7 +732,8 @@ XLite\Model\LanguageLabel: - { name: 'Safe mode', translations: [{ code: 'ru', label: 'БезопаÑный режим' }] } - { name: 'Safe mode access key', translations: [{ code: 'ru', label: 'Ключ доÑтупа к безопаÑному режиму' }] } - { name: 'Sale', translations: [{ code: 'ru', label: 'РаÑпродажа' }] } - - { name: 'Sale price', translations: [{ code: 'ru', label: 'Цена на раÑпродаже' }] } + - { name: 'sale', translations: [{ code: 'ru', label: 'РаÑпродажа' }] } + - { name: 'Sale price', translations: [{ code: 'ru', label: 'Цена' }] } - { name: 'Sales', translations: [{ code: 'ru', label: 'Продажи' }] } - { name: 'Sales tax', translations: [{ code: 'ru', label: 'Ðалог Ñ Ð¿Ñ€Ð¾Ð´Ð°Ð¶' }] } - { name: 'Save', translations: [{ code: 'ru', label: 'Сохранить' }] } @@ -708,11 +742,11 @@ XLite\Model\LanguageLabel: - { name: 'Save zone details', translations: [{ code: 'ru', label: 'Сохранить данные зоны' }] } - { name: 'Search', translations: [{ code: 'ru', label: 'ПоиÑк' }] } - { name: 'Search for orders', translations: [{ code: 'ru', label: 'ПоиÑк заказов' }] } - - { name: 'Search for products', translations: [{ code: 'ru', label: 'ПоиÑк продуктов' }] } + - { name: 'Search for products', translations: [{ code: 'ru', label: 'ПоиÑк товаров' }] } - { name: 'Search for users', translations: [{ code: 'ru', label: 'ПоиÑк пользователей' }] } - { name: 'Search for users that are', translations: [{ code: 'ru', label: 'ПоиÑк пользователей, которые' }] } - { name: 'Search in subcategories', translations: [{ code: 'ru', label: 'Ð’ÐºÐ»ÑŽÑ‡Ð°Ñ Ð¿Ð¾Ð´ÐºÐ°Ñ‚ÐµÐ³Ð¾Ñ€Ð¸Ð¸' }] } - - { name: 'Search product', translations: [{ code: 'ru', label: 'Продукты' }] } + - { name: 'Search product', translations: [{ code: 'ru', label: 'Товары' }] } - { name: 'Search profiles', translations: [{ code: 'ru', label: 'Пользователи' }] } - { name: 'Search result', translations: [{ code: 'ru', label: 'Результаты поиÑка' }] } - { name: 'Search results', translations: [{ code: 'ru', label: 'Результаты поиÑка' }] } @@ -723,7 +757,7 @@ XLite\Model\LanguageLabel: - { name: 'Select language to edit', translations: [{ code: 'ru', label: 'Выберите Ñзык Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ' }] } - { name: 'Select one', translations: [{ code: 'ru', label: 'Выбрать...' }] } - { name: 'Select one...', translations: [{ code: 'ru', label: 'Выбрать...' }] } - - { name: 'Select the membership level and area. for which product prices, including VAT, are defined by the shop administrator', translations: [{ code: 'ru', label: 'Выберите группу и зону Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… цены Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ ÐДС задаютÑÑ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратором' }] } + - { name: 'Select the membership level and area. for which product prices, including VAT, are defined by the shop administrator', translations: [{ code: 'ru', label: 'Выберите группу и зону, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ цены, включающие ÐДС, задаютÑÑ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратором. Включенный ÐДС будет вычтен из цены Ð´Ð»Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð¾Ð² из других зон или входÑщих в группы, отличные от указанных.

ЕÑли цены заданы без ÐДС, задайте группу и зону Ñ 0% ÐДС ниже.' }] } - { name: 'Set', translations: [{ code: 'ru', label: 'Выбрано' }] } - { name: 'Set the sale price', translations: [{ code: 'ru', label: 'УÑтановить цену раÑпродажи' }] } - { name: 'Set this language as default for customer zone', translations: [{ code: 'ru', label: 'Сделать Ñтандартным Ñзыком клиентÑкой зоны' }] } @@ -762,7 +796,7 @@ XLite\Model\LanguageLabel: - { name: 'SKU: z-a', translations: [{ code: 'ru', label: 'Код: Ñ-а' }] } - { name: 'SMTP server', translations: [{ code: 'ru', label: 'SMTP Ñервер' }] } - { name: 'Soft reset URL (disables only unsafe modules and runs application)', translations: [{ code: 'ru', label: 'МÑгкий ÑÐ±Ñ€Ð¾Ñ URL (выключает только небезопаÑные модули и запуÑкает приложение)' }] } - - { name: 'Some products could have been imported incorrectly', translations: [{ code: 'ru', label: 'Ðекоторые продукты могли быть импортированы некорректно. ПожалуйÑта, проверте каталог. Ðайдите продукт по ID в файле лога импорта, доÑтупного по указанной ÑÑылке.' }] } + - { name: 'Some products could have been imported incorrectly', translations: [{ code: 'ru', label: 'Ðекоторые товары могли быть импортированы некорректно. ПожалуйÑта, проверьте каталог. Ðайдите товар по ID в файле лога импорта, доÑтупного по указанной ÑÑылке.' }] } - { name: 'Sort by', translations: [{ code: 'ru', label: 'Сортировать по' }] } - { name: 'Specified e-mail address is already used by other user.', translations: [{ code: 'ru', label: 'Указанный email Ð°Ð´Ñ€ÐµÑ ÑƒÐ¶Ðµ иÑпользуетÑÑ Ð´Ñ€ÑƒÐ³Ð¸Ð¼ пользователем.' }] } - { name: 'State', translations: [{ code: 'ru', label: 'Штат' }] } @@ -780,9 +814,9 @@ XLite\Model\LanguageLabel: - { name: 'Substring', translations: [{ code: 'ru', label: 'ПодÑтрока' }] } - { name: 'Subtotal', translations: [{ code: 'ru', label: 'Сумма' }] } - { name: 'Subtotal range', translations: [{ code: 'ru', label: 'Интервал Ñумм' }] } - - { name: 'Successfully imported X new products', translations: [{ code: 'ru', label: 'УÑпешно импортировано {{new}} новых продуктов' }] } - - { name: 'Successfully imported X new products and upgraded Y old products', translations: [{ code: 'ru', label: 'УÑпешно импотировано {{new}} новых продуктов и обновлено {{old}} ÑущеÑтвующих' }] } - - { name: 'Successfully upgraded Y old products', translations: [{ code: 'ru', label: 'УÑпешно обновлено {{old}} ÑущеÑтвующих продуктов' }] } + - { name: 'Successfully imported X new products', translations: [{ code: 'ru', label: 'УÑпешно импортировано {{new}} новых товаров' }] } + - { name: 'Successfully imported X new products and upgraded Y old products', translations: [{ code: 'ru', label: 'УÑпешно импотировано {{new}} новых товаров и обновлено {{old}} ÑущеÑтвующих' }] } + - { name: 'Successfully upgraded Y old products', translations: [{ code: 'ru', label: 'УÑпешно обновлено {{old}} ÑущеÑтвующих товаров' }] } - { name: 'Table', translations: [{ code: 'ru', label: 'Таблица' }] } - { name: 'Tax', translations: [{ code: 'ru', label: 'Ðалог' }] } - { name: 'Tax disabled', translations: [{ code: 'ru', label: 'Выключен' }] } @@ -805,14 +839,14 @@ XLite\Model\LanguageLabel: - { name: 'Thank you for your order', translations: [{ code: 'ru', label: 'Благодарим Ð²Ð°Ñ Ð·Ð° заказ' }] } - { name: 'The attachment has been added successfully', translations: [{ code: 'ru', label: 'ПрикреплÑемый файл уÑпешно добавлен' }] } - { name: 'The benchmark evaluates server environment', translations: [{ code: 'ru', label: 'ТеÑÑ‚ производительноÑти оценивает Ñерверную инфраÑтруктуру, а именно:
1. Файловую подÑиÑтему - ÑкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¸ запиÑи.
2. Сервер баз данных - ÑкороÑть вычиÑлений, ÑкороÑть Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¸ запиÑи данных.
3. ВычиÑлительную мощноÑть - ÑкороÑть вычиÑлений и обмена данными в памÑти.
Общее Ð²Ñ€ÐµÐ¼Ñ Ñ‚ÐµÑÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ÑкладываетÑÑ Ð¸Ð· времени, затраченного на каждый их Ñтих теÑтов. ' }] } - - { name: 'The changes will be applied to all selected products', translations: [{ code: 'ru', label: 'Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ применены ко вÑем выделенным продуктам' }] } + - { name: 'The changes will be applied to all selected products', translations: [{ code: 'ru', label: 'Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ применены ко вÑем выделенным товарам' }] } - { name: 'The confirmation URL link was mailed to email', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€ÐµÐ¹Ð´Ð¸Ñ‚Ðµ по ÑÑылке (URL), отправленной вам на {{email}}' }] } - { name: 'The default interface language cannot be disabled', translations: [{ code: 'ru', label: 'Язык интерфейÑа, иÑпользуемый по умолчанию, не может быть отключен' }] } - { name: 'The detailed image has been added successfully', translations: [{ code: 'ru', label: 'Детальное изображение уÑпешно добавлено' }] } - { name: 'The detailed image has been deleted', translations: [{ code: 'ru', label: 'Детальное изображение уÑпешно удалено' }] } - { name: 'The detailed images have been updated successfully', translations: [{ code: 'ru', label: 'Детальное изображение уÑпешно обновлено' }] } - { name: 'The edited language has not been found', translations: [{ code: 'ru', label: 'Редактируемый Ñзык не найден' }] } - - { name: 'The email with your account information was mailed to email', translations: [{ code: 'ru', label: 'Информацией об аккаунте была выÑлана на {{email}}. Ðеобходимо войти в ÑиÑтему Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ¸ полученной информации.' }] } + - { name: 'The email with your account information was mailed to email', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ð± аккаунте была выÑлана на {{email}}. Ðеобходимо войти в ÑиÑтему Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ¸ полученной информации.' }] } - { name: 'The exceptions have been updated successfully', translations: [{ code: 'ru', label: 'ИÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ ÑƒÑпешно обновлены' }] } - { name: 'The file was not loaded because of a failure on the server', translations: [{ code: 'ru', label: 'Файл не загружен из-за ошибки на Ñервере' }] } - { name: 'The following add-on(s) must be enabled', translations: [{ code: 'ru', label: 'Следующие модули должны быть включены' }] } @@ -834,10 +868,10 @@ XLite\Model\LanguageLabel: - { name: 'The module to uninstall has not been found', translations: [{ code: 'ru', label: 'Модуль, который вы пытаетеÑÑŒ удалить, не найден' }] } - { name: 'The modules have been updated', translations: [{ code: 'ru', label: 'Модуль уÑпешно обновлен' }] } - { name: 'The name of the edited language in the default application language has not been specified', translations: [{ code: 'ru', label: 'Ð˜Ð¼Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€ÑƒÐµÐ¼Ð¾Ð³Ð¾ Ñзыка не указано в Ñтандартном Ñзыке приложениÑ' }] } - - { name: 'The product option group has been added successfully', translations: [{ code: 'ru', label: 'Группа опций продукта уÑпешно добавлена' }] } - - { name: 'The product option group has been updated successfully', translations: [{ code: 'ru', label: 'Группа опций продукта уÑпешно обновлена' }] } - - { name: 'The product option groups have been updated successfully', translations: [{ code: 'ru', label: 'Группы опций продукта уÑпешно обновлены' }] } - - { name: 'The product option groups have not been successfully updated', translations: [{ code: 'ru', label: 'Группа опций продукта не была обновлена' }] } + - { name: 'The product option group has been added successfully', translations: [{ code: 'ru', label: 'Группа опций товара уÑпешно добавлена' }] } + - { name: 'The product option group has been updated successfully', translations: [{ code: 'ru', label: 'Группа опций товара уÑпешно обновлена' }] } + - { name: 'The product option groups have been updated successfully', translations: [{ code: 'ru', label: 'Группы опций товара уÑпешно обновлены' }] } + - { name: 'The product option groups have not been successfully updated', translations: [{ code: 'ru', label: 'Группа опций товара не была обновлена' }] } - { name: 'The requested page could not be found.', translations: [{ code: 'ru', label: 'Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ð°Ñ Ñтраница не найдена' }] } - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back your present database data up before restoring one of the previous states from a back-up.', translations: [{ code: 'ru', label: 'Процедура воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°. Ð’Ñе текущие данные будут Ñтерты и перезапиÑаны данными из архива. ÐаÑтоÑтельно рекомендуетÑÑ Ñоздать резервную копию текущей базы данных до начала процеÑÑа воÑÑтановлениÑ.' }] } - { name: 'The same as shipping', translations: [{ code: 'ru', label: 'Совпадает Ñ Ð°Ð´Ñ€ÐµÑом получателÑ' }] } @@ -868,7 +902,7 @@ XLite\Model\LanguageLabel: - { name: 'The X language has been disabled successfully', translations: [{ code: 'ru', label: '{{language}} Ñзык уÑпешно отключен' }] } - { name: 'The X language has been enabled successfully', translations: [{ code: 'ru', label: '{{language}} Ñзык уÑпешно включен' }] } - { name: 'The X module has been disabled in an abnormal way', translations: [{ code: 'ru', label: 'Модуль {{module}} отключен аварийно' }] } - - { name: 'The X module has been installed incorrectly. Please see the logs for more information', translations: [{ code: 'ru', label: 'Модуль {{module}} уÑтановлен неправильно. Подробной информацию можно найти в логе уÑтановки' }] } + - { name: 'The X module has been installed incorrectly. Please see the logs for more information', translations: [{ code: 'ru', label: 'Модуль {{module}} уÑтановлен неправильно. Подробную информацию можно найти в логе уÑтановки' }] } - { name: 'The X module has been installed successfully', translations: [{ code: 'ru', label: 'Модуль {{module}} уÑпешно уÑтановлен' }] } - { name: 'The X module has been installed with errors: the DB has not been modified correctly', translations: [{ code: 'ru', label: 'Модуль {{module}} уÑтановлен Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°Ð¼Ð¸: БД может Ñодержать ошибки' }] } - { name: 'The X module has been installed, but the module has a wrong module control class', translations: [{ code: 'ru', label: 'Модуль {{module}} уÑтановлен, но клаÑÑ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ð»ÐµÑ€Ð° Ð¼Ð¾Ð´ÑƒÐ»Ñ Ð½ÐµÐ²ÐµÑ€Ð½Ñ‹Ð¹' }] } @@ -887,12 +921,12 @@ XLite\Model\LanguageLabel: - { name: 'This component is automatically calculated by shipping add-on module and cannot be edited', translations: [{ code: 'ru', label: 'Данный компонент автоматичеÑки раÑчитываетÑÑ Ð¼Ð¾Ð´ÑƒÐ»Ñми доÑтавки и не может быть изменен.' }] } - { name: 'This email address is used for an existing account. Enter another email address or sign in', translations: [{ code: 'ru', label: 'Указанный e-mail Ð°Ð´Ñ€ÐµÑ ÑƒÐ¶Ðµ зарегиÑтрирован. ПожалуйÑта, укажите другой Ð°Ð´Ñ€ÐµÑ Ð¸Ð»Ð¸ ' }] } - { name: 'This field is required', translations: [{ code: 'ru', label: 'ОбÑзательное поле' }] } - - { name: 'This is a default zone which covers all addresses. It''s impossible to edit this zone''s countries, states etc', translations: [{ code: 'ru', label: 'Это зона иÑпользуетÑÑ Ð¿Ð¾ умолчанию и Ñодержит вÑе возможные адреÑа. Страны и штаты входÑщие в Ñту зону изменить нельзÑ.' }] } - - { name: 'This is a demo store with powerful LiteCommerce engine inside', translations: [{ code: 'ru', label: 'Это демонÑтрационный магазин Ñозданный на платформе LiteCommerce, оÑнованой на технологии шаблонов PHP5, Ñ Ð¸Ð½Ñ‚ÐµÐ³Ñ€Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð¾Ð¹ базой данных SQL.' }] } + - { name: 'This is a default zone which covers all addresses. It''s impossible to edit this zone''s countries, states etc', translations: [{ code: 'ru', label: 'Это зона иÑпользуетÑÑ Ð¿Ð¾ умолчанию и Ñодержит вÑе возможные адреÑа. Страны и штаты, входÑщие в Ñту зону, изменить нельзÑ.' }] } + - { name: 'This is a demo store with powerful LiteCommerce engine inside', translations: [{ code: 'ru', label: 'Это демонÑтрационный магазин, Ñозданный на платформе LiteCommerce, оÑнованой на технологии шаблонов PHP5, Ñ Ð¸Ð½Ñ‚ÐµÐ³Ñ€Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð¾Ð¹ базой данных SQL.' }] } - { name: 'This month', translations: [{ code: 'ru', label: 'За Ñтот меÑÑц' }] } - - { name: 'This product has been added to your bag', translations: [{ code: 'ru', label: 'Этот продукт добавлен в вашу корзину' }] } - - { name: 'This product is out of stock or it has been disabled for sale', translations: [{ code: 'ru', label: '(!) Продукт отÑутÑтвует на Ñкладе или ÑнÑÑ‚ Ñ Ð¿Ñ€Ð¾Ð´Ð°Ð¶Ð¸.' }] } - - { name: 'This section displays 10 top-selling products for today, this week and this month', translations: [{ code: 'ru', label: 'Ð”Ð°Ð½Ð½Ð°Ñ ÑÐµÐºÑ†Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑтавлÑет 10 наиболее чаÑто покупаемых продуктов на ÑегоднÑшний день, за текущую неделю и меÑÑц.' }] } + - { name: 'This product has been added to your bag', translations: [{ code: 'ru', label: 'Этот товар добавлен в вашу корзину' }] } + - { name: 'This product is out of stock or it has been disabled for sale', translations: [{ code: 'ru', label: '(!) Товар отÑутÑтвует на Ñкладе или ÑнÑÑ‚ Ñ Ð¿Ñ€Ð¾Ð´Ð°Ð¶Ð¸.' }] } + - { name: 'This section displays 10 top-selling products for today, this week and this month', translations: [{ code: 'ru', label: 'Ð”Ð°Ð½Ð½Ð°Ñ ÑÐµÐºÑ†Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑтавлÑет 10 наиболее чаÑто покупаемых товаров на ÑегоднÑшний день, за текущую неделю и меÑÑц.' }] } - { name: 'This section displays order placement statistics', translations: [{ code: 'ru', label: 'Ð’ данной Ñекции показана ÑтатиÑтика Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð¾Ð².' }] } - { name: 'This site requires JavaScript to function properly.', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ð¾Ð¹ работы данного Ñайта необходим JavaScript. ПожалуйÑта, включите поддержку JavaScript в Ñвоем браузере.' }] } - { name: 'This tax is calculated based on customer''s billing address', translations: [{ code: 'ru', label: 'Ðалоги раÑÑчитаны по адреÑу плательщика' }] } @@ -903,19 +937,19 @@ XLite\Model\LanguageLabel: - { name: 'Thumbnail', translations: [{ code: 'ru', label: 'Мини-изображение' }] } - { name: 'Title', translations: [{ code: 'ru', label: 'Обращение' }] } - { name: 'To fix this problem, do the following: 3 points', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ проблемы:
  • убедитеÑÑŒ, что хоÑтинг поддерживает и предоÑтавлÑет Ñоединение по протоколу HTTPS;
  • проверте параметры HTTPS (параметр "https_host" в файле "etc/config.php" должен иметь правильное значение);
  • обновите Ñту Ñтраницу.
' }] } - - { name: 'To get the format of the import data you can export your products to a file', translations: [{ code: 'ru', label: 'Определить формат файла импорта можно по файлу ÑкÑпорта, ÑкÑпортировав продукты в файл и раÑÑмотрев его формат. ' }] } - - { name: 'To place the order please accept Terms and Conditions', translations: [{ code: 'ru', label: 'Чтобы отправить заказ, необходимо принÑть УÑÐ»Ð¾Ð²Ð¸Ñ Ð¸ÑпользованиÑ' }] } + - { name: 'To get the format of the import data you can export your products to a file', translations: [{ code: 'ru', label: 'Определить формат файла импорта можно по файлу ÑкÑпорта, ÑкÑпортировав товары в файл и раÑÑмотрев его формат' }] } + - { name: 'To place the order please accept Terms and Conditions', translations: [{ code: 'ru', label: 'Чтобы размеÑтить заказ, необходимо принÑть УÑÐ»Ð¾Ð²Ð¸Ñ Ð¸ÑпользованиÑ' }] } - { name: 'To place the order please complete the previous steps first', translations: [{ code: 'ru', label: 'Чтобы продолжить оформление заказа, необходимо завершить предыдущие шаги' }] } - { name: 'To recover your password, please type in the valid e-mail address you use as a login', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ, пожалуйÑта, введите Ñвой e-mail адреÑ, иÑпользуемый Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в аккаунт.' }] } - { name: 'To restore the images stored in the file system you have to copy them from the archive to the LiteCommerce catalog', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ð¹, хранÑщихÑÑ Ð² файловой ÑиÑтеме, необходимо Ñкопировать их из архива в каталог LiteCommerce, Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°Ñ Ð²Ð¾ внимание Ñтруктуру каталога.' }] } - { name: 'Today', translations: [{ code: 'ru', label: 'СегоднÑ' }] } - { name: 'Top sellers', translations: [{ code: 'ru', label: 'Лидеры продаж' }] } - - { name: 'Top X products', translations: [{ code: 'ru', label: 'Топ {{count}} продуктов' }] } + - { name: 'Top X products', translations: [{ code: 'ru', label: 'Топ {{count}} товаров' }] } - { name: 'Total', translations: [{ code: 'ru', label: 'Ð’Ñего' }] } - { name: 'translate to', translations: [{ code: 'ru', label: 'перевеÑти на' }] } - { name: 'Trying to access the shop at X', translations: [{ code: 'ru', label: 'Попытка ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Ð¼Ð°Ð³Ð°Ð·Ð¸Ð½Ð¾Ð¼ {{url}} ...' }] } - { name: 'trying to install a non-marketplace module: "{{name}}"', translations: [{ code: 'ru', label: 'попытка уÑтановить непроверенный модуль: "{{name}}"' }] } - - { name: 'trying to unpack non-downloaded archives', translations: [{ code: 'ru', label: 'попытка раÑпаковать незагруженых архивов' }] } + - { name: 'trying to unpack non-downloaded archives', translations: [{ code: 'ru', label: 'попытка раÑпаковать незагруженные архивы' }] } - { name: 'Type', translations: [{ code: 'ru', label: 'Тип' }] } - { name: 'U.S.P.S. settings', translations: [{ code: 'ru', label: 'Параметры U.S.P.S.' }] } - { name: 'unable to add module entry to the installation list: "{{name}}"', translations: [{ code: 'ru', label: 'невозможно добавить модуль в ÑпиÑок уÑтановки: "{{name}}"' }] } @@ -933,14 +967,14 @@ XLite\Model\LanguageLabel: - { name: 'Update', translations: [{ code: 'ru', label: 'Обновить' }] } - { name: 'Update exceptions', translations: [{ code: 'ru', label: 'Обновить иÑключениÑ' }] } - { name: 'Update module', translations: [{ code: 'ru', label: 'Обновить модуль' }] } - - { name: 'Update product', translations: [{ code: 'ru', label: 'Обновить продукт' }] } + - { name: 'Update product', translations: [{ code: 'ru', label: 'Обновить товар' }] } - { name: 'Update profile', translations: [{ code: 'ru', label: 'Обновить профиль' }] } - { name: 'Updates are available', translations: [{ code: 'ru', label: 'ДоÑтупны обновлениÑ' }] } - { name: 'Updates for the LC core and/or installed modules are available', translations: [{ code: 'ru', label: 'ДоÑтупны Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð¼Ð¾Ð´ÑƒÐ»ÐµÐ¹ и/или Ñдра LC' }] } - - { name: 'Updates for your version', translations: [{ code: 'ru', label: 'ÐžÐ±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð°ÑˆÐµÐ¹ верÑии' }] } + - { name: 'Updates for your version ({{version}})', translations: [{ code: 'ru', label: 'ÐžÐ±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð°ÑˆÐµÐ¹ верÑии ({{version}})' }] } - { name: 'Upgrade', translations: [{ code: 'ru', label: 'Обновление' }] } - { name: 'Upgrade core', translations: [{ code: 'ru', label: 'Обновление Ñдра' }] } - - { name: 'Upgrade to version', translations: [{ code: 'ru', label: 'Обновить до верÑии' }] } + - { name: 'Upgrade to version {{version}}', translations: [{ code: 'ru', label: 'Обновить до верÑии {{version}}' }] } - { name: 'Upload', translations: [{ code: 'ru', label: 'Загрузить' }] } - { name: 'Upload add-on', translations: [{ code: 'ru', label: 'Загрузить дополнение' }] } - { name: 'Upload and restore', translations: [{ code: 'ru', label: 'Загрузить и воÑÑтановить' }] } @@ -950,11 +984,11 @@ XLite\Model\LanguageLabel: - { name: 'Use this component to add an extra charge for every item ordered.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñтот компонент Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ð°Ñ†ÐµÐ½ÐºÐ¸ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ единицы заказываемого товара.' }] } - { name: 'Use this component to adjust shipping rates according to order subtotals.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñтот компонент Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑтоимоÑти доÑтавки в завиÑимоÑти от Ñуммы заказа.' }] } - { name: 'Use this component to specify weight-based charges.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñтот компонент Ð´Ð»Ñ Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð½Ð°Ñ†ÐµÐ½Ð¾Ðº в завиÑимоÑти от веÑа заказа.' }] } - - { name: 'Use this section to back the database of your online store up. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð³Ð¾ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð‘Ð” магазина. Примечание: Ñозданиt резервной копии БД может занÑть продолжительное времÑ.' }] } - - { name: 'Use this section to define shipping rates calculation rules', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñту Ñекцию, чтобы определить правила раÑчета ÑтоимоÑти доÑтавки.' }] } + - { name: 'Use this section to back the database of your online store up. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð³Ð¾ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð‘Ð” магазина. Примечание: Ñоздание резервной копии БД может занÑть продолжительное времÑ.' }] } + - { name: 'Use this section to define shipping rates calculation rules', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию, чтобы определить правила раÑчета ÑтоимоÑти доÑтавки.' }] } - { name: 'Use this section to define shipping zones.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð·Ð¾Ð½ доÑтавки.' }] } - - { name: 'Use this section to define your store''s shipping methods.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñту Ñекцию Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¼ÐµÑ‚Ð¾Ð´Ð¾Ð² доÑтавки, доÑтупных в магазине.' }] } - - { name: 'Use this section to manage the list of existing countries. This list is used in the shipping settings and calculations, and in the registration form at the Customer Front-end.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñту Ñекцию Ð´Ð»Ñ ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÑпиÑком Ñтран. Этот ÑпиÑок иÑпользуетÑÑ Ð¿Ñ€Ð¸ наÑтройке ÑпоÑобов доÑтавки, раÑчете налогов, а так же в региÑтрационной форме магазина.' }] } + - { name: 'Use this section to define your store''s shipping methods.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¼ÐµÑ‚Ð¾Ð´Ð¾Ð² доÑтавки, доÑтупных в магазине.' }] } + - { name: 'Use this section to manage the list of existing countries. This list is used in the shipping settings and calculations, and in the registration form at the Customer Front-end.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÑпиÑком Ñтран. Этот ÑпиÑок иÑпользуетÑÑ Ð¿Ñ€Ð¸ наÑтройке ÑпоÑобов доÑтавки, раÑчете налогов, а так же в региÑтрационной форме магазина.' }] } - { name: 'Use this section to manage the lists of counties, provinces, regions and states of different countries. The lists are used in shipping settings and calculations, and in the registration form at the Customer Front-end.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñту ÑÐµÐºÑ†Ð¸Ñ Ð´Ð»Ñ ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÑпиÑками графÑтв, провинций, регионов и штатов разных Ñтран. Этои ÑпиÑки иÑпользуютÑÑ Ð¿Ñ€Ð¸ наÑтройке ÑпоÑобов доÑтавки, раÑчете налогов, а так же в региÑтрационной форме магазина.' }] } - { name: 'Use this section to restore the database of your online store. Please note that the database restoration procedure can take up to several minutes', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ð²Ð¾ÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð‘Ð” магазина. Примечание: процедура воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ занÑть продолжительное времÑ' }] } - { name: 'Use this section to review the list of existing membership levels and add new ones', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра ÑущеÑтвующих и Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ð¾Ð²Ñ‹Ñ… групп' }] } @@ -981,7 +1015,7 @@ XLite\Model\LanguageLabel: - { name: 'Weight range', translations: [{ code: 'ru', label: 'ВеÑовой диапазон' }] } - { name: 'Welcome to LiteCommerce', translations: [{ code: 'ru', label: 'Добро пожаловать в LiteCommerce' }] } - { name: 'What is benchmark?', translations: [{ code: 'ru', label: 'Что такое теÑÑ‚ производительноÑти?' }] } - - { name: 'When the export is completed, you will be prompted to download the product data file', translations: [{ code: 'ru', label: 'По завершении процеÑÑа ÑкÑпортированиÑ, вам будет предложено Ñкачать файл Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼Ð¸ о продуктах' }] } + - { name: 'When the export is completed, you will be prompted to download the product data file', translations: [{ code: 'ru', label: 'По завершении процеÑÑа ÑкÑпортированиÑ, вам будет предложено Ñкачать файл Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼Ð¸ о товарах' }] } - { name: 'Wrong method_id specifed', translations: [{ code: 'ru', label: 'Ðе выбран метод' }] } - { name: 'X bytes', translations: [{ code: 'ru', label: '{{value}} байт' }] } - { name: 'X days', translations: [{ code: 'ru', label: '{{days}} дней' }] } @@ -992,7 +1026,7 @@ XLite\Model\LanguageLabel: - { name: 'X item(s)', translations: [{ code: 'ru', label: '{{count}} Ñлемент(ов)' }] } - { name: 'X items', translations: [{ code: 'ru', label: '{{count}} Ñлементов' }] } - { name: 'X items available', translations: [{ code: 'ru', label: '{{count}} доÑтупно' }] } - - { name: 'X items in bag', translations: [{ code: 'ru', label: '{{count}} продуктов в корзине' }] } + - { name: 'X items in bag', translations: [{ code: 'ru', label: '{{count}} товара(ов) в корзине' }] } - { name: 'X kB', translations: [{ code: 'ru', label: '{{value}} КБ' }] } - { name: 'X labels', translations: [{ code: 'ru', label: '{{language}} метки' }] } - { name: 'X Language (Code: Y)', translations: [{ code: 'ru', label: '{{language}} Язык (Код: {{code}})' }] } @@ -1000,8 +1034,8 @@ XLite\Model\LanguageLabel: - { name: 'X minutes', translations: [{ code: 'ru', label: '{{minutes}} минут' }] } - { name: 'X module settings', translations: [{ code: 'ru', label: '{{name}} ({{author}}) параметры модулÑ' }] } - { name: 'X months', translations: [{ code: 'ru', label: '{{months}} меÑÑцев' }] } - - { name: 'X orders', translations: [{ code: 'ru', label: '{{count}} заказов' }] } - - { name: 'X products found', translations: [{ code: 'ru', label: '{{count}} продуктов найдено' }] } + - { name: 'X orders', translations: [{ code: 'ru', label: '{{count}} заказ(ов)' }] } + - { name: 'X products found', translations: [{ code: 'ru', label: '{{count}} товаров найдено' }] } - { name: 'X results found', translations: [{ code: 'ru', label: '{{count}} результатов найдено' }] } - { name: 'X seconds', translations: [{ code: 'ru', label: '{{seconds}} Ñекунд' }] } - { name: 'X years', translations: [{ code: 'ru', label: '{{years}} год/лет' }] } @@ -1013,15 +1047,15 @@ XLite\Model\LanguageLabel: - { name: 'Yes', translations: [{ code: 'ru', label: 'Да' }] } - { name: 'You are going to delete the X language', translations: [{ code: 'ru', label: 'Ð’Ñ‹ ÑобираетеÑÑŒ удалить {{language}} Ñзык. Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°. Ð’Ñ‹ уверены, что хотите продолжить?' }] } - { name: 'You can choose if to download your database data', translations: [{ code: 'ru', label: 'Ð’Ñ‹ можете Ñкачать базу данных (SQL дамп), непоÑредÑтвенно на Ñвой локальный компьютер, нажав кнопку "Скачать SQL файл", или Ñохранить базу данных в файл на веб-Ñервере ("vаг/backup/sqldump.sql.php"), нажав кнопку "Создать SQL файл".
ЕÑли вы выбираете второй вариант, вы можете Ñкачать файл Ñ Ñервера позже и удалить его Ñ Ñервера, нажав кнопку "Удалить SQL файл".' }] } - - { name: 'You can upload the database data directly from your local computer', translations: [{ code: 'ru', label: 'Ð’Ñ‹ можете загрузить базу данных непоÑредÑтвенно Ñо Ñвоего локального компьютера, нажав кнопку "Обзор", выбрав файл дампа SQL и нажав кнопку "Загрузка и воÑÑтановление". Ð¥Ð¾Ñ‚Ñ Ñтот метод удобнеев, он имеет ограничение по размеру файла {{N}}.' }] } + - { name: 'You can upload the database data directly from your local computer', translations: [{ code: 'ru', label: 'Ð’Ñ‹ можете загрузить базу данных непоÑредÑтвенно Ñо Ñвоего локального компьютера, нажав кнопку "Обзор", выбрав файл дампа SQL и нажав кнопку "Загрузка и воÑÑтановление". Ð¥Ð¾Ñ‚Ñ Ñтот метод удобнее, он имеет ограничение по размеру файла {{N}}.' }] } - { name: 'You have selected to delete your profile. Please, confirm you want to proceed', translations: [{ code: 'ru', label: 'Ð’Ñ‹ ÑобираетеÑÑŒ удалить Ñвой профиль. ПожалуйÑта, подтвердите удаление.' }] } - { name: 'You need Phar extension for PHP on your server to download modules from Modules Marketplace', translations: [{ code: 'ru', label: 'Вам нужно уÑтановить раÑширение Phar Ð´Ð»Ñ PHP на вашем Ñервере чтобы уÑтанавливать Ð´Ð¾Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ ÐœÐ°Ñ€ÐºÐµÑ‚Ð¿Ð»ÐµÐ¹Ñ' }] } - { name: 'you save', translations: [{ code: 'ru', label: 'ÑкономиÑ' }] } - { name: 'Your account information will be e-mailed to you shortly.', translations: [{ code: 'ru', label: 'Данные о вашем акаунте будут Ñкоро отправлены вам на E-mail.' }] } - { name: 'Your cart', translations: [{ code: 'ru', label: 'Корзина' }] } - - { name: 'Your products will be exported as a CSV file.', translations: [{ code: 'ru', label: 'Продукты будут ÑкÑпортированы в CSV файл' }] } + - { name: 'Your products will be exported as a CSV file.', translations: [{ code: 'ru', label: 'Товары будут ÑкÑпортированы в CSV файл' }] } - { name: 'Your profile has been modified. You can check your account after you log in to the site', translations: [{ code: 'ru', label: 'Ваш профиль изменен. Ð’Ñ‹ можете проверить Ñвой аккаунт, Ð¿ÐµÑ€ÐµÐ¹Ð´Ñ Ð¿Ð¾ Ñледующей ÑÑылке {{url}}' }] } - - { name: 'Your shopping bag - X items', translations: [{ code: 'ru', label: 'Ваша корзина - {{count}} продуктов' }] } + - { name: 'Your shopping bag - X items', translations: [{ code: 'ru', label: 'Ваша корзина - {{count}} товаров' }] } - { name: 'Your shopping bag is empty', translations: [{ code: 'ru', label: 'Ваша корзина пуÑта' }] } - { name: 'Your shopping cart is empty', translations: [{ code: 'ru', label: 'Ваша корзина пуÑта' }] } - { name: 'Your store is currently unable to calculate taxes', translations: [{ code: 'ru', label: 'Ваш магазин не наÑтроен Ð´Ð»Ñ Ñ€Ð°Ñчета налогов' }] } @@ -1032,7 +1066,7 @@ XLite\Model\LanguageLabel: - { name: 'Zone details have been updated successfully', translations: [{ code: 'ru', label: 'Данные о зоне уÑпешно обновлены' }] } - { name: 'Zone name', translations: [{ code: 'ru', label: 'Ðазвание зоны' }] } - { name: 'Zones', translations: [{ code: 'ru', label: 'Зоны' }] } - - { name: 'It is impossible to delete or create user accounts because your store currently works as an integration with Drupal and shares users with Drupal. Deleting/creating user accounts is possible via Drupal administrator interface.', translations: [{ code: 'ru', label: 'Ðевозможно Ñоздавать и удалÑть пользователей Ñ‚.к. магазин работает в режиме интеграции Ñ Drupal''ом. Создание и удаление пользователей возможно, но через панель админиÑÑ‚Ñ€Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Drupal''а.' }] } + - { name: 'It is impossible to delete or create user accounts because your store currently works as an integration with Drupal and shares users with Drupal. Deleting/creating user accounts is possible via Drupal administrator interface.', translations: [{ code: 'ru', label: 'Ðевозможно Ñоздавать и удалÑть пользователей Ñ‚.к. магазин работает в режиме интеграции Ñ Drupal. Создание и удаление пользователей возможно, но через панель админиÑÑ‚Ñ€Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Drupal.' }] } - { name: 'Unknown', translations: [{ code: 'ru', label: 'ÐеизвеÑтно' }] } - { name: 'Quantity: high to low', translations: [{ code: 'ru', label: 'КоличеÑтво: по убыванию' }] } - { name: 'Quantity: low to high', translations: [{ code: 'ru', label: 'КоличеÑтво: по возраÑтанию' }] } @@ -1054,7 +1088,7 @@ XLite\Model\LanguageLabel: - { name: 'Site map has not been registred in X', translations: [{ code: 'ru', label: 'Карта Ñайта не была зарегиÑтрирована в {{engine}}' }] } - { name: 'Incl. X', translations: [{ code: 'ru', label: 'Вкл. {{name}}' }] } - { name: '- out of stock -', translations: [{ code: 'ru', label: '- нет в наличии -' }] } - - { name: 'Product is out of stock!', translations: [{ code: 'ru', label: 'Продукта нет в наличии!' }] } + - { name: 'Product is out of stock!', translations: [{ code: 'ru', label: 'Товара нет в наличии!' }] } - { name: 'The option combination you selected', translations: [{ code: 'ru', label: 'Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ ÐºÐ¾Ð¼Ð±Ð¸Ð½Ð°Ñ†Ð¸Ñ Ð¾Ð¿Ñ†Ð¸Ð¹' }] } - { name: 'is not available. Please make another choice.', translations: [{ code: 'ru', label: 'недоÑтупна. ПожалуйÑта выберите другие опции.' }] } - { name: 'Selected options', translations: [{ code: 'ru', label: 'Выбраны опции' }] } @@ -1067,22 +1101,130 @@ XLite\Model\LanguageLabel: - { name: 'Back to order list', translations: [{ code: 'ru', label: 'Ðазад к ÑпиÑку заказов' }] } - { name: 'Order', translations: [{ code: 'ru', label: 'Заказ' }] } - { name: 'Order details', translations: [{ code: 'ru', label: 'ÐŸÐ¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ заказе' }] } - - { name: 'Username verified. The password will be sent to your e-mail after the order is placed', translations: [{ code: 'ru', label: 'Проверка выполнена. Пароль будет отправлен на ваш e-mail Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñле того как будет размещен ваш заказ' }] } + - { name: 'Username verified. The password will be sent to your e-mail after the order is placed', translations: [{ code: 'ru', label: 'Проверка выполнена. Пароль будет отправлен на ваш e-mail Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñле того, как будет размещен ваш заказ' }] } - { name: 'License key has been successfully verified for "{{name}}" module by "{{author}}" author', translations: [{ code: 'ru', label: 'Лицензионный ключ был уÑпешно проверен Ð´Ð»Ñ Ð¼Ð¾Ð´ÑƒÐ»Ñ "{{name}}" автор "{{author}}"' }] } - { name: 'Response from marketplace is not received', translations: [{ code: 'ru', label: 'Ðе получен ответ от МаркетплейÑ' }] } - { name: 'Response from marketplace: ', translations: [{ code: 'ru', label: 'Ответ от МаркетплейÑ: ' }] } - - { name: 'All products on sale', translations: [{ code: 'ru', label: 'Ð’Ñе продукты на раÑпродаже' }] } + - { name: 'All products on sale', translations: [{ code: 'ru', label: 'Ð’Ñе товары на раÑпродаже' }] } - { name: 'Old price', translations: [{ code: 'ru', label: 'Ð¡Ñ‚Ð°Ñ€Ð°Ñ Ñ†ÐµÐ½Ð°' }] } - { name: 'Search for modules', translations: [{ code: 'ru', label: 'Введите название модулÑ' }] } - { name: 'Warning! There is not enough product items in stock to process the order', translations: [{ code: 'ru', label: 'Предупреждение! ÐедоÑтаточно товаров на Ñкладе Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ¸ заказа' }] } - { name: 'Dear', translations: [{ code: 'ru', label: 'Уважаемый (аÑ)' }] } - - { name: 'Products information has been successfully updated', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ продукте уÑпешно обновлена' }] } + - { name: 'Products information has been successfully updated', translations: [{ code: 'ru', label: 'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ товаре уÑпешно обновлена' }] } - { name: 'Are you sure you wish to delete the selected zones?', translations: [{ code: 'ru', label: 'Подтвердите удаление выбранных зон' }] } - { name: 'It is impossible to edit some user profile fields because your store currently works as an integration with Drupal and shares users with Drupal. Modifying these fields is possible via Drupal administrator interface.', translations: [{ code: 'ru', label: 'Ðевозможно изменить некоторые Ð¿Ð¾Ð»Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ, потому что ваш магазин в наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÐµÑ‚ в режиме интеграции Ñ Drupal и иÑпользует данные пользователей Drupal. Изменение Ñтих полей возможно только через Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратора Drupal.' }] } - { name: 'Test email configuration', translations: [{ code: 'ru', label: 'Проверка параметров Ñлектронной почты' }] } - - { name: 'From email', translations: [{ code: 'ru', label: 'e-mail отправителÑ' }] } - - { name: 'To email', translations: [{ code: 'ru', label: 'e-mail получателÑ' }] } + - { name: 'From email', translations: [{ code: 'ru', label: 'Е-mail отправителÑ' }] } + - { name: 'To email', translations: [{ code: 'ru', label: 'Е-mail получателÑ' }] } - { name: 'Email body', translations: [{ code: 'ru', label: 'Тело ÑообщениÑ' }] } - { name: 'Send test email', translations: [{ code: 'ru', label: 'Отправить теÑтовое Ñообщение' }] } - { name: 'not installed', translations: [{ code: 'ru', label: 'не уÑтановлен' }] } - { name: 'Install', translations: [{ code: 'ru', label: 'УÑтановить' }] } + - { name: 'Drupal frontend', translations: [{ code: 'ru', label: 'КлиентÑÐºÐ°Ñ Ñ‡Ð°Ñть Drupal' }] } + - { name: 'Return to Drupal', translations: [{ code: 'ru', label: 'ВернутьÑÑ Ð² Drupal' }] } + - { name: 'Username or e-mail', translations: [{ code: 'ru', label: 'Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð»Ð¸ Ð°Ð´Ñ€ÐµÑ e-mail' }] } + - { name: 'View update log', translations: [{ code: 'ru', label: 'ПоÑмотреть лог обновлениÑ' }] } + - { name: 'Do not close this page!', translations: [{ code: 'ru', label: 'Ðе закрывайте Ñту Ñтраницу!' }] } + - { name: 'Disable suspicious modules', translations: [{ code: 'ru', label: 'Отключить подозрительные модули' }] } + - { name: 'Disable all modules in the system', translations: [{ code: 'ru', label: 'Отключить вÑе модули в ÑиÑтеме' }] } + - { name: 'soft reset', translations: [{ code: 'ru', label: 'мÑгкий ÑброÑ' }] } + - { name: 'hard reset', translations: [{ code: 'ru', label: 'жеÑткий ÑброÑ' }] } + - { name: 'Restore last backup', translations: [{ code: 'ru', label: 'ВоÑÑтановить поÑледний архив' }] } + - { name: 'should be performed manually', translations: [{ code: 'ru', label: 'должен быть выполнен вручную' }] } + - { name: 'Updated components', translations: [{ code: 'ru', label: 'Обновленные компоненты' }] } + - { name: 'The upgrade is completed. Please, do not close this page until you check your web site and check that everything works properly', translations: [{ code: 'ru', label: 'Обновление завершено. ПожалуйÑта, не закрывайте Ñту Ñтраницу пока не проверите магазин и не удоÑтоверитеÑÑŒ, что вÑе работает правильно' }] } + - { name: 'Yes, I agree with License agreement', translations: [{ code: 'ru', label: 'Да, Ñ Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°ÑŽ Лицензионное Ñоглашение' }] } + - { name: 'Logged as', translations: [{ code: 'ru', label: 'Вход как' }] } + - { name: 'Added to cart', translations: [{ code: 'ru', label: 'Добавлен в корзину' }] } + - { name: 'Click to unblock', translations: [{ code: 'ru', label: 'Кликните Ð´Ð»Ñ Ñ€Ð°Ð·Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ¸' }] } + - { name: 'Activate your paid module license', translations: [{ code: 'ru', label: 'Ðктивировать лицензию' }] } + - { name: 'Promotions', translations: [{ code: 'ru', label: 'Продвижение' }] } + - { name: 'Discount', translations: [{ code: 'ru', label: 'Скидка' }] } + - { name: 'Coupons', translations: [{ code: 'ru', label: 'Купоны' }] } + - { name: 'Add discount', translations: [{ code: 'ru', label: 'Создать Ñкидку' }] } + - { name: 'Volume discounts', translations: [{ code: 'ru', label: 'Оптовые Ñкидки' }] } + - { name: 'New discount coupon', translations: [{ code: 'ru', label: 'Создать купон' }] } + - { name: 'Display prices in catalog including VAT', translations: [{ code: 'ru', label: 'Отображать в каталоге цены Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ налога на добавленную ÑтоимоÑть' }] } + - { name: 'Display ''inc/ex VAT'' labels next to prices', translations: [{ code: 'ru', label: 'Показывать метку "включаÑ/без ÐДС" Ñ€Ñдом Ñ Ñ†ÐµÐ½Ð°Ð¼Ð¸' }] } + - { name: 'On product details only', translations: [{ code: 'ru', label: 'Только на Ñтранице деталей продукта' }] } + - { name: 'On all catalog pages', translations: [{ code: 'ru', label: 'Ðа вÑех Ñтраницах каталога' }] } + - { name: 'Secure connection cannot be established.', translations: [{ code: 'ru', label: 'БезопаÑное Ñоединение не может быть уÑтановлено.' }] } + - { name: 'Have a discount coupon?', translations: [{ code: 'ru', label: 'ЕÑть купон на Ñкидку?' }] } + - { name: 'Enter coupon code', translations: [{ code: 'ru', label: 'Введите код купона' }] } + - { name: 'There is no such a coupon, please check the spelling: X', translations: [{ code: 'ru', label: 'Такой купон не найден, пожалуйÑта, проверьте напиÑание: "{{code}}"' }] } + - { name: 'Date: newest first', translations: [{ code: 'ru', label: 'Дата: по возраÑтанию' }] } + - { name: 'Date: oldest first', translations: [{ code: 'ru', label: 'Дата: по убыванию' }] } + - { name: 'LiteCommerce core version', translations: [{ code: 'ru', label: 'ВерÑÐ¸Ñ Ñдра LiteCommerce' }] } + - { name: 'Thank you for your order FOOTER', translations: [{ code: 'ru', label: 'Благодарим Ð’Ð°Ñ Ð·Ð° заказ в нашем магазине. Ждем Ð’Ð°Ñ Ñнова!' }] } + - { name: 'Get X off for order amount over Y', translations: [{ code: 'ru', label: 'Получите Ñкидку {{X}} за заказы Ñвыше {{Y}}' }] } + - { name: 'Have more coupons', translations: [{ code: 'ru', label: 'ЕÑть еще купоны' }] } + - { name: 'Have more coupons?', translations: [{ code: 'ru', label: 'ЕÑть еще купоны?' }] } + - { name: 'Limit number of uses', translations: [{ code: 'ru', label: 'Ограничение чиÑла иÑпользований' }] } + - { name: 'Maximum number of uses', translations: [{ code: 'ru', label: 'МакÑимальное чиÑло иÑпользований' }] } + - { name: 'Maximum order subtotal must be greater than minimum order subtotal', translations: [{ code: 'ru', label: 'МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñумма заказа должна быть больше минимальной Ñуммы заказа' }] } + - { name: 'Maximum order subtotal the coupon can be applied to', translations: [{ code: 'ru', label: 'МакÑимальна Ñумма заказа, к которой может быть применен купон' }] } + - { name: 'Minimum order subtotal must be less than maximum order subtotal', translations: [{ code: 'ru', label: 'ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñумма заказа должна быть меньше макÑимальной Ñуммы заказа' }] } + - { name: 'Moneybookers Quick Checkout enables you to take direct payment from credit cards, debit cards and over 60 other local payment options in over 200 countries as well as the Moneybookers eWallet.', translations: [{ code: 'ru', label: 'Moneybookers Quick Checkout позвалÑет принимать платежи по кредитным, дебетовым картам и более чем 60 другими платежными ÑредÑтвами, в том чиÑле Moneybookers eWallet, напрÑмую в более чем 200 Ñтранах. Мы предлагаем лучшие цены на обÑлуживание, проверте Ñами на нашем Ñайте Moneybookers www.moneybookers.com' }] } + - { name: 'New arrivals', translations: [{ code: 'ru', label: 'Ðовые поÑтуплениÑ' }] } + - { name: 'New!', translations: [{ code: 'ru', label: 'Ðовый!' }] } + - { name: 'No modules found for search_string', translations: [{ code: 'ru', label: 'Модулей не найдено \"{{search_string}}\"' }] } + - { name: 'Occurred X add product events', translations: [{ code: 'ru', label: 'Произошло добавление {{new}} товаров' }] } + - { name: 'Occurred X add product events and Y update product events', translations: [{ code: 'ru', label: 'Произошло добавление {{new}} товаров и обновление {{old}} товаров' }] } + - { name: 'Occurred Y update product events', translations: [{ code: 'ru', label: 'Произошло обновление {{old}} товаров' }] } + - { name: 'Period end date must be later than period start date', translations: [{ code: 'ru', label: 'Конец периода должен быть позже начала периода' }] } + - { name: 'Period start date must be sooner than period end date', translations: [{ code: 'ru', label: 'Ðачало периода должно быть раньше конца периода' }] } + - { name: 'Recently viewed', translations: [{ code: 'ru', label: 'ПроÑмотренные' }] } + - { name: 'To have access to the International payment network of Moneybookers please register here for a free account if you don''t have one yet.', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ñтупа к международной платежной Ñети Moneybookers, пожалуйÑта, зарегиÑтрируйтеÑÑŒ здеÑÑŒ Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð±ÐµÑплатного аккаунта, еÑли у Ð²Ð°Ñ ÐµÐ³Ð¾ еще нет.' }] } + - { name: 'To use the coupon, your order subtotal must be at least X', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтого купона Ñумма вашего заказа должна быть больше {{min}}' }] } + - { name: 'To use the coupon, your order subtotal must be between X and Y', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтого купона Ñумма вашего заказа должна быть в интервале {{min}} и {{max}}' }] } + - { name: 'To use the coupon, your order subtotal must not exceed Y', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñтого купона Ñумма вашего заказа не должна превышать {{max}}' }] } + - { name: 'X product(s) has been created', translations: [{ code: 'ru', label: 'Было Ñоздано {{count}} продуктов' }] } + - { name: 'X product(s) has been removed', translations: [{ code: 'ru', label: 'Было удалено {{count}} продуктов' }] } + - { name: 'You have already used the coupon', translations: [{ code: 'ru', label: 'Ð’Ñ‹ уже воÑпользовалиÑÑŒ купоном' }] } + - { name: 'You have sent a request for activation on the X.', translations: [{ code: 'ru', label: 'Ð’Ñ‹ отправили Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° активацию {{date}}. ПроцеÑÑ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ¸ иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Moneybookers Quick Checkout может занÑть до 72 чаÑов. Мы ÑвÑжемÑÑ Ñ Ð’Ð°Ð¼Ð¸, когда процеÑÑ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ¸ будет завершен. ПоÑле активации Moneybookers вы получите доÑтуп к новому разделу в Ñвоей учетной запиÑи Moneybookers, который называетÑÑ Merchant Tools. ПожалуйÑта, выберите Ñекретное Ñлово (должно отличатьÑÑ Ð¾Ñ‚ паролÑ) здеÑÑŒ, а также введите его в Ñледующем разделе Ð´Ð»Ñ ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Moneybookers. Секретное Ñлово ÑвлÑетÑÑ Ð¿Ð¾Ñледним шагом в процеÑÑе активации и надежно шифрует ваши платежи. ПоÑле уÑпешной активации вы Ñможете иÑпользовать вÑеми возможноÑÑ‚Ñми ÑиÑтемы Moneybookers.' }] } + - { name: 'Your order has been processed', translations: [{ code: 'ru', label: 'Ваш заказ #{{id}} был обработан.' }] } + - { name: 'Your order has failed', translations: [{ code: 'ru', label: 'Ваш заказ #{{id}} не прошел или был заблокирован админиÑтратором магазина. ' }] } + - { name: 'excl.VAT', translations: [{ code: 'ru', label: 'иÑключаÑ.{{name}}' }] } + - { name: 'incl.VAT', translations: [{ code: 'ru', label: 'включаÑ.{{name}}' }] } + - { name: 'percent X off', translations: [{ code: 'ru', label: 'Ñкидка {{percent}}%' }] } + - { name: 'X entities has been created', translations: [{ code: 'ru', label: 'Создано {{count}} Ñкидок' }] } + - { name: 'X entities has been removed', translations: [{ code: 'ru', label: 'Удалено {{count}} Ñкидок' }] } + - { name: 'All customers', translations: [{ code: 'ru', label: 'Ð’Ñе покупатели' }] } + - { name: 'Comment', translations: [{ code: 'ru', label: 'Комментарий' }] } + - { name: 'This comment will be visisble to shop administrators only', translations: [{ code: 'ru', label: 'Коментарий доÑтупен только админиÑтратору магазина' }] } + - { name: 'Discount type', translations: [{ code: 'ru', label: 'Тип Ñкидки' }] } + - { name: 'Discount amount', translations: [{ code: 'ru', label: 'Сумма Ñкидки' }] } + - { name: 'Active from', translations: [{ code: 'ru', label: 'Ðктивен Ñ' }] } + - { name: 'Active till', translations: [{ code: 'ru', label: 'Ðктивен по' }] } + - { name: 'Subtotal range (begin)', translations: [{ code: 'ru', label: 'Интервал Ñумм (начало)' }] } + - { name: 'Subtotal range (end)', translations: [{ code: 'ru', label: 'Интервал Ñумм (конец)' }] } + - { name: 'Limit the number of uses', translations: [{ code: 'ru', label: 'Ограничить чиÑло иÑпользований' }] } + - { name: 'Memberships', translations: [{ code: 'ru', label: 'Группы пользователей' }] } + - { name: 'Date when customers can start using the coupon', translations: [{ code: 'ru', label: 'Дата начала дейÑтвиÑ' }] } + - { name: 'Date when the coupon expires', translations: [{ code: 'ru', label: 'Дата Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð´ÐµÐ¹ÑтвиÑ' }] } + - { name: 'Minimum order subtotal the coupon can be applied to', translations: [{ code: 'ru', label: 'ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñумма заказа' }] } + - { name: 'Coupon discount can be limited to these product classes', translations: [{ code: 'ru', label: 'Применение купона может быть ограничено Ñледующими клаÑÑами' }] } + - { name: 'Coupon discount can be limited to customers with these membership levels', translations: [{ code: 'ru', label: 'Применение купона может быть ограничено Ñледующими группами пользователей' }] } + - { name: 'The maximum number of uses', translations: [{ code: 'ru', label: 'МакÑимальное чиÑло иÑпользований' }] } + - { name: 'Uses left', translations: [{ code: 'ru', label: 'ОÑталоÑÑŒ иÑпользовать' }] } + - { name: 'Uses count', translations: [{ code: 'ru', label: 'ИÑпользован' }] } + - { name: 'Coupon code', translations: [{ code: 'ru', label: 'Код купона' }] } + - { name: 'X coupon(s) has been removed', translations: [{ code: 'ru', label: '{{count}} купон(ов) удалено' }] } + - { name: 'X coupon(s) has been created', translations: [{ code: 'ru', label: '{{count}} купон(ов) Ñоздано' }] } + - { name: 'The coupon has been added', translations: [{ code: 'ru', label: 'Купон добавлен' }] } + - { name: 'The coupon has been applied to your order', translations: [{ code: 'ru', label: 'Купон был уÑпешно применен к вашему заказу' }] } + - { name: 'Coupon discount', translations: [{ code: 'ru', label: 'Скидка по купону' }] } + - { name: '$ off', translations: [{ code: 'ru', label: '$ cкидка' }] } + - { name: 'Coming soon', translations: [{ code: 'ru', label: 'Ожидаемые товары' }] } + - { name: 'All newest products', translations: [{ code: 'ru', label: 'Ð’Ñе новые товары' }] } + - { name: 'All upcoming products', translations: [{ code: 'ru', label: 'Ð’Ñе ожидаемые товары' }] } + - { name: 'Customers who bought this product also bought', translations: [{ code: 'ru', label: 'Покупатели, купившие Ñтот товар также купили' }] } + - { name: 'Customers who viewed this product bought', translations: [{ code: 'ru', label: 'Покупатели, Ñмотревшие Ñтот товар также купили' }] } + - { name: 'An upgrade is a dangerous process that may result in a crashed website. It is strongly recommended to create a full back up of your shop (the code and the database) and download it to a local computer before proceeding to the next step.', translations: [{ code: 'ru', label: 'Обновление может привеÑти к полной оÑтановке работы магазина. ÐаÑтоÑтельно рекомендуетÑÑ Ñоздать полный архив Ñвоего магазина (вÑе файлы и база даных) и Ñохранить его на локальном компьютере перед тем как перейти к Ñледующему шагу.' }] } + - { name: 'After the upgrade is completed please check your website. If you find that the site is inoperative, please try to do the following', translations: [{ code: 'ru', label: 'ПоÑле Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€Ñ‚Ðµ Ñвоймагазин. ЕÑли в процеÑÑе Ñтого обнаружены проблемы, попробуйте Ñледующее' }] } + - { name: 'Please save the soft reset and hard reset links so that you can use them later in case the website crash happens', translations: [{ code: 'ru', label: 'ПожалуйÑта, Ñохраните указанные выше ÑÑылки, чтобы их можно было иÑпользовать в Ñлучае Ð²Ð¾Ð·Ð½Ð¸ÐºÐ½Ð¾Ð²ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð±Ð»ÐµÐ¼ Ñ Ð¼Ð°Ð³Ð°Ð·Ð¸Ð½Ð¾Ð¼' }] } + - { name: 'Create a backup', translations: [{ code: 'ru', label: 'Создайте резервную копию магазина' }] } + - { name: 'Downloaded components', translations: [{ code: 'ru', label: 'Загруженные компоненты' }] } + - { name: 'If there are some critical errors occured you can do the following', translations: [{ code: 'ru', label: 'ЕÑли во Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ð¾Ð·Ð½Ð¸ÐºÐ»Ð¸ критичеÑкие ошибки, вы можете Ñделать Ñледующее' }] } + - { name: 'Loading...', translations: [{ code: 'ru', label: 'Загрузка...' }] } + - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'ru', label: 'ЕÑли Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°, у каждой цены в каталоге будет значок "Ñ ÐДС" или "без ÐДС", в завиÑимоÑти от того, включен ли налог в цену или нет. ЕÑли вы не хотите, чтобы такой значок отображалÑÑ Ñ€Ñдом Ñ Ñ†ÐµÐ½Ð°Ð¼Ð¸ в каталоге, информацию об ÐДС нужно размеÑтить на какой-нибудь другой Ñтранице каталога, Ñ‚.к. покупателÑм должно быть понÑтно, включен налог в цену или нет.' }] } \ No newline at end of file From 076a2d9858756ee428e95a1bf043cf49e2d29bc9 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 15 Jun 2012 06:35:36 +0400 Subject: [PATCH 083/562] [*] Changed behavior of the system if the payment transaction is pending. --- .../XLite/Controller/Customer/Checkout.php | 2 +- src/classes/XLite/Model/Order.php | 21 +++++++++++++++++++ .../XLite/Model/Payment/Transaction.php | 12 +++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/classes/XLite/Controller/Customer/Checkout.php b/src/classes/XLite/Controller/Customer/Checkout.php index 44f9be87e1..73914f4ad9 100644 --- a/src/classes/XLite/Controller/Customer/Checkout.php +++ b/src/classes/XLite/Controller/Customer/Checkout.php @@ -371,7 +371,7 @@ protected function doActionReturn() $this->setReturnURL($this->buildURL('cart')); - } elseif (!$cart->isPayed()) { + } elseif ($cart->hasInprogressPayments()) { \XLite\Core\TopMessage::addInfo( 'Payment for orders not over. Please complete payment of order.' diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index e90734daa8..057e224405 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -1203,6 +1203,27 @@ public function isPayed() return 0 >= $this->getPayedTotal(); } + /** + * Check - order has in-progress payments or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public function hasInprogressPayments() + { + $result = false; + + foreach ($this->getPaymentTransactions() as $t) { + if ($t->isInProgress()) { + $result = true; + break; + } + } + + return $result; + } + /** * Assign last used payment method * diff --git a/src/classes/XLite/Model/Payment/Transaction.php b/src/classes/XLite/Model/Payment/Transaction.php index 7fa03382c4..5a874d0fe7 100644 --- a/src/classes/XLite/Model/Payment/Transaction.php +++ b/src/classes/XLite/Model/Payment/Transaction.php @@ -295,6 +295,18 @@ public function isCompleted() return self::STATUS_SUCCESS == $this->getStatus(); } + /** + * Check - order is in progress state or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isInProgress() + { + return self::STATUS_INPROGRESS == $this->getStatus(); + } + /** * Constructor * From 26bc5d27aac67330fcebd96d5d848789c8edfbfe Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 15 Jun 2012 14:31:17 +0400 Subject: [PATCH 084/562] [*] Trailing zeroes config option is added. Currency edit page further changes. [*] Full refactoring in currency edit page JS/Model form classes. --- .../View/FormField/Select/CurrencyFormat.php | 98 ++++++++----------- src/classes/XLite/View/Model/AModel.php | 8 +- .../XLite/View/Model/Currency/Currency.php | 41 +++++++- src/skins/admin/en/currency/css/style.css | 20 +++- src/skins/admin/en/currency/js/script.js | 35 +++++-- .../admin/en/currency_view_info/body.tpl | 1 + .../admin/en/currency_view_info/js/script.js | 42 +++++--- src/sql/xlite_data.yaml | 1 + 8 files changed, 164 insertions(+), 82 deletions(-) diff --git a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php index 1b96c847f1..897ac6c9ef 100644 --- a/src/classes/XLite/View/FormField/Select/CurrencyFormat.php +++ b/src/classes/XLite/View/FormField/Select/CurrencyFormat.php @@ -35,6 +35,13 @@ */ class CurrencyFormat extends \XLite\View\FormField\Select\Regular { + /** + * Parts of number + */ + const THOUSAND_PART = '1'; + const HUNDRENDS_PART = '999'; + const DECIMAL_PART = '9'; + /** * Parameters name for a widget */ @@ -46,46 +53,20 @@ class CurrencyFormat extends \XLite\View\FormField\Select\Regular const FORMAT_EXP = 'e'; /** - * Currency format variants - */ - const FORMAT_SPACE_DOT = '1 999.e'; - const FORMAT_COMMA_DOT = '1,999.e'; - const FORMAT_SPACE_COMMA = '1 999,e'; - const FORMAT_DOT_COMMA = '1.999,e'; - - /** - * Default format - */ - const FORMAT_DEFAULT = self::FORMAT_SPACE_DOT; - - /** - * Format -> thousand, decimal delimiters associations - * - * @var array + * Delimiter to exclude the separators */ - protected static $delimiters = array( - self::FORMAT_SPACE_DOT => array(' ', '.'), - self::FORMAT_COMMA_DOT => array(',', '.'), - self::FORMAT_SPACE_COMMA => array(' ', ','), - self::FORMAT_DOT_COMMA => array('.', ','), - ); + const FORMAT_DELIMITER = '|'; /** - * Thousand, decimal -> format associations + * Pairs of formats * * @var array */ - protected static $formats = array( - ' ' => array( - '.' => self::FORMAT_SPACE_DOT, - ',' => self::FORMAT_SPACE_COMMA, - ), - '.' => array( - ',' => self::FORMAT_DOT_COMMA - ), - ',' => array( - '.' => self::FORMAT_COMMA_DOT - ), + protected $formatPairs = array( + array(' ', '.'), + array(',', '.'), + array(' ', ','), + array('.', ','), ); /** @@ -97,9 +78,9 @@ class CurrencyFormat extends \XLite\View\FormField\Select\Regular * @see ____func_see____ * @since 1.0.0 */ - public static function getDelimiters($format = self::FORMAT_DEFAULT) + public static function getDelimiters($format) { - return isset(static::$delimiters[$format]) ? static::$delimiters[$format] : static::$delimiters[static::FORMAT_DEFAULT]; + return explode(static::FORMAT_DELIMITER, $format, 2); } /** @@ -114,23 +95,13 @@ public static function getDelimiters($format = self::FORMAT_DEFAULT) */ public static function getFormat($thousandDelimiter, $decimalDelimiter) { - $format = static::FORMAT_DEFAULT; - - if (isset(static::$formats[$thousandDelimiter])) { - - if (isset(static::$formats[$thousandDelimiter][$decimalDelimiter])) { - - $format = static::$formats[$thousandDelimiter][$decimalDelimiter]; - } - } - - return $format; + return $thousandDelimiter . static::FORMAT_DELIMITER . $decimalDelimiter; } /** * Return formatted element string * - * @param string $elem + * @param array $elem * * @return string * @see ____func_see____ @@ -138,9 +109,8 @@ public static function getFormat($thousandDelimiter, $decimalDelimiter) */ public function formatElement($elem) { - return 0 == $this->getE() - ? substr($elem, 0, -2) - : str_replace(static::FORMAT_EXP, str_repeat('9', $this->getE()), $elem); + return static::THOUSAND_PART . $elem[0] . static::HUNDRENDS_PART + . (0 == $this->getE() ? '' : $elem[1] . str_repeat(static::DECIMAL_PART, $this->getE())); } /** @@ -164,6 +134,25 @@ public function setWidgetParams(array $params) } } + /** + * Get format pairs array with the key + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getPairs() + { + $pairs = array(); + + foreach ($this->formatPairs as $pair) { + + $pairs[$pair[0] . static::FORMAT_DELIMITER . $pair[1]] = $pair; + } + + return $pairs; + } + /** * Return exp. part number for a selector * @@ -200,12 +189,7 @@ protected function getFormatOptions() return array_unique( array_map( array($this, 'formatElement'), - array( - static::FORMAT_SPACE_DOT => static::FORMAT_SPACE_DOT, - static::FORMAT_COMMA_DOT => static::FORMAT_COMMA_DOT, - static::FORMAT_SPACE_COMMA => static::FORMAT_SPACE_COMMA, - static::FORMAT_DOT_COMMA => static::FORMAT_DOT_COMMA, - ) + $this->getPairs() ) ); } diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index f5b6a7d80e..808c25a4c2 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -1327,7 +1327,13 @@ protected function excludeField($fieldName) } /** - * Prepare posted data for mapping to the object + * Prepare request data for mapping into model object. + * Model object is provided with methods: + * prepareObjectForMapping <- getModelObject <- getDefaultModelObject (or getParam(self::PARAM_MODEL_OBJECT)) + * + * Use $this->excludeField($fieldName) method to remove unnecessary data from request. + * + * Call $this->excludeField() method in "performAction*" methods before parent::performAction* call. * * @return array * @see ____func_see____ diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index bf31e7777e..6fd07a97a3 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -48,6 +48,11 @@ class Currency extends \XLite\View\Model\AModel * @since 1.0.0 */ protected $currencySchema = array( + 'trailing_zeroes' => array( + self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Checkbox', + self::SCHEMA_LABEL => 'Hide trailing zeros in fractional part', + self::SCHEMA_REQUIRED => false, + ), 'currency_id' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyRich', self::SCHEMA_LABEL => 'Store currency', @@ -97,7 +102,16 @@ public function getCurrencySchema() $e = $this->getDefaultModelObject()->getE(); $this->currencySchema['format'][\XLite\View\FormField\Select\CurrencyFormat::PARAM_E] = $e; - $this->currencySchema['format'][static::SCHEMA_ATTRIBUTES] = array('data-e' => $e); + + $this->currencySchema['format'][static::SCHEMA_ATTRIBUTES] = array( + 'data-e' => $e, + 'data-thousandPart' => \XLite\View\FormField\Select\CurrencyFormat::THOUSAND_PART, + 'data-hundredsPart' => \XLite\View\FormField\Select\CurrencyFormat::HUNDRENDS_PART, + 'data-delimiter' => \XLite\View\FormField\Select\CurrencyFormat::FORMAT_DELIMITER, + ); + + $this->currencySchema['trailing_zeroes'][\XLite\View\FormField\Input\Checkbox::PARAM_IS_CHECKED] + = (1 == \XLite\Core\Config::getInstance()->General->trailing_zeroes); return $this->currencySchema; } @@ -181,7 +195,9 @@ protected function getButtonPanelClass() } /** - * prepareDataForMapping + * Prepare request data for mapping into model object. + * Model object is provided with methods: + * prepareObjectForMapping <- getModelObject <- getDefaultModelObject (or getParam(self::PARAM_MODEL_OBJECT)) * * @return array * @see ____func_see____ @@ -191,8 +207,22 @@ protected function prepareDataForMapping() { $data = parent::prepareDataForMapping(); + // Update trailing zeroes config option value + // TODO? move it to separated method ? + $trailingZeroes = \XLite\Core\Database::getRepo('XLite\Model\Config') + ->findOneBy(array('name' => 'trailing_zeroes', 'category' => 'General')); + + \XLite\Core\Database::getRepo('XLite\Model\Config')->update( + $trailingZeroes, + array('value' => "" !== $data['trailing_zeroes']) + ); + + // We do not map "trailing zeroes" - it is a config option. + unset($data['trailing_zeroes']); + if (isset($data['format'])) { + // Data format is divided into thousand and decimal separator (or any other if it would be necessary) $data = $data + $this->getFormatInfo($data); unset($data['format']); @@ -204,7 +234,8 @@ protected function prepareDataForMapping() /** * Return format value of currency for format selector (depends on thousand and decimal delimiters) * - * @param array $data + * @param array $data return the array of the following format: + * array('thousandDelimiter' => $thousandDelimiter, 'decimalDelimiter' => $decimalDelimiter) * * @return array * @see ____func_see____ @@ -241,6 +272,10 @@ protected function getModelObjectValue($name) $this->getModelObjectValue('thousandDelimiter'), $this->getModelObjectValue('decimalDelimiter') ); + + } elseif ('trailing_zeroes' == $name) { + + $value = 1 == \XLite\Core\Config::getInstance()->General->trailing_zeroes; } return $value; diff --git a/src/skins/admin/en/currency/css/style.css b/src/skins/admin/en/currency/css/style.css index aa823d7f3f..185ba27d55 100644 --- a/src/skins/admin/en/currency/css/style.css +++ b/src/skins/admin/en/currency/css/style.css @@ -49,12 +49,24 @@ font-size: 14px; } -.model-properties .prefix-value input[type="text"], - .model-properties .suffix-value input[type="text"] +.currency-form .prefix-value input[type="text"], + .currency-form .suffix-value input[type="text"] { width: 50px; } -.model-properties .format-value select { +.currency-form .format-value select { width: 100px; -} \ No newline at end of file +} + +.currency-form .trailing-zeroes-value { + padding-left: 0px; +} + +.currency-form li.input-checkbox { + width: 120px; +} + +.currency-form .trailing-zeroes-label { + float: right; +} diff --git a/src/skins/admin/en/currency/js/script.js b/src/skins/admin/en/currency/js/script.js index b98db7b1f6..fe35ec6a52 100644 --- a/src/skins/admin/en/currency/js/script.js +++ b/src/skins/admin/en/currency/js/script.js @@ -12,12 +12,12 @@ function CurrencyManageForm() { - this.callback(); + this.initialize(); } CurrencyManageForm.prototype.patternCurrencyViewInfo = '.currency-view-info *'; -CurrencyManageForm.prototype.callback = function () +CurrencyManageForm.prototype.initialize = function () { var obj = this; @@ -28,17 +28,40 @@ CurrencyManageForm.prototype.callback = function () jQuery('#format').change(function() { jQuery(obj.patternCurrencyViewInfo).trigger( 'formatCurrencyChange', - [jQuery(this).val(), jQuery(this).data('e')] + [ + jQuery(this).val(), + jQuery(this).data('e'), + jQuery(this).data('thousandPart'), + jQuery(this).data('hundredsPart'), + jQuery(this).data('delimiter') + ] ); - }).trigger('change'); + }); jQuery('#prefix').keyup(function(event) { jQuery(obj.patternCurrencyViewInfo).trigger('prefixCurrencyChange', [jQuery(this).val()]); - }).trigger('keyup'); + }); jQuery('#suffix').keyup(function(event) { jQuery(obj.patternCurrencyViewInfo).trigger('suffixCurrencyChange', [jQuery(this).val()]); - }).trigger('keyup'); + }); + + jQuery('#trailing-zeroes').bind( + 'trailingZeroesClick', + function (event) { + jQuery(obj.patternCurrencyViewInfo).trigger('trailingZeroesClick',[jQuery(this).attr('checked')]); + } + ).click(function (event) { + jQuery(this).trigger('trailingZeroesClick'); + }); + + jQuery(document).ready(function () { + jQuery('#format').trigger('change'); + jQuery('#prefix, #suffix').trigger('keyup'); + + jQuery('#trailing-zeroes').trigger('trailingZeroesClick'); + }); } +core.autoload(CurrencyManageForm); diff --git a/src/skins/admin/en/currency_view_info/body.tpl b/src/skins/admin/en/currency_view_info/body.tpl index 69ab0f6856..07d482b670 100644 --- a/src/skins/admin/en/currency_view_info/body.tpl +++ b/src/skins/admin/en/currency_view_info/body.tpl @@ -17,6 +17,7 @@
  • +
diff --git a/src/skins/admin/en/currency_view_info/js/script.js b/src/skins/admin/en/currency_view_info/js/script.js index 468a873c74..f5fd44f841 100644 --- a/src/skins/admin/en/currency_view_info/js/script.js +++ b/src/skins/admin/en/currency_view_info/js/script.js @@ -12,25 +12,45 @@ function CurrencyViewInfo() { - this.callback(); + this.initialize(); } -CurrencyViewInfo.prototype.callback = function () +CurrencyViewInfo.prototype.initialize = function () { - jQuery('.currency-view-info .currency.currency-zero .format').bind('formatCurrencyChange', function(e, value, exp) { - if (0 == exp) { - jQuery(this).html(value.replace(/[\.,]e/g, '')); - } else { - jQuery(this).html(value.replace(/e/g, new Array(exp + 1).join('0'))); + jQuery('.currency-view-info .currency.currency-zero .format').bind( + 'formatCurrencyChange', + function(e, value, exp, thousand, hundreds, delimiter) { + var format = value.split(delimiter); + + jQuery(this).html(thousand + format[0] + hundreds); + } + ); + + jQuery('.currency-view-info .currency.currency-zero .decimal').bind( + 'formatCurrencyChange', + function(e, value, exp, thousand, hundreds, delimiter) { + if (0 == exp) { + jQuery(this).html(''); + } else { + var format = value.split(delimiter); + + jQuery(this).html(format[1] + (new Array(exp + 1).join('0'))); + } + } + ).bind( + 'trailingZeroesClick', + function (e, value) { + if (value) { + jQuery(this).hide(); + } else { + jQuery(this).show(); + } } - }); + ); jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(value);}); jQuery('.currency-view-info .currency .suffix').bind('suffixCurrencyChange', function(e, value) {jQuery(this).html(value);}); } -// View must be loaded before the currency manage form controller core.autoload(CurrencyViewInfo); - -core.autoload(CurrencyManageForm); \ No newline at end of file diff --git a/src/sql/xlite_data.yaml b/src/sql/xlite_data.yaml index 07a65a49c6..2607787909 100644 --- a/src/sql/xlite_data.yaml +++ b/src/sql/xlite_data.yaml @@ -65,6 +65,7 @@ XLite\Model\Config: - { name: redirect_to_cart, category: General, type: checkbox, orderby: 300, value: N, translations: [{ code: en, option_name: 'Redirect customer to cart when adding a product' }] } - { name: shop_closed, category: General, type: checkbox, orderby: 110, value: N, translations: [{ code: en, option_name: 'Check this to close the shop temporarily' }] } - { name: shop_currency, category: General, type: '', orderby: 605, value: 840, translations: [{ code: en, option_name: 'Shop currency' }] } + - { name: trailing_zeroes, category: General, type: '', orderby: 605, value: 0, translations: [{ code: en, option_name: 'Hide trailing zeros in fractional part' }] } - { name: site_administrator, category: Company, type: 'XLite\View\FormField\Input\Text\Email', orderby: 460, value: bit-bucket@x-cart.com, translations: [{ code: en, option_name: 'Site administrator e-mail' }] } - { name: smtp_password, category: Email, type: text, orderby: 160, translations: [{ code: en, option_name: Password }] } - { name: smtp_security, category: Email, type: 'XLite\View\FormField\Select\SMTPSecurity', orderby: 170, value: no, translations: [{ code: en, option_name: 'Secure connection' }] } From b17fe2eb2cfacaf47e069575ba1f39171b3fd3da Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 15 Jun 2012 15:36:22 +0400 Subject: [PATCH 085/562] [*] Currency edit page. further changes. --- .../XLite/View/Model/Currency/Currency.php | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index 6fd07a97a3..7be90ab1d3 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -128,6 +128,31 @@ public function getFormFieldsForSectionDefault() return $this->getFieldsBySchema($this->getCurrencySchema()); } + /** + * getDefaultFieldValue + * + * @param string $name Field name + * + * @return mixed + * @see ____func_see____ + * @since 1.0.0 + */ + public function getDefaultFieldValue($name) + { + $value = parent::getDefaultFieldValue($name); + + switch ($name) { + + case 'trailing_zeroes': + $value = 1; + break; + + default: + } + + return $value; + } + /** * This object will be used if another one is not passed * @@ -214,7 +239,7 @@ protected function prepareDataForMapping() \XLite\Core\Database::getRepo('XLite\Model\Config')->update( $trailingZeroes, - array('value' => "" !== $data['trailing_zeroes']) + array('value' => '1' == $data['trailing_zeroes']) ); // We do not map "trailing zeroes" - it is a config option. @@ -275,7 +300,7 @@ protected function getModelObjectValue($name) } elseif ('trailing_zeroes' == $name) { - $value = 1 == \XLite\Core\Config::getInstance()->General->trailing_zeroes; + $value = ('' !== \XLite\Core\Config::getInstance()->General->trailing_zeroes); } return $value; From 09655bd1ea3186f533492d04f33bf02199ee8746 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 15 Jun 2012 17:43:34 +0400 Subject: [PATCH 086/562] [*] Customer area changes for currency format price. --- src/classes/XLite/View/AView.php | 59 ++++++++++++++++--- src/classes/XLite/View/Container.php | 12 ---- .../admin/en/product/product_list_form.tpl | 2 +- .../default/en/common/price_parts/price.tpl | 2 +- .../CDev/MarketPrice/details/market_price.tpl | 4 +- .../CDev/MarketPrice/details/you_save.tpl | 4 +- .../en/modules/CDev/MarketPrice/list.tpl | 2 +- .../modules/CDev/Sale/details/sale_price.tpl | 2 +- .../en/modules/CDev/Sale/details/you_save.tpl | 2 +- 9 files changed, 59 insertions(+), 30 deletions(-) diff --git a/src/classes/XLite/View/AView.php b/src/classes/XLite/View/AView.php index 64905fc0fe..aa005fb2d6 100644 --- a/src/classes/XLite/View/AView.php +++ b/src/classes/XLite/View/AView.php @@ -1064,14 +1064,15 @@ public function displayCommentedData(array $data) /** * Format price * - * @param float $value Price - * @param \XLite\Model\Currency $currency Currency OPTIONAL + * @param float $value Price + * @param \XLite\Model\Currency $currency Currency OPTIONAL + * @param boolean $strictFormat Flag if the price format is strict (trailing zeroes and so on options) * * @return string * @see ____func_see____ * @since 1.0.0 */ - public function formatPrice($value, \XLite\Model\Currency $currency = null) + public function formatPrice($value, \XLite\Model\Currency $currency = null, $strictFormat = false) { if (!isset($currency)) { $currency = \XLite::getInstance()->getCurrency(); @@ -1083,6 +1084,11 @@ public function formatPrice($value, \XLite\Model\Currency $currency = null) $parts['sign'] = '− '; } + if ($strictFormat) { + + $parts = $this->formatPartsStrictly($parts); + } + return implode('', $parts); } @@ -1116,6 +1122,21 @@ public function formatPriceHTML($value, \XLite\Model\Currency $currency = null) return implode('', $parts); } + /** + * Check - view list is visible or not + * + * @param string $list List name + * @param array $arguments List common arguments OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isViewListVisible($list, array $arguments = array()) + { + return 0 < count($this->getViewList($list, $arguments)); + } + /** * Format file size * @@ -1145,18 +1166,38 @@ protected function formatSize($size) } /** - * Check - view list is visible or not + * Return specific CSS class for dialog wrapper * - * @param string $list List name - * @param array $arguments List common arguments OPTIONAL + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDialogCSSClass() + { + return 'dialog-content'; + } + + /** + * Change parts of format price if it is necessary * - * @return boolean + * @param array $parts + * + * @return array * @see ____func_see____ * @since 1.0.0 */ - public function isViewListVisible($list, array $arguments = array()) + protected function formatPartsStrictly($parts) { - return 0 < count($this->getViewList($list, $arguments)); + if ( + 1 == \XLite\Core\Config::getInstance()->General->trailing_zeroes + && '00' == $parts['decimal'] + ) { + + unset($parts['decimal']); + unset($parts['decimalDelimiter']); + } + + return $parts; } /** diff --git a/src/classes/XLite/View/Container.php b/src/classes/XLite/View/Container.php index 43f1b3a2a7..2b85f3b74a 100644 --- a/src/classes/XLite/View/Container.php +++ b/src/classes/XLite/View/Container.php @@ -83,18 +83,6 @@ protected function getBodyTemplate() return 'body.tpl'; } - /** - * Return specific CSS class for dialog wrapper - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getDialogCSSClass() - { - return 'dialog-content'; - } - /** * Return current template * diff --git a/src/skins/admin/en/product/product_list_form.tpl b/src/skins/admin/en/product/product_list_form.tpl index 69721a2700..7396962f8e 100644 --- a/src/skins/admin/en/product/product_list_form.tpl +++ b/src/skins/admin/en/product/product_list_form.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 *} - + {* Open tag *} diff --git a/src/skins/default/en/common/price_parts/price.tpl b/src/skins/default/en/common/price_parts/price.tpl index 1bd855954d..2bc3e4b77a 100644 --- a/src/skins/default/en/common/price_parts/price.tpl +++ b/src/skins/default/en/common/price_parts/price.tpl @@ -12,4 +12,4 @@ * @ListChild (list="product.plain_price", weight="10") *} -
  • {formatPrice(getListPrice()):h}
  • +
  • {formatPrice(getListPrice(),null,1):h}
  • diff --git a/src/skins/default/en/modules/CDev/MarketPrice/details/market_price.tpl b/src/skins/default/en/modules/CDev/MarketPrice/details/market_price.tpl index 175fa9a808..99002ede3b 100644 --- a/src/skins/default/en/modules/CDev/MarketPrice/details/market_price.tpl +++ b/src/skins/default/en/modules/CDev/MarketPrice/details/market_price.tpl @@ -2,7 +2,7 @@ {** * Market price (internal list element) - * + * * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @@ -13,4 +13,4 @@ * @ListChild (list="product.details.quicklook.info.market_price.text", weight="100") *} -{t(#Market price#)}: {formatPrice(product.getMarketPrice()):h} +{t(#Market price#)}: {formatPrice(product.getMarketPrice(),null,1):h} diff --git a/src/skins/default/en/modules/CDev/MarketPrice/details/you_save.tpl b/src/skins/default/en/modules/CDev/MarketPrice/details/you_save.tpl index cc6aaf11ad..c9858a319d 100644 --- a/src/skins/default/en/modules/CDev/MarketPrice/details/you_save.tpl +++ b/src/skins/default/en/modules/CDev/MarketPrice/details/you_save.tpl @@ -2,7 +2,7 @@ {** * "You save" label (internal list element) - * + * * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @@ -12,4 +12,4 @@ * @ListChild (list="product.details.page.info.market_price.text", weight="200") *} -, {t(#you save#)} {formatPrice(getSaveDifference(product)):h} +, {t(#you save#)} {formatPrice(getSaveDifference(product),null,1):h} diff --git a/src/skins/default/en/modules/CDev/MarketPrice/list.tpl b/src/skins/default/en/modules/CDev/MarketPrice/list.tpl index c7994f57e2..f43ea8e395 100644 --- a/src/skins/default/en/modules/CDev/MarketPrice/list.tpl +++ b/src/skins/default/en/modules/CDev/MarketPrice/list.tpl @@ -16,5 +16,5 @@ *}
    - {formatPrice(product.getMarketPrice()):h} + {formatPrice(product.getMarketPrice(),null,1):h}
    diff --git a/src/skins/default/en/modules/CDev/Sale/details/sale_price.tpl b/src/skins/default/en/modules/CDev/Sale/details/sale_price.tpl index 891f4a0e55..9d5bb2f645 100644 --- a/src/skins/default/en/modules/CDev/Sale/details/sale_price.tpl +++ b/src/skins/default/en/modules/CDev/Sale/details/sale_price.tpl @@ -13,4 +13,4 @@ * @ListChild (list="product.details.quicklook.info.sale_price.text", weight="100") *} -{t(#Old price#)}: {formatPrice(product.getPrice()):h} +{t(#Old price#)}: {formatPrice(product.getPrice(),null,1):h} diff --git a/src/skins/default/en/modules/CDev/Sale/details/you_save.tpl b/src/skins/default/en/modules/CDev/Sale/details/you_save.tpl index 30be2c7626..30b37a2269 100644 --- a/src/skins/default/en/modules/CDev/Sale/details/you_save.tpl +++ b/src/skins/default/en/modules/CDev/Sale/details/you_save.tpl @@ -12,4 +12,4 @@ * @ListChild (list="product.details.page.info.sale_price.text", weight="200") *} -, {t(#you save#)} {formatPrice(product.getSalePriceDifference()):h} +, {t(#you save#)} {formatPrice(product.getSalePriceDifference(),null,1):h} From 6b62d906b58ee169c327db99e6ef48db841dbd45 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Mon, 18 Jun 2012 09:02:20 +0400 Subject: [PATCH 087/562] E:0041175 [!] Multiple fixes for the product SKU --- .../XLite/Core/Validator/{Sku.php => SKU.php} | 50 +++++++++++-------- src/classes/XLite/Model/Product.php | 29 +++++++++-- src/classes/XLite/Model/Repo/ARepo.php | 22 ++++++++ src/upgrade/1.0/25/pre_upgrade.php | 37 ++++++++++++++ 4 files changed, 113 insertions(+), 25 deletions(-) rename src/classes/XLite/Core/Validator/{Sku.php => SKU.php} (63%) create mode 100644 src/upgrade/1.0/25/pre_upgrade.php diff --git a/src/classes/XLite/Core/Validator/Sku.php b/src/classes/XLite/Core/Validator/SKU.php similarity index 63% rename from src/classes/XLite/Core/Validator/Sku.php rename to src/classes/XLite/Core/Validator/SKU.php index 73ede94291..cb430749ef 100644 --- a/src/classes/XLite/Core/Validator/Sku.php +++ b/src/classes/XLite/Core/Validator/SKU.php @@ -35,12 +35,19 @@ */ class SKU extends \XLite\Core\Validator\AValidator { - protected $productId = null; + /** + * Product Id (saved) + * + * @var integer + * @see ____var_see____ + * @since 1.0.0 + */ + protected $productId; /** * Constructor * - * @param integer|null $productid Product identificator + * @param integer $productId Product identificator OPTIONAL * * @return void * @see ____func_see____ @@ -49,51 +56,54 @@ class SKU extends \XLite\Core\Validator\AValidator public function __construct($productId = null) { if (isset($productId)) { - - $this->productId = (int) $productId; + $this->productId = intval($productId); } } - /** * Validate * * @param mixed $data Data * * @return void - * @throws \XLite\Core\Validator\Exception * @see ____func_see____ * @since 1.0.0 */ public function validate($data) { - $data = $this->sanitize($data); + if (\XLite\Model\Product::checkSKU($data)) { + $entity = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBySku($this->sanitize($data)); - $productSKU = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBySku($data); - - if ( - $productSKU - && ( - isset($this->productId) && $productSKU->getProductId() !== $this->productId - || !isset($this->productId) - ) - ) { - throw $this->throwError('SKU must be unique'); + if ($entity && (empty($this->productId) || $entity->getProductId() !== $this->productId)) { + $this->throwSKUError(); + } } } /** * Sanitize * - * @param mixed $data Daa + * @param mixed $data Data * - * @return mixed + * @return string * @see ____func_see____ * @since 1.0.0 */ public function sanitize($data) { - return (string)$data; + return substr($data, 0, \XLite\Core\Database::getRepo('XLite\Model\Product')->getFieldInfo('sku', 'length')); } + /** + * Wrapper + * + * @return void + * @throws \XLite\Core\Validator\Exception + * @see ____func_see____ + * @since 1.0.24 + */ + protected function throwSKUError() + { + throw $this->throwError('SKU must be unique'); + } } diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index ef7e9cbaa9..ec416406c7 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -35,9 +35,11 @@ * * @Entity (repositoryClass="\XLite\Model\Repo\Product") * @Table (name="products", + * uniqueConstraints={ + * @UniqueConstraint (name="sku", columns={"sku"}) + * }, * indexes={ * @Index (name="price", columns={"price"}), - * @Index (name="sku", columns={"sku"}), * @Index (name="weight", columns={"weight"}), * @Index (name="free_shipping", columns={"free_shipping"}), * @Index (name="clean_url", columns={"clean_url"}), @@ -86,7 +88,7 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder * @see ____var_see____ * @since 1.0.0 * - * @Column (type="string", length="32", nullable=false) + * @Column (type="string", length="32", nullable=true) */ protected $sku; @@ -240,6 +242,19 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder */ protected $classes; + /** + * Check SKU + * + * @param string $sku String to check + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public static function checkSKU($sku) + { + return '' !== $sku && false !== $sku; + } /** * Constructor @@ -625,7 +640,7 @@ public function setArrivalDate($date) * * @PrePersist */ - public function prepareDate() + public function prepareBeforeCreate() { if (!$this->getDate()) { $this->setDate(time()); @@ -635,7 +650,7 @@ public function prepareDate() $this->setArrivalDate(time()); } - $this->prepareUpdateDate(); + $this->prepareBeforeUpdate(); } /** @@ -647,9 +662,13 @@ public function prepareDate() * * @PreUpdate */ - public function prepareUpdateDate() + public function prepareBeforeUpdate() { $this->setUpdateDate(time()); + + if (!static::checkSKU($this->getSKU())) { + $this->setSKU(null); + } } /** diff --git a/src/classes/XLite/Model/Repo/ARepo.php b/src/classes/XLite/Model/Repo/ARepo.php index 175abff847..f0b0172466 100644 --- a/src/classes/XLite/Model/Repo/ARepo.php +++ b/src/classes/XLite/Model/Repo/ARepo.php @@ -755,6 +755,28 @@ public function getPrimaryKeyField() return $this->getClassMetadata()->getSingleIdentifierFieldName(); } + /** + * Return info about model field + * + * @param string $field Field name + * @param string $param Data param OPTIONAL + * + * @return array|mixed + * @see ____func_see____ + * @since 1.0.24 + */ + public function getFieldInfo($field, $param = null) + { + try { + $result = $this->getClassMetadata()->getFieldMapping($field); + + } catch (\Doctrine\ORM\Mapping\MappingException $exception) { + $result = $this->getClassMetadata()->getAssociationMapping($field); + } + + return \Includes\Utils\ArrayManager::getIndex($result, $param, isset($param)); + } + /** * Find one by record * diff --git a/src/upgrade/1.0/25/pre_upgrade.php b/src/upgrade/1.0/25/pre_upgrade.php new file mode 100644 index 0000000000..8e2ba93d31 --- /dev/null +++ b/src/upgrade/1.0/25/pre_upgrade.php @@ -0,0 +1,37 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.24 + */ + +return function() +{ + $entities = (array) \XLite\Core\Database::getRepo('\XLite\Model\Product')->findBySKU(''); + + foreach ($entities as $entity) { + $entity->setSKU(null); + } + + \XLite\Core\Database::getRepo('\XLite\Model\Product')->updateInBatch($entities); +}; From 01be92419d25ea5859fc954132ab58c1c3851df7 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Mon, 18 Jun 2012 09:07:41 +0400 Subject: [PATCH 088/562] E:0041175 [!] Multiple fixes for the product SKU --- src/upgrade/1.1/0/pre_upgrade.php | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/upgrade/1.1/0/pre_upgrade.php diff --git a/src/upgrade/1.1/0/pre_upgrade.php b/src/upgrade/1.1/0/pre_upgrade.php new file mode 100644 index 0000000000..8e2ba93d31 --- /dev/null +++ b/src/upgrade/1.1/0/pre_upgrade.php @@ -0,0 +1,37 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.24 + */ + +return function() +{ + $entities = (array) \XLite\Core\Database::getRepo('\XLite\Model\Product')->findBySKU(''); + + foreach ($entities as $entity) { + $entity->setSKU(null); + } + + \XLite\Core\Database::getRepo('\XLite\Model\Product')->updateInBatch($entities); +}; From 1f126f0c5a9062afce25b7b415e64ebfe1da994c Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Mon, 18 Jun 2012 09:59:39 +0400 Subject: [PATCH 089/562] E:0041113 [!] Fix for Product/Category pages parameters list --- .../XLite/Controller/Customer/Catalog.php | 16 ++++++++++++++++ .../XLite/Controller/Customer/Category.php | 9 --------- .../XLite/Controller/Customer/Product.php | 18 ++++++++++++------ 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/classes/XLite/Controller/Customer/Catalog.php b/src/classes/XLite/Controller/Customer/Catalog.php index 07592b2b90..a7d29b9017 100644 --- a/src/classes/XLite/Controller/Customer/Catalog.php +++ b/src/classes/XLite/Controller/Customer/Catalog.php @@ -44,6 +44,22 @@ abstract class Catalog extends \XLite\Controller\Customer\ACustomer */ abstract protected function getModelObject(); + /** + * Define and set handler attributes; initialize handler + * + * @param array $params Handler params OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function __construct(array $params = array()) + { + parent::__construct($params); + + $this->params[] = 'category_id'; + } + /** * Return current (or default) category object * diff --git a/src/classes/XLite/Controller/Customer/Category.php b/src/classes/XLite/Controller/Customer/Category.php index db536fa12e..f478970e3b 100644 --- a/src/classes/XLite/Controller/Customer/Category.php +++ b/src/classes/XLite/Controller/Customer/Category.php @@ -35,15 +35,6 @@ */ class Category extends \XLite\Controller\Customer\Catalog { - /** - * Controller parameters list - * - * @var array - * @see ____var_see____ - * @since 1.0.0 - */ - protected $params = array('target', 'category_id'); - /** * Check whether the category title is visible in the content area * diff --git a/src/classes/XLite/Controller/Customer/Product.php b/src/classes/XLite/Controller/Customer/Product.php index da5d4fe1d7..d8a3114165 100644 --- a/src/classes/XLite/Controller/Customer/Product.php +++ b/src/classes/XLite/Controller/Customer/Product.php @@ -36,14 +36,20 @@ class Product extends \XLite\Controller\Customer\Catalog { /** - * Controller parameters list + * Define and set handler attributes; initialize handler * - * @var array - * @see ____var_see____ - * @since 1.0.0 + * @param array $params Handler params OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 */ - protected $params = array('target', 'product_id'); - + public function __construct(array $params = array()) + { + parent::__construct($params); + + $this->params[] = 'product_id'; + } /** * Check whether the title is to be displayed in the content area From 15fe5d423b41f9f70dfff812568461dd9d5ea6c8 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Mon, 18 Jun 2012 10:06:46 +0400 Subject: [PATCH 090/562] E:0041111 [!] Link to product details page in Quick Look not contains the "category_id" parameter. Fixed --- .../default/en/product/details/parts/common.more-info-link.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skins/default/en/product/details/parts/common.more-info-link.tpl b/src/skins/default/en/product/details/parts/common.more-info-link.tpl index ac69b07d88..8c61424b06 100644 --- a/src/skins/default/en/product/details/parts/common.more-info-link.tpl +++ b/src/skins/default/en/product/details/parts/common.more-info-link.tpl @@ -11,4 +11,5 @@ * * @ListChild (list="product.details.quicklook.info", weight="12") *} -{t(#More details#)} + +{t(#More details#)} From 6c273addc0851e7d8ca77fcf2b81d8d37978574a Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 18 Jun 2012 10:41:47 +0400 Subject: [PATCH 091/562] [*] Add logging into XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php --- src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php | 2 +- .../XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php index eccc5146fa..6296e8ad55 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php @@ -125,7 +125,7 @@ public function write($path, $data, array $httpHeaders = array()) public function copy($from, $to, array $httpHeaders = array()) { $result = false; - if (file_exists($from)) { + if (\Includes\Utils\FileManager::isExists($from)) { try { $result = $this->client->putObjectFile( $from, diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php index 94640e8cb0..22e67d7ae1 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php @@ -258,6 +258,12 @@ public function loadFromLocalFile($path, $basename = null) if ($this->savePath($s3Path)) { $result = true; } + + } else { + \XLite\Logger::getInstance()->log( + '[Amazon S3] The file \'' . $path . '\' was not copyed to \'' . $s3Path . '\'', + LOG_ERR + ); } } } From 5d9613369c0eee627aab06787df96384582aa484 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 18 Jun 2012 14:01:12 +0400 Subject: [PATCH 092/562] E:41607 [*] Add warning note for Amazon S3 settings page --- src/classes/XLite/Controller/Admin/Module.php | 6 +- .../Controller/Admin/Module.php | 81 +++++++++++++++++++ .../Module/CDev/AmazonS3Images/Core/S3.php | 30 +++++++ .../AmazonS3Images/View/Model/Settings.php | 77 ++++++++++++++++++ .../Module/CDev/AmazonS3Images/install.yaml | 2 +- 5 files changed, 192 insertions(+), 4 deletions(-) create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/Module.php create mode 100644 src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php diff --git a/src/classes/XLite/Controller/Admin/Module.php b/src/classes/XLite/Controller/Admin/Module.php index 37741974ec..9776832b6e 100644 --- a/src/classes/XLite/Controller/Admin/Module.php +++ b/src/classes/XLite/Controller/Admin/Module.php @@ -133,9 +133,9 @@ protected function getModuleID() */ protected function doActionUpdate() { - $this->getModelForm()->performAction('update'); - - $this->setReturnURL(\XLite\Core\Request::getInstance()->return ?: $this->buildURL('addons_list_installed')); + if ($this->getModelForm()->performAction('update')) { + $this->setReturnURL(\XLite\Core\Request::getInstance()->return ?: $this->buildURL('addons_list_installed')); + } } /** diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/Module.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/Module.php new file mode 100644 index 0000000000..69a4a7e9eb --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Controller/Admin/Module.php @@ -0,0 +1,81 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\AmazonS3Images\Controller\Admin; + +/** + * Module settings + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class Module extends \XLite\Controller\Admin\Module implements \XLite\Base\IDecorator +{ + /** + * handleRequest + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function handleRequest() + { + if ( + $this->getModuleID() + && 'CDev\AmazonS3Images' == $this->getModule()->getActualName() + && \XLite\Core\Request::getInstance()->isGet() + && !\XLite\Core\TopMessage::getInstance()->getPreviousMessages() + ) { + $this->checkAmazonS3Settings(); + } + + parent::handleRequest(); + } + + /** + * Check amazon S3 settings + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected function checkAmazonS3Settings() + { + $config = \XLite\Core\Config::getInstance()->CDev->AmazonS3Images; + + if ( + $config->access_key + && $config->secret_key + && !\XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->isValid() + ) { + \XLite\Core\TopMessage::addWarning( + 'Connection to Amazon S3 failed.' + . ' Check whether the AWS Access key и AWS Secret key specified in the module settings are correct.' + ); + } + } +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php index 6296e8ad55..21dbd803d1 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php @@ -362,6 +362,36 @@ public function generateUniquePath($path) return $path; } + /** + * Check settings + * + * @param string $accessKey AWS access key + * @param string $secretKey AWS secret key + * @param string $bucket S3 bucket + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public function checkSettings($accessKey, $secretKey, $bucket) + { + $valid = false; + + $client = new \S3($accessKey, $secretKey); + \S3::setExceptions(true); + + try { + if (!$client->getBucketLocation($bucket)) { + $client->putBucket($bucket); + } + $valid = true; + + } catch (\Exception $e) { + } + + return $valid; + } + /** * Constructor * diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php new file mode 100644 index 0000000000..622df6f3ea --- /dev/null +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\AmazonS3Images\View\Model; + +/** + * Settings dialog model widget + * + * @see ____class_see____ + * @since 1.0.11 + */ +abstract class Settings extends \XLite\View\Model\Settings implements \XLite\Base\IDecorator +{ + /** + * Check if field is valid and (if needed) set an error message + * + * @param array $data Current section data + * @param string $section Current section name + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function validateFields(array $data, $section) + { + parent::validateFields($data, $section); + + if ( + 'default' == $section + && 'CDev\AmazonS3Images' == $this->getModule()->getActualName() + && !$this->errorMessages + ) { + $vars = array(); + foreach ($data[self::SECTION_PARAM_FIELDS] as $field) { + $vars[$field->getName()] = $field->getValue(); + } + $client = \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance(); + if ( + !empty($vars['access_key']) + && !empty($vars['secret_key']) + && !empty($vars['bucket']) + && !$client->checkSettings($vars['access_key'], $vars['secret_key'], $vars['bucket']) + ) { + $this->addErrorMessage( + 'access_key', + 'Connection to Amazon S3 failed.' + . ' Check whether the AWS Access key и AWS Secret key specified in the module settings are correct.', + $data + ); + } + } + } +} diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml b/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml index 31f16b1e2c..7ef37e7cae 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml @@ -51,4 +51,4 @@ XLite\Model\Config: XLite\Model\LanguageLabel: - { name: 'Content images are currently stored on file system.', translations: [{ code: en, label: 'Content images are currently stored on file system.' }] } - { name: 'Clicking the button will start the image transferring process. It will take some time, depending on server and application settings', translations: [{ code: en, label: 'Clicking the button will start the image transferring process. It will take some time, depending on server and application settings.
    After the migration is completed all content images will be stored on Amazon S3 server.' }] } - + - { name: 'Connection to Amazon S3 failed. Check whether the AWS Access key и AWS Secret key specified in the module settings are correct.', translations: [{ code: en, label: 'Connection to Amazon S3 failed. Check whether the AWS Access key и AWS Secret key specified in the module settings are correct.' }] } From 1db8213d85e24949c2fe52ad3f3ce65e14834446 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Mon, 18 Jun 2012 14:19:46 +0400 Subject: [PATCH 093/562] E:0041600 [*] Fixes and improvements for the Drupal clean URLs --- src/classes/XLite/Core/CMSConnector.php | 267 ++---------------- .../CDev/DrupalConnector/Drupal/Module.php | 20 +- .../Module/CDev/DrupalConnector/Handler.php | 184 ++++++++++-- 3 files changed, 187 insertions(+), 284 deletions(-) diff --git a/src/classes/XLite/Core/CMSConnector.php b/src/classes/XLite/Core/CMSConnector.php index 8c61c82a7a..cd3950574e 100644 --- a/src/classes/XLite/Core/CMSConnector.php +++ b/src/classes/XLite/Core/CMSConnector.php @@ -299,6 +299,23 @@ protected function getProfileByCMSId($cmsUserId) ->findOneByCMSId($this->getProfileDBFields($cmsUserId)); } + /** + * Get profiled DB condition fields list + * + * @param integer $cmsUserId CMS user Id + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getProfileDBFields($cmsUserId) + { + return array( + 'cms_profile_id' => intval($cmsUserId), + 'cms_name' => $this->getCMSName(), + ); + } + /** * Return ID of LC profile associated with the passed ID of CMS profile * @@ -345,254 +362,4 @@ public function getProfile($cmsUserId) { return \XLite\Core\Auth::getInstance()->getProfile($this->getProfileIdByCMSId($cmsUserId)); } - - - - // -----> FIXME - to revise - - /** - * Check controller access - * FIXME - do not uncomment: this will break the "runFrontController()" functionality - * TODO - code must be refactored - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - public function isAllowed() - { - return true; - - /*$oldController = $this->getController(); - - $this->getApplication()->setController(); - $controller = \XLite\Model\CachingFactory::getObjectFromCallback( - __METHOD__ . '-' . \XLite\Core\Request::getInstance()->target, - $this->getApplication(), - 'getController' - ); - - $result = $controller->checkAccess() - && $this->getViewer()->checkVisibility(); - - $this->getApplication()->setController($oldController); - - return $result;*/ - } - - /** - * Get Clean URL - * - * @param array $args Arguments - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - public function getCleanURL(array $args) - { - $url = null; - - $target = $args['target']; - unset($args['target']); - - if (in_array($target, $this->getCleanURLTargets())) { - - if (!empty($args[$target . '_id'])) { - - $id = $args[$target . '_id']; - unset($args[$target . '_id']); - - if (empty($args['action'])) { - unset($args['action']); - } - - $url = $this->{'get' . ucfirst($target) . 'CleanURL'}($id, $args); - } - } - - return $url; - } - - /** - * Get canonical URL by clean URL - * TODO - to improve - * - * @param string $path Clean url - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - public function getURLByCleanURL($path) - { - $cleanURL = null; - - // By product - - $product = \XLite\Core\Database::getRepo('XLite\Model\Product') - ->findOneByCleanURL(preg_replace('/(?:\.html|\.htm)$/Ss', '', $path)); - - if (isset($product)) { - $cleanURL = $this->buildCleanURL( - 'product', - '', - array('product_id' => $product->getProductId()) - ); - } - - // By category - if (!$cleanURL) { - - $parts = preg_split('\'/\'', $path, 2, PREG_SPLIT_NO_EMPTY); - - $category = \XLite\Core\Database::getRepo('XLite\Model\Category') - ->findOneByCleanURL($parts[0]); - - if ($category) { - - $params = array('category_id' => $category->getCategoryId()); - - if (!empty($parts[1])) { - - $query = \Includes\Utils\Converter::parseQuery($parts[1], '-', '/'); - - if (is_array($query)) { - - $params += $query; - - } - - } - - $cleanURL = $this->buildCleanURL('category', '', $params); - - } - - } - - return $cleanURL; - } - - /** - * Get session TTL (in seconds) - * - * @return integer - * @see ____func_see____ - * @since 1.0.0 - */ - public function getSessionTtl() - { - return \XLite\Model\Session::TTL; - } - - /** - * Build CleanURL - * - * @param string $target Page identifier - * @param string $action Action to perform OPTIONAL - * @param array $params Additional params OPTIONAL - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function buildCleanURL($target, $action = '', array $params = array()) - { - return \XLite\Core\Converter::buildURL($target, $action, $params); - } - - /** - * Get profiled DB condition fields list - * - * @param integer $cmsUserId CMS user Id - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getProfileDBFields($cmsUserId) - { - return array( - 'cms_profile_id' => intval($cmsUserId), - 'cms_name' => $this->getCMSName(), - ); - } - - /** - * getProfileWhereCondition - * TODO: remove this method - * - * @param integer $cmsUserId CMS user Id - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getProfileWhereCondition($cmsUserId) - { - return \Includes\Utils\Converter::buildQuery( - $this->getProfileDBFields($cmsUserId), '=', ' AND ', '\'' - ) . ' AND order_id = \'0\''; - } - - /** - * getCleanURLTargets - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getCleanURLTargets() - { - return array( - 'category', - 'product', - ); - } - - /** - * Get category clean URL by category id - * - * @param integer $id Category ID - * @param array $params URL params OPTIONAL - * - * @return string|void - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getCategoryCleanURL($id, array $params = array()) - { - $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->find($id); - - return (isset($category) && $category->getCleanURL()) - ? \Includes\Utils\URLManager::trimTrailingSlashes($category->getCleanURL()) - . '/' . \Includes\Utils\Converter::buildQuery($params, '-', '/') - : null; - } - - /** - * Get product Clean URL by product id - * - * @param integer $productId Product ID - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getProductCleanURL($productId) - { - $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($productId); - - $result = null; - - if (isset($product) && $product->getCleanURL()) { - $result = $product->getCleanURL(); - if (!preg_match('/\.html?$/Ss', $result)) { - $result .= '.html'; - } - } - - return $result; - } } diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php index eed3da69c1..cebabb11cc 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php @@ -86,7 +86,7 @@ protected function getAdminAreaURLArgs() if (\XLite\Core\Auth::getInstance()->isAdmin()) { $query .= '?' . \XLite\Core\Session::getInstance()->getName(); $query .= '=' . \XLite\Core\Session::getInstance()->getId(); - $query .= '&' . self::PARAM_DRUPAL_RETURN_URL; + $query .= '&' . static::PARAM_DRUPAL_RETURN_URL; $query .= '=' . urlencode(\Includes\Utils\URLManager::getCurrentURL()); } @@ -171,7 +171,7 @@ protected function registerPortals() // So called "landing link" $this->registerPortal( - self::LANDING_LINK_PATH, '\XLite\Controller\Admin\Main', 'LC admin area', MENU_NORMAL_ITEM + static::LANDING_LINK_PATH, '\XLite\Controller\Admin\Main', 'LC admin area', MENU_NORMAL_ITEM ); } @@ -354,15 +354,12 @@ public function optimizeCSSFiles($list) */ public function translateOutboundURL(&$path, array &$options, $originalPath) { - if (self::LANDING_LINK_PATH === $path) { + if (static::LANDING_LINK_PATH === $path) { $path = \Includes\Utils\URLManager::getShopURL('admin.php' . $this->getAdminAreaURLArgs()); $options['external'] = true; - } else { - $url = $this->getHandler()->getDrupalCleanURL($path, $options); - if ($url) { - $path = $url; - } + } elseif ($url = $this->getHandler()->getDrupalCleanURL($path, $options)) { + $path = $url; } } @@ -379,11 +376,8 @@ public function translateOutboundURL(&$path, array &$options, $originalPath) */ public function translateInboundURL(&$path, $originalPath, $pathLanguage) { - if ($path) { - $url = $this->getHandler()->getURLByCleanURL($path); - if ($url) { - $path = $url; - } + if ($path && ($url = $this->getHandler()->getURLByCleanURL($path))) { + $path = $url; } } diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php b/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php index 66d22d4732..33ad277686 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php @@ -124,27 +124,6 @@ public function init() $this->setPreviousTopMessages(); } - /** - * Get Drupal-based Clean URL - * - * @param mixed $path ____param_comment____ - * @param array $options ____param_comment____ - * - * @return void - * @see ____func_see____ - * @since 1.0.0 - */ - public function getDrupalCleanURL($path, array $options) - { - $url = null; - if (0 === strpos($path, \XLite\Core\Converter::DRUPAL_ROOT_NODE . '/')) { - $args = explode('/', substr($path, strlen(\XLite\Core\Converter::DRUPAL_ROOT_NODE) + 1)); - $url = $this->getCleanURL($this->getControllerArgs($args, false)); - } - - return $url; - } - /** * Clear top message in Drupal * @@ -316,6 +295,167 @@ protected function setPreviousTopMessages() } } + // {{{ URLs management + + /** + * Get Drupal-based Clean URL + * + * @param string $path Drupal "path" + * @param array $options A set of URL options + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getDrupalCleanURL($path, array $options) + { + $url = null; + + if (0 === strpos($path, \XLite\Core\Converter::DRUPAL_ROOT_NODE . '/')) { + + $args = explode('/', substr($path, strlen(\XLite\Core\Converter::DRUPAL_ROOT_NODE) + 1)); + $url = $this->getCleanURL($this->getControllerArgs($args, false)); + } + + return $url; + } + + /** + * Get canonical URL by clean URL + * + * @param string $path Clean url + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getURLByCleanURL($path) + { + $cleanURL = null; + + if (preg_match('/(\w+)\.html?$/Si', $path, $matches)) { + $product = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneByCleanURL($matches[1]); + + if (isset($product)) { + $cleanURL = $this->buildCleanURL('product', '', array('product_id' => $product->getProductId())); + } + + } else { + $matches = preg_split('\'/\'', $path, 2, PREG_SPLIT_NO_EMPTY); + $category = \XLite\Core\Database::getRepo('XLite\Model\Category')->findOneByCleanURL($matches[0]); + + if (isset($category)) { + $params = array('category_id' => $category->getCategoryId()); + + if (!empty($matches[1])) { + $query = \Includes\Utils\Converter::parseQuery($matches[1], '-', '/'); + + if (is_array($query)) { + $params += $query; + } + } + + $cleanURL = $this->buildCleanURL('category', '', $params); + } + } + + return $cleanURL; + } + + /** + * Get Clean URL + * + * @param array $args Arguments + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getCleanURL(array $args) + { + $url = null; + + $target = $args['target']; + unset($args['target']); + + if (in_array($target, $this->getCleanURLTargets())) { + + if (!empty($args[$target . '_id'])) { + + $id = $args[$target . '_id']; + unset($args[$target . '_id']); + + if (empty($args['action'])) { + unset($args['action']); + } + + $url = $this->{'get' . ucfirst($target) . 'CleanURL'}($id, $args); + } + } + + return $url; + } + + /** + * getCleanURLTargets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getCleanURLTargets() + { + return array( + 'category', + 'product', + ); + } + + /** + * Get category clean URL by category id + * + * @param integer $id Category ID + * @param array $params URL params OPTIONAL + * + * @return string|void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getCategoryCleanURL($id, array $params = array()) + { + $category = \XLite\Core\Database::getRepo('\XLite\Model\Category')->find($id); + + return (isset($category) && $category->getCleanURL()) + ? \Includes\Utils\URLManager::trimTrailingSlashes($category->getCleanURL()) + . '/' . \Includes\Utils\Converter::buildQuery($params, '-', '/') + : null; + } + + /** + * Get product Clean URL by product id + * + * @param integer $productId Product ID + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getProductCleanURL($productId) + { + $product = \XLite\Core\Database::getRepo('\XLite\Model\Product')->find($productId); + $result = null; + + if (isset($product) && $product->getCleanURL()) { + $result = $product->getCleanURL(); + + if (!preg_match('/\.html?$/Si', $result)) { + $result .= '.html'; + } + } + + return $result; + } + /** * Build CleanURL * @@ -331,4 +471,6 @@ protected function buildCleanURL($target, $action = '', array $params = array()) { return \XLite\Core\Converter::buildDrupalPath($target, $action, $params); } + + // }}} } From 68fb314841b9b91a61987217434bb67c19e1c94a Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 18 Jun 2012 21:30:54 +0400 Subject: [PATCH 094/562] E:41613 [*] Improve image icons storage routine --- .../CDev/AmazonS3Images/Model/Base/Image.php | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php index 22e67d7ae1..672f7cfe5c 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php @@ -418,7 +418,7 @@ protected function generateS3Path($path = null) */ protected function getResizedPath($size, $name) { - return $this->getS3() + return $this->isUseS3Icons() ? $this->generateS3Path('icon/' . $this->getId() . '/' . $size . '.' . $this->getExtension()) : parent::getResizedPath($size, $name); } @@ -435,7 +435,7 @@ protected function getResizedPath($size, $name) */ protected function getResizedPublicURL($size, $name) { - return $this->getS3() + return $this->isUseS3Icons() ? $this->getS3()->getURL($this->getResizedPath($size, $name)) : parent::getResizedPublicURL($size, $name); } @@ -453,7 +453,7 @@ protected function isResizedIconAvailable($path) { $icons = $this->getS3Icons(); - return ($this->getS3() && $icons) + return ($this->isUseS3Icons() && $icons) ? !empty($icons[$path]) : parent::isResizedIconAvailable($path); } @@ -473,7 +473,7 @@ protected function resizeIcon($width, $height, $path) { $result = null; - if ($this->getS3()) { + if ($this->isUseS3Icons()) { $operator = new \XLite\Core\ImageOperator($this); list($newWidth, $newHeight, $r) = $operator->resizeDown($width, $height); @@ -500,5 +500,17 @@ protected function resizeIcon($width, $height, $path) return $result; } + /** + * Use S3 icons + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function isUseS3Icons() + { + return static::STORAGE_S3 == $this->getStorageType() && $this->getS3(); + } + // }}} } From 6d6efd202bb9df1d5414bcb669a605ce7889a6ce Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 19 Jun 2012 10:48:31 +0400 Subject: [PATCH 095/562] E:0040373 [*] The Doctrine library is updated up to latest version (2.2) --- .dev/tests/Classes/Model/Category.php | 1 - .../Plugin/Doctrine/Plugin/Money/Main.php | 138 +++++++++--------- .../Doctrine/Plugin/UpdateSchema/Main.php | 2 + src/classes/XLite/Core/Database.php | 19 +-- src/classes/XLite/Model/MoneyModificator.php | 8 +- src/classes/XLite/Model/OrderItem.php | 6 +- src/classes/XLite/Model/Product.php | 6 +- 7 files changed, 80 insertions(+), 100 deletions(-) diff --git a/.dev/tests/Classes/Model/Category.php b/.dev/tests/Classes/Model/Category.php index a9213a68f2..ace1364487 100644 --- a/.dev/tests/Classes/Model/Category.php +++ b/.dev/tests/Classes/Model/Category.php @@ -29,7 +29,6 @@ class XLite_Tests_Model_Category extends XLite_Tests_TestCase 'lpos' => 100, 'rpos' => 200, 'enabled' => true, - 'cleanURL' => 'testCategory', 'show_title' => true, ); diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php index 1d09bd1ec5..b47370bfba 100644 --- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php +++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php @@ -3,9 +3,9 @@ /** * LiteCommerce - * + * * NOTICE OF LICENSE - * + * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: @@ -13,46 +13,43 @@ * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to licensing@litecommerce.com so we can send you a copy immediately. - * - * @category LiteCommerce - * @package XLite - * @subpackage Includes - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @see ____file_see____ - * @since 1.0.0 + * + * PHP version 5.3.0 + * + * @category LiteCommerce + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.24 */ namespace Includes\Decorator\Plugin\Doctrine\Plugin\Money; /** - * Routines for Doctrine library + * Main * - * @package XLite - * @see ____class_see____ - * @since 1.0.0 + * @see ____class_see____ + * @since 1.0.24 */ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin { /** * List of pairs (code replacements) * - * @var array - * @access protected - * @see ____var_see____ - * @since 1.0.0 + * @var array + * @see ____var_see____ + * @since 1.0.24 */ protected $replacements = array(); /** * Autogenerated net getter * - * @var string - * @access protected - * @see ____var_see____ - * @since 1.0.0 + * @var string + * @see ____var_see____ + * @since 1.0.0 */ protected $templateGet = <<() { @@ -72,51 +69,56 @@ public function get() * Execute certain hook handler * * @return void - * @access public * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.24 */ - public function executeHookHandlerStepSecond() + public function executeHookHandler() { // It's the metadata collected by Doctrine foreach ($this->getMetadata() as $main) { - foreach ($main->fieldMappings as $field => $info) { - if ('money' == $info['type']) { - $fieldName = str_replace('_', ' ', $field); - $fieldName = preg_replace('/([a-z])([A-Z])([a-z])/Sse', '"$1 " . strtolower("$2") . "$3"', $fieldName); - - $purposes = array( - 'net' => '', - ); - $behaviors = array(); - - if (isset($info['options']) && is_array($info['options'])) { - foreach ($info['options'] as $option) { - if ($option instanceOf \XLite\Core\Doctrine\Annotation\Behavior) { - $behaviors = array_merge($behaviors, $option->list); - - } elseif ($option instanceOf \XLite\Core\Doctrine\Annotation\Purpose) { - $purposes[$option->name] = $option->source; + $node = static::getClassesTree()->find($main->name); + + // Process only certain classes + if (!$node->isTopLevelNode() && !$node->isDecorator()) { + + foreach ($main->fieldMappings as $field => $info) { + if ('money' == $info['type']) { + $fieldName = str_replace('_', ' ', $field); + $fieldName = preg_replace('/([a-z])([A-Z])([a-z])/Sse', '"$1 " . strtolower("$2") . "$3"', $fieldName); + + $purposes = array( + 'net' => '', + ); + $behaviors = array(); + + if (isset($info['options']) && is_array($info['options'])) { + foreach ($info['options'] as $option) { + if ($option instanceOf \XLite\Core\Doctrine\Annotation\Behavior) { + $behaviors = array_merge($behaviors, $option->list); + + } elseif ($option instanceOf \XLite\Core\Doctrine\Annotation\Purpose) { + $purposes[$option->name] = $option->source; + } } } - } - foreach ($purposes as $purpose => $source) { - $camelField = ucfirst(\Doctrine\Common\Util\Inflector::camelize($field)); - $source = $source - ? ucfirst($source) . $camelField - : $camelField; - $this->addReplacement( - $main, - 'get', - array( - '' => 'get' . $source, - '' => $fieldName, - '' => ucfirst($purpose) . $camelField, - '' => $behaviors ? '\'' . implode('\',\'', $behaviors) . '\'' : '', - '' => $purpose, - ) - ); + foreach ($purposes as $purpose => $source) { + $camelField = ucfirst(\Doctrine\Common\Util\Inflector::camelize($field)); + $source = $source + ? ucfirst($source) . $camelField + : $camelField; + $this->addReplacement( + $main, + 'get', + array( + '' => 'get' . $source, + '' => $fieldName, + '' => ucfirst($purpose) . $camelField, + '' => $behaviors ? '\'' . implode('\',\'', $behaviors) . '\'' : '', + '' => $purpose, + ) + ); + } } } } @@ -136,14 +138,12 @@ public function executeHookHandlerStepSecond() * @param array $substitutes List of entries to substitude * * @return void - * @access protected * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.24 */ protected function addReplacement(\Doctrine\ORM\Mapping\ClassMetadata $data, $template, array $substitutes) { if (!empty($substitutes)) { - $file = \Includes\Utils\Converter::getClassFile($data->reflClass->getName()); if (!isset($this->replacements[$file])) { @@ -162,7 +162,6 @@ protected function addReplacement(\Doctrine\ORM\Mapping\ClassMetadata $data, $te * Put prepared code into the files * * @return void - * @access protected * @see ____func_see____ * @since 1.0.0 */ @@ -179,11 +178,10 @@ protected function writeData() /** * Substitute entries in code template * - * @param string $template template to prepare - * @param array $entries list of pairs + * @param string $template Template to prepare + * @param array $entries List of pairs * * @return string - * @access protected * @see ____func_see____ * @since 1.0.0 */ @@ -202,7 +200,6 @@ protected function substituteTemplate($template, array $entries) * @param string $class Class name OPTIONAL * * @return array|\Doctrine\ORM\Mapping\ClassMetadata - * @access protected * @see ____func_see____ * @since 1.0.0 */ @@ -212,5 +209,4 @@ protected function getMetadata($class = null) } // }}} - } diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php index 6b1a702b57..1fc34d784e 100644 --- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php +++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php @@ -45,5 +45,7 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin public function executeHookHandler() { \XLite\Core\Database::getInstance()->updateDBSchema(); + + die; } } diff --git a/src/classes/XLite/Core/Database.php b/src/classes/XLite/Core/Database.php index d3bfc8512a..ce6356b2e7 100644 --- a/src/classes/XLite/Core/Database.php +++ b/src/classes/XLite/Core/Database.php @@ -147,17 +147,6 @@ class Database extends \XLite\Base\Singleton 'addParent' => true, ); - /** - * List of LC tags - * - * @var array - * @see ____var_see____ - * @since 1.0.24 - */ - protected $nonDoctrineTags = array( - 'LC_Dependencies', - ); - /** * Get entity manager * @@ -1694,12 +1683,6 @@ protected function setCharset() */ protected function createAnnotationDriver($path) { - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); - - // Register tags - array_walk($this->nonDoctrineTags, array($reader, 'addGlobalIgnoredName')); - - return new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, array($path)); + return $this->configuration->newDefaultAnnotationDriver(array($path)); } } diff --git a/src/classes/XLite/Model/MoneyModificator.php b/src/classes/XLite/Model/MoneyModificator.php index 960dece4e8..606946d49e 100644 --- a/src/classes/XLite/Model/MoneyModificator.php +++ b/src/classes/XLite/Model/MoneyModificator.php @@ -69,7 +69,7 @@ class MoneyModificator extends \XLite\Model\AEntity * @see ____var_see____ * @since 1.0.19 * - * @Column (type="string", length="64") + * @Column (type="string", length=64) */ protected $modificator = 'modifyMoney'; @@ -80,7 +80,7 @@ class MoneyModificator extends \XLite\Model\AEntity * @see ____var_see____ * @since 1.0.19 * - * @Column (type="string", length="64") + * @Column (type="string", length=64) */ protected $validator = ''; @@ -102,7 +102,7 @@ class MoneyModificator extends \XLite\Model\AEntity * @see ____var_see____ * @since 1.0.19 * - * @Column (type="string", length="64") + * @Column (type="string", length=64) */ protected $behavior = ''; @@ -113,7 +113,7 @@ class MoneyModificator extends \XLite\Model\AEntity * @see ____var_see____ * @since 1.0.19 * - * @Column (type="string", length="64") + * @Column (type="string", length=64) */ protected $purpose = ''; diff --git a/src/classes/XLite/Model/OrderItem.php b/src/classes/XLite/Model/OrderItem.php index 119e8fcc7f..09521f7e9f 100644 --- a/src/classes/XLite/Model/OrderItem.php +++ b/src/classes/XLite/Model/OrderItem.php @@ -108,9 +108,9 @@ class OrderItem extends \XLite\Model\Base\SurchargeOwner * @Column ( * type="money", * options={ - * @XLite\Core\Doctrine\Annotation\Behavior (list={"taxable"}), - * @XLite\Core\Doctrine\Annotation\Purpose (name="net", source="clear"), - * @XLite\Core\Doctrine\Annotation\Purpose (name="display", source="net") + * @\XLite\Core\Doctrine\Annotation\Behavior (list={"taxable"}), + * @\XLite\Core\Doctrine\Annotation\Purpose (name="net", source="clear"), + * @\XLite\Core\Doctrine\Annotation\Purpose (name="display", source="net") * } * ) */ diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index af5045dfc5..da93af1335 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -73,9 +73,9 @@ class Product extends \XLite\Model\Base\I18n implements \XLite\Model\Base\IOrder * @Column ( * type="money", * options={ - * @XLite\Core\Doctrine\Annotation\Behavior (list={"taxable"}), - * @XLite\Core\Doctrine\Annotation\Purpose (name="net", source="clear"), - * @XLite\Core\Doctrine\Annotation\Purpose (name="display", source="net") + * @\XLite\Core\Doctrine\Annotation\Behavior (list={"taxable"}), + * @\XLite\Core\Doctrine\Annotation\Purpose (name="net", source="clear"), + * @\XLite\Core\Doctrine\Annotation\Purpose (name="display", source="net") * } * ) */ From e573d5b6d7a14f61695bd610584493041b07f09b Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 19 Jun 2012 11:53:56 +0400 Subject: [PATCH 096/562] E:41607 [!] Bug: Some Amazon S3 setting fields has not 'required' status. Fixed. --- .../AmazonS3Images/View/Model/Settings.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php index 622df6f3ea..131225f237 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php @@ -35,6 +35,20 @@ */ abstract class Settings extends \XLite\View\Model\Settings implements \XLite\Base\IDecorator { + /** + * Amazon S3 required settings + * + * @var array + * @see ____var_see____ + * @since 1.0.24 + */ + protected $amazonS3RequiredSettings = array( + 'access_key', + 'secret_key', + 'bucket', + 'server', + ); + /** * Check if field is valid and (if needed) set an error message * @@ -74,4 +88,20 @@ protected function validateFields(array $data, $section) } } } + + /** + * Check - option is required or not + * + * @param \XLite\Model\Config $option Option + * + * @return boolean + * @see ____func_see____ + * @since 1.0.13 + */ + protected function isOptionRequired(\XLite\Model\Config $option) + { + return parent::isOptionRequired($option) + || ('CDev\AmazonS3Images' == $option->getCategory() && in_array($option->getName(), $this->amazonS3RequiredSettings)); + } + } From bec266795cad49ced15b5c45796ab70fa5977091 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 19 Jun 2012 12:05:36 +0400 Subject: [PATCH 097/562] E:41475 [*] Add link: 'role' subcontroller -> 'roles' controller --- .../CDev/UserPermissions/View/TopMenu.php | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu.php diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu.php b/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu.php new file mode 100644 index 0000000000..91fb190b1d --- /dev/null +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\UserPermissions\View; + +/** + * Top menu widget + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class TopMenu extends \XLite\View\TopMenu implements \XLite\Base\IDecorator +{ + /** + * Define and set handler attributes; initialize handler + * + * @param array $params Handler params OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function __construct(array $params = array()) + { + if (!isset($this->relatedTargets['roles'])) { + $this->relatedTargets['roles'] = array(); + } + + $this->relatedTargets['roles'][] = 'role'; + + parent::__construct(); + } +} From 3015e356d063db41785ce4f84d345158a8332699 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 19 Jun 2012 14:02:36 +0400 Subject: [PATCH 098/562] E:41566 [!] Bug: image changed file name after migrate from Amazon S3 storage to local fiel storage. Fixed. --- src/classes/XLite/Model/Base/Storage.php | 51 ++++++++++--------- .../Core/EventListener/MigrateFromS3.php | 4 ++ .../Core/EventListener/MigrateToS3.php | 8 ++- .../CDev/AmazonS3Images/Model/Base/Image.php | 2 +- 4 files changed, 38 insertions(+), 27 deletions(-) diff --git a/src/classes/XLite/Model/Base/Storage.php b/src/classes/XLite/Model/Base/Storage.php index c144544c6c..ade782b031 100644 --- a/src/classes/XLite/Model/Base/Storage.php +++ b/src/classes/XLite/Model/Base/Storage.php @@ -495,7 +495,10 @@ public function loadFromLocalFile($path, $basename = null) } if (empty($local)) { - $newPath = \Includes\Utils\FileManager::getUniquePath($this->getStoreFileSystemRoot(), basename($path)); + $newPath = \Includes\Utils\FileManager::getUniquePath( + $this->getStoreFileSystemRoot(), + $basename ?: basename($path) + ); if (\Includes\Utils\FileManager::copy($path, $newPath)) { $path = $newPath; @@ -683,6 +686,29 @@ public function prepareRemove() } } + /** + * Get storage path + * + * @param string $path Path to use OPTIONAL + * + * @return string + * @see ____func_see____ + * @since 1.0.12 + */ + public function getStoragePath($path = null) + { + $result = null; + + if (static::STORAGE_RELATIVE == $this->getStorageType()) { + $result = $this->getFileSystemRoot() . ($path ?: $this->getPath()); + + } elseif (static::STORAGE_ABSOLUTE == $this->getStorageType()) { + $result = ($path ?: $this->getPath()); + } + + return $result; + } + /** * Save path into entity * @@ -845,29 +871,6 @@ protected function getLocalPath() return array($path, $isTempFile); } - /** - * Get storage path - * - * @param string $path Path to use OPTIONAL - * - * @return string - * @see ____func_see____ - * @since 1.0.12 - */ - protected function getStoragePath($path = null) - { - $result = null; - - if (static::STORAGE_RELATIVE == $this->getStorageType()) { - $result = $this->getFileSystemRoot() . ($path ?: $this->getPath()); - - } elseif (static::STORAGE_ABSOLUTE == $this->getStorageType()) { - $result = ($path ?: $this->getPath()); - } - - return $result; - } - /** * Get allowed file system root list * diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php index a32af5efc4..48fad30436 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php @@ -67,7 +67,11 @@ protected function processItem($item) if (file_exists($path)) { $item->setS3Forbid(true); + $localPath = $item->getStoragePath(); $result = $item->loadFromLocalFile($path, $item->getFileName() ?: basename($item->getPath())); + if ($localPath) { + \XLite\Module\CDev\AmazonS3Images\Core\S3::getInstance()->delete($localPath); + } unlink($path); } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php index 3ab5387697..3d6c037c42 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php @@ -64,9 +64,13 @@ protected function processItem($item) $path = tempnam(LC_DIR_TMP, 'migrate_file'); file_put_contents($path, $item->getBody()); - if (file_exists($path)) { + if (\Includes\Utils\FileManager::isExists($path)) { + $localPath = $item->isURL() ? null : $item->getStoragePath(); $result = $item->loadFromLocalFile($path, $item->getFileName() ?: basename($item->getPath())); - unlink($path); + if ($result && $localPath && \Includes\Utils\FileManager::isExists($localPath)) { + \Includes\Utils\FileManager::deleteFile($localPath); + } + \Includes\Utils\FileManager::deleteFile($path); } return $result; diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php index 672f7cfe5c..2e6375b338 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php @@ -309,7 +309,7 @@ public function removeFile($path = null) * @see ____func_see____ * @since 1.0.12 */ - protected function getStoragePath($path = null) + public function getStoragePath($path = null) { if (self::STORAGE_S3 == $this->getStorageType()) { $result = $this->generateS3Path($path); From 700e70c96af323727c62ae260ac187ac35097a0a Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 19 Jun 2012 15:18:07 +0400 Subject: [PATCH 099/562] E:0041627 [!] "Pinterest" button in GoSocial module produced the fatal error in some cases. Fixed --- .../XLite/Module/CDev/GoSocial/View/Button/Pinterest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php b/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php index e228700496..dfc4b27795 100644 --- a/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php +++ b/src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php @@ -94,9 +94,11 @@ protected function getButtonURL() */ protected function getButtonURLQuery() { + $image = $this->getProduct()->getImage(); + return array( 'url' => \XLite::getInstance()->getShopURL($this->getURL()), - 'media' => $this->getProduct()->getImage()->getFrontURL(), + 'media' => isset($image) ? $image->getFrontURL() : null, 'description' => $this->getProduct()->getName(), ); @@ -111,8 +113,11 @@ protected function getButtonURLQuery() */ protected function isVisible() { + $image = $this->getProduct()->getImage(); + return parent::isVisible() - && $this->getProduct()->getImage()->isExists() + && isset($image) + && $image->isExists() && \XLite\Core\Config::getInstance()->CDev->GoSocial->pinterest_use; } From 9b89dcde492d3301216dc8ced0849fbe8f2a2e01 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 19 Jun 2012 18:01:05 +0400 Subject: [PATCH 100/562] E:0041626 [+] Clean URLs: support for autogenerated suffixes is added. --- .../XLite/Controller/Admin/Base/Catalog.php | 79 ++++------ src/classes/XLite/Core/Converter.php | 14 ++ .../XLite/Core/Validator/AValidator.php | 14 +- src/classes/XLite/Core/Validator/Enum.php | 8 +- .../XLite/Core/Validator/Enum/Boolean.php | 8 +- .../XLite/Core/Validator/HashArray.php | 2 + .../XLite/Core/Validator/Pair/APair.php | 2 + .../XLite/Core/Validator/PlainArray.php | 2 + src/classes/XLite/Core/Validator/SKU.php | 7 +- src/classes/XLite/Core/Validator/String.php | 2 + .../XLite/Core/Validator/String/CleanURL.php | 146 ++++++++++++++++++ src/classes/XLite/Model/Base/Catalog.php | 5 +- src/classes/XLite/Model/Product.php | 16 +- .../View/Form/Category/Modify/Single.php | 4 +- .../XLite/View/Form/Product/Modify/Single.php | 14 +- 15 files changed, 237 insertions(+), 86 deletions(-) create mode 100644 src/classes/XLite/Core/Validator/String/CleanURL.php diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index 2004d64466..0f8943fd15 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -150,18 +150,6 @@ protected function getPostedData($field = null) // {{{ Clean URL routines - /** - * For validation in forms - * - * @return string - * @see ____func_see____ - * @since 1.0.21 - */ - public function getCleanURLPattern() - { - return '/[\w' . static::CLEAN_URL_DEFAULT_SEPARATOR . ']+/S'; - } - /** * Generate clean URL * @@ -178,31 +166,19 @@ protected function generateCleanURL($name) if (isset($name)) { $separator = \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')); $result .= strtolower(preg_replace('/\W+/S', $separator ?: static::CLEAN_URL_DEFAULT_SEPARATOR, $name)); - } - return $result; - } - - /** - * Check if specified clean URL is unique or not - * - * @param string $cleanURL Clean URL - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - protected function checkCleanURL($cleanURL) - { - if (!($result = empty($cleanURL))) { - list($class, $method) = $this->getEntityInfo(); - - $repo = \XLite\Core\Database::getRepo($class); - $entity = $repo->findOneByCleanURL(substr($cleanURL, 0, $repo->getFieldInfo('cleanURL', 'length'))); - - // DO NOT use "===" here - if (!($result = !isset($entity) || $entity->getUniqueIdentifier() == $this->$method())) { - $this->setCleanURLError($cleanURL); + $suffix = ''; + $increment = 1; + list($class, ) = $this->getEntityInfo(); + + while (\XLite\Core\Database::getRepo($class)->findOneByCleanURL($result . $suffix)) { + $suffix = $separator . $increment++; + } + + if (!empty($suffix)) { + // DO NOT change call order + $this->setCleanURLWarning($result, $suffix); + $result .= $suffix; } } @@ -210,19 +186,20 @@ protected function checkCleanURL($cleanURL) } /** - * Set error + * Set warning * * @param string $cleanURL Clean URL + * @param string $suffix Suffix * * @return boolean * @see ____func_see____ * @since 1.0.0 */ - protected function setCleanURLError($cleanURL) + protected function setCleanURLWarning($cleanURL, $suffix) { - \XLite\Core\TopMessage::addError( - 'The "{{clean_url}}" clean URL is already defined', - array('clean_url' => $cleanURL) + \XLite\Core\TopMessage::addWarning( + 'Since the "{{clean_url}}" clean URL is already defined, the "{{suffix}}" suffix has been added to it', + array('clean_url' => $cleanURL, 'suffix' => $suffix) ); } @@ -239,19 +216,17 @@ protected function setCleanURLError($cleanURL) */ protected function doActionModify() { - if ($this->checkCleanURL($this->getPostedData('cleanURL'))) { - $form = \Includes\Pattern\Factory::create($this->getFormClass()); - $form->getRequestData(); - - if ($form->getValidationMessage()) { - \XLite\Core\TopMessage::addError($form->getValidationMessage()); + $form = \Includes\Pattern\Factory::create($this->getFormClass()); + \XLite\Core\Request::getInstance()->mapRequest($form->getRequestData()); + + if ($form->getValidationMessage()) { + \XLite\Core\TopMessage::addError($form->getValidationMessage()); - } elseif ($this->isNew()) { - $this->doActionAdd(); + } elseif ($this->isNew()) { + $this->doActionAdd(); - } else { - $this->doActionUpdate(); - } + } else { + $this->doActionUpdate(); } } diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index ffe86daab5..b114fbf723 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -425,6 +425,20 @@ public static function isURL($url) return is_string($url) && 0 < preg_match('/^' . $pattern . '$/Ss', $url); } + /** + * Check for empty string + * + * @param string $string String to check + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public function isEmptyString($string) + { + return '' === $string || false === $string; + } + /** * Return class name without backslashes * diff --git a/src/classes/XLite/Core/Validator/AValidator.php b/src/classes/XLite/Core/Validator/AValidator.php index 58d48ac9b2..369fef40fa 100644 --- a/src/classes/XLite/Core/Validator/AValidator.php +++ b/src/classes/XLite/Core/Validator/AValidator.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -abstract class AValidator +abstract class AValidator extends \XLite\Base\SuperClass { /** * Validate @@ -46,6 +46,18 @@ abstract class AValidator */ abstract public function validate($data); + /** + * Constructor + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + public function __construct() + { + parent::__construct(); + } + /** * Sanitize * diff --git a/src/classes/XLite/Core/Validator/Enum.php b/src/classes/XLite/Core/Validator/Enum.php index b6addf5559..3182c6a569 100644 --- a/src/classes/XLite/Core/Validator/Enum.php +++ b/src/classes/XLite/Core/Validator/Enum.php @@ -38,12 +38,16 @@ class Enum extends \XLite\Core\Validator\Enum\AEnum /** * Constructor * + * @param array $list List of allowe values OPTIONAL + * * @return void * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.24 */ - public function __construct(array $list) + public function __construct(array $list = array()) { + parent::__construct(); + $this->list = $list; } } diff --git a/src/classes/XLite/Core/Validator/Enum/Boolean.php b/src/classes/XLite/Core/Validator/Enum/Boolean.php index 43f9899804..d618c78bde 100644 --- a/src/classes/XLite/Core/Validator/Enum/Boolean.php +++ b/src/classes/XLite/Core/Validator/Enum/Boolean.php @@ -38,12 +38,16 @@ class Boolean extends \XLite\Core\Validator\Enum\AEnum /** * Constructor * + * @param array $list List of allowe values OPTIONAL + * * @return void * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.24 */ - public function __construct() + public function __construct(array $list = array()) { + parent::__construct(); + $this->list[] = '1'; $this->list[] = '0'; } diff --git a/src/classes/XLite/Core/Validator/HashArray.php b/src/classes/XLite/Core/Validator/HashArray.php index f8a942f143..7004a3079c 100644 --- a/src/classes/XLite/Core/Validator/HashArray.php +++ b/src/classes/XLite/Core/Validator/HashArray.php @@ -53,6 +53,8 @@ class HashArray extends \XLite\Core\Validator\AValidator */ public function __construct() { + parent::__construct(); + $this->pairs = new \Doctrine\Common\Collections\ArrayCollection; } diff --git a/src/classes/XLite/Core/Validator/Pair/APair.php b/src/classes/XLite/Core/Validator/Pair/APair.php index 50ba61f8b6..660a1f1f87 100644 --- a/src/classes/XLite/Core/Validator/Pair/APair.php +++ b/src/classes/XLite/Core/Validator/Pair/APair.php @@ -61,6 +61,8 @@ abstract class APair extends \XLite\Core\Validator\AValidator */ public function __construct($mode = self::STRICT) { + parent::__construct(); + $this->mode = $mode; } } diff --git a/src/classes/XLite/Core/Validator/PlainArray.php b/src/classes/XLite/Core/Validator/PlainArray.php index 8833290df1..77ef24e160 100644 --- a/src/classes/XLite/Core/Validator/PlainArray.php +++ b/src/classes/XLite/Core/Validator/PlainArray.php @@ -64,6 +64,8 @@ class PlainArray extends \XLite\Core\Validator\AValidator */ public function __construct($nonEmpty = false) { + parent::__construct(); + $this->markAsNonEmpty($nonEmpty); } diff --git a/src/classes/XLite/Core/Validator/SKU.php b/src/classes/XLite/Core/Validator/SKU.php index cb430749ef..392c928f05 100644 --- a/src/classes/XLite/Core/Validator/SKU.php +++ b/src/classes/XLite/Core/Validator/SKU.php @@ -55,6 +55,8 @@ class SKU extends \XLite\Core\Validator\AValidator */ public function __construct($productId = null) { + parent::__construct(); + if (isset($productId)) { $this->productId = intval($productId); } @@ -71,10 +73,11 @@ public function __construct($productId = null) */ public function validate($data) { - if (\XLite\Model\Product::checkSKU($data)) { + if (!\XLite\Core\Converter::getInstance()->isEmptyString($data)) { $entity = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBySku($this->sanitize($data)); - if ($entity && (empty($this->productId) || $entity->getProductId() !== $this->productId)) { + // DO NOT use "!==" here + if ($entity && (empty($this->productId) || $entity->getProductId() != $this->productId)) { $this->throwSKUError(); } } diff --git a/src/classes/XLite/Core/Validator/String.php b/src/classes/XLite/Core/Validator/String.php index 3010c38b0d..627abda4d4 100644 --- a/src/classes/XLite/Core/Validator/String.php +++ b/src/classes/XLite/Core/Validator/String.php @@ -55,6 +55,8 @@ class String extends \XLite\Core\Validator\Scalar */ public function __construct($nonEmpty = false) { + parent::__construct(); + $this->markAsNonEmpty($nonEmpty); } diff --git a/src/classes/XLite/Core/Validator/String/CleanURL.php b/src/classes/XLite/Core/Validator/String/CleanURL.php new file mode 100644 index 0000000000..874cf2201b --- /dev/null +++ b/src/classes/XLite/Core/Validator/String/CleanURL.php @@ -0,0 +1,146 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.24 + */ + +namespace XLite\Core\Validator\String; + +/** + * CleanURL + * + * @see ____class_see____ + * @since 1.0.24 + */ +class CleanURL extends \XLite\Core\Validator\String\RegExp +{ + /** + * Class name + * + * @var string + * @see ____var_see____ + * @since 1.0.24 + */ + protected $class; + + /** + * Entity id + * + * @var mixed + * @see ____var_see____ + * @since 1.0.24 + */ + protected $id; + + /** + * Constructor + * + * @param boolean $nonEmpty Non-empty flag OPTIONAL + * @param string $regExp Regular expression OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function __construct($nonEmpty = false, $regExp = null, $class = '', $id = null) + { + parent::__construct($nonEmpty, $this->getCleanURLPattern()); + + if (empty($class)) { + \Includes\ErrorHandler::fireError( + static::t('Empty "class" parameter is passed to the {{method}}', array('method' => __METHOD__)) + ); + + } else { + $this->class = $class; + $this->id = $id; + } + } + + /** + * Validate + * + * @param mixed $data Data + * + * @return void + * @throws \XLite\Core\Validator\Exception + * @see ____func_see____ + * @since 1.0.0 + */ + public function validate($data) + { + if (!\XLite\Core\Converter::getInstance()->isEmptyString($data)) { + parent::validate($data); + + $entity = \XLite\Core\Database::getRepo($this->class)->findOneByCleanURL($this->sanitize($data)); + + // DO NOT use "!==" here + if ($entity && (empty($this->id) || $entity->getUniqueIdentifier() != $this->id)) { + $this->throwCleanURLError(); + } + } + } + + /** + * Sanitize + * + * @param mixed $data Data + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function sanitize($data) + { + return substr($data, 0, \XLite\Core\Database::getRepo($this->class)->getFieldInfo('cleanURL', 'length')); + } + + /** + * Clean URL pattern + * + * @return string + * @see ____func_see____ + * @since 1.0.21 + */ + protected function getCleanURLPattern() + { + return '/[\w' . ( + \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')) + ?: \XLite\Controller\Admin\Base\Catalog::CLEAN_URL_DEFAULT_SEPARATOR + ) . ']+/S'; + } + + /** + * Wrapper + * + * @return void + * @throws \XLite\Core\Validator\Exception + * @see ____func_see____ + * @since 1.0.24 + */ + protected function throwCleanURLError() + { + throw $this->throwError('Clean URL must be unique'); + } +} diff --git a/src/classes/XLite/Model/Base/Catalog.php b/src/classes/XLite/Model/Base/Catalog.php index 71834f82c8..8ba0121d9a 100644 --- a/src/classes/XLite/Model/Base/Catalog.php +++ b/src/classes/XLite/Model/Base/Catalog.php @@ -45,7 +45,7 @@ abstract class Catalog extends \XLite\Model\Base\I18n * @see ____var_see____ * @since 1.0.0 * - * @Column (type="string", length="255", unique=true, nullable=true) + * @Column (type="string", length=255, unique=true, nullable=true) */ protected $cleanURL; @@ -61,8 +61,7 @@ abstract class Catalog extends \XLite\Model\Base\I18n */ public function prepareBeforeSave() { - // http://bugtracker.litecommerce.com/view.php?id=41562 - if ('' === $this->getCleanURL() || false === $this->getCleanURL()) { + if (\XLite\Core\Converter::getInstance()->isEmptyString($this->getCleanURL())) { $this->setCleanURL(null); } } diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index 38de759235..785240a7ab 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -230,20 +230,6 @@ class Product extends \XLite\Model\Base\Catalog implements \XLite\Model\Base\IOr */ protected $classes; - /** - * Check SKU - * - * @param string $sku String to check - * - * @return boolean - * @see ____func_see____ - * @since 1.0.24 - */ - public static function checkSKU($sku) - { - return '' !== $sku && false !== $sku; - } - /** * Constructor * @@ -660,7 +646,7 @@ public function prepareBeforeUpdate() { $this->setUpdateDate(time()); - if (!static::checkSKU($this->getSKU())) { + if (\XLite\Core\Converter::getInstance()->isEmptyString($this->getSKU())) { $this->setSKU(null); } } diff --git a/src/classes/XLite/View/Form/Category/Modify/Single.php b/src/classes/XLite/View/Form/Category/Modify/Single.php index b86b0e1bee..13ec21275b 100644 --- a/src/classes/XLite/View/Form/Category/Modify/Single.php +++ b/src/classes/XLite/View/Form/Category/Modify/Single.php @@ -70,7 +70,7 @@ protected function getDefaultParams() { $list = parent::getDefaultParams(); $list['category_id'] = $this->getCategoryId(); - $list['parent_id'] = $this->getParentCategoryId(); + $list['parent_id'] = $this->getParentCategoryId(); return $list; } @@ -112,7 +112,7 @@ protected function setDataValidators($data) $data->addPair( 'cleanURL', - new \XLite\Core\Validator\String\RegExp(false, $this->getCleanURLPattern()), + new \XLite\Core\Validator\String\CleanURL(false, null, '\XLite\Model\Category', $this->getCategoryId()), null, 'Clean URL' ); diff --git a/src/classes/XLite/View/Form/Product/Modify/Single.php b/src/classes/XLite/View/Form/Product/Modify/Single.php index dd57937eb2..05256a30e3 100644 --- a/src/classes/XLite/View/Form/Product/Modify/Single.php +++ b/src/classes/XLite/View/Form/Product/Modify/Single.php @@ -113,18 +113,18 @@ protected function setDataValidators(&$data) $data->addPair('meta_tags', new \XLite\Core\Validator\String(), null, 'Meta keywords'); $data->addPair('meta_desc', new \XLite\Core\Validator\String(), null, 'Meta description'); + $data->addPair( + 'cleanURL', + new \XLite\Core\Validator\String\CleanURL(false, null, '\XLite\Model\Product', $this->getProductId()), + null, + 'Clean URL' + ); + $data->addPair( 'category_ids', new \XLite\Core\Validator\PlainArray(), \XLite\Core\Validator\Pair\APair::SOFT, 'Category' )->setValidator(new \XLite\Core\Validator\Integer()); - - $data->addPair( - 'cleanURL', - new \XLite\Core\Validator\String\RegExp(false, $this->getCleanURLPattern()), - null, - 'Clean URL' - ); } } From df2e554ac954497cd437f7157145c1bbde3d4df8 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 19 Jun 2012 18:21:14 +0400 Subject: [PATCH 101/562] E:0041559 [*] Clean URLs: the "maxlength" attribute is added to the input boxes on edit pages --- .../XLite/Controller/Admin/Base/Catalog.php | 22 ++++++++++++++----- .../XLite/Controller/Admin/Category.php | 10 ++++----- .../XLite/Controller/Admin/Product.php | 8 +++---- .../en/categories/modify/parts/clean_url.tpl | 2 +- .../admin/en/product/parts/clean_url.tpl | 2 +- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index 0f8943fd15..1ce3297fde 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -63,13 +63,13 @@ abstract public function isNew(); abstract protected function getFormClass(); /** - * Return entity + * Return entity class * - * @return array + * @return string * @see ____func_see____ * @since 1.0.24 */ - abstract protected function getEntityInfo(); + abstract protected function getEntityClass(); /** * Add new entity @@ -150,6 +150,19 @@ protected function getPostedData($field = null) // {{{ Clean URL routines + /** + * Return maximum length of the "cleanURL" model field. + * Function is public since it's used in templates + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + public function getCleanURLMaxLength() + { + return \XLite\Core\Database::getRepo($this->getEntityClass())->getFieldInfo('cleanURL', 'length'); + } + /** * Generate clean URL * @@ -169,9 +182,8 @@ protected function generateCleanURL($name) $suffix = ''; $increment = 1; - list($class, ) = $this->getEntityInfo(); - while (\XLite\Core\Database::getRepo($class)->findOneByCleanURL($result . $suffix)) { + while (\XLite\Core\Database::getRepo($this->getEntityClass())->findOneByCleanURL($result . $suffix)) { $suffix = $separator . $increment++; } diff --git a/src/classes/XLite/Controller/Admin/Category.php b/src/classes/XLite/Controller/Admin/Category.php index f19319898f..5b38ef5c8a 100644 --- a/src/classes/XLite/Controller/Admin/Category.php +++ b/src/classes/XLite/Controller/Admin/Category.php @@ -36,7 +36,7 @@ class Category extends \XLite\Controller\Admin\Base\Catalog { /** - * FIXME- backward compatibility + * Backward compatibility * * @var array * @see ____var_see____ @@ -73,15 +73,15 @@ protected function getFormClass() } /** - * Return entity + * Return entity class * - * @return array + * @return string * @see ____func_see____ * @since 1.0.24 */ - protected function getEntityInfo() + protected function getEntityClass() { - return array('\XLite\Model\Category', 'getCategoryId'); + return '\XLite\Model\Category'; } // }}} diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index 5c38e00ad5..aba1546ab2 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -73,15 +73,15 @@ protected function getFormClass() } /** - * Return entity + * Return entity class * - * @return array + * @return string * @see ____func_see____ * @since 1.0.24 */ - protected function getEntityInfo() + protected function getEntityClass() { - return array('\XLite\Model\Product', 'getProductId'); + return '\XLite\Model\Product'; } // }}} diff --git a/src/skins/admin/en/categories/modify/parts/clean_url.tpl b/src/skins/admin/en/categories/modify/parts/clean_url.tpl index 3b92b66122..f30be529ba 100644 --- a/src/skins/admin/en/categories/modify/parts/clean_url.tpl +++ b/src/skins/admin/en/categories/modify/parts/clean_url.tpl @@ -16,7 +16,7 @@
    {t(#Clean URL#)} - +

    diff --git a/src/skins/admin/en/product/parts/clean_url.tpl b/src/skins/admin/en/product/parts/clean_url.tpl index cca596ad53..6c0b11be15 100644 --- a/src/skins/admin/en/product/parts/clean_url.tpl +++ b/src/skins/admin/en/product/parts/clean_url.tpl @@ -16,7 +16,7 @@

    {t(#Clean URL#)} - +

    From 421c2e10f1ae72ee1e9c054d63504c32f845166c Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 19 Jun 2012 18:59:46 +0400 Subject: [PATCH 102/562] Clean URLs: fixes for URL autogeneration --- .../XLite/Controller/Admin/Base/Catalog.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index 1ce3297fde..a371a913ea 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -130,10 +130,8 @@ protected function getPostedData($field = null) { $result = parent::getPostedData($field); - if (!isset($field) || 'cleanURL' === $field) { - $value = $this->generateCleanURL( - parent::getPostedData(parent::getPostedData('autogenerateCleanURL') ? 'name' : 'cleanURL') - ); + if (parent::getPostedData('autogenerateCleanURL') && (!isset($field) || 'cleanURL' === $field)) { + $value = $this->generateCleanURL(parent::getPostedData('name')); if (isset($field)) { $result = $value; @@ -229,7 +227,17 @@ protected function setCleanURLWarning($cleanURL, $suffix) protected function doActionModify() { $form = \Includes\Pattern\Factory::create($this->getFormClass()); - \XLite\Core\Request::getInstance()->mapRequest($form->getRequestData()); + $data = $form->getRequestData(); + $util = '\Includes\Utils\ArrayManager'; + $pref = $this->getPrefixPostedData(); + + \XLite\Core\Request::getInstance()->mapRequest( + array( + $pref => array( + 'cleanURL' => $util::getIndex($util::getIndex($data, $pref), 'cleanURL'), + ) + ) + ); if ($form->getValidationMessage()) { \XLite\Core\TopMessage::addError($form->getValidationMessage()); From 274d9b1d3984df7490cba8da4a018c3efb84ef09 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Tue, 19 Jun 2012 19:12:07 +0400 Subject: [PATCH 103/562] [*] Minor code style corrections --- src/classes/XLite/Core/Converter.php | 2 +- src/classes/XLite/Core/Validator/SKU.php | 2 +- src/classes/XLite/Core/Validator/String/CleanURL.php | 2 +- src/classes/XLite/Model/Base/Catalog.php | 2 +- src/classes/XLite/Model/Product.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index b114fbf723..6023aeb7fb 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -434,7 +434,7 @@ public static function isURL($url) * @see ____func_see____ * @since 1.0.24 */ - public function isEmptyString($string) + public static function isEmptyString($string) { return '' === $string || false === $string; } diff --git a/src/classes/XLite/Core/Validator/SKU.php b/src/classes/XLite/Core/Validator/SKU.php index 392c928f05..a897461ce7 100644 --- a/src/classes/XLite/Core/Validator/SKU.php +++ b/src/classes/XLite/Core/Validator/SKU.php @@ -73,7 +73,7 @@ public function __construct($productId = null) */ public function validate($data) { - if (!\XLite\Core\Converter::getInstance()->isEmptyString($data)) { + if (!\XLite\Core\Converter::isEmptyString($data)) { $entity = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBySku($this->sanitize($data)); // DO NOT use "!==" here diff --git a/src/classes/XLite/Core/Validator/String/CleanURL.php b/src/classes/XLite/Core/Validator/String/CleanURL.php index 874cf2201b..ca986d171d 100644 --- a/src/classes/XLite/Core/Validator/String/CleanURL.php +++ b/src/classes/XLite/Core/Validator/String/CleanURL.php @@ -90,7 +90,7 @@ public function __construct($nonEmpty = false, $regExp = null, $class = '', $id */ public function validate($data) { - if (!\XLite\Core\Converter::getInstance()->isEmptyString($data)) { + if (!\XLite\Core\Converter::isEmptyString($data)) { parent::validate($data); $entity = \XLite\Core\Database::getRepo($this->class)->findOneByCleanURL($this->sanitize($data)); diff --git a/src/classes/XLite/Model/Base/Catalog.php b/src/classes/XLite/Model/Base/Catalog.php index 8ba0121d9a..e9be7dd56c 100644 --- a/src/classes/XLite/Model/Base/Catalog.php +++ b/src/classes/XLite/Model/Base/Catalog.php @@ -61,7 +61,7 @@ abstract class Catalog extends \XLite\Model\Base\I18n */ public function prepareBeforeSave() { - if (\XLite\Core\Converter::getInstance()->isEmptyString($this->getCleanURL())) { + if (\XLite\Core\Converter::isEmptyString($this->getCleanURL())) { $this->setCleanURL(null); } } diff --git a/src/classes/XLite/Model/Product.php b/src/classes/XLite/Model/Product.php index 785240a7ab..57695d6e12 100644 --- a/src/classes/XLite/Model/Product.php +++ b/src/classes/XLite/Model/Product.php @@ -646,7 +646,7 @@ public function prepareBeforeUpdate() { $this->setUpdateDate(time()); - if (\XLite\Core\Converter::getInstance()->isEmptyString($this->getSKU())) { + if (\XLite\Core\Converter::isEmptyString($this->getSKU())) { $this->setSKU(null); } } From 6db7c3d9116ae5c661702bd1f2c9ea1066cfc497 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 19 Jun 2012 19:15:03 +0400 Subject: [PATCH 104/562] E:41623 [*] Add checking image state into mogration process --- .../XLite/Controller/Admin/EventTask.php | 19 +++++-- src/classes/XLite/Core/EventListener.php | 27 ++++++++++ .../Core/EventListener/AEventListener.php | 21 ++++++++ .../Core/EventListener/Base/Countable.php | 11 +++- src/classes/XLite/Core/EventTask.php | 6 +++ src/classes/XLite/Model/Repo/TmpVar.php | 47 +++++++++++++++++- .../Core/EventListener/MigrateFromS3.php | 29 ++++++++++- .../Core/EventListener/MigrateToS3.php | 30 ++++++++++- .../CDev/AmazonS3Images/View/Migrate.php | 12 ++--- .../Module/CDev/AmazonS3Images/install.yaml | 2 + src/images/category/demo_store_c1002.jpeg | Bin 11592 -> 0 bytes src/images/category/demo_store_c1003.jpeg | Bin 12662 -> 0 bytes src/images/category/demo_store_c1004.jpeg | Bin 12860 -> 0 bytes src/images/category/demo_store_c4002.jpeg | Bin 13711 -> 0 bytes src/images/category/demo_store_c4003.jpeg | Bin 10698 -> 0 bytes src/images/category/demo_store_c4004.jpeg | Bin 16022 -> 0 bytes src/images/category/demo_store_c4005.jpg | Bin 13433 -> 0 bytes .../en/event_task_progress/controller.js | 5 +- .../en/modules/CDev/AmazonS3Images/migrate.js | 10 +++- src/skins/admin/en/top_message/controller.js | 2 + 20 files changed, 203 insertions(+), 18 deletions(-) delete mode 100644 src/images/category/demo_store_c1002.jpeg delete mode 100644 src/images/category/demo_store_c1003.jpeg delete mode 100644 src/images/category/demo_store_c1004.jpeg delete mode 100644 src/images/category/demo_store_c4002.jpeg delete mode 100644 src/images/category/demo_store_c4003.jpeg delete mode 100644 src/images/category/demo_store_c4004.jpeg delete mode 100644 src/images/category/demo_store_c4005.jpg diff --git a/src/classes/XLite/Controller/Admin/EventTask.php b/src/classes/XLite/Controller/Admin/EventTask.php index 76c5e75ac7..167c49a208 100644 --- a/src/classes/XLite/Controller/Admin/EventTask.php +++ b/src/classes/XLite/Controller/Admin/EventTask.php @@ -70,11 +70,15 @@ protected function doActionRun() { $event = \XLite\Core\Request::getInstance()->event; $result = false; + $errors = array(); $task = \XLite\Core\Database::getRepo('XLite\Model\EventTask')->findOneBy(array('name' => $event)); - if ($task && \XLite\Core\EventListener::getInstance()->handle($task->getName(), $task->getArguments())) { - \XLite\Core\Database::getEM()->remove($task); - $result = true; + if ($task) { + if (\XLite\Core\EventListener::getInstance()->handle($task->getName(), $task->getArguments())) { + \XLite\Core\Database::getEM()->remove($task); + $result = true; + } + $errors = \XLite\Core\EventListener::getInstance()->getErrors(); } else { \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->removeEventState($event); @@ -88,7 +92,7 @@ protected function doActionRun() if ($result && $state) { \XLite\Core\Event::eventTaskRun( array( - 'percent' => 0 < $state['position'] ? min(100, round($state['position'] / $state['length'] * 100)) : 0, + 'percent' => \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventStatePercent($event), ) ); @@ -96,6 +100,13 @@ protected function doActionRun() $result = false; } + if ($errors) { + foreach ($errors as $message) { + \Xlite\Core\TopMessage::addError($message); + } + $result = false; + } + $this->valid = $result; } diff --git a/src/classes/XLite/Core/EventListener.php b/src/classes/XLite/Core/EventListener.php index 2e74f68dee..8b1a0d9ec4 100644 --- a/src/classes/XLite/Core/EventListener.php +++ b/src/classes/XLite/Core/EventListener.php @@ -35,6 +35,15 @@ */ class EventListener extends \XLite\Base\Singleton { + /** + * Errors + * + * @var array + * @see ____var_see____ + * @since 1.0.24 + */ + protected $errors = array(); + /** * Handle event * @@ -48,6 +57,8 @@ class EventListener extends \XLite\Base\Singleton public function handle($name, array $arguments = array()) { $result = false; + $this->errors = array(); + $list = $this->getListeners(); if (isset($list[$name])) { @@ -56,12 +67,28 @@ public function handle($name, array $arguments = array()) if ($class::handle($name, $arguments)) { $result = true; } + if ($class::getInstance()->getErrors()) { + $this->errors = $class::getInstance()->getErrors(); + } + } } return $result; } + /** + * Get errors + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + public function getErrors() + { + return $this->errors; + } + /** * Get events * diff --git a/src/classes/XLite/Core/EventListener/AEventListener.php b/src/classes/XLite/Core/EventListener/AEventListener.php index ce7c73d5b6..ce15e23d33 100644 --- a/src/classes/XLite/Core/EventListener/AEventListener.php +++ b/src/classes/XLite/Core/EventListener/AEventListener.php @@ -35,6 +35,15 @@ */ abstract class AEventListener extends \XLite\Base\Singleton { + /** + * Errors + * + * @var array + * @see ____var_see____ + * @since 1.0.24 + */ + protected $errors = array(); + /** * Handle event (internal, after checking) * @@ -77,5 +86,17 @@ public static function checkEvent($name, array $arguments) return true; } + /** + * Get errors + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + public function getErrors() + { + return $this->errors; + } + } diff --git a/src/classes/XLite/Core/EventListener/Base/Countable.php b/src/classes/XLite/Core/EventListener/Base/Countable.php index cf3048504a..608287543e 100644 --- a/src/classes/XLite/Core/EventListener/Base/Countable.php +++ b/src/classes/XLite/Core/EventListener/Base/Countable.php @@ -94,6 +94,8 @@ abstract protected function processItem($item); */ public function handleEvent($name, array $arguments) { + $this->errors = array(); + $result = false; $this->initializeStep(); @@ -132,6 +134,8 @@ public function handleEvent($name, array $arguments) protected function initializeStep() { $this->record = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState($this->getEventName()); + $this->record['state'] = \XLite\Core\EventTask::STATE_IN_PROGRESS; + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setEventState($this->getEventName(), $this->record); } /** @@ -143,7 +147,7 @@ protected function initializeStep() */ protected function isStepValid() { - return !empty($this->record) && 0 < $this->getLength(); + return !empty($this->record); } /** @@ -169,6 +173,9 @@ protected function startStep() */ protected function finishStep() { + $this->record['state'] = \XLite\Core\EventTask::STATE_STANDBY; + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setEventState($this->getEventName(), $this->record); + $event = $this->getEventName(); \XLite\Core\EventTask::$event(); } @@ -182,6 +189,8 @@ protected function finishStep() */ protected function finishTask() { + $this->record['state'] = \XLite\Core\EventTask::STATE_FINISHED; + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setEventState($this->getEventName(), $this->record); } } diff --git a/src/classes/XLite/Core/EventTask.php b/src/classes/XLite/Core/EventTask.php index 3faf7c5943..6d620dfca1 100644 --- a/src/classes/XLite/Core/EventTask.php +++ b/src/classes/XLite/Core/EventTask.php @@ -35,6 +35,12 @@ */ class EventTask extends \XLite\Base\Singleton { + const STATE_STANDBY = 1; + const STATE_IN_PROGRESS = 2; + const STATE_FINISHED = 3; + const STATE_ABORTED = 4; + + /** * Driver * diff --git a/src/classes/XLite/Model/Repo/TmpVar.php b/src/classes/XLite/Model/Repo/TmpVar.php index d2ecdbc146..fb24632768 100644 --- a/src/classes/XLite/Model/Repo/TmpVar.php +++ b/src/classes/XLite/Model/Repo/TmpVar.php @@ -107,7 +107,7 @@ public function getVar($name) */ public function initializeEventState($name) { - $this->setEventState($name, array('position' => 0, 'length' => 0)); + $this->setEventState($name, array('position' => 0, 'length' => 0, 'state' => \XLite\Core\EventTask::STATE_STANDBY)); } /** @@ -157,6 +157,51 @@ public function removeEventState($name) } } + /** + * Check event state - finished or not + * + * @param string $name Event task name + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + public function isFinishedEventState($name) + { + $record = $this->getEventState($name); + + return $record + && ($record['state'] == \XLite\Core\EventTask::STATE_FINISHED || $record['state'] == \XLite\Core\EventTask::STATE_ABORTED); + } + + /** + * Check event state - finished or not + * + * @param string $name Event task name + * + * @return boolean + * @see ____func_see____ + * @since 1.0.22 + */ + public function getEventStatePercent($name) + { + $record = $this->getEventState($name); + + $percent = 0; + + if ($record) { + if ($this->isFinishedEventState($name)) { + $percent = 100; + + } elseif (0 < $record['length']) { + $percent = min(100, round($record['position'] / $record['length'] * 100)); + } + } + + return $percent; + } + + // }}} } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php index 48fad30436..752eb3d91f 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php @@ -75,7 +75,18 @@ protected function processItem($item) unlink($path); } - return $result; + if (!$result) { + if (!isset($this->record['s3_error_count'])) { + $this->record['s3_error_count'] = 0; + } + $this->record['s3_error_count']++; + \XLite\Logger::getInstance()->log( + 'Couldn\'t move image ' . $item->getPath() . ' (Amazon S3 to local file system)', + LOG_ERR + ); + } + + return true; } /** @@ -129,5 +140,21 @@ protected function getItems() return $chunk; } + + /** + * Finish task + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function finishTask() + { + parent::finishTask(); + + if (isset($this->record['s3_error_count']) && 0 < $this->record['s3_error_count']) { + $this->errors[] = static::t('Couldn\'t move X images. See log for details.', array('count' => $this->record['s3_error_count'])); + } + } } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php index 3d6c037c42..3026b44301 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php @@ -73,7 +73,18 @@ protected function processItem($item) \Includes\Utils\FileManager::deleteFile($path); } - return $result; + if (!$result) { + if (!isset($this->record['s3_error_count'])) { + $this->record['s3_error_count'] = 0; + } + $this->record['s3_error_count']++; + \XLite\Logger::getInstance()->log( + 'Couldn\'t move image ' . $item->getPath() . ' (local file system to Amazon S3)', + LOG_ERR + ); + } + + return true; } /** @@ -127,5 +138,22 @@ protected function getItems() return $chunk; } + + /** + * Finish task + * + * @return void + * @see ____func_see____ + * @since 1.0.23 + */ + protected function finishTask() + { + parent::finishTask(); + + if (isset($this->record['s3_error_count']) && 0 < $this->record['s3_error_count']) { + $this->errors[] = static::t('Couldn\'t move X images. See log for details.', array('count' => $this->record['s3_error_count'])); + } + } + } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php index 56b2a98c91..e5b4eda987 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php @@ -123,13 +123,13 @@ protected function getMigrateStarted() $result = false; $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateFromS3'); - if ($state && ((0 < $state['position'] && $state['position'] < $state['length']) || 0 == $state['length'])) { + if ($state && !\XLite\Core\Database::getRepo('XLite\Model\TmpVar')->isFinishedEventState('migrateFromS3')) { $result = 'migrateFromS3'; } if (!$result) { $state = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateToS3'); - if ($state && ((0 < $state['position'] && $state['position'] < $state['length']) || 0 == $state['length'])) { + if ($state && !\XLite\Core\Database::getRepo('XLite\Model\TmpVar')->isFinishedEventState('migrateToS3')) { $result = 'migrateToS3'; } } @@ -151,18 +151,14 @@ protected function getPercentMigrate() $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateFromS3'); if ($info) { - if (0 < $info['length']) { - $percent = min(100, round($info['position'] / $info['length'] * 100)); - } + $percent = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventStatePercent('migrateFromS3'); } if (!$info || 100 == $percent) { $info = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventState('migrateToS3'); if ($info) { - if (0 < $info['length']) { - $percent = min(100, round($info['position'] / $info['length'] * 100)); - } + $percent = \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventStatePercent('migrateToS3'); } } diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml b/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml index 7ef37e7cae..b58cb89249 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/install.yaml @@ -52,3 +52,5 @@ XLite\Model\LanguageLabel: - { name: 'Content images are currently stored on file system.', translations: [{ code: en, label: 'Content images are currently stored on file system.' }] } - { name: 'Clicking the button will start the image transferring process. It will take some time, depending on server and application settings', translations: [{ code: en, label: 'Clicking the button will start the image transferring process. It will take some time, depending on server and application settings.
    After the migration is completed all content images will be stored on Amazon S3 server.' }] } - { name: 'Connection to Amazon S3 failed. Check whether the AWS Access key и AWS Secret key specified in the module settings are correct.', translations: [{ code: en, label: 'Connection to Amazon S3 failed. Check whether the AWS Access key и AWS Secret key specified in the module settings are correct.' }] } + - { name: 'Couldn''t move image X', translations: [{ code: en, label: 'Couldn''t move image {{path}}' }] } + - { name: 'Couldn''t move X images. See log for details.', translations: [{ code: en, label: 'Couldn''t move {{count}} images. See log for details.' }] } diff --git a/src/images/category/demo_store_c1002.jpeg b/src/images/category/demo_store_c1002.jpeg deleted file mode 100644 index e1737bf64162dc4cdba161af5a346847e6a85bf6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11592 zcmbVycUY58({AWhklu+1h;-?l*Z=_$L6D|IL8J+YbO;1Ndhd!z1f&T_?u$506<210WRkO z_W)%7yO96u@}E!g{|E&ICB;8NPX5mi%728Mf{KcglJuse{AZAV4?+4DIVA>z?fL?^E(_nO+e`i91)=9aGRp5DIxp96#A6O&Vare|j7kf_zQ^^MKH zTick!qvMm)Gwk`rKe)&M6#sr?WF$5GBmW0377{LUN=gb!8qzZ+-SqpX0}CaUkQ_DZ z9TS?Do^03U-_x?+P06c9&ivc;h@xf(BG(DF9v}Y2YrMqiMXuM6y z6X%HauxXz>5h~U%@z+C+#A`l5w%_EZ@bW1|6!Q5rn(A()pknUXMrk^3^sDjA5tsG0F#{kE8$QAnV)gTASh)B_k!DstbvV z;RVh=6N|%|kLRs>CKeV3t{1k~T+j5&yn8plgfi0(07%sdVZob_V5fps(&2R4nl3Z@9=xfQ&V zH@2q3rkI)i>SCumV*n`ZQ%_QtqanGXZ|ntBoa z1vt>C7CTB7vg2%xBzGE!dQ7tNh!@}+H+<9n%(n)Hv;yZ9)PIm^rbUL6^2H;i99qM2%vjsr6HKfZ>ZT;~KmKW=S-R zM@`~WpO7wSh&d39Wz!csOgWnQE%AX%hW^WPfK$hM8E%ZwOPpIq`(;HO$6Wz;UjnM2 zyGNz|#ZOp2Gcd<3*S+vy#@d0B_nWKH3GscWYmOm^U_Zw*vpT)>%8i24s7pZD&Lse0 zb_sCKYOBW-?*(I+5xIPmBJUu4=-b_Bjc(r*xZ&HmyS-4&7oKrt10PT9jFryapma^u zu{W*qoJ3iLD>W=xX@(Xco5FL=$&@S#kNk!PMAHGATDJv~jw>f>LKu<1esJYQ#20l; zPHT3Y<)4eRCFPWUdCfhKvrdrQt;5&jh6#FRlWjUBwmU6T1Y&)~lEH-SPWJk4OG9n2 zFzfG$=MRS!s-^U$dQx3^U$OnXk;9eA7`;%vkXH>WdJB?xV=>!x<-7k}#XM}sI;b#} zFD6&`)aDhl-@7W6wAb->g$J>7->ow4K*)bl>tC~&>XQpwkF8P7Qha`qTZXndjm4he zG+Y}6uVZO2WvG6HbRcFmXjl*F*dzUUWr&f>%xk}4LznYkFk?|FZK!DK} zdlYvX#_|b`nnB(T4SjPO!ycWs^ccY^UF9-;KkfL52dhcBx>Aqy?I(#hKhAsIGN~#t zr+lXo&o(pl@zpivkMZwxms{sOjE`cEsy}I4B$n>UeRS~=U3wf3Tbg)1iLuO<%uLYN z2~dU$??dOMoMQh`u=4p5z^jiOi8|{{MmUTrB3+Ar zHUsuDIr*9D(GxU@$}Hb&LfK2AB|_ERDBkbQm|;E{k~0x+=>y0Tsr1)0`z+54dfl?O zE%)r4zg&M9kap{_L0=pB<~q+>Y>VnM8G8Ci-kg_$V+NAN_fx(YWVo7bmWkcKwGtf+ z-EJc^6+Y57NA#z?qqQla1$NFXdX zwy{dvW94CeNSQ%BQ$0al!1W%nn!mLwuIsrc@~vazp@eyXth27W{Qf6GF7Y>MRZRB- zugw1q)Z4Sc-SnqGX|>#nGRG`;E^|MJs7>$Z{RC?%Ub!Q)o9!TydB@L#@04ZwxE3c& znzR2UVC56MfjwJ02FX0ftb?_|uvu!Gffzcp``~nKmJ^grFB)1}yoziam&|bjYlX3I zo3B}%tKQR)Yqk_|OyJhx{=BgUSgR~K|A{!hFhBnxWTO;kSYD%SNlSF$*YuROcap;r-wf((9`beZ!!db&3i(g<4M6)*T?Uf|>7z*J}{ zUsE+$lY*eB<`BQVr3Y)fmW)2U+o2QK+rl?F7}{Cy&-;akU~is5g* zN)0d3g^M;Wmi3utiFc5+V9^V$4jgb|oudcKfHLkLiOm(L$3VMf1+Xe8l@A9Fu0h7^ zSejmCZF%(KWK064AL=Mor67aMU`|Qt_5B+DvohAX?~(l2kEpinz=DmWdD#_*q&+#D zIB^sPsHaV})Ru;bOlz`TO?EIv9rl^mrV+{BR)K&E97MSgxzYLq8viJ3G&JVTW<7>E z9AXrJtav@i+Q@m9sW9O9HsZm^kfPMBpj(w^bjc3JjUekwz)cud6?kd~s!hUk@SR4F z9S^I!0_pJ9@CNKWGAfbfN^@M#+koj(3MM(GJdVHGQI&6qwMcEp-CD*+<|erM>qYH$ zyL%fGmw*A|G*m1@YNpJ*GHk^B9Mpz?mALNsU`9VDyxkz;Jc*lUYt+-Q*?cIY`{qKy zm;S1YTn(lZekXJLMIMc0wPY#@d3BZpqS8&B1v)8egU~f3%~#M9a4V2Sq+q{7rz0hM zAX9~9(10?FTf$mLAn?VZWbSiiZ;?f#I+}&Y{8b~GY5jpS9Ucqva$T)@JTF>Xel~TM z54bVWwYIC$kSlq}q2&RpmjKPD>HBGhFDKmPmi=ZpnX*@t-% ze}QW(;uIIXkY}B+1aKX=XAy)H&5H3hj-Km}bXVH5M+Nz(8MNU{T|mrA;N20XzkzgB zRwpl!?G`3k&)aKlOf;+Yg)LzlwM5!!WKy(s|6cz}yA6^#E(C}NO|=Oir9CV$Sur8k z{gaH))t7(|PcLYXL9BC5jVjd!pt}9?di_1Spa%}EjgcE0{`S&LdZz`*U=K4D+goT@ zB;1vm8!NVY)}2JNi1(jt3(gyo(q_g?M;yBW&C&IR8?C2tJesnlnpsazc?}jjd4|(H z7p`+2vBKq67e+Yv?+*Q)S}z_55Lx@Nws&w?b~tYcF7usII#J^kOsc*3_4WMo;=IG$ zf!-y6qUaJZ#D!DP~0m zD3kQQ7DlV~*9-htZxt911iaDa$BsNA+4SpFvOOE%4NXmHW_5{d4$3=|iDVSrG>2m(|6)Yarw1NP$N@QnX?AR{ zqBo*eVISZP9&rwnP=|IyUN?J1;T{P*_c0u~zuRE6wG9!# zi4lK=h!9G&C9#g3*1lht_|UzVfLL!225elP!a4ZwboSoz%yBT6Vd7KE{gZZUpVVdJ zDjIo3FQXgtLC$O7T^gj{t|ywW3kvAa4jJM-*o`T5firr;V*Gf`vJWDN%sZJ}A-6DM zk)LfN2d8_NufnX-dN0;^5%tdFL-)s}c8}GLg9q)!-*UO0J|bjmvp^BbipF7J3Zf|f zHkPgsintrX`&S*d_c)il{g09wgatM9oN8b8MAEZ@LBY+jWbqE;Q;(8oHT7qwyz|a8 z4fP%hyT)YLB7`>3f4;w^cuxo;iKOWQhi9=uys%Sf=i<4`?zv}hXbE)omBXf04%@lLKMTt>yoqW%EuosDIOT9DXy9x(`4K94s zrgA+bT%QlWmvW%cySB77e%l}{Fe$K<-;+!F-G-Shq#k%3ApgLY5NVU>q9adsRR+Lc z=l*e;W?G6KAv4QWs}YG^HHoLdm_^K*ThICehvnPvUw=LBf6 zIypOeZ`1ao>p2H0Wud9b{03cxyUMa}0bgUp`k%k_Hl`i+q#np0t?PQM`6@ml z*Y2R7(yel*2L4fXRleX8Ml`U=yIIKTM$6&fWmtQV_8*Yp&$m;zX5Vl)1{f|acPvMQ z!6Of_n&6cWnZBSJu|2hdzv~|?E~XJ4ysj*|+V^u+eV((t_PE&M%r8ruiar1@B!s9z z5dk0vg2ibK$y2<>L$E$b55^>R?7@BFPwe}Z1T`UNk1P90-))`^od$m&-cV|s8>Iru zy-@w_8Xi%5b6xXJM8BDDShlH$15Z$m$C&c(@(HGDRr>S_Ki6-KEz_9#q{C;me^#A` zYxgNre@5Ke1l_ta;x==FYPjDE4^%bhL1;2k;H$xwhL-@!HA0Dxfc}I&Rs$n0^F~n49vQM(hpP0@@ReBf@Q(>HM z>!)vM!;0lE0SYTF4*vZd5@wDY%??Dpe)UKhc3tj$=lc;RIH48dEBf+iyXWJI0b&x6 z8V2t^;|h2Gf-YN8v`n)fa)fJ(H#e?w>vs&){<~O)cSNW}uW!6KB}+=KzSho{u86+F z?P7_%2RuCZbFH1fCFaG}@e*UH=^|-H8b!IoO6_9^iFZW{wr75zJP=mJ3jwEYyMud# zcgMzHCVCq>uA-L_;LxGfR`DOw6$g8joNllAjC2^~lNnRy_ES}^M6a2NivCQ1*Dy!I znd@aaLJ+{(jXZR1@7(lzh#Wc`m0O6R=vTMs8v2ZD7w(_a{kSAtT|X}UV?T4Avtg)W zewmQ_ggngFQb-H^D|^1>0(6QeB0l`IL;} zaChA(@b-Gz$L8DlU%HF2& zL}8vD^P8sbTN8oBBKdhO`dT*W8I4AgB44IwUmX<~lJVFWdARYpE&Jlzfh+!wdrCN6 zytKzmBjOUk4t0~Atwo*IGDV?x_Mo*E{fipCxip{qiMOWeJm_q;dBF+ptf)iK)vd!} zt-hS%TMK>pbbc{{#?qGnkq|B@!X5Mq&W9Hv%1u$3=8odF=c*s!moF`LaA=3v9N!5gSV(&8A6dDR|$l7bhC_Ki((Ke_{K#!KB z4kjtm9l8QrX7G6)gqX{KA=cVk>Z&KXY+5kN6{j{|41#b*ELkQk?M(@PY@&NOht%%j z)^W*zhxMettm7NeQ^okgSa7?XDd&?wxd0|fk`P&9okK3 zi}xYC5L5JKIFWz5LkqJ3D|J%P=RXVdZTOSxQ?dR#$5bp*BPeE{I{!*3V`ALV!t;!m z=zz~dw*{%ABzxy_6JFRb+(X64oUgok-XttFod?Q~Oo!Y3;QR@DqvevgFd+)D5 z2+ux`0F!)U4=@ynHowAPf&oX?fno(I>M+bb%M5=_21E~HDy8vSUuU+|pTc~kFnyV+ zy(RZbtO==$jwYPn3fB??ct~+nJHRnM83Ca3gWZA@c&;v|8gme1;DSUEtXLnYdSp)+ zXM{Dhsl||zVTdqJ+`nUqISk0J=$a6C_IONNXgh6I>Z%JDgGZ^pE9I$gApX!+w{h(H zfP>eqh{iia-^d;t$|U(;b_w>*vyE-*)Z=T8WiMc*m1Qe}{z%EO(qVrC$)&&NrZrj1Euz^$Q^Q&0?$+ClE6J*y$25$F)og zv6qh3Yd*L>E@S^bt2X!-MdHfzti9L6GU>O8AQpPayqCUCdqb+md)l~JZjc&x? zoVM9w5+H`6f5ZK7GEYO74nZS^-pOs(h&?@+tzA)xfjS!}!RbS2{SB6a7VS|M@w;sb zl)mUJr-G(WRKM1PX!BUrJnoY3+qn&=L>*7&y2sHmXWutj*ZXdM~4nf6;f zme>ScnPQ${>rp@JKZpj_!$<{cW+RUxyzqEb1fJ>?C!PFkyCp0#cSB%Sr1vU4GbQVS zx7em?TI^w4qi98JC+ekX?bERM0-8L^i+eN;^on^j9)jyQ&Jw~zfb2foG|$`-Zdc5C-7%n)KBok-ay`Qg|fN$4Ve9P zmas}kwo*L()P=Ye{ZG=)a0IK-c=~iqo1Zv(38?Mg6F>^kkLZmPm9W4kXxTXG&&8q{ z;XAeh*^*^euony)!_Fn@xx3PLc3rW=M9q@NUDt8cdFb|=kOS#l*_;mp zNf5Kp6Sppw872x;D#Q(dv8lN9)N|k$43+BWuWcJ=QQ3AYqIm7GE0Hb{{v{Wj0w~5pbZX=zHI%wD|)whe@ zgx=QTd8sQC0y3yGqt~hadu^3S(CIU5S|LP|klz9Dhxe8G1)=A=z`!;Z3|qf7yLH&i z%uZ&9!1Uh1=(B?>+$?2_%t}*jCHsy-mR~9eaUuO6Uf>G66F!4G{eS^Ro$R^xXp5mY zV?wl@mw3_pbq(3Ra1=NJT31*Zb$r0GjL>|21!J=~q<9^9!!Darh9#DE=W_zuD?P*7 z<*?LAbgWEe$W5t@vt6du>SV1c`rW&wg+^#9Joxj(B%Y++-NLw$a=zh`Jo%{(Ua-VA%B1H5@duM^*eJ>bh$gP^d)rRzY3_I zG?87S2;*O&_zNv=4|xwo7{HyxK~4wrlBe;Q$-vyka?3@CKjvA3^=7mWRr{n;kcQ3Q zIxV4(-#lf0*6s2BRvpQVM=WGerhuuc&FKx&?OLXL16QlR1hzobyA=nGp}IXw}J3wEsVJ#1bD-kXr;4UNiW ztVbJ%k`S=?Utc!CenBc{brQ)M#v$U!PY0ShC@=%|�#FMQ=|_>GKkYf0j`2r*Fi4d5 zcCIOp{kXY~J(8)6HuJO$_A5H5dqP0L2rWqLmLt441(j#?J3;SN``X3QLc{se(!=xC z(?VrCKyxj%X=xJNXm8J|Bz7o8JulhoHM^mCGQkv||s5$^XeJSHJA+CBWFo z#t@sZQaOLt2M2l^?g;2XI6L@BiQastg?d}aO9qL!cDpNg*C}5WFqBRCP-T3>)2hW- zya~!@*#k?fydcq{r`#igQ+scFIry9HQvJ#fS}y?sjZj0SBh^~{BRdZEgP#>!ZoIg$ z3t5uQ7GOEtaQdYB?OnJ7@PpqU)Q;gFqNLRh@2;Swx2u+b=+q5HExz5@;@L7n;7c_4 zL%~G;I2_51#yO+sEAp-N3vBe=?R99W$3ON_L9-9=yr0pj&=@G%G^jE<$vxE>N=0OM z$-SNlm4e;ac_O#f@Re;e180oPz63nX>jWC$9eWvVDtq8hO6UY%}90FE*z)ss-VU;{z#e#j(a1P`AQ7;RiDdsb20az88BQ=F>XV?R;Cc~C$OAb``>h1`BVaR#W3}8fq~oq0 z+7H#yjOv^8)nCEM0{m%EG(DaLz3$DTKk5^LZa3NWLegGe0)h*TWzS2{nGr##WlpSK zm%5A6@FgG)Vo`*(9;E!$@unr=q&@qZfWEXU3Vs{9QUt7nMTN+PECK7Fy~gjCuIGZI zY^Bhr8R)of^&aK^M=hiT^X1ASMR((%IG}vLZdLsNnlfIqXa8GfY)RN9A1~VT^Ltz|tik6^Bpyt;!Hx(K9}vIOHCuP^)m@ zbG!U^f2uxZ+Hd`{k~QZXK=Hds?$_=eO#;qwb;>rbT+ok|i$7I21#qTp?LXtipT3)M z*er%lFLi`Z9xYXXdAshZ5*^8o*TB@vg*=k@ZH4^VDv zUMoOp)QKqm=U5BW)1v#igpg#2Nz9;*K^bzIJNc+e`!E=pPTtbul`NACFzMqlNXb#4 z=uYhJ7Krc`Ll2Z)fX$CAzzWt%0ur(Li*7rk1a*>Kwz_03DPu8cu~qlFL;bRUQi^Kk zuB6zDMGRTQ`uQmML38@8pXcxzlz=`rLL|(1-Qea(HqEE&_?l~CUYG%jJnqWzk@+Vm z@Oy1J;vmVwldk$hO$-ls@j`?gCD?2diqQ7-fOkthDhhAtRqk|4A!BZTPNv>ok_yTA zmGzP5`FFSOnuJ~!>b1FU;T*?G?fQYVKDnW-aZlHbLCK<&wAgbi$pFh~-c_lG#asoo zxN&GHfm8rRd=Vrc&$>gXBi_(+=4s2aMNfylY>~wM9oMk=JZn!=LRD;frxOKloFm>P zF-Ic@Owz@>0l0_Q90h#>9H-k~Ok-y}RE&ih*(w~!X$qbY0xga}ykaiyPE!yJA+p8P-EpXn?h6UPWHOo0~UL6ruAu}g?E%ukJ z62pNFFQ0dXvufXPed>=Bti_1+Sl1V@s(fggmR*0$L>*%BD7fs@nD&WJHKD@zpl$C0 zCe&NqE+OsVcftR`%gEJ-V}Xlp)|jem;f{~1hRveQ&kyqY{3Yg72tb)QmBAYSgjEb> zer=_6B=-xiX)R+f6V<17-D2{uwR)00bDMUKPZd88%9(yserFJ$(NB}M18x>M)>fx0 zdLMd|R`RgnSt3u3fB(7>ljbjq1&4J0!=Tks!Mcb@-!QI}oKPMD{NgwSbLN&Hm(1t6Zh|Wm5X57X>t%FBCHP!vH&p5}Z9vB24UTq2_5?mw=1Obyh&>6zyS- z+=8wG0+i^S2ct-SCL}epK6nPoGU&C^CEU+`nDfkNO|&Zeb%S$!K4(V9@1!cBw4vXl z>$jh;I06_^Up#o?Tx&V0!d_P0=HCQnS(nvirKf99-_YA>lAG&fTZRkPd)|fLU zmbv9QYCo5z?-b^~KU7ML1)`m7zlst*5J6jr0{h~SNk7v7le88gFXSGptzI)_e4xe2 z7jW+;o@W?!?%r`FWR6Il9KQwRz{{@E0%*7=71egXscB!l3xUE;qrig;&c?HzPt}3T z@MU(AOFeE&Db6r)t?$?vHPPWXqWR8lq67F(3xM{uhk)quLfBH2bB-QOls2#H#qqeK zdvEQytPJ<&%zYzh^j=%ogPdwd*k0<;HDRiUza3tSO~|vs?tynn$uN~R<|o#T6lk{y z&23I%iA%xEr;jjeneu};_Gb(JUXN=V0HpX_*qmVIXD5kw+e1KaJcv!Icm8u|*j~kv zDH0FEZP6;>vciu8-ZtUy?c9`YCWY(0{$9^#%k>2eTaMUz;=@q_>Ptn{p@h5NNds5vuY|K4?OJi0RSj+h1>W?`+ciP=EaKEgij$<~ra_asX)XV<$B| zj`9U0FFi9vPgo$)CG?ADT`e+3?J?6mulNvtqK`O_R6oxG_i9)Z@%j1pj<<7zt@7^vo$5w+6#-d`NyVKUrsDOB4pWaGgFwztb6%^kx&`7X4tw6vc#s*ZSpw?fna7qLVq3~y2m zYVe5Y-vvIGNFvUK#B_Uk4WeMW)2q-)Ymz_WKKoz&5%cB_k;x4^#N6e970K!w=5WuR zH^)w|8q?x=$1+vsMW^SLnv}li%9<8+--9n`gvTF&*Q-7GoX?nfXm%@v+tcGe(WeUZ zf!_F@RUWVrnKh>IdR$$`GhST{rrX2FvV&+rMa-j0``6?B#S7q>t!(LBnC5zjDZ01B zMIv?qwPC6;jn;BTx!ROy_xm~wtQ2kIy+ZEq@q3awezU7h2_KdGyBrlwmMH5uu4r>2$)-HqXA>$Ezo$jAMo=*C;4lX`X)^fdsA| z4LdIAgxphnj8OP`B%D$x@qoYaO)d=fC;9x$(++&okke4&A?q`HkRSi5mR`l{t)l%; z%AmKgXOBeID>dHr8c^Zy&+VPF%_yR z@r#*q8mHEGPeyN1BtsxnGv4CpERJ2+SS!ye_`5!IMLrWAbCx3~dLlky>>T3EoF6NB z*uC|inEKB*^GDLjr{$TWQwX67uaJ+`JAIGls7$OgW_FP-bE+~9kWSAI?k>(e6z;n- zV5+BdZj50gUTGoWa`fLB4gy7Wh@f*0#Rc6{DhlVsHP@uZ8jmWM4I~YGT*e`j-%$83 z@aqoT1J(wchXX;R;yH}i<+Z4JYO8{caNtw(`LJ~XDOB5PeK9gEu%(CRjlo@c30W4v z-+QNx=Jm}bTLmsuZo9F163awBYR295H@K++IkcYNR$;Tx z>l{47PM?MAxHMJ9j5nS}c;IU)EQg20*cF(!zNWg z?qHa^34!xHE!tU*-x6evf`*=2UGvM-3%K>;D<-_(n)uD+?oE?3vlq;_)#-gWR#Dad rZEj$XgffY=193HwVQZ^^S;=^wpn;sp^Hjq_QbN`|eD@!Fxt#qkydyqf diff --git a/src/images/category/demo_store_c1003.jpeg b/src/images/category/demo_store_c1003.jpeg deleted file mode 100644 index 5ab91aa454f75072fddb79a27aeb77bac241ba73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12662 zcmbVycUV(R)MpSBrT1Q>i!|v)Br4K{2uK&AAksmkLr9d~5fD%mkS-0hx(2!ciYovB1^ENG zTmWbTDE_Nl`H#zgf3N%xp`@gu{8z4A`S%aizjB50>QyQ#@|TM0-$DL!2=Y@`s3^(3 z{-5Qt1HgP8@D-3nNg)il!c0NQOmW!*5G2p@>VF>_@Sj3K9{uVy>gzXXXvrNAOn@sC zNw2E$qvt@Gh<3y2!)YPIj{itf->nn}{1U9GqO- zJYwP!wXDXXZescUFI($Uq^H!w7RYGG+*ZDZ^7()pE(tDC!@e?VYRa7bumRCG*i zTzo=$#)r(T?2n&v3X6(MO3S{LSJc%vAR3##|7h;&?&YxZ|~raj!*vJPYHj|{?&^DK>43bMnT?&f93zsiFicv0zmQx;N=&JR=>Nd3zhE-qsd4Gip}Vim%dg2!YlQdw~Q=tKKnoBR`MT;D(i$X4-mD3D8p% z#PqgHqzrMulSdLW8lxZ6>9e=*{n=c=5ZH53O!6y0C4dQs^)%%sxSVX$4W@V)q`hvW-X@>{EFrp2S3=C z+PZqhD!Too9o00;e|rW6aKNq!0;sq7Gh*r2`?Jyf zI9bmkhT$vEMrops8>yr@H_ZY!@rRCP>7^C2r8LOanFe4*uB!cn@&~!1T^`G-3Wa{7 z>F3k6mjLLe%BM`BR=7)m^Ey4)@O#Sf(Y0 z<_RLKdh+A7q)=K+kO$L;nl|kD(WN-O7@|?RYJRobpxeD-*7>DHCx4t;YjRQgvjI4- zWT2&eEzRQOX1Y?eg@n_e$%I?*(T54QzFzsSt-zDQ7_#pffc7;h%=!vbKsN0{?l)eP zkZvvoAFMo$__=e$3#M3F>>4b2_S?6Uxh|#ep$a?QaYI~LP~I^Iw=(W|`>{d`?=5PE zV(&leyQx2s|EzEkC_9l%O7lvoJi$J?IN8s_ndjp5Wjfy;ecG{jX$d&}DYXt}y99Kq z!Cd%5*Y`CnBUPg|U1To-a|s+;p@7d_0N_%UJ=@ZO-_H-9n}dLPj0}tJ8jw*VenYk~HF zX$D$?(>%GkkmEmyv;7YSv9#C9>>Z8dQ4Z$xGmc#BEu#64^rkE@`I4MB4JuI#t z9Su8)>6$pWY;JY0%fdhB(1jTjl}6%-prRVoUp8_iSm^shO{N1|ZT0zD@+=$d&W zyaBdpZ=rZ6d)Hs{!TJiDT{m@{<|Ff=2=p?io72>ulZYfu3pfARsPsDn3R8CIKT}F@ zRo(hjlSxl$|KaNf@-}WLUu&D*{DWSeXu)T%8g4yF2r@D+W&5DK!)B^u`qfm24e-CU z+_QhLBm!R3+$#KdmCf|Npd=K{9EoM^t^en$*YhmPF+Szw6PNr-nUGW>Yqlj%O^5M= z%*aGge9mZrR0nsW$rnn3aeiMLEq)azEx>${OZ2F*w}tP+;kiAmb}dx8=enQ2Efjr; z00tfvzYXn^+BhVLG4@z%daN-f^XODD&v&i?IbBuWEcA+>gNjICBRMY8j&gE!Gw?h3R5t$KTqyeY$u5Vn;X}H3YgdI zeMdX8q3y+L*d;GLdd$>mk?@|?&D+k+eXP*6W<7T&d+ zd@*yf1ij`lcGVfel^inxAr!XMA`!C@qeY_>0S*q%`QkLCcxC9XGh3%=9hX~uzi^4Z*$1*g1T zC^83V^eeSyKKYtg-BH0{Gsl#$!R$~};jWTnk{eRKGSY~*oq z$~p?;T4@sO8{>kwUKD5v4P%TA|2Dv`2iF~U=kbj@=c2le&P6_Z#7DVMjs&IX&~?9g zl%{)!(uHRx{DXRW3#&I?Z~GFE0$fG#WM$O2kdb;ZGi7qnExaSGC=gPE(uyp?mZx-bUII|nhQSqe1}*Y$5cR-%GES8uoGPFlNM4B1 zS9cZLl0<^Ca<0hJDcP)}z9UJ+%~7fW!)Apa-I5|X#6|L(KoL9v0hL1+n!)HtV+DkT z&ias-zaFt}pAn@&_Y}SU{%RMv$b-3ocnGI>!HW{;mEbaKG7K2Ou6Uqwn2_HQA%)Y@ zdtQjSYV#4G+xtNm_C>!c-l>tM^G6jmO6g5Dmw;x;PV73!!y7HwkO*NF>zESapJxe=phMB?={#{ zb~hXUY^nC(Nov>4FR?*CJms`fL}L5dd|PVw*k+I9&#hsd#{P`SW`sn{>LlWj&RvTU zN0lX5xALx9wYO&XOzm7VizM;=2Db-qvhH6F%k-cJ{8@R4ECXvv$Z{C=i5wdIkWf|z z!h+Xg6J<0_*Vqs<4VQpKbYNonLZTqcU!V)^b8+;jOe?Rftp(ltk@E+Ned%H_B`EMB zza0p9jJt-cAiy3pwqpld?Lf58mUgcy%Q!Ccx;ljocIaB9yG8X6Q%iCs2^2GGi*!5B zRfU%1OmCF5Eq(}v%bpX@a@B48y{I z5JVrBJh?(>>C?KIy?<8v<4vvTt=?4qf&{g%G0GH<30xBoqp!5X(n+VCO<-(Vu(lnJ z@g2fmULg1n?1o3S2K%2z3K!?Oa}e+Mn<=4IGcZn=OHJwuBggR*9I%^_xxdV=XxO*h z?TI+j?FzuAID2pJNcXFxSg{Tlb0C`>xqYw0pEvLMBg3k%iY?d2PWm`GyVRcLqi1_e&zdd0ly99ptB`N;85;d7 zSo$!8osV)W7x*eOZ`6Ns==5YJzb;3jci#gKy+|do5Vr8;sOLD%Ug5@Rxhg&z;(di3 z`3G-CWg3j6;TsR*!5v1gMY)PrxENd?q`(fx4ltA&>KxS=d4mo4yGJT2+lsA@RM`z)1~33f8so z`FGI_l#4L?_#Zbw*3N?6Khp<=4yuA8?$<=p0q?@GC*yL*zwS5LGelFHX{dIPjmfruK6)=yuY1YL;zzwgi0%Qchk-<%Sa=nC zo>H2&LMBy&E=A2|B)8@f_aUEjo=@{T&w={=i{IiRqP29EA zwK4)f&V=8o$I{7kqVPMGqpWmp2bH96w;R?H=M-g&wHwQvuuu>Gvc7u>h*`l}*h`ra znpVRlNNo80wG|#hkxgPJ+A2|*-^vK(pQ~_eZXmsy?y*%DX&xhy<%(IN?|>Lm%JaU% zA<vJQ zkis4m5IM_Y%OuD!l4b>0u^kxOY#O>R}Z1W=K1 zFPCLLKlR}!>f)NBAlf0{Rw|8xt`63tyiQ`x?!WL8mGc#j2E++BI$sw{vN{A3S=RAp z<3Q(JK}=aJr^Re5Xg%D#H%q&3SpxUCaLZnCZrk#8X^x$sG)Et1b3N5Ble3DpmQUJ( z>$yDpKMk8B*)0L}i0avFr}PRudzp^1Xxl<{V-PZDADXr8gcmU)gq1DZZpVlCy70Fp z846AL8!N~$y44OnshVPsbxSue8WqwwAg?D zdHuJKvJ>3ZLH?f^e;F%uP_Bul9W0jy#5Tmp@O%?kCc~3Py<{Uy0 zW~@7GNnoYN7Frt~E*C{K%MN`!;g0??n=N2*(U7&~Z}awIY1(tAi$%MR`{NCe)G0eM zsX<0nA6w*}QyN*?U8D7>z;(*4i9TfQ{Jdq3&DPE>y#ixh%#55*rC5L3r*PG>X%0=wT=?o%yOAT~AZ@r^O#)@}A~y|+|vUw2>%H%fxzl@L2HT9P_8 zr48HPn^O~^X;C&@yz9X8{akFRwOYb5UiY_4g3jMp3D)>QzVf5*-tq&2%`0{Joiemx9D|lfTzL4B1X{CJW`3Z6a3- z1SuPwFUpZF`Rs&*^X_&oY*0e0d5NnkRC;#Z14P$>LPwd~i&x`n4lwdwIl86|ob-#s0#-@Kq@{Pe&b*i*Lk$~cP&@6)2!n?TO`<} zj~M>>)!(bq0{q{PF9E#SaQI7P^D;bCHs|7%)IE4=*HriDyb;EJZzj9UvgOm!g0yEN zO6ppE8CoLK%f*AHn@(z*?>^Oi6VTAL5Q%hyZ+dBWeC{O_W(B%zkC~obNSR>J$Afvt zL-N)OJ;}(P4*LmNr|CkE)%eb5$1ef(v(Zo{I|6D9Oc<{E-MkeGQS+8V z_|Uo8ez2{H^u`Ji^Y)q1|r=R$IN;gk=9r@?J1AS+T_ib)#koZsn<(YS$?jy zQJaAnznGLdd1hiKUCs8-QTdIg>&QUUOk|6!02@$03=B+}Qk%Wf=n5!|1UMifW}_1v8Q( z{oXvWnO{drODtVO;yJ%C=F|HYYC2bQ6DlG`C`i|UtA$9cl~)*vM%@P|rGw3T#~Fci z0Y$f~Pwhk5f6x9CgR4pKEw;kn4GXPP8l|Gc^Hp9;RS zbPbePyU-;p-LG1qhE9Pgk5h(+(&{c#+)gic9x?Hc4%KG4ah3m6K2td{6Y)T#5V1(`y&T z*QNDr;|jcg)8XK5ydq?bo=-)i{)<%@xM+EHNuqt*0j~`IxL#}e)K^)(uuY{ou-WQ& z`}&_<63xAHC`5qJeJ)KJ6};Mhm8eR1w+h$p(vqGbDMJ3`y?RnP=YqQ(2%Q*XFHInQ z_179Nwuij-TC?{NQ~O@r7S9_Rnv$8Ar3TN*wn+8)qLs*g?n%g4hZeZGd?SGRIcCwY zq*jA9{#QH8hx>x)!1s2GV7H@Q)SUhN7`N30=97?g`7Z!0O2)}1!wQRx70O)N97oxU z4Qs&yMcv>ehdGw!4cM5*86{rg0uJ#zXD5xf(-JmUOFRfCpX~H;u`xWbdNg5JyT!Gy zpiKV~&^5v=7V}t8HY^xSC2789dln?0B-+Vr_y|e*JGxz|DB?)+tOi=$5N}y4<5UP9AiP4u7=C8B@u;)_BLbx0 z;%=Nh&ApxJye)qB($at0c|7gy@^D>#*thH$?6Y@qZa`GN_@>3|D#!}u3Wgs-l-K$B z@xv~G{-a^{KVjzmJk+S#;C~7rcg`pD6FSlmpV7)*F3+$6`A*+F+F4OIu^VT)pDV^N ziA#n)8=j)^Du$6r>RM!FUx-k z^axdj@QJmREyKWJI+5TBh~&2c{4PftFh*&9q}gAE^vl{3}yx*6;`^mgXiSrS)bcgv0YAGE53^Y#uZGRT*=4f5)Iz-woez_z*y8m+V*k=K`mLCI^ zhFqWag6LiC!4kk`U_RSKqgw&Ag9}D6m?OKFDWIh^KQ?na73^SQg>cz(RH*CXr2#7gV^&DtNWii_xv z4{1NpAN7JClNnD_p!Yoy{Hu$6j=)FlIB*aB%V3EvTONo0t4r(8x`n}uZ-)p8s2f2o z>^DCZnb1aPX_F6wAo7F$P|03w&{`9b)ej@s#Tbn~?C{}_Yrpn8Pi|bf&72%4FcbNy zEkKs7goqiG&`=B>*QBY|db%KM%OaLR-l9cV^QpM7cCkuU^>2iNv_#1oQIsJ~1 z2HeF9>o`()^*jeK=%2kismUHyRL98sB`Xh_oav}KpEjbIMzT~${9_(lIq=8n`5`Gs(> zJ}BKq9ONptzRQX;t1+Kj>lUo{Im+9#<^;*GApTW)vwu1M;6U2>B}uMM&a@Xs1*Fpw zvHgu-mcmAFtg-gUcUGdMw8TT;X4c?g>ciYR7us}{q@*{%2}%+JFV?vx4)!WPDwK#a zbpWmTB+SxNnSYai++_P`*;8f@GY4A{M!u6nv*I6)LtM(1gQr&8YrKC+(&I~3E92Y8 zstBR0E+LIn2Mh0gQ|>@5_swY~n`COvMA8u#B@RM-&y!S;RbwA|aepOinSd%FKq7IWGH*mBjEm<-qv*zu01|~3$&N=tWs9v-?{mt10 zzLG-5w)0(l)#6?u24P8vZxFfq*=K|r&_9SKdt(-(yWhO3zZ#|CLqr>Yq@y;SzF$*S zS+HjEwPFu?p;K}wz`h2&;SQC^k>PzD{c`$Go9=?~B>X@krB~KD=K-7EXj+!C+0pG! z{1LJS($q@(+8tWL0y2(blteHw%^iKtxaS+_>I=_U22qOs*n| z_dQm-`TKU~+C+LXAa*5!qw{b03-SloJk?TeoIW7Ja1thyCo|Zkk_h8wdY)7#zcQTKxwIw9;0x_K}*4Wt8TyNF}_s$Cc+swbqo?X@W zBv-P^?pscNLu&ogzqYUO4r8BlhsMxhPt#4bMw>>8FA~VEIh2A-;|T=c?bMQ*lq24# zB50uT{RV{SwW}HC%3u7xpLf*dBhr{ykfvRtp093jLbG)-=9DYu&ACwpV2xb_tj)KKKFv?jq{ zMVOu=q6r~-J(bt`HxDdUrqu?McnM(IZfBj??+Jyb%WkE+N*5&g_H8&&%l5oge0MQr zOZthVY5>g#;h$fm2LP!QJdjlF0>2%Ya9U++i>?m0aVBuFOa!WlYWAP6Ir`oR-p?g> z%45NkHv<=%E~w8E&*2+FH)2-vi?Z4$Lg2C;0N(yxS7Umt(QKTI*9&k zHT9cbl4;w${sKy5evA4mA@JNL(IVkDn!6~+UN;CE81J$n(l8cK0q*B>O)&TQbmduu zwNv#PF$>mdU4?vgVTG^5$;O_GK_swpT|i2r{G=C2(8ChUpf#z)$mY@Pac2hMN}S)I zvE4uLD!j9=eJz(Nit|G)@f7zM$=CW|Z7u-J2`1{IT5leSKJn1lb<1OKNrIU((2b^k&{tjY@ln>BJKtJoyDtH3i*tisVu%xz)t!NCm7uK2 zkJVK!$x-h|S+CHvdROdpL~v73G3Wd(wlS$Lq85Fb_wiR7Yj>%uttJb%`rvxdnz8um zf^tqw7H~WRuXj-f1&|idmw!NltpJf7igY`S5Tmn zw_%mq@TW;_xu;&UehDDmI45ta4WaFviVWsjEOpr4{9eW=0fkz7+vAR$lz-6tTQSPn zVfri2CgdRH&@n$@Yik`})|)At((rDD5A@*I!4<=%&8;(s2u2Eze42wlOSY%IJU(w* z4QSCjX9Azfm&d}(ge>*v3z$vfl9(i!lYiJpU06|LU)l9?4ZZIj)XtO$7#=xH|55R$EQ_GGhR+s@<#i9ZI(?h2k#nDN3Hc1ro6u1hP5Vu| z;C@>iXAiw1W~PJei2f?!@2e>!D4N#ikh7%Sx?H$AW6mcrw+>!4FKN~xS`($THT8k{ zGLjn!&WU0U+!QW*;mC&`CsTMfY*Uv{+zLy;lH59bb$Qt8l4>UlNHg?WsgnJxzF%Q+ zULrGQ4v*u@iqn@`#q`r;<`r6w!8MM-aT96LhP0^b>xCFmx?o*=f#Fc z;6VYWb5*go*3eJ=T>W$=f-*p#rp+2W51m`KojtY#b4Z=A)i1zCjx^kH2M_4&AGa~0 zv><)31O3ATtK66Nj>`&-lLLBm^&*~*4BDcfs5hPiO?Lm5lKrXI&=Emimm0PJIesEh{~L2~8#Lp@QPRyA;&ckgdzO&&-lG|8(y^1M^C{oG&Bka#z)-1)?> z>d~9>@)rxg676ga3|H{``$s_4k@e`97Z%TRw;gaN?)bkBD?+Y?2{;qh)kDIq)4jHU zb6el z<|KaC&1DX^gf3U-$gUmcVSyCg5G9*@?Wis5n_nrFIN&g-r(QGeFzmkq;%tVd>} zgX$919zQp*e^9jgSxrvd3&IiBp>OD6PrwaZL|)Z%U*etCX}NX=4=5vHYwcrk5Q0t= z>yv=ist}Dl#gEMGSU%+@F@sYD*?_CLmw+b5&iMmj+~M9Z&KzWzXE0zf>)g{oW6sc}Tx0zgbxS~5I_a)EmHPX+7td;W!t=bE2{A#$aL zCq&6I=R;vu?@IG@e5T0~ zC@~ktz*QVqAx?M^uBL$pRVGs z8^E2I@g2L7UKv8qRvmIhe#0azDYEn4Zf4tr&-$@Yu!H`x$~(*_I!B$?+HwU05^r7K zB*+Dg%KW*qV3E7Y8XHEnu-1EfKfjlePVOK!UGj7`{m$c1{ zJkAhn8}0FCd880x_qHaZ>SU}Iqzv!z^3i0~qo*2zT3?>-A?ifyHLTQyegF(rr?#`ZO$vI2eGaMuw|p0jQ@n_|>j=YHwk zWY7uQdJ9|4w1xh_POS;1YMQJtL5w|cscVxE1C*9TuwI|-wd^%m?ASNk{t##H=6gLX zi|!6KA?s}+vN9V9`YCe*5?7K7r-Dw%d2aGCI%`#<8REoMdDjDeaM(OyV>>jP(d>;6 z1V^;re%094)LfUle;^#4&W(BBhpQEo@)n4tx{x||B#hz8)(-b;$>umqU_ZZ4RK%9W zD<38-(`y8#`4td6I(ec_1Dg@iZ85Q!WCkI=M~Oy>Mn3BNsaBPi0e^p4QcVADZ7`<`$C-ad(0(55e1B26!hi zC^BcQm#^QM+$_JA1NGRdpZ{ymGu~_2IU6G$*-&_Z93H>WnQE25McTJVjCBiALKSy| zPU-q+tu?6w+(p$jxy8_5^CC5IlSm8TOU5}M{>ubnlW>Yd_Cf_Ovb8uNKaJfBEb}B&T#lxg4&Y7RM-yTflOGGMy)wxn|jcFt%wqp=-7jqad z$PL%@xdhxujcf(KZWfz|N$WHDmjQbAMVTrS1McOl_jWKI)s{V|*lxPXBr9|9!eA9fV0$A(bp3WWNSTazfX8%^i$T=a>Jj|B z`ZE|;WiL6C86n@;MAO=YGZlfgX;dZ~rNQs9G%aap7qBjJQ2Kz3I=aM^e=wG-)d33zcBA0H0GqGasW91yQ<)_fS33`*=o1avpz8mL?Z zLn*gKq%BdMFmp~rnuP&;yfrtEsom?+a%ToDWdtu6|MPT$!{ zZBdjY5xB3`9fHp)NYHw;jL_ZHEDtXUm(F?w*Zz9|_ulYgWg)4J(S-K5RBhSZh z@8_zx-qTe6^-3|kvvXrlugui;&OoPT`6DYPKGF_EUtQow&B>RGI@sz8Xl?ehKUsJ-a-@9wc&=!ERyFVp!;vvTs-12yQZ=a`c_;JImiv~;2jzyMCaoiEt zTL5LcqC+Ak^#);V4UhC&1I7t(%o4dV9?}oBqOZJMZUO~E9BOfIqtiRBezkX)CaC@aU zFVq4F*g-AxOw00+BpvBlm2>wDos9z3h8`FFLa(em%Tyoe9J=sbx04YaacLZvG2>#Zf18t>SJ4K#ZvUvSkOGc-T^&b!Adsv1+fL2t-(jqb;vu{!Tv^uU3vFrj93pdxZ1wTle5_5<;djR; z8;kGyxqBhwueFu$o4vNRcZ$Uf(SxniVShejPAYSuO$0*UIQq`g>v}IHM;|vJTrH3AtC+-F7n%zjiZP#B?br+vRs$ zQa^=>LN3~~;dAnG+$F%^Fd|g6otvPJE$a3ga>?&rp;w}3a2vD9nbNC!_vPa8OOldR zSkb)f=MuN(H^7fM;ZYn?H@R4@JL*R=I@JS{+0yH3xAoR^GuccZ|Ch?Or!@_`GKR}` zM!R-lEjI7_WymkJlG&9z56n9&8=i<~Oyqw=B9KIuO1#ZQW$WGWVnWl}R&3PNK^C=_ z`r|-96N+#+ZOi%`&mza>PeO|DgK^&?q+n!38Pn#*VPf0as%O9s<>4$o%T&>-L<7C zuT($*B|#VpUf01%yo2a`BN+8V`A|eb4E(k^N5R?{i(B2cMq9bV4cC`Xdc#E@7cpov z`8k-Ei)V+mg39bnIxe<_>40Z5qy{8{oCA-=D_>MAwInjeuh2Fac#F|_9m1=G6|L|3 z{jyV`%G%HK^AdI01&^)tfeA_;Yr2RqzYwe)J`o3w5DGC`*cQ0i0A|_7MwqbMIx7P1 zZ7R*^wu|}YJayL#ILq%+;$euJJS2@Yn%Uiq+6==2yV|G?5VcJUo7ybwrV&g|+h9}$ ztg~Q+SLa~r+%{Oovp!WRn7jD<#|*LEf>EEa)e z4{qw=lzj0u7~CED?CdlyVDMRTnypP2T)OIw7Un&*=(`N?GMLCLMYC`fy#Vu@UrUDnEb|VH)^?7+?ok8OP0&dU#&r=t6?nk tC!8MH$Hl2syc?%57#t37f#v^&zB>7B+%i28i2QTPSeS6zWa@JMzX2BhGt&S7 diff --git a/src/images/category/demo_store_c1004.jpeg b/src/images/category/demo_store_c1004.jpeg deleted file mode 100644 index 16e75453abc3225654388557d938024c5c1c1af2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12860 zcmbXIbzD?m^gfCY(jg^XBaOn)or(eiQcBmTNRGn@NXY;K(lG+k2vXABE!`kp5;K(a z3^~96m-qMg`Q7^K-n-7(=XK8O?6c2)cC7WRwfF7Z?J9s;OI=ePfOii7z`HvDw~K&h z0KEUJ-1}dT|6T9>{{&MCZ=ZQHt%ii>>V7P+&;N`czSt%4*D7#5*ijB z5f}eGAu%aAB{e%IH}6+|L19r2Fzb98)idUlSzxcmMCtSFdU=$;Lvjnq*N1G^xCyqv9tpPm z-MgLVjyI<{utivJU(6xTVi$g;wXO1QQn(y$W#iA2m*rVEMUbRBycl_56Q{1L=i3qs z7HFs^J`GjZ8gTy%+Ft=TuX|@MfCdNU{lWgLenV=$5J`xTTkpT$)H|M!##+rxOz;wd z@c#tOv@7B`G3R>IC2!=dt05opoul8Ua6j1N9*%bD=i!h6;0ucjZo6TWXEo40hv5ry zhb1T1EIMkX`oW2+MOwdn7~bHWjQW_2BVB65K24ho|J%+Rt3H4&Q3qPfEUsAn|#+;+@3XKz3`Yqt`Bf#(V z^;3SPfdfa#Kgyrk5dwh!N%-X5e!Sy~yt!j#UZDo{6DQ5~FE*PS{u)X~(MlQVo24Xw zp?}J+^jI54?U3XV?n_jfuLp#l+n{Gp=Bav zk^?-63PbmGXQVQq%A2(2kDf!18VJ7W$A0T0)MfJX#C^mHVycmdE(8bmxYNY}Oy>-j z$Qmj3?*y*y%fraAhdmyDR{yHm^G;P;um*n};_4hF2oW#Ru8KIuBw(g^$3k<9R2Pcp z^UGHzF-IC8r{oCNmWS!SP@A1r*jY6CI|mn-a^5MiswG~M+>$Kf})?xd+M63Mo;bZ{hnjF*G9l=@s6pR zu}CV0Z3Y);N(tPGC;^(cFkDhL-)IpeQT2(E^J!xUIT=a?x)PC^*~Qvw4)O8vRX>vD z8b6?c8TPPEJRatbQg~$VktoEm&k}_ffvING750|gHPMuwiLAb8zT9q)?J}>`O4fMw zD|IeZA6t%I?7aM1T!yVW?34dP#ntf;p@zO{qZ(o_F>8o@de!zm-xE;qPXS1E^XE+3 z2BL;J1E1zvY>^WO0>k8xE>*~YO!9$4hVQFci-3ZR!`Pf@&F`G|)v%1$pVptT2B!>b?S!7e;)4(6ZDUTa>!`$|sDhxStEp1)xWCY|kcC(S?Z4Q|&g`ogrOjT;+fwCzTXRWT9|zQ4a; zYoXxP@o?2o_iozdtc}eTciaMq;9_VCq;V@o{kT`A$uL8?9t+K~giMYp=eQL%DJNEv=yF`rhJgajtl)g#6bNx!_v)>P@?mPY2g+8zV-?xI?P}E|eQT2GBHK>xH?We+xKiAe%-vqz&dcDHi7YDBJqG@8^}w{#YtQJR^VP zBRj3V3%f`0N4R+ETP&Lbl0x1U;v{It^J{0ef;iSVuIQwhf!KDs=pMf-(}HLd^GH5UQBApR;hX~9gWi< zll!{!x^px;zWSrVxw}cbMD&Ue#{nb$qjIO#nVIl|YpR2p2wd`AUEcb4SSl0T0ywisqpI8zf_dqhJS)ww6&^GbI^6>Hhpvnv z!0MI2-gxxUnC8@t05)QzOtR6vk=u&AQ~FJfy+I3Qht*OS5A}o4_p!j$QVn_)ob;ZoOjGV#XRY4y#G!Q8Rg+V38a6y(|uSp9@u{WRG~hoKmNya_MU zgw88Hs*|)laU0NA^Nt=j52~pG-DjnAI4^#v1hhMhQEscVZ~;RWG#REmwq1S-*L?BUn^w8r(J#(;$PigB$? zu=`8cbEIF8ko0*XnBmmd-mC$mUcDx#2z5k8%QJ77z8-+EmM~55gd4GNiY-XAR7?A@ zB%KA{0=`D}vV^1*LO!Rn2yrlapA3Am(zp`QuWO7$$v*S$rp~gF0K_nBe%p{Oc+k7d z(~<#E!D_mbe{V6%x|#4%lD;x{u^wv))dO+U_WmrAP~Yw6=c`Zfo=A1%J3CL(X$Prr zZ(d`0)>E&kicXcDbpokRp`KP4MA)g12uBB<=nhNL7e#H)U;kJ>F&M)V17oVP0r$BBt{6bB4T`= z*{zVYB1dI5h?%voTMtWHfWaLRbLcmG(5-0lPDa z@Sbx_S~1hUh%qU*SY#8AFeTQtmt8_#lRt&7 zzbe7VwByZt2b7(wItknC=0%%NOj@Fq&iwJ{fs%=exXxuBv~BHVSm`kxH?ve}(mI^= zO3ZIa0xpJ~U%dsec#(Hoi=q)>irgh#MOe@7<@*hZv)%F((LQX{?EP*+ABGDCxSHe{ zD56N|Zz83+R?QYbi^NS94n0G`Bpf=Co76c0iA%p%O}2o0uq#?Geq_v#Jh&EyBR+RW znRn(>F=T}N1%n_cDfG=ZQ1|P<%?FUQ8Q%BH>%0w|2A)LUZsPF*BCdl1s^GK2T}Hij zljpmxwd@zKnrBCjq2s)zC)SkqkvS1XtzV(^vkeAn^yi_;bOvewx=M9TaIhjU2QrS(sPB#9?ZWGqt{uJqs9eE3Jqo8uVuld{do&Bo zX3a}As~ZwW={>}T{|#C66~s~G%5V<*(9t+GDO3@H(v&RLqtPyDZJc;F?y-GopFlz+ z6S1@TC^Cf-(4i)Gf~~w{{F7OVisV#6{PXNL zHgj%qcxBpWL0GUmrfA4anHPP!R6Z}c{p*jE?CYTx^psX!+}lsylpFZsu`zlxZLZhJ zjNLZ^fiPyA;WX#8^9|vSCkw-m@};mucE>zZpql3!Jnwfao`TF0oD5wqAButNJ16M* z??v{e<)}t2BW}+_Emzm*mUt)We{IMAvX>saWG9C0;of3o&i>XnjW2d{NTAhY3!F;X z|7MVWm0A2?*kBv;PsmQ9^V>gGY#6iD1@IO?_-VSV#pvoejte~#oqrhL0j4TDuutS0 zmOfjk%el^>bEOqy=`MUoh$eZ6$xwMGIYzC65kb8)u5-CABG*oAZJRoLk&s+w_TB@y z4|u}FojT_~m(vA&;O{h|vDQ{!@Dv55>Rh3e%%t4TAWg)RYo9K4KIDzK{3kp2E`&MT z6!qr!V2B2=S)8<6P@~av{KgZUy>1vjmJae|_gK_NXl^Blh zx)%O4PbExI0=cC3vOS?r!^k$dEJM7k&ZJPpCtUlQf2>2x7zh^@cUf#bK!SSz8eR=P`x z$OEf({V5Opx{7;?x@)3;4a>>Oy=5zD>ujE7c_$%cS)>}x+_SHjs-Jm7=%cdx+^ojP-IiIVz-nB{!_6vX92gB#^~k~II>y!K^hFABS()(51nNv7X3%g_l8Qjq<)I zM}fq%#G#P*ePc|5<@d)i>GzoB97KmMNY6RNh!S7 zHGlBrM5W})fwQ(gWMNqr8MsUzNb(NvZ7_{$(a)QI0K7dyJ!`2eC2Sj*9mjx$pnTH8 z%F4@e{En1)ZWI|#mX?eB^Y-6>XUnu$#ppGz*2MPmiiQZU7AZv|kr0O8ozp!q9O3-<@UV*q}2DLZqGh`0sR z=O(Ss*Rfl-DCuo1o?)&_LjzFYugY{&H4rOE_v}m?a8@cUT+7Ts(?|Zvk>vo#CQWyo zV1>T!_!o(Y3j|8%IzI@cA)0Op4xlM(+?j zY7_>1ny>V%)@}iFetmsFSR=-|-n+=@d|$e@%!weg=I^knM5XgjVmYRNqGG?xC8ym% zf_+V}fKztL4R>~7i50xdKswj zY||}()J&yk|Ad}ZcS5=EIswNHLuQf>pad@zo1=|d=6Ex>jx-ZSw}=CC+Syd@xPG)b`=U9PQEQTWA{Jg=|JN*XMC-Id(_jv7@{7xIo8hF& zYPS4lO3?_iJ$jj?&PpDgmn+{|i*EtMPVvUaX@9w~zLO z4PJ?Lq6+e^H*y-Iwm|c{%aT|tv;@j8wdq726g)gzS#tKutU@!-jO2}`zT0`IZnyDD zm)=}CvMu7AWh*kn^kgns>)VobYw52PR)G)S@;7+`W(yU`a7kE~tLNBTz}c&5?g{sO z79hJ9%fiNr&ZN6SArvMVqVb_MH{v6vkOH26;VSz^`Sqm_T3wI*W;uhh5gUqJVco84 zqnwbsDyITtITpY%ntg53{`ihWM%2|2fjo`n#ksTUzLobhwo0w1wd|vBbHC~e~QM=Uu*q7rL2*{Nk zAWuh>3*7>0a0XcezQvaFI~@GcCI&h$EbJ_7NNLG^R5g!~j=EaLr^7jshx3s= z%LJ1@b;!`(3>T?9wXrQ}@zXJXod@I;PjQ0(R=!%xPMzr3-Dm8Pj$hDbD`xF;EvZ;~ z97k4c&tz-YKW2`-JS66aOKfTvFJ0aOz!G)zY`%*Q{u(RjmnzgtJDEg^MtN3$byUt6 zV_u4;*b32EE@;S+HLh*)E4N)kPO92P@9ag&4KS^1nE~7GVBuSgUG9V`8=Tt()NDG; zQU1=!DxVy@NnZ^g%_o2J_uK%oo;!h~Ic}&)$@LD5*lZQCs^D&?d;u&g2D-G{nxc9+?|Hs%y;^z!_l=)z({5jW zDg2I86UyBJg3{cZl`Jf=;489=HZpW?+(b{Y-=7RA^gw9$vVfr(JtDYfcP@2#aBg3y zJ_)1gBJeP;wW3Sh+zH4cRgUL{j|%O9Y%BU>9(04LPQWy9qiIRL0Qd0P9~#;FP9b7QqVa_K{fQi_I)4!8^F|2|?>4uXDrA3+x3rodkdX0bb^za3ydo|S* z7H$FMu#^oTQ0l%$r!qc9IVlsNSXKRTyb zFomC>)3Qbg&ScH4$Vfl9P#Z;}KXU2>sYcQkh@4dVjiV_VXt?Q-hT-@s{CorYr zQyVTPdFL#*oR>C}r=`Mc&)PEKw%?w|KcsahxX|NQ5|=CAdZjYI*y~>_6D6fWi8V2r zsL>}QnYw$1uH2X1%=anAM+qt;We0=g$+<9=tRG}@lg#+^0aARg5;Og-<#Og`BZP^qrEZR_wbFsB)Pr;KdIVG|y8({ z0k-PC5_)pyQSB%zpp6s%^w}%tcyB^js1aZOSXL;%=hP&UV^zF=XBSWT&P^h_7bsJ% zQ!DSwZw{25HYX7w10Oq!t!9wNpL=bz7H^8dlOH4IMy0q;HW83R=jiRMR*~gWqm+xT za=6-$7BH8W$DphQt;HxodT#;tu%MYcP2k_> zxK}2bR?tR?Q%V#Z<4|-ROuRgaXS85vx3#1ewjv)1WQMLLB^=Yu7HTsGMpHpwNk=i1 z;u4b5K675lX{G~%Rcy;?{N{)zW;@%cE%b=z^mr3yyRAH?_fG`H8dKtkR+sb|5eGl} zi4R-eY_=6+Ij?B3V`r3@n@H5y*U$M;ithQ?>`itFlu4)*QQ*q++0w6RTn#lf`r|!P zm9fd%JW;(8kHtC&{Z=t6UBEC8G4p50a{9iv`Hs)c9G2N9g=V!UYQo;J(vm>4xnw6q zMY8}*_~qsp$CJaDLa&M?fvE&n2BRsnZw0+fhyUE7VqBW#%H+08_k5X=j?)oc+8V^u z;9`$y^GowFs5@Vt zLLc|In2%n5_`IraT-99VLb&sSRDizk;nuIcBe59B8jK1qj}1Z*h3L^*`o<0T`ByFk zaI*(%JIk?#zRpNDnO`CFW4Z;rxAJWt&Oix-pwSFsYIsrSZPfmbKer6a>27 zl-iT1saQa;e=kzBGjx4BBUGO-D~$r!H5Ku|3I25Ls}-45Dglaa$gvO(ie_v8rmyct z4(o}5^jYIi+|YP&ZFMgI!w-}xddd)t4q`h`)~=o}d40YaU0`~btj%rF$i<9IxRw#< znXl{>kFPNr8)(PMHs6q0U=Gh9({TDLVH_ids1O~gj%n|5ROW`i!gl2hU+P7`B)7|9 zA0CcN`o5r^5yQ*>JL2Q*JoNE-#q+r5ZI1q^oIW76pQP7o@KjAE6%JJ2GW%*xex?#b zZh1vGsV81i##d*iJT-w^ZESS^CdT<)RO&j=zoW}@1#}o{V$-riPhXU$Ai#BpmiDL!+UosVQY(i6`#GkwTrO9nAcKZPYDB-k_v0^)tVZ zSspawsyyMeEmQluMjFME%n)R$*iEM0V%z5HObc`ka!qVjg~|Uanatl_l{CV^Jk9#L zt|PokC%4N5Pze-lltb$H+iI^mO5F!`w>?5wwO5Sa0+8erpBABf^S1z3;kMsZqGW&Z z*ob)g05x5)b?srT{yi1DEW(A}rMs!6Aps=}brm%gjXvbz+5QQ9gKq-6c+_39EH;_B zfsMZHswcrv>6;Art7R!4MabuqALZb;_-V#B*B5RUuTcAcYV`R>Fs&ZG4VF&>Yz%Aw@tgEQ%Gk}fYw zG4)^lSMxI2a<5b1&?_0I&&HLgav(Ooo70aKr&cw!b>}v#Cl&5+9h?3sI|+_`7x!S( znzy<)Z$e=!ydt(&&HpQq!tarnNuNGW7aLma(Bzj{gcW&(cJB+7gbeUb?}N&bv;v5C zOf+qOVh0|IS1M#?&_hCH`nQCnybM!kQw_{z9tm7Exofs&#LRq_P(+YMX6NgQZZ=zd zNV>?JuC4#Q0#I|yg|x9Sw(&PlPWqmQNwqUrVOM(0({nSiR}C3Y3CB09y8)h@}&{tVA5?9Dx&1{em<7G>siBEs&k500@>-4XFlWpwivP>i}6oe|L zG+%jEbjRgsZa{alQ>N?6f|V)jtz!M>bWv8pIq5@AP`Bs(O4Y)C{v)^^!ImVOi&K3~ z(2~}UCg`)9pvUa7a_p#N!cHDt?Gn()OAiTJ>4nmPcT?S`LxNT9(?mlIP=`Q1>70zuJ-D!ueBri9W(WeO)>2yKRj!}D;Rs0( zR9!~ye3nYM$@z4dQOWzA;or*+o@PO*E@2Xq1|?F(pxC)jg;J0qqh$4Oi;}^bVg$@` z%=+Ci;u2$xYcYz}Ac*l4)01i)9tkmJ%NO@5WnF6fbibtADB8=F9cxVTe>Z>X{n5Tz zROrLew?ez1W|w0Hw=aGzCPs?n-w&4J_UuPD@?zGySR@xV<`N;cF@uDU*mFg$7UMJ@ z(XM5uzger7I-BhPhYp~CKre;PHcNkpnOdJ0Qtu-aHEi-1HxCYYx4t|KD^xj|WZzw1 zQs|bq4}#iGZN_qGLp zUo|VUa$9;E!!!Uq{yX~@9b)zjm^R+2X=QylF4%m%;@uJXJx6O7ikJ%<++(GC91yH8 zN=NyH$~iMwx!B?bGo62xf{#(^O_E|9`IoXlY1TwznyU0K9WfJBb)@A-#n(SoKKRpn z*`w;aR_0NQ$X}u8!L2i1j7GOgKpS4t+2_gAG?j={!kc;&RCTClp{=&yKQ>l&nq2ZB zc&U@gneUmH!1AZq%+veW`ZdxP#??}YaYdS%mFFIeIJES1_xSCvC2P@ch#(@lXuZ+! zBAIVIYTaKP%&5$FGsdBeF^T$Ak8Vrg@8gSEGjGDwT&f4TAjg>XT)2OjZW9eIFlx3; zOuiuTwpX`1wtMdemdITDr@xWov1Om_0fUN6EY4ewnq?2!@6#FP&F?QB`MVvf#QBG1 zJjN!h0Yfv`u;Bb1KVghW2wY_CDwEMcg%VT-w3wVUodK;*x|6pm&!}@){T=UuZ3^o* zXp(b&t5jito1nKMKGZUxGox@4D1V|Z=WOqqavBF24vy(sQbt)3iXz2+Zdv{zp_rbJ z>mn+x9D>)8ih7vHo)sEpew=a)jKBd%ne((9a`wj(>nr86SSeZOF*8)j9fuOb`*9({ z;{6`+L&whtu8-ZtWEzaSXMVi}FrR`RpsZsZon}&@D+omu`{LajHe1VQzIjd^3@H95 z;w58JF85(wPkAi(Gbt*sD3Ojv+XiV8&*5Ei~>D4Uy7^hPtR zE?teQMfro!Vzy^gjk64=F#z#7(N@5mQu%Q0MkC7vWR$%#S@7og~LH>67q|?O&Vc1QIl>z>MPw|wKN^GRMW6PqqMzANl!E1I1L85>*4F1_SH;3 zUi8+U2C9AW!Rl6z2o>BH?HSYpr0QmvXt|#~;3Ng&5G>%FIiU4ujI;1QY2ZuTL``@Z z8#1^Rm)N?2Lz~)vLzH0PX+^bc2#0W_$+UZMwDqC>%%MiO+Q#&7DQN2W@1XIHNveju zH&5(RO1RxS%@V8ENR8;67#{{q)l+iGNUkn#|LphjVH*@*_TO^hN=jbXuCBXSQI{r7 z73|EMryYKph1OIeDu*jhlzuP{InQ`ronBM@8#<%MTyJ&i&99v~VW&~$SiX83=kh}g zu z7>+K;V%EJ?Mh!Dkj!1^=y{VrP`Q%f+*ZfjY_L#@5iIKKt9=Q8G9Ip$bajpd zr-QVnP@VmAaJkR*B2Xgv<0d4g__S8G=2H5g&A9TKP^WAR735Neh3Ll|je5$Mm}^_I zdPVgeYLnyDF{c&h;M0Az{o=oD6wPO$9d7q+-l}yF`e0s3lWQa8=4 zdJJ{90_`jkwoIOJrPVemImVs_aRbE(jbpVm%PPCw`eR!Zm`*iQLQjQ5L?!9?;f%Z zCbpXD9hmSz!k~C#cI4OWa_x~1O=6eakdvoIhbxm6)rpF`P!A{dtk~OE;d{O>EqM>0 zN9rR?Fu^?ukwWNSg&t5`UO(x**apm0+mp2n9e>^SYN`M(tS>sJBZDz!33LFhscD&- zHX+_Od8jQQxAmC9{5^q8v2I?&Ng+@p#nVD%kqo6-{o`g9qR5^So3S4`qHGsIE>)dAB#~ zZ1DO!?ls2ya1Cu06Mzh!;uQyj9h=l@gZD89M?-W@!}D7_@fp6mXJsh*1QI2Mpg*(R z1rEl?L{u!_G!$RCL^{@1r0N+X)>llf3r97O(J1Kib0I+WftF$ROA=D}9Zb+VPwQHU$-jGYI-DmTguqK z%Yx`Kh2Asou1w*qYHzKN99aMe7uPc489p@9zZU?G^H}DqY5>>dB)sS_<0jtV=Lv}N z{iyfSPii}}?rsxH8z*-6EDpn0zV^?)hLHuDiZxNUv#a}a5;kEM$P}aO;mv|FuU7U9(DE7&y>z52=gTv$Zt}jXvSk3*saGPnNpG}=fj1qT2xIUm)X5UKc(TMWQ z5e+~yS3*lOMqt(BgNWtYN@JgH!i2`JrQv>f0cIJHxZ9(tAvTRPPCJvBr zak-cFtLYC?J{pX@8c+qJS~pNkK0)xX=TqfN27MWkk;<+|a`bl`HK&KS8e1fl%9NdP ztUbk72??(We;>7|G(|~Q1$_YTaAo~93oY_@z}-2e1gqFJjLFmb?{FDS7?FL|L=J|q zhGm#F#9}BzjRBeYW&DnS<8O{}AM7*Uka9xT^uGF2N~(mf5TD+S$)==0MQ=#KF3T+d z0oVTJba@zc(%?7k#utnHAv|i|Kx=KSNf5uZ%=L^yKhcaoe(>q`c$Xn0uEab^hofC7 zDP_~R=k=?oEM9>n@X$u{1qc1rgPYz5jvfnR5pWR{$i^fTbsky+g_#Fuzn^d};|ksg zIa*+*Qxtx+J)Y1cKps$IvORjYPln(aL)lvJv~X$Le0m=#@OG+H%3_4uwE7{glyIXZ zT=Jy?-5aH+Y$khDdpTDk4wt+!nV&8tr9C`6T+GePx&YcQlg}u)ZbtbciCAVZ#ZAO?nyJrK4%P16rtL0?u8OF z$8G0(MIVfqnAio)3`|(n#U^Syk)m^t1*yIUex+ZEtD0Wg-kg(OY$jyl*eaEe5d8Vn zXd~Fnl$wN_?X;LqpP0GGjOhONQC$*zesp;c4ExA4@B~5Q$N`*gvC1PSl~f3SGg<3n z<}8(*H#xoxDZmxz=eqVEI(OL4bw5%FEaX2|huFU9i;AP-p3H+^VW`eNU@b60fBieb z$cx$nXFEvZkKk@0@2wB$a#6=}Y%lqm8R;2qsF#HFC=&Qs6G z_dEbzbN%=2qT{!&)%Lkb>-reNhVj?NQ%gw?p5;}VTHK@*F5fv*eDC_$n@lcAo!ZfQ zdV%N9_AdQHK1GWUQ^O;Do(o~Oo1P`Yx@RFsmAN1!V=yi;v@7)kg3;|mknDMnI^*Nc zw{NnOB&@94L;9@brwftD&{q?W7aaYS@4^*0efZseh(H&(9_H&=XV>rgXjTA0)f|%{ zWe`tH#`L8ddiI6{xi*gsvC`^OpD>6>)TjeX0{w`UAeX=I{OitJ06Er=AV_zjq%`Lx zfV1B87LX*h@GNVt>&v&^pPxEU%GG%39ZE?)ANVU|klg)B)v+$)8RT;bf%-Gix?0u{ z((OC_bQbzWWi{;p}(WLiaX^5s$G zx=WlJ!s&7wnr(@h$)n*~Ba{6}`RpmWE;HNw8N>#{#(;VFVnXuw%gq@?TAmpQ50m zB-i?XE|={9Ryx2tz~!QnTHV*P>xJbDZXz|$6%G$=(&h@FAyN9QjcVJL(NGLQcJUS*e zF8)n7k700=j8MZfByGhxvl^x|7*yukf-6_^1sQ&N|uX)ii(nomORGfo1ylKtNa7WMxn z+5Zsif66rvxJr42Jb9F?01$xm_vXh$z^%lEBo^(Lhlbs;qQR7jUE@lkQ)08ix>x7j zziZ~-zHXLrR}_#IoMlR&dqi`>VfGI-huQ1!Yo36Q>8Ui&4E8zP(#EWnKI2C_?F4#P z>~MPVK}j#3IZrDsIBFs;PLF5^J>nCK%z23@NT_e5Kj(BoH@8*I`)tO1uWZb6utuB# zN0xJ>mT;v7;A7&=|Kr#LD?{aa;th$#Bt@9~lpmY&3<0=?N+xl?IB9BVv`1gvyK--} zX}prReTP`WOS*w9-dhEx!f$-TdK}DM2<)*r+Igizb5_rK<>>Jle=%lM<~#M{PW6!)rz48Gr$e@EP$Y%spUNeMM*mSj&rl<9=GMtlujVkIN$` z?fn<)ZBpH>2Dt2qsF^m-1_|4eEe(!iR`V#Q4Wj59HlR-d$%*jFb zY{M)qQTX(?ds9pP7`I03_4H>&-x6~lCz}meaMQJDTSd^IaeDSs8}goX%}j|IOb6Wt zVU-TfSW6R^7+`?NF+u#Bj7At{2#mb&I#jQC4GSK*w`=^ayT zIDN}RgkFw3*_Ms89o~EFcknK!7r_M!oY^n)XWIREkCo&6FG~~}WAJ6MbR{2l)M6lO z0@p9Nt0D5FjY?2@MzOr4`70I`ztJ2O$aJvv{Rv69EzWuF*7FR7{nw!eG>2y3Qv9f3 ztMwqT_N;w!-IQq;u7OoNa}va()~aL<6_-qPn=Y=Bq~hlItR@aEh?ecaR@csV7aU^x zt;NE;%hU&UM+7!V;?LS>h?Q_zD7F9ldO@zKD!Je0xIYUA0`ogFCgrun3?9+s2iHTg z8JIC2nm3T&G`Zo6g={#vImJWZj@R0C^RTPNh%y7&q7S!Zj_ydYsB%OPFaQC93o$o)Pp2i$-E(56x3}SeTc~H5 zu9akL+kSIH7Cnzy^s$fQ`}MK2zE9;vPG$x=J3psQiXGE_^>&#}p4h89YCrs5Hzh6i zgne%L=Z^-f9Q|;O=eH!g7WrDhF)MUvPb84QKV6klGP&o(nYY2@(U~)G#TQykII=ek zi`!sn5n5|xqqz?9)?is5WrS&u`Lt@U89R+yer;(;4ZY^jC$~`cmW-afqQP& z213TBhr0FXDypl)=SYohBRU+=tEGjqmw>2D_@o>rNvZ(y08fjZ zw@0zSXt6R=2mYsw^iM6DX8qq=EfC8-hsh7zIdXZS380!HKU++&C1$jW z_^z@f@ZGxv^rp@APUq?Wd0Un!#{*L{xL*8rC)9$Ku0i(TMqR6vr{i4A>D8W%W4E-j zklh`@Gy)O9{M`=IePNif`SEZml!Qis4j_ZA=3EAk3$M@>+JLHTQ)xxHRPP8VF3XOdhL1n@ zbp^1@_lxgu&Sly~5p}n#SD$xAUZmE*GT6P2B0GHG1r7B13I?6v%I0-Uh``6YDCc6kbaJ+|Wure7 zG^iEbxTtY_`#}RJGaJny(;{Lcq2eipoK`vDys#tC60>3Sp*a3^R1XU+K?dvF_Uq#e z%&|O4ciNp&c*Xdejdf$zhh zQvC{EdlyPf4QJbFJV5?2mhGTeu(d~Baj8$?zOIE*#g=|3+YPOrr;~up8CH7lwdxOd zSYErD(fyj@Wwr!>-SXyLsUg>To=~~8z~BBcz&dp5A27=`K7oudL%t^COlEiXN9tVO7PQ18K6`zSM z@Kqc-h+3Cc9o(M)$+B-PbrPP-zM@P^nnN56odIS8!KJ0$9^c_y~ zDq2Z9n#0dEhtjwS)&1IzTr{94mh7_5JCtK+)YtUW##6HVc;%MPwPKxbFqTdY=V z<;@VI_(^k%LC*;;TzNxXuD!|J*B0rih4o)M>^!7fA(#=1G;cry+n2e=6?1UZ8=-vf zEFAQ_t}RatR9EvkyYdc5(>h6ESbpY{7_~1%2?4|gn9KzTKB}hIy#rIhe80cfVFyk; zxyLYTfb~!KQh4VU^kx15pvaz{qd&SR<+A~5OOC|Ae_>DXCJ*8p_#}t}^z;%iXWiYf z%uRgPcD3*G-X(ws=2g1e9J?Lg3RZsWsI)|`JCJI-`K`Xuwkl{(N>nab!AQK<0+{nx zjy#y!A_^_Dp4~jI&}; zeJZ1Y?{X*J8y;YLrS>7cQ)v2~_Z2^C-Ioex3LWjwgDwGaipe)vLgtanSXIE^)bA-W zO1D}6QSE%$r?}oeK*bV}_?IoJ5gHr|Vm)D^3_TRV8kbhrgsOudwY(5OENH+v7p({9 zO<%RmUU)-~JIDKNgFtghoy{Y|uA;hs(-L780$~S(KS7%Y^_8^Kie@^uuf4t^@q)$x z)oVKMar$zSBtlxU1MQcqdy$0j)~krQV+WjG&*9ZYAjlY}T!Jymccfutd|y`e1*wFk z6zUUy-xsfyHdpgA{44Mist=Xe#)y@B^)YFEG-khc0hpKvuL#C&W9V*cgiobk0z4O; z^c&c&<|La^n#6qKJq8FRT*1{KA(DzalOZMsLqDX-Rv_n&g7p?}ou6+fmZy9;5L4sy znw%diH+%j$<=**|?V+0FCil7of)=9V@g-n29n67nMhQR=>>5{!pwWHE>iC2cw)^+&waVo_$RNZqBF@=DVI5A{J{;Iqa<@ z{6PtNa&)u;9-R&BFi;6DMpNP^@C_F_dn68gS1G{&5BltlWY%yg_K!fY;@KU(WBpLx zNAl7$4a(*{(){_`o*1{3w-o(LmjFFY=1V}wAQ)>g8VhHfC4exd34cxde2pGWx{Seq zm`gxP^L>0$H;JMlHfdOE4);@j_ z6d|2D(WJS1U8IkwfGX;oEHjC5HCP6PpYy3b%Q%}Jtpa&n0u~NWzY)LI-9n)~LCGXJ z+)`@>y(@OHIofNPrB;&kBrM$Lfp(U}<|6Y_MQSc8wa~!Br+*Cf0 z7ovk6?GIjH(XGWJKSB9Th;J_e?u{5nZChdq$eS@2&Ph;B9XhO?H?IAq#ALg~WqQj; z$g^PTR-r~5YUYrJphQ-8M?{Cpm#SK_;TT;bfU%D*0rL$;-M$z4q;XA-R|FQU+g}&> z`08jp)c{0FO45L7t9~{^q_2r$=5A#OI~6)iE^I#=^_ysFDl;gbn_Qs51Pb;$O@=KN zCLKr0!j(x~mjJ9TdOqoNV3KSL6550tvD^Ct7b+tNrZ<-WL6U08R*ox1H=Co;-k%og z&9h>QlUeWlh3hI=Xw`cr7r?d||0nlC1g1`m0j(mNYr{kLU9k2x`0WdAFBPVeJy1RH zz;aE>3ugIYxs&ABN4Vic>wFqcGawSo?#Q2ny}}|S^ywH8zfy}jI9MMQ#CKtsYj8<+ z6G~vM!o1mZ| z#uu90CPmO0(^+{56Jy#irC!eexZ|@mzob#_#Omc)b&FQP$akWyYjyXrcVI|-;r>yX zB2qDJ0ErhmY}akZtABtQU_+xTHS}=Yy@Gd}ru_+~f$O!{m^@9SZvgm4dHX>PETaXztlDn~_t)J$P$A2%BKOvN^#Apstryr}+M_%@0?^e8J}8S2nT zPCpLaM^&M_Q41<01|UxPhegC1f(DOn2Y>5}52hAcFb!T^VI07KSfxdQ`GZp$K{G!h z?&UMTpX~?LZy#8GB=uba7-cnYt3+u8Vo=vt_E@13Yv|Zk_SGf59zI}-hViH3q@ta_ zCnJ>#dL=fCrhJw2SzG-SQOMRTjP@TSfi2%?9L`G`&4AI&1XouQg2^saju3&n1lTlB zqQCjI`eP9MyVlL5I*hu_fM!U3K)G@GoUOx+TN_^Tx*@GTNz;bUGtF{NHXtSynVZ?$ zyJ8$>j=CEb3Y9*#QOUs)fQVVlXdjrv0d^ICUIlhkD!2r6ArsrgS6ne(m6=A^?1Im` z&wH+6<6j}*y9Tn;UzmJ?L@7NES2eO&+60SW*jV zq8}$YjS&orZT6giv-{f}XKionr<}69@H$EYim8 zhOZYE4J)a(HZZ~Ka4~`xKJ9{mV1qr0e^qOmstF<%XxMwX6v06F>GxjYIXx@a2;4Iw zO^tCtI%sz1(8!G6pL3ZExqTv3M``$Gh1YYxZnHtnO)Ri?B??rFj`ksdOLs|pINhwk z=AZc4wckblpOoqbaWYklx4$0wi`FzsUk7A6vy4oAJKx2hYOR@fT_-RTuyY}{9lO0z32~6ZaE*6 z!0T5FY@E(?+h<862JQ=XvU@0j^Y8q1xCGR4Rj)aMI?4ku1=4%&G9Y8_XFvOs<$Si< zvqBOyirFeZ9}U#?M@HkP$u{6C!3P@}1JlADt{%3hglz0w0$4QpywEIuhhKyvRUE(C zKL`wze9*2^5Uf5ps*wCih}lFhjc!}1#&)c0UQzYQ$HR(D_@CP8nnto-o8e%?lg22U&)>Su4Ih=6GBOyOm+{(XJg>4WH-s&YB|C(fTbG{#4_e6B{w977 z_hZ`t7kXfZ8?~w)C+Lc{V&kJnI;Q;Xrqs*xA7bk=ulRaTh^Ci}bly)LTzi_yl)86n zG}%Un-|I++{ezYLN)oebx)3Z2sPsaWK=^#e9vv|CRBUvIe0A1xbAHZJcD!9e>O-=^ zj8>~$`{r|!6z{^cJRpdOh&BF;g%%`-!{Sc!6Nq)V&zUbzjJLK)091N>3%brz@ZniM z8U_6NuS%b0OT|nWoB+CQ?HMCt zle>fsMDDab;nxN}k2BWNX?z@5fe1JKizxg)nlaLd&+~y5*svuc>A6)*iAh9nsEgASJ%oH`R_@r^>sewtF+4a^jPk*cR)ptFQ5E*`|=|S z`yrrGqzZP3M32VVub&oxdeiWd+&v=_9hU$)4S63JIPgLNrioLBYOm48Ngup?vj`pS zmJ*7XWCJdXKIdFIs_Glr1djPfT>`2Ro#3BcrwDvO1eT=(#L_0{ga@znR$;R@mV1=!`nR3V5yGu zlHB_oG7gU7J8UP1z>;`%$XXTms%e4-&+b%yG9a>?CT7d4FS(cHtVI=_w_MqDAl7j5 z;b`~yo4ms9QpMfwg3Ux&iPq;MhnKyW_gB-W61zx~3A5piqGte)DvNxJGzeF(9xABeRTw7NuTk5hSdvc%uj zCWzgP-VG zD*u-!>2N|rfU&^(7;xQk#d?)d4_|Lfc@;V(sK7RcOcd0Xc~1CB+Cy;yR#I0X0?J=M zB{IFjr71lu!?iBr^ZVwfR}#qN(ym(DhjJ%_$cWH#$L}N48#S8eZdpHT?#PSfzRh+W z5IuJ4S{-EqLrZ?UOnzZbTU%1Ry`Q4|915dOVv59H0zUs6|E(X+`CGO%r?sP53ChdzSlt{%xF5UW%pW(MHzKNi`4LZ! z!t!rB?ia1UOgm^7coFH@Uz5lC+o^hrGi#Hp@b5j%6OYXZU;w5s&bBWG=4ugL)0|#z zr}%4XJHA8C%UJbhLvyT2c<5w)X5QebaS-!u17QE`8~k4T3|y!#%l#!I=Q-F9Q%3s- zWm_!CbL}6Y6O093<)PGSd%OymOX;KZFGllVDO9 zQ!X&f8XsH%MXjpzNo6qx-~v|<{=k8=FnxAvVVq|6j(84gVFU1Fx~dfB@pSwhEAi1D zoPDD1lUv*_-P}_i-+pGuCh|IbIQ#Fb!gYPmuEzdXrIs~?_gYB7cVfhw+`qganUlm} z&&Wy}4dcNw*R3s(ksg`TnLRN6)ZuooEqWasuc>(nh&3wrmVL|^ri7&1O^^=wru+~& z#}{4vGWF+&_C8#&7_u9cifHhwCP#%HojAM)hHuaA4M}3m52gZ2R6L|!*$H?!F`%3( z%C^+uaq~i3YwL-Qc~1c|KT)3$a3KSISs39JG?lCW)IvBXc_SQyme(Xx${jQ$I@0tq z2z%JQBG5xd=m6OLF^ajq^~2~k;hgq1g{i8sCwKk7q%(|cGIgrv!hTIB(kr{@@wHEs zshB6$=0Of6WqQ6?ocCb+y3$^OYtcQR7_vXrpvTS+bqez0>#!ZIS`lBMHC+`fy(}@B ztkcK~Q1^T#?qII81K}nRqHOhx^S7K^f;KDFN6?<;N(Yi2?SYDI0I|Vk@o8l2$^d7> za~m~$gAn}?HS;zd{%l$B=pJpcZ643srQEFpH?b#E~L;@;UK4Z)2 zo8b~|7mkH*6DCFP{B?A}6*vdJsvg*~^(u>i7#HvfW+pldOftE1M7DLw3}T z(hlXh;76UEVD6*l3BxyP5w^OI?vX>OZSv>^<5&(XHCAf2J5qp;@!$)w9qam8O`&*m z)&>0by4!{VZ{?TZ-h^D=KaIRro_{|5jFyIob!RGi2_SM;Xf!#T@I#LqQhetv-EAp# zDJv+h@Q5U{j!i(5I<5GYYO5XF8*UF4>Wqn~uy*|rd-XD7EL+wBbbDzf{RFtr8BhjO zYndUa;~1^St-F@_$43+XTmpE#!>ihmCBHt&x+Ja}<=H;;Rs6?6N0j~JwU1IUPq>G= zpT4u!RvMZ_nS<=?`%J?w0l~q4?0xrEiDK{+nCY4d=epF!Plmd?VRnxzZZ`G4xt-P#2$ojkr5_dGP?<)GhHBZ4Z=8MAZFjhW-oP;RS z?gCcVJjEqk?6bL2O+Xq(g>LKpl_T|&xs;&oeRiDFOc!}=)}mraH%KGP5}8BwId&P` zxQ1vx-QA&bo6ZR;s%;f3vvq;~aO4*TlyoP5#&A@K=@mJgv@K*DP z)#N{)#OGLKJPNTh5>2oA-qhdKlF_g5;3*EgIZRJ=P5<7jJ*TWS8Lr6t%gpaJzAX;j z*v!(hadnEcF+I1oG<-aN+ZY%lnGG&NW?2^I@ll*5hzKtY1!%J%oFfePM3L&gaP%=E&_rQF-V3w-LqP zEK84Gv@H@oR6DU=h!GfD$)lS9pR;q1t(b?LA}I;CBK*VFhrWvorxZaW1#K%U#hRqc zef;xi^0q>p_qKd>!r1PPZoj?d3LRC*azM01mmJ=eY0Wx&o@48m5mGl!oa+g0l=>CD zwmpUClq8s?njmL(bs|iICCrPT{4O6aoj(n-@D3KZZf%{8^g?u8YmoOX0izCw_4}}wIvkIvjgq8n zI}{drZjfoNDwL`7O;2yjU84P4Mwf} zqnfv3P#d-Nr~Pi8P1Twxy#df(f0aT(RUmM79-X~{mpwcf$0eQW5Q{m-??E*Qv=GvIlw-Rqb|SKh%a)yHPAc_j&sJYVtr7Q+LC6cTHO ziV0`w7@aqA#4?@rez#vIFU@IxekckP^0{3jbkfP&DsP`#KF+e$*15UkNFcjduTz;q@^- z*_?FBX>5&~6ZDAdRArIx;QQ7?ac5xDKJ}^Z20n4lK@FJ8v|%5+8BKY8q}*u{+edko zR&vpK_NdoC{AY9BvuCiBCYgnr$OYfCy)DF8e9Uz9J5c+%m2I!hFH?mQ-2$~#2KmzB zkD1>}i|BObbk**w+1*ke=kV!CkItHhbqM(;#{>zbY6(QlkTDEPLhwCx)2S1FCT^1{ z|JZkJH)gpuel;7o{XDo4rQ&w~%SYo^8*+p)_s6;$LhH;&L>2X+QBZFJ>yTd@@^c6iBNob{_i1LEphz`uO>Jrf05**2G zu^TY=!=jrL$3tgs%4lH1S*^rjDJEq*8J!nUIXO{UIH(-(=H2AW^F1;vKO#tn4efzs z<3lm$nzsp{+6b?cx{0h-DTH*~HUBEby>j6U75PT!TH{fkDj?8(ObfJ{;*O7Hm>(t>a4E^{Ozm{6z9a7 z-%FCh#@6S2w5L{CH~U^!fU$CWB;K%WK>d~_M?$<+uQvl~)C0bH0t6UfPgnGF9A{LQJk8l%;NS__*GpRhmR%yL^0DJMdNaQv(z`<)l@iGK95yKY z=3uzzD>F}I5*dAfvGE2qGca3>`U<;kS5Z%}TN&QSuq|(9mu$W0G@`@q^?c3fr4vsV zmVY;*k***ohhDTCj@~p%OGJ6&-5ygTRPIbFEq0dgV_{IahiW&XqWK zXh@2P9oD+@<~nxtg6 zoeK#v_i|Okk-SNJh9tw3Zg3(WI!VJmFz^es5WzYJRXKIQ`Q-+bIe3|}B*P3u*&L0E zr9(sSRF%F-iIj3ssH9g6&;ZXhbjtngTRnXF$C$FS@EYE0Et0aUP_QP=WIV`MMJI8^ zc=EoeF2u?Bh3DUw(zl5H{ef=JZK-}!qB1|ckotle z-tPn?zG>qtiwz1WT_$f^stw^sF?tEL1@y2xrT841>}7sSd#1bU#3ZB11K$J1r8}m_ zq8Bn*$&wRBQlpB@y+`||a1c)qlz^v0B-+~v&@lSA}+V>!$oQsiyC?5k2M zdc&m)cpXrvHb!IFP1O298A(TgoRd?4qTgt8?6gVXZ(%*w73-UMfy^gFkM_LZMOC_N zGxG~h_2eWj;ig6jpGS+1p3mnGU;EmkeEXmJmY_=`<_v#RU6aool>z6Y8%#S8jPNls z6Gys1;K65=8I|KHF?zATTjfyNepc%JY;MEcAzz?I`Cb`}ufRa**EcrYTNhVkO7h*N zpK*rdt<>0+9eDxm+uwoTV!64U@3u&il=-|397}H2uHUV%Gko+s<*yTwh(eM(2DwdXqyx5btY zrgSh`laU-@lC5J0h;$9FXI785#2(vBxnrlJz9f};Hv>^S1bBJZFAyEYjTwBUs1G2MS;-TH3P|7pgwH)?XbMgK2IurV!G!Gtx9H9#52`zn_Heu0J^aL`x52w&t&X(b zBu+k)_nzNndHZbUH2MAKAz?NoCus&*d#@giv%mnmWdvutLgpJ%g3nR4`7Ct5qC49J z3N2Ib{;s?0!|gq9KO}7M{E1Eq=NE?J0J;85m^?8Z0U__kyRQC@Uavs0j+PSCCwxx0 z@h)Zf7H}Ol->i*MgBo6cZJv_&pKXCVVEoygcX!5PcGqOrjjon)-kj(jWZN!R zEGRRSMb_eXjWV2mlzsmdesGpjtDfKwb1TQ^&HS}Tu@kc|9)+z(BsEbQKR@T+NS~Wd zGH9%L*z=Ec;PTwco?2gW5Gn>pMc}L=lU#k6TO+9nt0;!~0^NP(u7SNFdR4!aoszl0C~No}qW1c7&ii>V=w%!2E}Uzu)t;oUPJULj;oFj$Vbq}iIi61 zSo+M9Wd3{w2SR9HmUBMajD<^V4aeydsl>qrn1I)xgIAUTq<3yg`NKaA&fzsFU+{66WPz1b?Sp z-#$nPC?YuHx2e*13k9%3TAyL!cq5_ibUGKex$>0<9f%1xaLt3gw@=bvG=e7eqTxW} zJ3XZ2`#C=_^wI$t1|X-p9VZ&R=L;=qY(`^ye{Z zndqD$HCg3+H028jgyZMs@B9RSCF9qwQo=|Ni>0m|i8 z>pnq_XuImh+NM`r^N;U{Ya}lC3WMkH}Vvc=Hb`C4`vjkR;(<)+0 z@IfdBxIZG>gj-o{)}N0ZiOYN{rzwi}n+ugU_V_3H$+-v*xWTJq0g#i(3?bUU?6H_x zhladcz7v+P7d!Wn_fq;~b z;vcVyvfbvwZ0r23Tycd$mp2#*-R~+RyqzZONsg{JYcYgLlfH8hOdbEye?8yW$Oy-j zg^q(+mp05TcOI=Sh`(P^7^qjh{p;6WeCj{LEpaT5ln<{<6Vx@oBSIk%7wQ_Ny@g>v znavCpH~o(chAr~#lu^Z*z4WL84#V9vo3aF12q(?Tv> zf~qLjv`^lx4G|6AJX3E1a*DjbRzUGi{5X@e3eROhd=tvkPOvhs2mLY_!I$FS$(_-S zd0;Sp(0$12%&50T!ctV~OS7~;X}#C^xR>ZkuW9I8(L3r_u6}ZC(s#ydMhdhioHB#nG4(i=^A}mDc{>DKQV=Ve=DiZvUk>5$d7Zd@Iug&_@N$a zXRm@+5;YZYs1Eepmt({6I{pK_wXph>ATYc4EO(Clev;{!bWFyIgS~oj=iuNBTZM2g z%ww&OK;Cw`(DOvsQm^!y&JFb~3la;f2wK6R%GE_=s;NVnq>h~_5G>{mmV(IKmA9?j zzS?cGSlWMF=Vr;k{kN5DM_qU|S;E>B@hP}Fy(_h*eN~9AnPo1VY47N(?9)8UrM7g4 zP-ApgAd-z8?sIx$ZoREAmx& z?v{=Zb!=6CJP&PXa!->?Shnex77;z_vH9}h0d#x7K_iNop%~C z{1(+q?(9m*fEGef4Fq}YjJi-pe+-C6{mObYQEH-9eYM3`oNl)N=UT{XJz9cP zQ{vJiS5KZl;5U&{vxbBHnA^1@GQPqLpJ~emZ%e&T6;j>i*}X04rlVEMeCM6TC-UEI zoXyAoryBovb*7^1;1!H}pE0xSkZ>cVV>Qkp+G6}4fzqN?6w~g5y51cB*5mISQV7Yd zl{Kd*a5$hKs#bCxm=zw$aizx4gg`=g{J;C%_vYO@^X9#`&ROT2J$s!s`?uGg*{kfc*|QY@+kFEg0{|5@ z06=wq0nX+DdH|~bov8oS{O3vipF~4LOY;v=Q~&cp`wvmm(9zM-p5L^z|0wyliu1py zX=%=-{-5dWD}bE=5CQl|LnR8JW~ZWIr#kBc2%nFW?mu(`{!LWp+UYLPGcaCcIu~eU z15i_)4~+I-!#S4@JMRb3veR)~Rn)n_Y4L$Fb{V!B^?xGl$V;!00nMKE6E z;pMx`FCi%(>{IaVH8uc#Bo1;HGYvtTp1&Q{|DN?kp15Qi}?RS z_CJCBFI;E5o>~I{=rAuQbygL;b>h+Cs!TYJ|~vSq_UgS<@r(Zke&T(o56YUvuzqKFCa8 z{_UJUg9cp%$R*Br^pZU>4c>5Q(jDwgfWY24`)w=#%vAw&n78dz?huo4lPnyTtA{ zzj2EJD^iJ&-0(HGv^8gAn8GkaEpa65kX6iX_GWcOL8<3@r)5C(5nqvotVdeKHwjZJQaH(-6DN92(F-rtXZsk)G)4Y(4 zv?!ZnFake8a{L#F1sZ;kBvsTL?Lcb2bk@Wk(Gns$JuC2hVHLjNf zLq63VR*Yzxk=w8Qyiy@W^Cz>m%?@#Y{21}~3=m=IUR8wd5+OS|svnU!kxIQsS*X|L z+Y&Yqwj!7LflGQq7uydmU+?&p`VeOpKhxhOTtAhhIKQB}6S@O=pD!(ygw@v#zW%D% z?Sl%;W@kyN1*M|LwT*lGqTDC*{;yq;Bf|m_yMu-Qcm$7H+iqcvy{QGLnCMcAzaZ(2~=gr$ZZ|DusXiD?rDL$<2+#?nEK z7tJyq@QI|BUAe-hD7qBBDbBISR0V^G)tvn>dz*)L0FfjYmZjDzQ1#LDr|Cz3d}<;v zt_{?l^XBRoVk1RgrMpxL7^%wBp@2gLUx;gOG`xpt|BZeQi>35On-!={0&X z-Dmjyb&PMf?@K?FpuVr^t5*tMtX^XQt{QrrNg;;_(8QnVM+2rtTan*ZOQ7FNmXBqV z{$5XcC*`x|bh@&uksb)nJOjk490Gqk7jNGnvYOBM zV6zrgLO;>H<-BJ2cegl4^+jm+J1xQ#1C06kl62d6V*%$D;gucHYF9nEtFiiySSV1P zU2uNhP>Stp^hM=5D2chiUy)|JfOfDL5qog#&)vu`I90dseAI>aw;$+cc~iRRE$L0} z$&||8&KJ#$)>y}2vW$Eas zII#;NSxq(CZ#FC{nM6~$(Qj!pQDOP+2_uS;6a&3j){9rN$Y526~HO=?K3>+w(6>_=ChDrR1B3;9tj1J!kZp4o;{YY`l=sm+e)xCQ9o*~CDrkNIpB?u^OomW-enc9;SYC# zcS~Nl4csX6_;m*Gd^rtf@GoidY-r8J%Et?q&AO(r=#<(?r3=?}6i5}Ui}KxlXYkgb z_U?{RTM^e6nlW4^H`faaYoy}Q`atg39$=BM! zh3whxPf|D1#WS7zq8W}Vq09r#xZ-SQOll19vh1N3FY-jFS(&kR>3N0+I`nIuzB9I6 zBY4(@7(-~p${jX z=9;#~dfav9@9ajq*hm^$-rm2C*_s+h?3|ENMYEp#K1I*VcW;CS9{SwP%LU%|@^2Tk zVPAXGL`tYulhf*bd5=^hRzAY8Vr%S-+v~08PInYDcz@*P=e~K`2@uYNUc;>tV(@Np zWG#%N2l6YrY_j4f+gsT_=pbK=iA@>0PsCcipIuLGxJ_A8dU}U?>oRU=UyJ zumlwyU+Kc_5jL~?!HuxjjIDOGmg0%e%0P}kX2EUcA@wvd{eFXT(SNd6PXurN{EV~B zO?P^keFhMPg>O31nJCk=e4y=1OdM7qsCi5 zv6O8xcdVhHw55=^e8nr^48UT7@u4^Ls+uJhnWy&Dd)}#D5^N7Ge6#cj^y9w7X>WX* zI8U|L$9+JK^VO6kaNB{Fx|W#1g#SC|1nGuORTlMI7|S;UpYNst!vAu;SP}9CXH#f! z1KD^5Y+27vo|{SIvm> z(<6sa9}p?9lY?3`VQ+D5Xm0dM&NeJ~z8Ykw*;)F#8EIct3x)7(3xbq6*8yYQarUA1y!=Hn@Ci5;D$y8$K-XCc1g zw1jv-%xsSa57m&=OZOE+`%*P1bF~4I=Y62TC_6989-; z-j}7CQ%2v!zo_vi1=*M6T8jR$pq2W)dBrrWfZ%`nLAJxELI*E^RiA5))JBhDSXsf> z?`TUJyQ03+{VxA0p3^Il;$9T5M5w8qBWb?s$amR(Xf*W}^tP?@fNVMAJuP5lCnID_ zl7{t$T*}E2?nlIjxTt02SS4Ha3UN=#>1`dETB)8SpVk8q92;SsxwYRD#V0DF3^FL= zWaiVn4qH5Oz+!Ipv~oft*mBAlhPLW0ZI44NwnMKXV4C3{Oi=26$Gy^j1JfV)C)BRC%9oP*+AY@Dzh_6a~lx4o_391GhMN65U_i401^3GA9;}XfB9b+=kQ~iqL;=s88;TTTnz^mGE3m zjfY=6SmuMkt#L<*9ZID{lx_>E@q)d^y!d1dIy7rv4D$5ZO?`!1c3A0$kue%|nrDCz z)~paA8!?*8-$!!mDP0>IHCgd83&g}bIQ`K`O~yicB7D_;YE1L8&*k=50`CM_YxQz* zj`6L?eymGgX=59!{3haQe3EzC4P9%SuJo1(nD`dIeEWrhC-`NfJk1+94?!iPy?aq$ zx}+J->ZTplB6#Tf63lEE8$pw*&m$V;PpQC_oi0ID?!xFJQsWe~Iqq8#t!d5)B4D=JOiRKs@ z)fT1wh*@Ird-HWwWNN?{h4`_YaVra)U|cwT^6)&;;G@uws^^_HRh7;Wm8|fpdDz_7 zRnI9`_!W|Y?%nLrmy=mc)=f(7M7>^~L>KF)5su@^Jp!-fPX}q18h|lfnt1Dh*F_LN zlh|GgPh)VS9Q*;^_Vo)27x{Ke1i?&R1x&L!Q-DS%MJ2C563t_-IVTT^VcwovV0;)H zw<^4|Yy#D}->RV;!V-S!J@Kd2^CVfZe+cW7#M38+Fwy5!^x01h5!{&KrwI&(SQsQa2$ahK6i)ZfXpdYs^b;Y`HNzFNy@vN@6FBq$Z|J zfBevp<`MsuV)u2vWmS;=$|b--Rpt~!%fP7LOqnTH(GZ;r)QS{L8J|7_)MtMMvwIMD zne)~0c^ylah;UkYyu)CaAG@6ovVytl8B+)8wXk|0l|UUZ8OY}N{3wX`3#8D*^6&D) zpCO&6jX!7j5Bp@Udm2h3HtEog= zbW@2!oTdUMS8YmVJ%+;cEQTPU{IgzG?!~tqj{5Qsstev?$64cW7X>tYRX9Q5Zgvk$ zlxSBn=M)^0)wpURv}!b!AuiYy;_yi-7%)04opR&eP{!YxZyRibPwTm3qXZHfYnqLl zQEkUUF@mV5+r@{Pwmms&v6_C^J!Yr^(fh=-1_5ceG&Yf3-?vE_89+;8nB+fIfZ1%A zLLZ4;u>18rQg0PlB+r%wxv;1mK)8g%O2eja02t$xoE8z#30lRTB}Q{=GOA+YxfdEESuO zjdZU;#}mKrBmqK-r$RWm{tS@NVR9w$N$s}oxl>~*-0tfaR<1fIv&=qUGMR$Ryn74D zt+KiDs`7RiZ(Kjf3Un+JxW9j_pjm12DlihY56m}93|tbz!v|Sx`v)x4q9~U=tcZFT zx!S)5U(^|E4pTXonAax$tnFz=y#hgsVr+lZUDzSh<3Q!S;?4#?nz}v?}O9} zhU<-aHSJ5Y{cfSrx}x_cMraf4nqb&@sPFE+s#=;!N$r=~QSW_6y(iw5_K{DhS|$~e zhS&7yitoVwuCJRd-i?fw%Ls2I<&q@Gv|YFhxo!y092cH0g~=CB8`J~3TpDm;amc|E zovUlVXz5!DGL+|l0bI5`{Lu~r9VJ@4wsYEv!<4&z5&~j>M(3RPoyObRPPVDPB;b5Z0x&u%#kcG%iKig{u7sw znP^SDLP+ktcQis3m{Us@H?tQ>XMmdM_c{b|VUOOKu4_b=vrEkM3TJLYHQ!PpM^I*f4c(Dv09Qmbns-29w)+7QRS0#$ zEA$P^U|vBrrYO>I5Aro!UzbQ`!;Y5I8KBRX?{GfUQ)51tgMg~Il(Zd~;(3rrkRsm3 zrxK8O*1>LJ*m##5KIT29(-l2*Kh%fm<~&5KFJCGpbjWyTQx5SsXU3v2(e(3pnrN0} zGS4q+o;!hldN=ZnuA4{rh2>4pgykF;zV+`&-Mo7*>Kc8F;}2gX%~<3@Xu@dcbVHc3 zo5hs>4poOC<$WmkmjxXWwx6sboTE>`8NA)pX8`x*IRg^~3!)=FIRGBRh!tRwKhk+; z686NIWo_~X+Y(Qg+KrC_se8(vLw6$O2$of^2cfQ~pEQBEeo@MFei*o~OCrI<=D8@7 zZ?#iwTEt7=A+|FBr1E<2@1NzxhyeBayvY?5csjLW7*tnMI91S4iF4GwEOh&0&JDe5 z9QxO9ecO2R<7=w94uXytiQC7h#7}q!+*`*r&cu-o-7#S|z34!iSr`&wC+iR7m@7%}(6ec9 ze`-R|kz{1~dEt>fyBNgfuDHWE zvRLe~z*MMC@P+0=`<VWqc)a%X)WF2`?y# zpNN7*23&BTofi*XWYD02jb%E|lFvjlOuGnkHh<&l8Gt=&OT=cdPJ|LbP9V|~3jc{g zpxloR&)>iX`A&QRGCL_irkjdv1t&gGDILmA*GLw&evhCnj$u7bhW+{?F1-Z~f^we$ zA|np$!%Q^ANH(z1C25>|r^k{(8CD^BRI=WaW`phzRHgh~08;=hht1{M6s2e_W>gk` zpzmEj9dEdPU_LkQG>e)41>H>12xu!76|6FLJ=*-^W2$h#SK(-A4^DtEdYawsp8H&a zD1$HS(Y`q;nWUM|OBq*ZO_8NI_PdSk@d*49dt>(2RxC!0_7s?w&e(J14dlro_Y^l* z=VG#cVZya=n7Gi#6o%THdzdpol#kE)l+?KF5(R6firpMwu2&qfOZ6KC{oed|DFoGf zBA0f7>DE}q>KfmPEykA2y4P>3@?-8=ngcFpR9DV(BKRkA@5B|2~5J|HR z{*$ypbA?#R%C0|QI@7$aQq)R5f%TpN>ioCSK?8enCwhhzrinqgJ*4gQY#2Wy=h{?l z(Ubn4KlCUjqdYB={-TYen4 z@l#-DL(o*O z^0QKib1!HwnQT>S_T&>$4cVM8ju)IlG31~}&6?ByZq=FcGID)j#fnv^Z1eJLHR+q* z5m}}G$1;0l-n~_)64JSE+;h7l%=eS#m}zFT*?nEYU!cd$6#)&64*0CbCrd z3VhVh>Un>w_=5sjht$MII8lb0XhyJ{0=gF@z;59s>&^h2ntIstxY@YpkM zvVB}uR$0S3*{(YC1-r9Ev0ZUOu%4@}-UhrOwdYt{3U(f`bHZ+tornck;n*{PK*uwZ zwg*LaBHOt0^F8H7c|rbt^ZGIQt7&Q)+w8_{t?6^CX-?bXLzU`A#AWO#6VV=f1_(co z@ndoXzfO{AFyOfzBt?=~#@{2_n734*3@UARmRz%}Pb3|$%D+b%OU^Mm%*>tvni0Dy zC7VGYpZ>e}wb}xVy*+}JXo-9f2HQu51ms6nZY$b@J({WHk_27z3{U;FgHH3H`uNBd+uy9%?x-c&seonP^HhjWU+3*E zCCEM~xuH9%>&kRYa`6_`$-O#H<)i%t;+0txo|v|IBGtRfQ8Lh4 zy-bX?@5pNuG_#x(Pg&ovYq{>0_H zN|x+cswbT3E*yV=uVT>sC0w`AyjLia1TVVxPGr3uah}JiSBra$b1lO1oo8aA1Hv@= za!NZfyM}$QW{J5Lc>kcFjFI&13W6^~Bg?BaeU=>i@3c1xt`(vamO0UL9^Dt7;j$B; zq1aSTNFAvUwAdU$wpi6tu#2@A4`2y$?6P-cdSG_R$j`@DC9m!Nn4bD~mEjH^ce%kI z84JuMj02vw!>CR~3o5xbrP+okh%x-&LAgAsf}r2#nP4xQUo@qNPSoU??v9zg?QRnJ zd-++5Sl!IzGDEkI4^bNYdv-cdUAWK07`qYi`(iZiC{-+DRWkO91r6zoQbWjY&hGBI zLFH|MH7H{%kUt%XKziMBW*MK5C+DV$-l_hsX=%n8Eg}9= z$!QVC`ZdQbS<|}IkyyC7g?`|=eROY3!NyUhPe>u#RJCx|%i`_5rly+U=knffqb_Vq zkE0Eb10VgE>Ob}DSgJ7_Fb3 z=3g(nOp{{B{cD-8iygwcY8!E=KtBv@zg zV`qfVW%6M}h3Uij#;Jw{QvwREW&86Cpfbt?n-Zo5x|zsed3zB8#Md2)t6^3cBr82D zmxt=f=>m4tzKvsc`v~*`=vLp=8N(oH@5d$fv~ri@<(xLdY55-PCS*dGf0N(owbu%Q zU9SWZ)CW>Xej4f+bf>9#xO#sUd}od!&B*uVla_>gYpgNJj4#dr=G~34WOe}zu+Q-o zVF#IQquycJH{KM9_cToG*HEKs0724~`D?nyJ{f+Pxu}YGz)uz-em{4t@`=eLji!>| z!bhGk#xEHGjny+_%}JWnJ6Gp&ec0^1|1z;@8@G&w2Rlc2raifKUGdW`r)v^{e-_)0 zS~n&k?~Eo>(!D951G2If6IQs7=?uU{elRIdX2f4-vG48TXLk?bdCyG_AtXC{dNL~w z$+a=R4K8e+lyali{hKT4wZ*5mwZwg14qKGMXc1EJGD!8B!MN&x+ka$HdMsg>R_9RH zQ_?~*s-OEas!?C@-CE9F(ly%7o`)284UC2SjL5oLHMEy-QrnGTK$N`qNAS9<+45&2 zE4&u&Cp_s6*YwRw36yn3KYU|$y;^$)*WC|{Ym>}=Qod+hbbf9D7azqxkf&_R(bkZ~ z^0qDf^HUDAS!TT4TdUOfqnfxMaxGiOc6sJiqgTvPq8#t4G4%b+$driWx5S9;1 z{Ht$ga@}TkU%MSw_B$E}#5%>|>9Lb|V1hF-b=9+gAL8C2_QKzX$4=JWM0u(qGQQ8|dRT-B;i-AePkL79ZtquAP_Y+KTe$GlgDiNQByqvhh8>edi`kno;;fScyPj> zJp~oxygT##$~zLnKanHp?ozFt?={EdCH9dwIeNP-fltlmL}vzeSo;eSy146Odo2v6 zyQqlpO80Nmwu;sBIqQF^RqsWQi~IK&<|rrmq%7vI=F(hj`9Ya5-LY@pnDeUqtM2;g z{xzM@pX9RBi0+l@g2r-u>hB|*!A#G2K?Wv6mYjro0$)=^h$!1>!z3COWU@?V?f-9+OddDs<{Wa-v!digB zxs9w?HqerGfxkpFg*rVPL>Etvwq3V$4uC`ZScTs1L?^(Mz#U@jil;){O$p?@COR-f z0SQd7Db;*Ww-gDf^3jmW5>Op^9Zu^e+Vz5nToFbC9f`(RIo7Xg-E0T&7>Yc2S4#|2 zv!0=;Er|~p_(1S=@KF8LFE!`16s$cmZm4P5J?mZa(#li#fI=K3T_Up(F(plDc$!|2 zLfo#7f(N=br+#tkrw-L_?ZfJ^&#Nq)6?{Sw-9p-G=l(IP%DlkwAv|1|t)$>Vz{_RU zE)k7ww9=ZRu1-S-%U-_0ED7s*j^lKt;5~0=N~Y|K zU4N2{v4FrM+3M<=^ofy?X^G~>h6D-5D;5TTi*c2el@|c!GRL3)SF zh?n}BuY@ZjU)8>d(!Mh9p`P7eg69oi9aE0Vx0f-IGK<)4zP~@TucXJbmgSmBqvS)$ zEOIQb+H6sNylKdyZ=Uob+t$k;^oIgYpKZBs<$ziUvYyTT546`TkpKVy diff --git a/src/images/category/demo_store_c4004.jpeg b/src/images/category/demo_store_c4004.jpeg deleted file mode 100644 index 7b4f097fb9a84e525d0c25d4994155d1d55cb083..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16022 zcmbWecU)7!*FG3T1q4BQl_0$%O*)837b3lbfOG-r0RmBw-UI}cD!qgBPUyWzmrfD^ zX_8PQgz(Gv-S^$y-~P3`=ibRD`OIYQoH_T-ob#OL-u}AX0zA@E(^LZx+yMXx@CV>_ z6`%qj_}}HufBpQ==bir%Lc+U*|B*X){`2MTf8-9~y?b}>;?KKx|I^8TcY*)cox6ni zR{x*nwg*5-4EPSnCL~}7+@T~Oq$Ic<008mhy!U_f4ft;%!1sRdJ`pj=15$j0rbmD~ z1o(m7{jcHRTZiE50e30yQ9Th=zE7=ZOT_L)Bla;lpP1uCT`#Tv42o0S&O40c0UbR9 zBNG=l4=*3Tgyb_RX&G6Sm#S*&8k$-LhDOFFre@~$Zyg++oLyXfeEs|bz=1*GpCTfo zqGMuHQop37XMFvZSx{J1TvA$AUQyrB*woz8+ScCJKQK5nJTf{qJ2$_uxb$mz1&%=e z-rm{$v$u~vIXyeSxWxRs`j1`&0K)&CG6K9A{v-bny(sZ|-MM?0@GcR4j`5WN|7k#Z z_udoH`&7z$M7Cbk>|!5@X^-+6oFxwGcYla0_x})mPezg1Tmi9o>gRpaG;DX z6FW@;-HF?}-7Fa5b5*NeeiWMQ|L2cVP2SOw*G}$`Je0)dLwlECO|}@HYhEn-%@?dv zd7$|%;D`fFhAABKPhV1YVx>XZD??^L47=m)i^7dYjPQt0{dKk4Jmaprj5R?1LbOq~ zeduVH!!5w0a`YdYwC6GqN8W^iqN6Sn8ZkE4Dxp)0w*Ue~YVhiSy*esjP)81-g6ZDv ziIFH_)|9t(5z2lP=RFBr@$~&?CU{BjT>O!<6?8DfSkM|Pvz5#hX-K6msLPqC`sP9X z56(x*cOPl6g^>$jwf>%$H+I?UE+BXl?EPCfqle~B-IF!`C_na@rydfxAy?Ykn8xtS zLX1%AkxF*3grMtDB#0dR-ZFHmn{UCB>;yCXqQ2#n2bDe7w$Al8nao`%nX~cgojXvZ zv_t!1(^4)$~yJ)j_# z7hfh9ni2$*f3z<6RcnK0CB~mu`<3ly%(%3NlsTEskIToGeP}2M8*uohu73~UqNhQu zpfr^J;Q?>K|5lg|DK!;7%A=%rQ-1~L-h*a%V(FJIDu7K;EX@)!Vk)UJ0R%tpq4d0# z#40+MTI47y!-q3%D6M+N{KeMX0x~ONXma)(NJarB7tFVSdz0vh-9+ExFr|7!*}ruT zTeYkzHCRW?b|EIfvIBLq6zdBlf0k49N0u(%%bi{8oo7>yw_MwI6Fq6v#_$-u0oDWe z>lW}M?oT(PXAJO8*hWgQZgykZ`l6i3d+h9^J<6jup8)%U9mbqR*519 zs~$Vf=QRDvT9$&&uKW#E!6f(si6KI_fKOq!0IkOPPBWwp9V`+{x74F;|NYmVm$F}t zE7VC|TO!4JulZ@=2~+0bk-9rOKNOfnD&i!<+Y<$>Qsbd6b=xpcF%rW2Cxh;nU| zhsX~Qj(Dc9^_)Ba1le^r-6Ufv71I!vR@w;ls7`H)-djL)H!!K!S{U{td<1$p{YXx= z)b(e_!wz?m!~Ble_sWSOGFG~OP|z9dPDf%+J0rEQ(_dTj*)8B( zPOJ_{=lCX+=qeK0D-7NGZq0hr1#?gtPKvMU*3Hu$n*}#ZByn#y>r9TU&`~%N^fhQ0`A`<_S4#sCM&E^zcMDnyfSVA5-%o+Bn`yOTiRcMnm zkV}Ax$ycw%1nWO|(rzd?19A%>*NptT2;OaOYw^rvJla;c>jdl*WKeHM9c zhb9^b(chpD&5sn#NSxiA_*irN;4s25#@iv22AWl@R>NN9{4?&$@57XZmfsRt{_5qp zMWtr-!<%bbh-f#a^7=XWR2P*VK{ZMjQ&=c;9M|dK8*6IjeD&UzYoh4rUL<>x|J!6D zNi6hWvjsFXjSjgrP&gNct5hUT|paptcr&-Vkp=X6D()6&kf$u~jDH1A&~zldYe z$hVK7cYXOCP*M2fHGuG^VWXZ6e~77`Dh=R&ioWOrQtA))HH&K#VeXr&N^qV-Ih5QW zkTF!iZN=l8eUVG5$ec-qWrI###=zt6-AWd9ZZmOq`lG1J8raaQ<6_PxZWZ_VO0~jPK)wu zr`UM%r|2|0pyuEOx;DDgZL6%C7raRNOWpxZ_fQ4V5^pLBKI(4fh ziu!eTXS$9(0@UX&quK#Zu@Q{%J0|C4h%*myvEXvaErXv)ST_MWcFpJ!J_~(T;4aK?* zhCK>PFLDuj6VvI5=7F~i!D71k8*j290VSnz?p0Ntq!r-0PAQ~XTSMcu)hDkvt12OO z4c!G3CG1xYMQvv0jv4>7veZ6G1}`m~`5@meyz>C|U+t74PT@LKgNWy}o>1SpxM&90 zw^H@S6oXyoshvSgNU14A2W^}Ow_(P#^lg$tsDrCkU4qi{3;*~x|1h=Ge)u!#b=zsS z*35H5$$=r2dcL87H6yp1NTgtYqzjT=|uqJl~_6*C}OZ?)v_)Z7n$sn zE?b)q_E3|Y>DJ7s+}y!d&{U!@cR@&wy5Q2OS3ItvEjP^NT(fP1M94o2oc@lh{q7EnFh6Q*F*z4G}FHR!U=evE|y$ zMsgkJOQ>k);x#61&2$3yN@W$eVS;UC+0<9T>X#0Wi(GQqo1Q|nF>!*Sa+vs}iA^UC5^A698RgjaG)~Y+h)vlE? zOoAq_lqm!+H$wAyJ-gq%eM~NJEvVNB(6nF6ExP1}<%u#T3Mfsw?P4wi=RL*?tf)@3 z*R3_M0)6}7Tqy)gKT z3p^_pg?Wh`!`ezc}9I$iorFPn5$Y+hXpUOuB=ZX zBls<-N>8aOFM2}}wcB@m2Mj}q#QBkii1f3P{1k?$*Y4Ash^|8yuJ+9neq#Y| z>2Gz%(xXrWKAzCZJ#(js!(3iZ54u?aRWG*oRt?AZv-DrNLbbrdIJ_%yt-f#buo1+F z0jh=%Ue3m8TbaONQB^hEn1t^NSGN9UvK4EA@3b`D2=<8j3ewj7OSebtMm-(60Ws&; z?rG5)F{&Ba<;c#)W*a#`*QMy%LQ46U{MSJAv8ef04ykn297NfTtJv$5Qe#>}p2`dF zG#M??%!VD4%TPvhEj^o7;E$G}hxV2?dEHc5Hcb20;wZc?D9`CDP?=za9nTUtu;rA> zgdB`SBF6N75VSzwP1uv$Tlh^NKZ-u->{2P}zg3!MTs+6+O% zthr}!EEsj<-CF=Dga-j+bzNmqlf5*epUG;bG9 z4lSLR%67H9y~8!v)vMkfjkV0KXVo9<1IdqTC7M}*^WlO4#Ex}>-sL=8$)LiI9gm|G zo7PR~b+{nLG*Q7#A3HV%UxEeeK?H zT9ntp`U0*rbKib$(-z7R)xPIh{d$v@oC=8)TC4MXe zRk)b=V2w};iPbl8)tKC4H)6?2)^+5y)G9LJx8twz5zn!Kz#4nbnC0@xV>&J1Am)E;?t$3Vq6Mp0Np&{PdC0%Dx zXRc)4ZsSd^tn*rlWc)uE(#*bb5OU;Cg|xAESKp-J*quY~p=$>)5Y6g5GG_zGvn&K%ns4%& z4wY*+OYVl5ZNeMBw71>$t(`4o9Z_GKadr&zUvNDLYtHG0&f+&-MwaDskbM%)tfmed z)nFla|McBF#4*K=rB2VU&JKZcNn<|H^3Z1Y@5>yX;=@a0*AqS6{Xe$=btr}dIGD7Y z+6yHW31u8d3-q^39g(0ZhE0OHYvCf);$SC(rP&$%IjtW*{|Z0rtzZ!9ALo4LaXKip z&;vFUMqY1_tG!n*vu%o+H~H5ZI(Z9tBrmb@?&^MNfM+1w%3>6K9C0kKOtDHe@r%v`UqshOIN^P))JS+|LA`Bx!o>Q^{t{Fy}^pC$zhW0&1-nhD(UxPmS zCy8jIsRCOTTa6yntqc8raG#E0m;+H?g^U05g0|3M-R<)H-}%Py7LF!_9jrq11r7$u z75zBruXUIvnyRJuaGAq#T6Xhk@w<$+I3L2QWCidW+42(Z0oS#B=ud;aZWg9B{DOny z+)N7-iOQoY4p-}5D0Q!FP@P|xj4Vy(_A1EF zWid8~kGnJJ;9ZNvxKBKb=szQ{aiLH#37;x<$!Ni&Jx-OzI0|e`AJbSl>C?ZmlT_+v zf@6j)NCa0u8y}E0FWe8JS)w~pp*{NX{`EMa?AXU%s~KT60sn4?n-Zv-$fvw|Sfs?d z4T8KdupE;&C?&QBqfn&B=rWu`W0a^wp6HzP7VRDWkuOs=Zkrd*WoDLmb4gFhXSEg> zY5Q^Phh&4`R3k6ETy?5gbM(cdPe$8(S~_Z?u?wS(DGT*Z(gtza>nZD9NpQ~#JnRvs zjD_4Jc*v`xRR(1_z?Xd@?>(?O=qu9YPTiHkf%?1dDwgv#X2(LM9p4sWHz?cPl7v`| zS7BKhUI|I~xZt<0t030t8mNxxRBEp_1VPaDV z8V}V3mM|g6mZ*EX?--V|h__dMRr2;}PPwW~%i#~94P2?px><=Rl({*kz7c>tpOhBM z1H4^$5|Pi)YFPV1ajaU)U-N~0vthycZki+`=w-J3MCmpYeg82DSo~#D|HcE<&`0>g z2h87U-OoS|UFfd3Q^}U77(KX5*^Qo`vXoH!PJD6X?z)#@jJ{jSASi70LiMaA zQB0|G-EEZGe5qDsa;nV2DANVI+FK^mnz&8CsBRbVl#w zqm1GhvU%hS`V>loUP^2{CdZT_h@z`9ucrHC9VRyS42ItoQdx=JN%x;J60RwV75p%m zaVdZ!MWP~+I7*7;Ys6yQ-8@v{n(GQI^0-%sts&)NN}%K27BpC^D1QoxfVBHgxE8mBCy5G=;5<=sti2CDKn~#eZfgBN2}{(b7<@p>jz;dAY)Hi} za$dj7Wtch3I(SU4^P|BcTK=HvRQPVo)55jR_-NQf%aJM`r+mMNqk%Z0=~Ax+v1}Nb zVhC;cpl3N&5s&^Q4jZC@Fx5=RHSjv$@VFK*K^eg7_@%N!Qj()#ASsU z2^zeHlJugL5IixR_C#TJ^X^y~^2(qi+RFWt)iqb2e{Rtem)_>)nqJa+oI{J;-iP^> zmxMTyC)aF{`#0Z1$sjK<3Fs{N{4IbAt5Xi%0Fk)FAs*Z7|Mblv)oy5L`eNfEZXxmN z666;kCNa|)N0S-!t3((JR^PuVg(wej+1qsDTCk>&T8eD?il2q7P3+= zQuQtkH0NJ)#FYOweMi64U@6t8mr}32;f`I>-Z(x}V(V7G%|e-BZkzG+o0OrPD&!57 zo64-;@-d*kOr1VwYqGig1VmWBW&^jTeGF-5&1Ab-v11^o-CAfm7J#?KCr_wdQXKGJ zC?`1TIVvEQW6m#uLi=Z@eNZmT(nDmgORe+oRm*!{?sd;@M+ES$TxGuf$i{P#dSQsS zqbFAMCZ!1!Yd+n73!n#YTtQ<}Rb1yVpO!&YU?1(~^g#HW`>}ltV{hQNwp>AHByYW< zHIxJ9nfGavv|BKAP8Qa`85QIdeJHPjO47cj9|FY$oiBd|hZ}S~$`RLWX;Eb^Xi`f~ zn9u77MKDoogkRcOWHR7|(g=?0*4a{qxrkEbUT>9^c~j>T z-Ku@VFWiOWe3COge&W_rh*%cJ-hb~(kBrKTko11EJm3!AL9-2AbBk|{HK8h5twL#; z7IDGvkK*Mk7~byQ)0`$`TQb_RQdgf>3th9fZZF7vx-p0pWT$;0>sp`F6`R6Bc!aqXfWSWIcQ~Ja^j@uQD4k}?%U)AWs_l_ zc&2OQ7SUl@^DTg(Q$}(^q=@3~ez;9nR(}BZ_-nJHzzF?IH`=#pUlQ^&e9h!O^x_(j zo{umVAM3|jH`oSvrTYwCo6o0MoDAz$bFOOrU23}q5`qg zqi74Kumm1md!+0jrtJ_IVE_KR*mz0f4-L6^f?=g7bEIE_#ZYF*0v@fx@$BK)yHFWX zT(QUfK)Up~Yjy3;meya%!bN-OnqT^!WY>R)r=1^5DNBOQ_>wYjM^x43XUecs3yp?P zG&!*4j6da8D9wHZ!{rX?hxVz~5Wv2v6KnwV-o$jj(?IZFv{fr!M7VFxDKNsm-wg2;5Xc}C%$E=tIa zr>*+3BL`JbO0s(wC!6;{^!=J8Apxj7{+-UpeBurlkh zCk=CFs|-dp9>>BZUNm$+I3^|HX$`ZJ&rJDS$27HxxHqk;f2X%&r$3@j2R&(|-RRZi ziIQpsUv7^dt|=6~UDbLN>z!IXS=%9PE<8r>v3ogv&5HX4B!#`(jBvrDWBr>hmqFHL z5J_b1y#o;G0q*`n3bBXz6dd6g>s%BG_7M6D=a!3hRAXk*q=A|&{ierKE?tOVBCdHL z57180icifn;hV9*$MV`vNFf{ewRL})4r=q&+!@-wa8K%Vz?@N1tbTpn`X4!}UudgE zlZ$T0MajnPOi-dy>l0VBah7?l_)YWHgb9^B7$iL86+!%Sl1DAOaxVPR)@aaY&`rSX zZ(H%$-?p3@ob*kbl1rENg&BssTLje{Q;JDNfD$2Ig%BV{yTC2-Eoxyp8ml7zdBxJT zn#3%0(BWR!ITk%IE;#zeHeqJR#AX*^Ljg`TMXN_EvSYQ-#>L3ISVfVSNkc$Ntdsn+ zD_kv&?yRz{yBjOpobR~5|FbLA*kQN(+O+BRTmyNtJV&5waSZ82BSsP-5)OSN+_cU# zZO~DVCW`E|hYJkML7Y&R*0UZd*Q!frZW$&Te-CTyG-)(yY04ZT4Z+396sP(4G$t>8 zar}Ur(%-PgqYP)$t3>dHEQuI2>4kT+a~>Vyqs5&N3-}=Ry7+6nc*32lQ!gHe3Np4^ zfMRzJjuw21@HhI<4|eA>8QD`Frw%Wc9;((FGfB`?ZoLK%$ydYAs$6E*>RJ}w=}m^Kr*3mUm9MUhILYRFWzWE<$P5>WXC*@Kl$K!v zUZSb`kq^lY=%XQo_(!Ui7@~$+i++#ZS7hx@e5|(o1qJza=SuXzx}j+Qs^*($TOF*m z@k>H+wTC%-|4iL{Fw-r75zWZz)t9#aI}pcO0;FZM)~nPt-0xjk{K8#uv^Z<-=2&z5 zZyh{;HC=D`Pk&P#nuA9~$(vEzt#2QawsEqEZZ}v>$5kCJ_6>s?P)Sh`N%?e=-SJXQ z$(x(&%F*V46tl;LYYbu0FMd4GfP3jFvb*sUcQm1J1rspnYt(jj%fsP7)A6Fu1;dF<13pr>0MWaw(phY+sd%uM4wbw2((zUc+CHdFuR zB2Y~xN=~ykrtfcj*bSXkl7()S;-emU1GM@DA3ETZJYz|B6Vm4X$}pN*Yfj>Xv&-4{ zpiNkkfre#!Q`cSnGDPF62y+CKR@U?5ceF@kC#ZH6Q`@^jJN&824yFi1i$pW)F3P*? zGLo;8i&La=7SI~}9_8=+1o)J0q_h@w^boy)gnNeJM6iY(bDmA6*vD`R$_;IYVvD{z zWvKIs2NOxr16p$q_0m_THWL|GYK{w)?wcY-L5vB4VlXK(C@%);2#S;y|K%36Q%CBo zNQ#c^uy)6&> zzwt%lZTT(l2i|Qvib0F(FF~L#6?=INm;IU??dXAWmS%cuv94A}HxPxX<^UE2L`J8h}13Xi73hN6goOwc$~b5B@b^3J2N~|M+(30ZkI0J@k?C zUYWIE>#tAcNlnGVOYW_t)~ZVoP~>*H2D)px~?57RpQw zM@hcXcK*EN=WmRXqh3^zkX3)~`K)|57X8=;e!d&A)3$&meYdot&>wRSjf&jrb@p0x ze>iTpVM&2G_gt6K82R@`(mhnzHArX79Gs_m>YkmZqphPP_*KFD8B(!=STXGY$GUU| zqIy2(BK2d9mpOMWCFALC!%!fw?6UUv6a^Ca2*Ngz>y|oMA=c7ZDgvc27AV#zEnMg0 zVH`S6*ETrMV}uZ+ruPVY(^{nlI%{&J2#kWOi>Gx#F0 zYIaIZ9sRqj0~_KW?eLaxY3M6IBtT5Z9i zp~KsX;p$m~SeOKRH6JuqdUN?8@`@L2Efs^JDgNrv#DyD;OVNSb3O#1}to5^OeRkm4 zf<}{$^eAX06w6=np#nhooe-cudxznz)6cL6$%pE$=D5!afFge8NWj+bw@x&TuZbpr zjZTO5*H1$igWQ{Qu9YFQD5Zhm1WEM^`dG<_GL5y-*0gUlshn|Kjm~}+M0bBnR!=~X zY)D$nHQEVByooM_FSp@ig}2ZZF8Sd67bO8nW)gbo}UcQcPt(}XmDDX@usn79A!ziAsJR=z(5h!HaFjf19ey&Br@a5 z?@f~)AMRHgmSFd$L?(6ywot7jCy4U$pub(L2fwG0;t1nv)~_Ek+4VapBUM z^4oL;Ts!J z@XejMYgus^ccCsCJgdxImR|FZN_N)2IE-U2thAS}yhFmWbOEd$FFn9>L5lVl{mpCA z%2&J6ON(8NlU-%43&~>jH9Xvlj1vvtXz;N)u$|Rzu0#0&AO$2i(5dP4M`_u z@P7bRC00p+Jc2(#L_MB#(@T%+N`B_*jH3MW*U|W7@Ijp{>}L zbk*7|ARbn6G9lJVsZYO5+1c(#-fi9#|D zv?T}@Mse_et*H4~>fw0S(bQD0*-}_<-dzgcJW4i(Cwo!|Ca)@eH6nb&CwN}~4#jW{59hJEpdtD<--___)U+iM>7#-c z=w({}q{=zVz2qln>RFZiQ9z;bNZjh9FlQLJ*jjH){a+WFaBDcWs%HG4C3RoKGvFrA z6VKA(J~8%5GqukP(5K!uvVMUQwQjlwLUevAIVMH7pHC`05pofFNrw7V*ck*VuV5*0}`(Wxkl%o;Fk-R^9m%Nq0-0Sz{I(j8t znHQ;-g=(}Wl5?4r(%vgNN<`GX$vtlwvKuIPtaV-WI%&9y3Ts6qs<~L*X>yO;mabqZ zT+_YbXt-T(teK#m_6|J>!<*NBy+cRe&wGcpPDEDmv1EMXag;2mXEW@C0%HXO)@Jl< z0OzS3B1HhsOQd3Mx!fJ89Ak+ai_8NFSAWg2p=FZ)tPptWp;Mntq=}SvX>o3CxpcvK*cIjI#%q9#p7 zm0+q@ZT-bwzshQ_{lw#SBvW>^emmr}te|Wt%ZQ6Nn~c)elo7n*979%S2cMrRMysI4+UZ9u+6>BfbT0x5seQOupWz4 zR^!OWK~pE%5zj6{bvpXFHcFLNL_GD)3OpM^vhVD%5&px>o%5bCGiS{H@QeFrJ+ih> z`N4Pf&3m%<5q)Fpui}TtS@^>$133yhf-;q$1Sv%PqlKgDsaP zrRH(E8)nCTLOzx$8b|Y0FSxE1GTRG!zV&ZdUWRDSnS;lV|*iP3?tgi0H2>ajRlj7xuVy3<#!YS$)UQ>9i!pjtQk z=wzPJ)xe&#~wM%|9qwE zCJILekw=AAmga?LY>3YAw8fl1_C6lWoHtOH*V?(iNtWkGWoNQ7o6jcau9un@{x_5X zt9g^rDUK!_P$EziHsvlyC{cuj54Cf5d^cY?Fg7k1n7lWY>fKvF|7=HdfjhxyX~Ir) zXfqD!p|n*C6eE6rp<`V`Px;_%`-KrAjj4KrYR9*$v%IWNXUG5#7zU2iAhtahvCmKe z1Ji|xUM6uqmRw}xBDGQFWUt;g>{M&2rxz(?Rv*%;^C!n!zWM#nu-L7PFLdV5;>FTZ zgXyy-+saA4fh#vP>p$Y}pY`>KmGdyX@mc9mMj0R;H=Rjs(4qnos{f`~^}1svgBha3 zNC1uY{Lt3r!BElAepo&1Nagx1)(+#2l7nX?hH`^52F)kOTsItc$iXUAG26>rlGf#>I^BGmg0GGL}v;UPJG(HTw#;qLT$Cq zxjCZ)_a+%Hm@Z2tg}(S`JzuG3ka%{W!HHMX?D04qwpl5)ivylFWRbwVh%`hIMIZf* z1uB@RXUW(gR>PjZ5f7hj6Jf#%EJ#-K@2aC~!~Z7cJfTjmFze3as*1}=RTg)5F4CQS za@SYpZum{l-e%qIVJ+jmP$CTZF$>b@N0x>0Fvt7W^yiz2ZuN~fUzHpW7-j`PA8hWy zUvi}?k)CNs=?8tDwGj6?uSUUMKr#qpOOwV=$L2*JrF?NB78uf8mu}*fZamkKtJxjg zvC$#(aC-0+;-R8d%~(=QqC4XiB;AOVKrALGEbhXcu#Y@1s&0y~0SI6cus(0_n9>H~ zhH*nF^_v6Zx~U=WyW4a?1EEyS3pK*-%y=eL^f6M1c44x@g6k+gz7H&wQoNXg7QIkbhHk&fXCqF4Re!9LWaIu>4$@E8q=lIFTop z6C6b?hdRW9GtagP`DbI}DzW!8bFK{Drm-{n6aEa43=gaTFbIpTW}brtYeRpHOog1zwz+*9 znby7kl-vgwSYC5}XJUBs*rWGs53_i0VD;pw+Wnwi?D=;x5jsqZ3d$);a+3~Is2`_+ z+Ku%6c0TE2_{|)A=DZQ3A?aptX%% z8jl}1^WZ2!QLL1id&1T79Pm|=;*^zQ!UmBO}M|oW}zJ!wy#9tTosYl{JB@y)A6I|OhjCwD)b4C90f|m z$zdk2LKqbn7omkBH>m_{VA;TMpAxy?a^0?##(h@%rp~Ol<749y4CJGjTR_a3_J=W) zUumXYepC-U|46_nYa5@F9KFyiO6mAgR7lGwU3eY-XY~teGb&po8l4yaHZ?1aMZ&zZ zm}VuTK53=g*y{^>N_#w)uycP-o_M85ES{bzd*uVJP!LgbH?eGLs1I>`s5rIZ>^^a+ zuU1t@oa^Q%c-Sh&qu`djAOR%?CKodx`uuZ2AA2c^({UUOyg{rpDIAcJ|dFRbd{ z^j*=B+9SdX3cO$Lh!KZ-h70|D#grTV{a~g)00E-e*B~00jyq9fh}m|$CwQotZb0*f zmh_3}FbDPfO=k!mRS5IL`)t(I0WmQAOAL|EuEzEbN+=k>Dxj>MP+9Qjl!6d@PzrNg zI+?adySPJ}%#gqUDk-jYJQ1Htey64_&-$v(_(3ywVWa@9?%280C&R2lE%SE$ax=qh z7S6q5?xmB>XtOD^0Tzp-=^qjtQKqr=<%hP%YI))vmP-w(0bjnD@Ta;y)8xR;`)v|q zJg%;Fo6+P^EpRuuDYekSqyp_M{IK~|3{Gw-I4%vI8qw8${5ZOeXEGE4Mqs==*5Z8&FL(4@>ICwnp^GFKQE<>^FCmBp8PSq>DgA^h+?`-#-rb0 zGFDp^Yq-OPYp7i)2^`enIw;3`o0)pR6B{DgO>juvz!#r1Vu)G^l! zKAUv^MShSepMXSGe5#H0{#GH%GX%FjcQLSPt=|GrtuBv5AQ#rD>2daK-c(amM~RI&-eh z6dQR#czTyXkX$_c#%%^iim48zg_xtF;v5>2UeBF{c*r!l%R1izyefXZf@J+-2$C1m zj`wvh@~u6cCd#v|`&TXP*ktLf>$RJ?@zkAf)Oo4Bsj2A@TGVzVuVdLl9X-xg8j~QS zm2LIUfp-v3Ojt}<)h^0{ed}4lC|-iHhMD{>zF%H4sb#Vv5JQf^qF9a!gLF7bS!jQB5FK1+j0dg|$-DOIh&I=0O@&@*X))%KA(ZOZL@`60T!?^Xl6?Ng|HZjg(0p?9#%GdMxq zoJ|8of0wpS%Y2pOaZ)Zbn!DxR1iNVl2<3Z%**SSf+4~YTTjnt-b~fd9AkRAB*whIc zJz3*YXGDlfly5v#G_6REU+F^3YJm)q4*r=+K(vqSxC=%-cWIJ$sF)Ydqo@@-<73Dn zU6NjYy0X|T$SbHz_I*pTW#SM8!hBg$hFqU~~HYCTN|7 zx|@wG7h+*|-*G81Vt19gfOUzglcy)Q05b^%u|J=LC&YUghW{O_M>UpN83+0|p30<{ zD6EeVwgmpk2*YkL;B9n#WdYGz8l%vN|I;poh$$?R3eehhgF~m&c#HO4kJ^ z{L7}xIUig!C$KykBX<)!&;w4l*=sks(JN%%B^h_i+RJIPQ>n?ynEdN!^g7@BELkomJWxv zx=8!+i0AK6wp7i}t`vUd$`@Gzs~3cm^Byyi2dgb?)CwCfK2)+iEvQIZUG)sNrkMGA zTyr-40PHaqqIKo2d*LQTzPNlWEX*7-I8gkEKHYd+KH*emJ4P}HN@P)xOq` z@a&@Y<1ogvUuMw-B#Dq!vhdwK;+v~<(TlK73(4q}t?MeEs>rLe=`q~qPboid+hulI z{!34if#5%}ecxE9mLToI^j?$4^LXAZvkJ$b5_DZ5nlvzL;TCYWG0uB1(d=t>YCOg1 zksXL;C5m@ zQ+p~m@$Ucy@L;GiZu1sUSJHuetafnm4Rh~%7M{v#E}TkRI*=6QuPlhXDQJ|V8F*C5 z!j4JRiGDigk%v<(xIbj4+zh@21UCs0Z-4qh`&h>MDfGdXqzLKYQ?KpcRDr8kOHl*a zQYmPE^%(fZlkb&p4hDzbXBf?twtun8ep}5u%0rj=>QdS*M!e?H^!qi<{)KII#ur+z zvjadCZcdB>LwW)61#53J-GL+YpX5#8(=1>p2u&a5$$F_fPZ=xmS+Z%NDp^j|%iV_% zp&`tc#u@3%Nq|U^QUk>9E$Le6eG+}Dqjqo8miY&$#r@!s%n)v$Vq;r*)beH<4~~-E zL_?HOmsV)?qrhuLu-ofJwr-(n+#K{iM9R^r1O4`C>2YT;yh8%`tigrKWB#y!xk zgatw~)yaeih%DPS5vW@2H*rJQoc=9tG-7W|nb8bJYyB0)zwpyKQ35r+XwN${ zS;kpMBNA%nTYh(aTdQ!@V%Su3-A75g4t?*aIlSr*LLS=x?qVr-;ni!m0E%u!ti`pQIQSY_hoVdM3BO*K z>XDU9Pw@x-&9N{`h{+y1)6RseZ`I*Lxj3Eye^#5ev0{m!C(wroBl196; z0=E@eQ8j@cjAiq~i={fN0b>iAO1fHn?oQl*2mqcjIbNTVNpA_iabyTj!EU=jB)4!|ZZ}!~FHK z9Rhbqh>)1$kFCK2)=UHMTc~Ds`xnd=ign%K<+|o4QzC{JK_%H1pu<+uL`+hDC{I7y ziOl!{oCz}ObXCS0?hDj7>o_kSXsVWTE};m^F&SEQbEyN=R;%4f4sJIcl4ssk=?PAE zNZWYKh{g=Y60)Cel}$q5+Mr$mBTSUYV78#;q?e0F=9>ddE&Zg>7;D}zXGm7GACz%z z9o(;{sk|GcQ`4xEs~q*X5`KwKg9ItrOJFM95eZ5|n~!~K!_=*9s9a(75lM0HqIw_e z8@5`cmIx>mx;9@))D%w69Q~bLM+y-ylS-&xCT?Zi5*9_j2k#KmWa+`X7ank%{r&a_ZE-Uzq+arx;J4W@4hhnV9}<6zI%?6-Lw zp0M`)$NI+4%`MXJ{ewT`L*VbxzjiTz82@X?80gdRZ}~s$;-cGiiiwGliJ3me^qax| zR^Vbfeev2EZe0sz7e5{e<(Fr9Z>8pa?q-oxxliPK^lb7RzmzIon)I(}|FP`<&ahYi zUzYt(!~U0DI1n2n1AX!sxj;}5ZT%01*DJVXCzqG_xxTTbCdv(4zp#LASlASq(b8oS zI%W5@=JR5ZzSuLt_vZw{**?vn-eI`5oux^!7gp`=wHb3GD*`1oD zq}tT>9Pi7%#l@P$4--UgI7E|@^Ml=pPB${M;A}yqe%z{+m;RV1Ls$2z<3pFSb~cC+ zcyi8jRbh=Jns!~wkES;%jota40$J9dzc4egR6R;(PMW;3#ZVm`E*n0xEJ@Pn@hAfP zs|K0lT>&vX7VtSuQMYh1=ZlUK%_L8ag^x9YT^vq8HE|>nb6yX#H9_swpFI^T(A!%3 zZzSHRHXn#m@L0sRDDT-tBicyEJ-hRK-}{F3az_}%0+ z8`7EfP&be?LE|2BNO~5b-b(>ailEOHAo$2~JX5C?5y2J~wJJ^$YZ8!o@qZ zPvywoxMc`^hArj5=}e2;JwoWcd24;!ex*KecJS2+Xf+!~G*dVwDD$Ze_)8KYr0iZK zaSjVLHer?ON_TYB@Z)tvp}DC+`x$%C-*Zay(JI*sJo*{epG`Z3y>;2LN?XqyTtu9J zPEU}ak%aU+zzrg3>*$W`g+`Lit^jGgPy8yWqoK5CaRs-z^EIt;`7$nNnH4_z#O2o$$_9y5-f>m10Aw)+PmVm{rg@*K|yHp*G zvMl;5T!S-ZuPSTQzIOsrR?m7*G$f1N*v>QO_gdz5fC(YPe>*|@!Wm}|PC&8FLNng; z`AyUHP!1SwJM?+qlk05h-|jr)xYe7drd-VbN=@o5tpv*6A%Qd}Z1kRh&Y;WzbZJ%R zYBd7yh{8}Y0}2@nI+ z=V*MymBf0gZ||JvlaC6J@jmX<9 ztn@C6U3e{W*YI7#ZAR)-1n!T3g6lOVe*s3o+_@fq0y;PQu2&o^!%UMV`EOz=ayT{q zu^gqtwhE4(vgfDSE6_}6Vz9|Z7qr&?yFV$|Nt01b6%mfMr+GryDb^jcG)|<0X=`hU z3~{tBR|GfS%DK>dtl7OIfyDmIpvurEZ;@?x)px!^97Ajf+zG`1=?*reL1JUSZ$8e; zKJ2UY6*qy)FDT78z9!0P&*&@#^ZSUw?3|P`R0v_HYR4^dtV_r30yFV3*J~&bjP4DM zjj@kOupQPD5R=yF(1`$jrd zAzSN>m6yK1&A3sKGDKC}bib30J2q*F{4!B7m)%~!sQ8lsIXn3^^WGOb-LEl@FH>`i z%}M;P-`&lXBDSy*IpPC$9v+^6oM1NSZpaD9jbmY-d_;67XLbL=8Q=$dec4eLX50aT zRm^#0`;VITjx77ynvU5gb>2KilY6;$(pYa?uey|Z^|72F+jpa67I$_?3GG_z$nLPIB;zE0QqC($9{$Dd&7FO9$ z1`BKE&|#O@qk?k12kRE~wCVc%tzRD@;njk~47Q;ke6_+R+-3Ud5!o%}+RrRQH?R9E z+V1UDq$qwOxyPjY{Ne+Q%=1V-+1HX!K-=Y$JAnx|DtfJ^dipM=SqoQ)zy(AgBO|vT zvb24nd_<;?n6@@5`gOXY0m5Y?gN0j<;6i6GK?`{$;-_{BNsMtIk8h}z;} zkc8ad^WOHFean_DAC33QlkhA!`S3aVL_@tfz7^jC99F%9$r!+!^ax8hJ(pUHG=eZw z^czSSnMq;z>B2$$PZ>{d_|>*6=l}68)_*ML#rI9{YtH2jyXT?X?8X&N`Z%K-4i1Iu z6$ihcr_A|vh>`{z(%Viz;EcKAhQi0voHU-5k766`B>`3&zdiVSr?MJxKb0bx82t`Sk)Jiz1{PYwCG*c6VPrb zm4&245wWDZrx`GJq?FJhOPgA$Wsaj56#u*igyR(3o5HXTdOhQo#Ugzk} z(T(+{qdx3!T;<}uZbb1)Nan6L8Kb^1Y`7B2)4-!TO!`AYI-Zxvv2U^~3&fv${l4Tu zaGjjKvd{Y!`S$seucWlbmfgR9bb`(|&Qf#C*Scp41E$JNRo`zmq`kL%<9m6@tA19z z6;6P03^(-?(5%Li=GQ3IJl{+{KjZz}H^`dFD3g41PwoSW)kGk=&A7VW7Ws^Xlf1wq ztJe0V$}$>f%eR#1o`{{Jojw6Ygmik|Fd!5sbesYh$@C@i>M@YAmYG^;UJP`uu0+!y zTP-Pl?*!pUnWo0psp#bCzR5QAUFF>s-zeosM{GAu3Mf4`0H*sfVmchhW)wq`Zy!f2 zn5iO=Bg*C)P~K+&yhhrunauo=V>kZ#m7sQZf;B-Mx0w-m$K{2e6X}gBu{N*U!2bvU z_D|=d?#V_AoP#7 z;yLA7Ip?BB!QC1Zu@M8xg_T-O(5V%EHL}!G&B+RYYKrDm4_09c85){r#%+&%7q`~=swpMd&K zK*HPD1`RFO!Pvbvm8#7-T*fP)wpSgOoK-w@rnY!~TtYzE$VK`c{U>l^KTK{0sCcLtjy49XwRuU?^00@+R;2gYW8!s~3xRhJrj$(EQcf4< zEbcU3t`<}tVl!~TRrIvWkUvwCq2Bb-0W(*(*^vgx%0LJa-fb-$m62S&_MEY+AsZa) zUDVvtpXV7h{3TBECBwB3)*R78-m^fFb~KP%6z0Hc5MN^XwG3YJs5la-^{jf-?18Mj zR$tpKKPwqyWmxluF{+F-Nn`v65F;pRCwRGQI!h)hYc(ASMSjA}mjw#pg_;wP!UC+(&T7yB516GfZPIv1S$!~e;J$(q!5}7_Z*#&C zWk@oeQFm6K-aS}yu$=scI6{+snw4VeS;VYX(-0yazI{O|j*bSzEQ;tc^o5QJ(S*hV z#*bPbujXcu*2k?deNa&>euy}S3H4o@K=JriZZ&q!v;HWoCRc=hu>1TyD;akA>g|-S zU-NJpOF12P*nw^$YxfC=izYxD?yMb52p2)l;kNG+W8xw5+v4m~ZLso%8;d2_ICfeg z`$XK2#?*`1wl9&pFYZt7j*qT12JgU+ooJ)sk^o$0mzfBr2R;_aMf>rONG=Ggc^(2H zPSTq#m|)p0@|NBE{=DgV&BWP4*T0)q5tAT`gJet7a6AZ4Mb&S1e{5 zk8R<$pL5{AoR8rN-xUSE<492!|#a}V^E-$RFid1+#(ha_}A=EVt! zvyLOaLv{*vjcC7MF^5v}T=f+}`Vx4d;&j3ruzfglf0?CkLZ|3)^0!;ggx@%~K8wr+ zSX9RiV7vecrkytgOi17dK#Zra3`Oo`;WENL=|GDQ8yTno@1jXJ)J_#7TU&bi3w6|A zU2r(76BUz2oK~`EXeVTP2arqJMi} z`@-X=PrvFiMZolz(cKq2SIdIQ!KP5U+kxA(vQ5ve*dsA`iUwBMIISRh`TI7b%C$Gj z`@g@Wu3lyWkD0&J@~Oq!b!Z_i`$D~!69`Ido<{h}Fuj=vdL^D34FXwn!9lepn%sKw z%KBZ8UC*-!R%1zigJBuh0t$KChnwb|SrlPW2=VqntbdkVzboGlEju^G96K~uiK%I! zIxegKQvM~3;^bsuEwl}jd_@Yw{in#OKupO%G#5D;fTvzA?NH$km)Mq~W7F&KH`fQf zCA!eYa>EXii|eUWM#_bBdO%UZ{ADhlF0FQNdno^%Y3ylvAQ3D7h~F>IdUFs z4^?~8?=5c7>_n3bNOz`cn=GLbXh6G44aPtli3+3GlbF$_!egD$N3=D1I=q)9(}k`D z`<;MT;e9&K0}vNsy-^RnWT`*KtLHk=Cm^4BQF<8B>|BjybF4-8R0Ho@|Ji$@*qRSg zehvbKf=-8nlq~*KuT(G8uG3NVDY~1}JP>dt>A-1gIE4qnwAPQV{(ERZo5b^zjl?pKZ4IJ=&ONwf%s*m(@S37H!@;f(+qd>Kewd0-&fCLW@Gd|mZ7n_ za17p|Mxs5mp-G`p4T%bM7$#&^&ock)F8Xu*3a3HfS{S?bv3?J8YC-NYe>~y3lp|;? zf_(_~{RBi-0K$$J=_ywD9{y1__zhXKf=(T2f1gy#wC6`z%z_!VU8Ibmx*E zuUY2k_IzE$Fh>1qvG%NAF)Kcxvjrw#5~ZiHV?ksWu_DbCyH`+D>%Ad|2K8Z1+C8b= z=unzoh2Pf|&zunz2i2O4ciuL!nJob=$n%Zg%`z=Ba=%khe_(lyOR#zfBg(&W;OO{sY z_lX^icy#>oRRCS&`Q@WwRbFkw^sl@IWFbb`a9zS~?E>^nn>jfTDx%cp@No;nuOmc~ z>7LjU4rw6f#;pAk+|Gp+E}b3JK+%56W_GW;y{q_Vb-GxJVdhlg9T9 zU-$EgI(NRfF~Q{9v3OAF09Q+PzDW0RX`!6IzcH-0jpM+cq!fwralQigPn4<&jO%}N zBk?MCl&1k_xvWKCp|yo&(YE?lzrRU#flaGwKCL8N3vgdO0VN&LKL^lQI=}CXdPrnW zUT*~~*Qyx-!oGFqOh7B35Y^T6Tz`%*<7AAQ&A$90S2|u$Oz}=s6j};Kv_P|OcF?oS zS2PqG(YJdTk)%G|i>WyQMF;qDYzAi+9PKWZLb$L$()dFhzdH3*%Vc$5x?A?*X7!hq zm=1cH_bLKF;AyG&92MPr}2panZ{L~xgCh;U`Zk4uVd7;V{ zr{5V*d7gmmfy(s3z7A1>Xah!CG|2N+X=H|{-VE?*FH+j#y8natL)XjARR}xHLUGuE z5vjPpQyg&us?AL({z*FnL@+1ROMfPkivq9gg1fSHJ{jf}e|mXILAbx zFY69*FU4(IH)!Ql<%uk8@ngB1mIihF>7uXlmntzQhu2*j*@wzcQhIVht2hb^9%32W z<8tkKk&0TSytQ(ba`=M4xqAV5vMoJHmnRcF`_b`^({GBE#*i8@6nLLsl9>i6MW@G2 zu*9`Vry*tbQv&<23G4lOGtasypZgU{%?>t*cNzL})U&i}s1?pXwM{3W!J_Ooam}fn zn1heyDEriRgGYGQrn66Mu5TwnCPKq39R1>d7;Lv-CYZa6$0O@bJ=2|@NaP45FJSxA z556QO8`L8;x(C6;SP!vqCoSkq_MvvsXnL;MBOOfP6|ZlEok@x~x_dDRbBZ?N^fX)! znZQU}ol~Re*c{R`D`vl|kh9c(9-t>5kYvE7U~@W0r-2bU<=P_W+713YtgEfi(T1-5 zypjx6>Q#!{DAqyXE+L2vp(&Ne?F(@$a7_wfeLp> zOeDHnfv(2|16JOI>Zoj5IRV1~unrvk7^^QwrsH=$HTHR*!>jhaFwO7wmkO#`1k3X2 z%BRBpw2#gm!D;8<$ELl$#MXWoV;f&Ju+c9rN-D|^DcKe-?l)<*BrIqn)kxAwb@yKx?3s7J44^USiQ+$*@TKEN2YHo;o_&$Lo=_crxq71ir2mRtXXf{R?5S})|M zP4!rHH^xSv?-0PpNEKT*)+Yrk`uKS0{dUOO=`Zz3**gKzSpMbmnbeoz>gaAQC_E(| z%-g{Slsl5flj;1vLy9C`$~=JP1wwJZx5B8_GRU3XU)+LkVkH?QtnM-2O*8-QP7x&? zv(ScDKAZQhe0$fAuC;lg=F74zt_ai<5}pT{`V$n}*WTSQ^b8UQx74P%{uwFfzqA9i6Mi=(7-(%?=QtyM_iXs~vVHo!ePJsn=66^;fXn5aA@Bs-oEn zmyiQ?V|APCwa`JP&y}rl&>+;@;8%1bUCq!v_6eWNRVAj=u;Cii5;dxJ4_SblA~VtH z87GtAG^tRP$Y_x}59x+`OPbzjiD`;nvaPt9f9-dFxK(c(!{BvyL7iVJqkN76^_6O; zwJLv`W6~6r9TT#$wT%kBIbQdwi)fN4Rp1>xn|T22mQh${1N4Dw_{!UTw6lO7K|$Cd$Dnurr@d;HpZ&_h7ZW43 zkHh2$7Tx^?z4H^#SpJ&hi+g^>lffKW#xrO)@Iu!8deUQky8mFo>@HZ8%4!ODe#~yy zp3vv9e_JbrgMVJI=^3lo*Hxtv$l0s`^f`#?Px7)Pk-joy`ddyPZ)$|IO;;2Wi&H+P zt2NLDXhUex%VQ1CV2J$8hbgtQI!YCuJ=3ttzbV%J zOw|pMlI#IrlM;fso-0sdV#K6$@OkZT(Se;e5D{0;QWc0ON6c@`RzvI5?3Tk8-U?Ou zoGZ<|@A&I=$ztDow$+g9J{+pOZvV6ZZ4bO$+;`fO)XdW!G(Vg*^U9ra#^zeTdH(I0 z+~9KixQ%lE4aSopm4hbVF&-=Y z`;{T9`xtt20IO<+j`tZH?6|N2z0tIJ0y2AT;k;!we7mRl_z%(NE?{trPGbjO1+PUo zZ)%@_@*18(gThEtZLF&cC!l`GJb3A6ODyOaVzCNLWf?HL-!$iAUhudc?9^cfz%=!61%Ml!ELj+jPG9<)x|X2 zitAi`k0I(=B*Ota(mm=m0{gj6jM^5Yp2|YQf}j+hEZW)T0Ykuw^zgUebe}z+rnX_+ zUP@8tYV=C|`O;(g@F5Hr%BXl#I1z_V==AVBP`GUuzx;c!C$lAsEEBUf#nXrDukcpL z#R!j=eC1c?9+r$sdOD>=RiZn(H?<*931>-`p?*LKgy1u0>cA|{fHh&QKl^I?9OaZ6 z%dfiOcP8a_ijj?4dcQ~1L~K4a=On&%yz_JCZUSud*N(%nH*$sSG|_Pdd1-;*p3ruk zxJ@w2l)zG0iYU-Y+GV8n0QV^Po3G?-K$7v++3+xp$40lW*(9qkyt%Kvf)k*fV_f49 zr;Xa9cZOG?aWA7qD7`l^>iBNT9OvCGFkBJ?QTwrS?q4^JG6*^=xAv-UqUP5OghF?DY3BrqXnCjnn+*^@Olg_MJ} zk?OL2<9wlY?o(CuA_-@w4S#=UBlZU(iZ+iD9KQ5@nB}s+YQspPrxSPRP*hEufY!SA zQlVYK8vRuNuDNiY&%#O(N^Kg%m|mL7%*SbGJ0F?PZLLi$^-Za_zv#Re>$y-M*89+0 zgj$aF{DqSv&ycL58_TwFgMHxhC`}@*ki?-kCjs~tqSR+x8lx&tKn;K1Z6mbf`jXf_ z8-U**a$mKbiMl_EnIyFtbk{4x%3VG^v&Fa@>nvUWxVnK}R`Zrhw=i9Dp7ViybbDKU z28-YN$FY;+zUJor$Oo97qW2;1>Xx&ONA>r%_1w`1{=f~of1Dvfs)<bCv-X|jG zt`V%EL~Bd}1T?*e5-AR!qyu=ssHF7-16H+;nxi9E>{!3A_b3(Z(JNkdq0Q(+SiV%O zgv?{umGfUa|AF$+G?n^);kco3v}+_xyjta@-GgK8-B2aQO>sf2{7zoIp<83aq)V=Y zl;QB**baEei!9%_vDIZHjl?$faln`FC7w;p9{IH%uDYeql_=4?mmc{;ss8MIsrMCs zxspL(yGJx(V5BF|Z6A9XQaHaQU{dN?E5UBYx*Zg2 z5>^T`CVCD1kceiAIsskjWJT0$=UxHYt4Dvxx$M2w7zYuiFjf5?B*&DY|PFK z24lGIJcXLf$gSFil;25nYWWp3z9qkLtq1AChEJzS^y0Lsr5)2GCp7|U74=K1k;5lSIQcgSkq=Pw1=(in!%#bm;?`cbgBdmMjDwJ{k$4BJ4ush zR?`BPbk^EXc=pNqKzcPYzX!${&bz5WQ*M~9H|O)fX~a~bv{!Q=3;GiW3pwTwT64n^ zuILOg1x+(0dV`w>%m_AFKga_JPu$7&jPb-F><|b*S@a(gD0%l{GI8x>YhRRxQjk; z+1Zpe!Uh)K_eGWzY7U9o>=e^+{}uHO)I%wTAJ?DK zLkNql_|Vu=tJtrAUmkCd!|mL90s6Z@rmu`wK6J(UGzy-F1b45nR0eQxhnc#CFU1>41U@plJsyR+oj}*wDc%I7 zSQw{X6X{HIf&FGLmsP|ww`EQ6B0I&#OL@PS-aYLSlG>ZnS0c2Ew{ zz-A%1%y|h3zxi%J*fYUAcYV#wVa@I0;;GK72bNssLO@gl56t3r|`YkC>$vYW|Ju5H6MLe`j>2VetcX380 z`j<`1tQxCJpr=f1(BkEL@YqGZzYwQSe_uA}gL=j4hY#L#J=I_XEc)J_fFf)2;>Rve zm&%_3vuoJ58?dQ`;4FL`r%SC>^UY+h)p|la%`+k3N$q5cEg?nVH+}0g>vXoo&~r@P z$TizVCSm|@VM5+%bGz>u0H-8l zUfY=#@^IqA^egAT3_9h-Q#y^0k8g=`MbtMB!hZ13&NkeoE=M8FZ*)uwc#SeL*tD+9h<+TRhSs?uKz8~HFAxuS|p~+vS*_7+&^vNk}Rk@ z+cuVk92Gs>C3t<+LJijb>*Xaw-%dbxDdt^Bm&mVItu&Rmgy2r0sqbAhN5lAx6B6G= zcxqV98r^u3-fC{XjET=An8%7sKig_9QM{pt+~46m)udmo$eIj)x|a9F1kNnsnL}Ag(gPVvUgT6-7B?>$tyglyPb}k zT6VMyikZzJJvcBMBO%*;&S$BaKBwQO<1oqDMF~$QzwaKqy^yw&Vms9{;25mUj^;TU z?1gb{W+@le*LbOS4@G+vK6qV)JfEn`j1?09^FHs2vxWXw<13d!aDTw|v^c2euKl(y z9b)J~sGIlC0$)^hop}tJr#?)&>9%yM34$=rJ}Maajy?_ePs_x9e0Msm<+_i7KV*!px)Iki&m5}ge8 zZx*J;DmJ$=3Tv+g&=p@R_jmpNEeloIBo!0s&)fs7weM?Bje(r<)9-EAA%wKw zshBhuKzepb% z)WNFx`TlI`+8uiu`XJ0}^4LBiQA_e5bDPF0bBq`*H2ARSg=Te|dh|-pwqgaJ@lM{N zi(r^4p z)0Ka@5Xvi=_*5V9qdeiE^3zaJke0vMgsQ2DGYK41Cnhn4Sh92=ox$X7X5Q0(oV!KX zBQGzXonZT3`z0Q+-4%zWa-S~? zwXlL*rj3DxI~3?A(B7^oF#u?bS(IWYSKtb>9c-R{E~aiD>2B3ZoF!vH5e?f$&Cc4T z9}67Qp!t|2XI7Fx&x*h{O=k*q9ZkSQ=U#24&6C6$;(V~#m2@v|4m0V zs+@AE(H9kU&(tC1GCMa_XV5OuzM@$=lvn!8D0hhzt-ZW+c=wu_>Nb@$Gb0zcJj3`6 znBQSZ;@p&IzTC3RY6^w#Hu(urV>kc!Ix-*M5wV7Va!_=q15LoOFqSrpvTsnb^Gm{W zejAJ#VnmX!zS&OkN%2F$3Y$bg`zksD6X(n|2@wN2Er?2kVsduW+;Hj5X`Rr)NFDSC z7&N9z?7Z;CojGqprbw$0$0%DHdj%*2w1}SB@9+G?u@i@1Vzj~rnnxdE)w7*Sb1GL! z<8f{+ZO?A$G06ss3Q0YS{XohbS{0^D02%a9@*Pkjxyg;H(3PP!HCMcL(y;rgTJqt* zXV28nQY=b=tZ@!wd!uK%&Oc=~ZnF9wzWUx(`gj<;VN&V=W_FFrfv8ZFQHiou#i0(< zd(;5Ie& z-Ju&@v=wBdAskd*@Gc>w>SEfJN@m1zo#~-9+$rB!mzh#kfwFP?Vm{o-R5z^m#RHWdi-nPg2JRm{i8#dYr3z};XNkLZ7OD@2lhvU@jP9Q{Kb+om6AlW1Y2%tO`zdWQxnUG)9iVyzR95ih+h7g~Sn zE9Ne-hc9O|c3DU)1Rn*I_=6>(qeas+79o0okeGG- zO`xViq~@zhPKeNzXjOK|#U(nivo@SL|JRF3pSxF2>BGYZ^=xNctA0t7gaL>y8WcEQ z&3VMZgAxWz3t)}OG;WkSNxI_YLA5Z-ilj&1F>_6l({1{#rb?t`-1sq88tCfltJ?57 zYad-_1YONSf7^|F%5{DGpM-I6|_VU-|E^~7hGZE5rW}`n&H*dje2D_ZJ$qrNugr9O| zN{wnT;7->xVoV!4*Dzd^<%=X*^K*YlDM5*I<;BxR;i}T-rC!`0DP@Nh`7bV4qoQrA z9>o)wja+iovaj$y*80T6_2*3dtC8v&-)zDYb}WxTYU}D#<{y+YKew~s%c5`)>SF`{ zg^rkN-Q)venPwLyg>w6v#F$7wl5tzY1^+|6yDhxN zO}4KezRbAk|I2CR&5h1q**gEJJi&~C##~HI5L`R>Vv+4mkyKwRyKn+}kwUD#^E;-I zx^MJ7#Sz`52MYN{9Q`!Lb>?}DniNDlp5 Date: Tue, 19 Jun 2012 19:16:32 +0400 Subject: [PATCH 105/562] [*] Restore category image files --- src/images/category/demo_store_c1002.jpeg | Bin 0 -> 11592 bytes src/images/category/demo_store_c1003.jpeg | Bin 0 -> 12662 bytes src/images/category/demo_store_c1004.jpeg | Bin 0 -> 12860 bytes src/images/category/demo_store_c4002.jpeg | Bin 0 -> 13711 bytes src/images/category/demo_store_c4003.jpeg | Bin 0 -> 10698 bytes src/images/category/demo_store_c4004.jpeg | Bin 0 -> 16022 bytes src/images/category/demo_store_c4005.jpg | Bin 0 -> 13433 bytes 7 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/images/category/demo_store_c1002.jpeg create mode 100644 src/images/category/demo_store_c1003.jpeg create mode 100644 src/images/category/demo_store_c1004.jpeg create mode 100644 src/images/category/demo_store_c4002.jpeg create mode 100644 src/images/category/demo_store_c4003.jpeg create mode 100644 src/images/category/demo_store_c4004.jpeg create mode 100644 src/images/category/demo_store_c4005.jpg diff --git a/src/images/category/demo_store_c1002.jpeg b/src/images/category/demo_store_c1002.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e1737bf64162dc4cdba161af5a346847e6a85bf6 GIT binary patch literal 11592 zcmbVycUY58({AWhklu+1h;-?l*Z=_$L6D|IL8J+YbO;1Ndhd!z1f&T_?u$506<210WRkO z_W)%7yO96u@}E!g{|E&ICB;8NPX5mi%728Mf{KcglJuse{AZAV4?+4DIVA>z?fL?^E(_nO+e`i91)=9aGRp5DIxp96#A6O&Vare|j7kf_zQ^^MKH zTick!qvMm)Gwk`rKe)&M6#sr?WF$5GBmW0377{LUN=gb!8qzZ+-SqpX0}CaUkQ_DZ z9TS?Do^03U-_x?+P06c9&ivc;h@xf(BG(DF9v}Y2YrMqiMXuM6y z6X%HauxXz>5h~U%@z+C+#A`l5w%_EZ@bW1|6!Q5rn(A()pknUXMrk^3^sDjA5tsG0F#{kE8$QAnV)gTASh)B_k!DstbvV z;RVh=6N|%|kLRs>CKeV3t{1k~T+j5&yn8plgfi0(07%sdVZob_V5fps(&2R4nl3Z@9=xfQ&V zH@2q3rkI)i>SCumV*n`ZQ%_QtqanGXZ|ntBoa z1vt>C7CTB7vg2%xBzGE!dQ7tNh!@}+H+<9n%(n)Hv;yZ9)PIm^rbUL6^2H;i99qM2%vjsr6HKfZ>ZT;~KmKW=S-R zM@`~WpO7wSh&d39Wz!csOgWnQE%AX%hW^WPfK$hM8E%ZwOPpIq`(;HO$6Wz;UjnM2 zyGNz|#ZOp2Gcd<3*S+vy#@d0B_nWKH3GscWYmOm^U_Zw*vpT)>%8i24s7pZD&Lse0 zb_sCKYOBW-?*(I+5xIPmBJUu4=-b_Bjc(r*xZ&HmyS-4&7oKrt10PT9jFryapma^u zu{W*qoJ3iLD>W=xX@(Xco5FL=$&@S#kNk!PMAHGATDJv~jw>f>LKu<1esJYQ#20l; zPHT3Y<)4eRCFPWUdCfhKvrdrQt;5&jh6#FRlWjUBwmU6T1Y&)~lEH-SPWJk4OG9n2 zFzfG$=MRS!s-^U$dQx3^U$OnXk;9eA7`;%vkXH>WdJB?xV=>!x<-7k}#XM}sI;b#} zFD6&`)aDhl-@7W6wAb->g$J>7->ow4K*)bl>tC~&>XQpwkF8P7Qha`qTZXndjm4he zG+Y}6uVZO2WvG6HbRcFmXjl*F*dzUUWr&f>%xk}4LznYkFk?|FZK!DK} zdlYvX#_|b`nnB(T4SjPO!ycWs^ccY^UF9-;KkfL52dhcBx>Aqy?I(#hKhAsIGN~#t zr+lXo&o(pl@zpivkMZwxms{sOjE`cEsy}I4B$n>UeRS~=U3wf3Tbg)1iLuO<%uLYN z2~dU$??dOMoMQh`u=4p5z^jiOi8|{{MmUTrB3+Ar zHUsuDIr*9D(GxU@$}Hb&LfK2AB|_ERDBkbQm|;E{k~0x+=>y0Tsr1)0`z+54dfl?O zE%)r4zg&M9kap{_L0=pB<~q+>Y>VnM8G8Ci-kg_$V+NAN_fx(YWVo7bmWkcKwGtf+ z-EJc^6+Y57NA#z?qqQla1$NFXdX zwy{dvW94CeNSQ%BQ$0al!1W%nn!mLwuIsrc@~vazp@eyXth27W{Qf6GF7Y>MRZRB- zugw1q)Z4Sc-SnqGX|>#nGRG`;E^|MJs7>$Z{RC?%Ub!Q)o9!TydB@L#@04ZwxE3c& znzR2UVC56MfjwJ02FX0ftb?_|uvu!Gffzcp``~nKmJ^grFB)1}yoziam&|bjYlX3I zo3B}%tKQR)Yqk_|OyJhx{=BgUSgR~K|A{!hFhBnxWTO;kSYD%SNlSF$*YuROcap;r-wf((9`beZ!!db&3i(g<4M6)*T?Uf|>7z*J}{ zUsE+$lY*eB<`BQVr3Y)fmW)2U+o2QK+rl?F7}{Cy&-;akU~is5g* zN)0d3g^M;Wmi3utiFc5+V9^V$4jgb|oudcKfHLkLiOm(L$3VMf1+Xe8l@A9Fu0h7^ zSejmCZF%(KWK064AL=Mor67aMU`|Qt_5B+DvohAX?~(l2kEpinz=DmWdD#_*q&+#D zIB^sPsHaV})Ru;bOlz`TO?EIv9rl^mrV+{BR)K&E97MSgxzYLq8viJ3G&JVTW<7>E z9AXrJtav@i+Q@m9sW9O9HsZm^kfPMBpj(w^bjc3JjUekwz)cud6?kd~s!hUk@SR4F z9S^I!0_pJ9@CNKWGAfbfN^@M#+koj(3MM(GJdVHGQI&6qwMcEp-CD*+<|erM>qYH$ zyL%fGmw*A|G*m1@YNpJ*GHk^B9Mpz?mALNsU`9VDyxkz;Jc*lUYt+-Q*?cIY`{qKy zm;S1YTn(lZekXJLMIMc0wPY#@d3BZpqS8&B1v)8egU~f3%~#M9a4V2Sq+q{7rz0hM zAX9~9(10?FTf$mLAn?VZWbSiiZ;?f#I+}&Y{8b~GY5jpS9Ucqva$T)@JTF>Xel~TM z54bVWwYIC$kSlq}q2&RpmjKPD>HBGhFDKmPmi=ZpnX*@t-% ze}QW(;uIIXkY}B+1aKX=XAy)H&5H3hj-Km}bXVH5M+Nz(8MNU{T|mrA;N20XzkzgB zRwpl!?G`3k&)aKlOf;+Yg)LzlwM5!!WKy(s|6cz}yA6^#E(C}NO|=Oir9CV$Sur8k z{gaH))t7(|PcLYXL9BC5jVjd!pt}9?di_1Spa%}EjgcE0{`S&LdZz`*U=K4D+goT@ zB;1vm8!NVY)}2JNi1(jt3(gyo(q_g?M;yBW&C&IR8?C2tJesnlnpsazc?}jjd4|(H z7p`+2vBKq67e+Yv?+*Q)S}z_55Lx@Nws&w?b~tYcF7usII#J^kOsc*3_4WMo;=IG$ zf!-y6qUaJZ#D!DP~0m zD3kQQ7DlV~*9-htZxt911iaDa$BsNA+4SpFvOOE%4NXmHW_5{d4$3=|iDVSrG>2m(|6)Yarw1NP$N@QnX?AR{ zqBo*eVISZP9&rwnP=|IyUN?J1;T{P*_c0u~zuRE6wG9!# zi4lK=h!9G&C9#g3*1lht_|UzVfLL!225elP!a4ZwboSoz%yBT6Vd7KE{gZZUpVVdJ zDjIo3FQXgtLC$O7T^gj{t|ywW3kvAa4jJM-*o`T5firr;V*Gf`vJWDN%sZJ}A-6DM zk)LfN2d8_NufnX-dN0;^5%tdFL-)s}c8}GLg9q)!-*UO0J|bjmvp^BbipF7J3Zf|f zHkPgsintrX`&S*d_c)il{g09wgatM9oN8b8MAEZ@LBY+jWbqE;Q;(8oHT7qwyz|a8 z4fP%hyT)YLB7`>3f4;w^cuxo;iKOWQhi9=uys%Sf=i<4`?zv}hXbE)omBXf04%@lLKMTt>yoqW%EuosDIOT9DXy9x(`4K94s zrgA+bT%QlWmvW%cySB77e%l}{Fe$K<-;+!F-G-Shq#k%3ApgLY5NVU>q9adsRR+Lc z=l*e;W?G6KAv4QWs}YG^HHoLdm_^K*ThICehvnPvUw=LBf6 zIypOeZ`1ao>p2H0Wud9b{03cxyUMa}0bgUp`k%k_Hl`i+q#np0t?PQM`6@ml z*Y2R7(yel*2L4fXRleX8Ml`U=yIIKTM$6&fWmtQV_8*Yp&$m;zX5Vl)1{f|acPvMQ z!6Of_n&6cWnZBSJu|2hdzv~|?E~XJ4ysj*|+V^u+eV((t_PE&M%r8ruiar1@B!s9z z5dk0vg2ibK$y2<>L$E$b55^>R?7@BFPwe}Z1T`UNk1P90-))`^od$m&-cV|s8>Iru zy-@w_8Xi%5b6xXJM8BDDShlH$15Z$m$C&c(@(HGDRr>S_Ki6-KEz_9#q{C;me^#A` zYxgNre@5Ke1l_ta;x==FYPjDE4^%bhL1;2k;H$xwhL-@!HA0Dxfc}I&Rs$n0^F~n49vQM(hpP0@@ReBf@Q(>HM z>!)vM!;0lE0SYTF4*vZd5@wDY%??Dpe)UKhc3tj$=lc;RIH48dEBf+iyXWJI0b&x6 z8V2t^;|h2Gf-YN8v`n)fa)fJ(H#e?w>vs&){<~O)cSNW}uW!6KB}+=KzSho{u86+F z?P7_%2RuCZbFH1fCFaG}@e*UH=^|-H8b!IoO6_9^iFZW{wr75zJP=mJ3jwEYyMud# zcgMzHCVCq>uA-L_;LxGfR`DOw6$g8joNllAjC2^~lNnRy_ES}^M6a2NivCQ1*Dy!I znd@aaLJ+{(jXZR1@7(lzh#Wc`m0O6R=vTMs8v2ZD7w(_a{kSAtT|X}UV?T4Avtg)W zewmQ_ggngFQb-H^D|^1>0(6QeB0l`IL;} zaChA(@b-Gz$L8DlU%HF2& zL}8vD^P8sbTN8oBBKdhO`dT*W8I4AgB44IwUmX<~lJVFWdARYpE&Jlzfh+!wdrCN6 zytKzmBjOUk4t0~Atwo*IGDV?x_Mo*E{fipCxip{qiMOWeJm_q;dBF+ptf)iK)vd!} zt-hS%TMK>pbbc{{#?qGnkq|B@!X5Mq&W9Hv%1u$3=8odF=c*s!moF`LaA=3v9N!5gSV(&8A6dDR|$l7bhC_Ki((Ke_{K#!KB z4kjtm9l8QrX7G6)gqX{KA=cVk>Z&KXY+5kN6{j{|41#b*ELkQk?M(@PY@&NOht%%j z)^W*zhxMettm7NeQ^okgSa7?XDd&?wxd0|fk`P&9okK3 zi}xYC5L5JKIFWz5LkqJ3D|J%P=RXVdZTOSxQ?dR#$5bp*BPeE{I{!*3V`ALV!t;!m z=zz~dw*{%ABzxy_6JFRb+(X64oUgok-XttFod?Q~Oo!Y3;QR@DqvevgFd+)D5 z2+ux`0F!)U4=@ynHowAPf&oX?fno(I>M+bb%M5=_21E~HDy8vSUuU+|pTc~kFnyV+ zy(RZbtO==$jwYPn3fB??ct~+nJHRnM83Ca3gWZA@c&;v|8gme1;DSUEtXLnYdSp)+ zXM{Dhsl||zVTdqJ+`nUqISk0J=$a6C_IONNXgh6I>Z%JDgGZ^pE9I$gApX!+w{h(H zfP>eqh{iia-^d;t$|U(;b_w>*vyE-*)Z=T8WiMc*m1Qe}{z%EO(qVrC$)&&NrZrj1Euz^$Q^Q&0?$+ClE6J*y$25$F)og zv6qh3Yd*L>E@S^bt2X!-MdHfzti9L6GU>O8AQpPayqCUCdqb+md)l~JZjc&x? zoVM9w5+H`6f5ZK7GEYO74nZS^-pOs(h&?@+tzA)xfjS!}!RbS2{SB6a7VS|M@w;sb zl)mUJr-G(WRKM1PX!BUrJnoY3+qn&=L>*7&y2sHmXWutj*ZXdM~4nf6;f zme>ScnPQ${>rp@JKZpj_!$<{cW+RUxyzqEb1fJ>?C!PFkyCp0#cSB%Sr1vU4GbQVS zx7em?TI^w4qi98JC+ekX?bERM0-8L^i+eN;^on^j9)jyQ&Jw~zfb2foG|$`-Zdc5C-7%n)KBok-ay`Qg|fN$4Ve9P zmas}kwo*L()P=Ye{ZG=)a0IK-c=~iqo1Zv(38?Mg6F>^kkLZmPm9W4kXxTXG&&8q{ z;XAeh*^*^euony)!_Fn@xx3PLc3rW=M9q@NUDt8cdFb|=kOS#l*_;mp zNf5Kp6Sppw872x;D#Q(dv8lN9)N|k$43+BWuWcJ=QQ3AYqIm7GE0Hb{{v{Wj0w~5pbZX=zHI%wD|)whe@ zgx=QTd8sQC0y3yGqt~hadu^3S(CIU5S|LP|klz9Dhxe8G1)=A=z`!;Z3|qf7yLH&i z%uZ&9!1Uh1=(B?>+$?2_%t}*jCHsy-mR~9eaUuO6Uf>G66F!4G{eS^Ro$R^xXp5mY zV?wl@mw3_pbq(3Ra1=NJT31*Zb$r0GjL>|21!J=~q<9^9!!Darh9#DE=W_zuD?P*7 z<*?LAbgWEe$W5t@vt6du>SV1c`rW&wg+^#9Joxj(B%Y++-NLw$a=zh`Jo%{(Ua-VA%B1H5@duM^*eJ>bh$gP^d)rRzY3_I zG?87S2;*O&_zNv=4|xwo7{HyxK~4wrlBe;Q$-vyka?3@CKjvA3^=7mWRr{n;kcQ3Q zIxV4(-#lf0*6s2BRvpQVM=WGerhuuc&FKx&?OLXL16QlR1hzobyA=nGp}IXw}J3wEsVJ#1bD-kXr;4UNiW ztVbJ%k`S=?Utc!CenBc{brQ)M#v$U!PY0ShC@=%|�#FMQ=|_>GKkYf0j`2r*Fi4d5 zcCIOp{kXY~J(8)6HuJO$_A5H5dqP0L2rWqLmLt441(j#?J3;SN``X3QLc{se(!=xC z(?VrCKyxj%X=xJNXm8J|Bz7o8JulhoHM^mCGQkv||s5$^XeJSHJA+CBWFo z#t@sZQaOLt2M2l^?g;2XI6L@BiQastg?d}aO9qL!cDpNg*C}5WFqBRCP-T3>)2hW- zya~!@*#k?fydcq{r`#igQ+scFIry9HQvJ#fS}y?sjZj0SBh^~{BRdZEgP#>!ZoIg$ z3t5uQ7GOEtaQdYB?OnJ7@PpqU)Q;gFqNLRh@2;Swx2u+b=+q5HExz5@;@L7n;7c_4 zL%~G;I2_51#yO+sEAp-N3vBe=?R99W$3ON_L9-9=yr0pj&=@G%G^jE<$vxE>N=0OM z$-SNlm4e;ac_O#f@Re;e180oPz63nX>jWC$9eWvVDtq8hO6UY%}90FE*z)ss-VU;{z#e#j(a1P`AQ7;RiDdsb20az88BQ=F>XV?R;Cc~C$OAb``>h1`BVaR#W3}8fq~oq0 z+7H#yjOv^8)nCEM0{m%EG(DaLz3$DTKk5^LZa3NWLegGe0)h*TWzS2{nGr##WlpSK zm%5A6@FgG)Vo`*(9;E!$@unr=q&@qZfWEXU3Vs{9QUt7nMTN+PECK7Fy~gjCuIGZI zY^Bhr8R)of^&aK^M=hiT^X1ASMR((%IG}vLZdLsNnlfIqXa8GfY)RN9A1~VT^Ltz|tik6^Bpyt;!Hx(K9}vIOHCuP^)m@ zbG!U^f2uxZ+Hd`{k~QZXK=Hds?$_=eO#;qwb;>rbT+ok|i$7I21#qTp?LXtipT3)M z*er%lFLi`Z9xYXXdAshZ5*^8o*TB@vg*=k@ZH4^VDv zUMoOp)QKqm=U5BW)1v#igpg#2Nz9;*K^bzIJNc+e`!E=pPTtbul`NACFzMqlNXb#4 z=uYhJ7Krc`Ll2Z)fX$CAzzWt%0ur(Li*7rk1a*>Kwz_03DPu8cu~qlFL;bRUQi^Kk zuB6zDMGRTQ`uQmML38@8pXcxzlz=`rLL|(1-Qea(HqEE&_?l~CUYG%jJnqWzk@+Vm z@Oy1J;vmVwldk$hO$-ls@j`?gCD?2diqQ7-fOkthDhhAtRqk|4A!BZTPNv>ok_yTA zmGzP5`FFSOnuJ~!>b1FU;T*?G?fQYVKDnW-aZlHbLCK<&wAgbi$pFh~-c_lG#asoo zxN&GHfm8rRd=Vrc&$>gXBi_(+=4s2aMNfylY>~wM9oMk=JZn!=LRD;frxOKloFm>P zF-Ic@Owz@>0l0_Q90h#>9H-k~Ok-y}RE&ih*(w~!X$qbY0xga}ykaiyPE!yJA+p8P-EpXn?h6UPWHOo0~UL6ruAu}g?E%ukJ z62pNFFQ0dXvufXPed>=Bti_1+Sl1V@s(fggmR*0$L>*%BD7fs@nD&WJHKD@zpl$C0 zCe&NqE+OsVcftR`%gEJ-V}Xlp)|jem;f{~1hRveQ&kyqY{3Yg72tb)QmBAYSgjEb> zer=_6B=-xiX)R+f6V<17-D2{uwR)00bDMUKPZd88%9(yserFJ$(NB}M18x>M)>fx0 zdLMd|R`RgnSt3u3fB(7>ljbjq1&4J0!=Tks!Mcb@-!QI}oKPMD{NgwSbLN&Hm(1t6Zh|Wm5X57X>t%FBCHP!vH&p5}Z9vB24UTq2_5?mw=1Obyh&>6zyS- z+=8wG0+i^S2ct-SCL}epK6nPoGU&C^CEU+`nDfkNO|&Zeb%S$!K4(V9@1!cBw4vXl z>$jh;I06_^Up#o?Tx&V0!d_P0=HCQnS(nvirKf99-_YA>lAG&fTZRkPd)|fLU zmbv9QYCo5z?-b^~KU7ML1)`m7zlst*5J6jr0{h~SNk7v7le88gFXSGptzI)_e4xe2 z7jW+;o@W?!?%r`FWR6Il9KQwRz{{@E0%*7=71egXscB!l3xUE;qrig;&c?HzPt}3T z@MU(AOFeE&Db6r)t?$?vHPPWXqWR8lq67F(3xM{uhk)quLfBH2bB-QOls2#H#qqeK zdvEQytPJ<&%zYzh^j=%ogPdwd*k0<;HDRiUza3tSO~|vs?tynn$uN~R<|o#T6lk{y z&23I%iA%xEr;jjeneu};_Gb(JUXN=V0HpX_*qmVIXD5kw+e1KaJcv!Icm8u|*j~kv zDH0FEZP6;>vciu8-ZtUy?c9`YCWY(0{$9^#%k>2eTaMUz;=@q_>Ptn{p@h5NNds5vuY|K4?OJi0RSj+h1>W?`+ciP=EaKEgij$<~ra_asX)XV<$B| zj`9U0FFi9vPgo$)CG?ADT`e+3?J?6mulNvtqK`O_R6oxG_i9)Z@%j1pj<<7zt@7^vo$5w+6#-d`NyVKUrsDOB4pWaGgFwztb6%^kx&`7X4tw6vc#s*ZSpw?fna7qLVq3~y2m zYVe5Y-vvIGNFvUK#B_Uk4WeMW)2q-)Ymz_WKKoz&5%cB_k;x4^#N6e970K!w=5WuR zH^)w|8q?x=$1+vsMW^SLnv}li%9<8+--9n`gvTF&*Q-7GoX?nfXm%@v+tcGe(WeUZ zf!_F@RUWVrnKh>IdR$$`GhST{rrX2FvV&+rMa-j0``6?B#S7q>t!(LBnC5zjDZ01B zMIv?qwPC6;jn;BTx!ROy_xm~wtQ2kIy+ZEq@q3awezU7h2_KdGyBrlwmMH5uu4r>2$)-HqXA>$Ezo$jAMo=*C;4lX`X)^fdsA| z4LdIAgxphnj8OP`B%D$x@qoYaO)d=fC;9x$(++&okke4&A?q`HkRSi5mR`l{t)l%; z%AmKgXOBeID>dHr8c^Zy&+VPF%_yR z@r#*q8mHEGPeyN1BtsxnGv4CpERJ2+SS!ye_`5!IMLrWAbCx3~dLlky>>T3EoF6NB z*uC|inEKB*^GDLjr{$TWQwX67uaJ+`JAIGls7$OgW_FP-bE+~9kWSAI?k>(e6z;n- zV5+BdZj50gUTGoWa`fLB4gy7Wh@f*0#Rc6{DhlVsHP@uZ8jmWM4I~YGT*e`j-%$83 z@aqoT1J(wchXX;R;yH}i<+Z4JYO8{caNtw(`LJ~XDOB5PeK9gEu%(CRjlo@c30W4v z-+QNx=Jm}bTLmsuZo9F163awBYR295H@K++IkcYNR$;Tx z>l{47PM?MAxHMJ9j5nS}c;IU)EQg20*cF(!zNWg z?qHa^34!xHE!tU*-x6evf`*=2UGvM-3%K>;D<-_(n)uD+?oE?3vlq;_)#-gWR#Dad rZEj$XgffY=193HwVQZ^^S;=^wpn;sp^Hjq_QbN`|eD@!Fxt#qkydyqf literal 0 HcmV?d00001 diff --git a/src/images/category/demo_store_c1003.jpeg b/src/images/category/demo_store_c1003.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5ab91aa454f75072fddb79a27aeb77bac241ba73 GIT binary patch literal 12662 zcmbVycUV(R)MpSBrT1Q>i!|v)Br4K{2uK&AAksmkLr9d~5fD%mkS-0hx(2!ciYovB1^ENG zTmWbTDE_Nl`H#zgf3N%xp`@gu{8z4A`S%aizjB50>QyQ#@|TM0-$DL!2=Y@`s3^(3 z{-5Qt1HgP8@D-3nNg)il!c0NQOmW!*5G2p@>VF>_@Sj3K9{uVy>gzXXXvrNAOn@sC zNw2E$qvt@Gh<3y2!)YPIj{itf->nn}{1U9GqO- zJYwP!wXDXXZescUFI($Uq^H!w7RYGG+*ZDZ^7()pE(tDC!@e?VYRa7bumRCG*i zTzo=$#)r(T?2n&v3X6(MO3S{LSJc%vAR3##|7h;&?&YxZ|~raj!*vJPYHj|{?&^DK>43bMnT?&f93zsiFicv0zmQx;N=&JR=>Nd3zhE-qsd4Gip}Vim%dg2!YlQdw~Q=tKKnoBR`MT;D(i$X4-mD3D8p% z#PqgHqzrMulSdLW8lxZ6>9e=*{n=c=5ZH53O!6y0C4dQs^)%%sxSVX$4W@V)q`hvW-X@>{EFrp2S3=C z+PZqhD!Too9o00;e|rW6aKNq!0;sq7Gh*r2`?Jyf zI9bmkhT$vEMrops8>yr@H_ZY!@rRCP>7^C2r8LOanFe4*uB!cn@&~!1T^`G-3Wa{7 z>F3k6mjLLe%BM`BR=7)m^Ey4)@O#Sf(Y0 z<_RLKdh+A7q)=K+kO$L;nl|kD(WN-O7@|?RYJRobpxeD-*7>DHCx4t;YjRQgvjI4- zWT2&eEzRQOX1Y?eg@n_e$%I?*(T54QzFzsSt-zDQ7_#pffc7;h%=!vbKsN0{?l)eP zkZvvoAFMo$__=e$3#M3F>>4b2_S?6Uxh|#ep$a?QaYI~LP~I^Iw=(W|`>{d`?=5PE zV(&leyQx2s|EzEkC_9l%O7lvoJi$J?IN8s_ndjp5Wjfy;ecG{jX$d&}DYXt}y99Kq z!Cd%5*Y`CnBUPg|U1To-a|s+;p@7d_0N_%UJ=@ZO-_H-9n}dLPj0}tJ8jw*VenYk~HF zX$D$?(>%GkkmEmyv;7YSv9#C9>>Z8dQ4Z$xGmc#BEu#64^rkE@`I4MB4JuI#t z9Su8)>6$pWY;JY0%fdhB(1jTjl}6%-prRVoUp8_iSm^shO{N1|ZT0zD@+=$d&W zyaBdpZ=rZ6d)Hs{!TJiDT{m@{<|Ff=2=p?io72>ulZYfu3pfARsPsDn3R8CIKT}F@ zRo(hjlSxl$|KaNf@-}WLUu&D*{DWSeXu)T%8g4yF2r@D+W&5DK!)B^u`qfm24e-CU z+_QhLBm!R3+$#KdmCf|Npd=K{9EoM^t^en$*YhmPF+Szw6PNr-nUGW>Yqlj%O^5M= z%*aGge9mZrR0nsW$rnn3aeiMLEq)azEx>${OZ2F*w}tP+;kiAmb}dx8=enQ2Efjr; z00tfvzYXn^+BhVLG4@z%daN-f^XODD&v&i?IbBuWEcA+>gNjICBRMY8j&gE!Gw?h3R5t$KTqyeY$u5Vn;X}H3YgdI zeMdX8q3y+L*d;GLdd$>mk?@|?&D+k+eXP*6W<7T&d+ zd@*yf1ij`lcGVfel^inxAr!XMA`!C@qeY_>0S*q%`QkLCcxC9XGh3%=9hX~uzi^4Z*$1*g1T zC^83V^eeSyKKYtg-BH0{Gsl#$!R$~};jWTnk{eRKGSY~*oq z$~p?;T4@sO8{>kwUKD5v4P%TA|2Dv`2iF~U=kbj@=c2le&P6_Z#7DVMjs&IX&~?9g zl%{)!(uHRx{DXRW3#&I?Z~GFE0$fG#WM$O2kdb;ZGi7qnExaSGC=gPE(uyp?mZx-bUII|nhQSqe1}*Y$5cR-%GES8uoGPFlNM4B1 zS9cZLl0<^Ca<0hJDcP)}z9UJ+%~7fW!)Apa-I5|X#6|L(KoL9v0hL1+n!)HtV+DkT z&ias-zaFt}pAn@&_Y}SU{%RMv$b-3ocnGI>!HW{;mEbaKG7K2Ou6Uqwn2_HQA%)Y@ zdtQjSYV#4G+xtNm_C>!c-l>tM^G6jmO6g5Dmw;x;PV73!!y7HwkO*NF>zESapJxe=phMB?={#{ zb~hXUY^nC(Nov>4FR?*CJms`fL}L5dd|PVw*k+I9&#hsd#{P`SW`sn{>LlWj&RvTU zN0lX5xALx9wYO&XOzm7VizM;=2Db-qvhH6F%k-cJ{8@R4ECXvv$Z{C=i5wdIkWf|z z!h+Xg6J<0_*Vqs<4VQpKbYNonLZTqcU!V)^b8+;jOe?Rftp(ltk@E+Ned%H_B`EMB zza0p9jJt-cAiy3pwqpld?Lf58mUgcy%Q!Ccx;ljocIaB9yG8X6Q%iCs2^2GGi*!5B zRfU%1OmCF5Eq(}v%bpX@a@B48y{I z5JVrBJh?(>>C?KIy?<8v<4vvTt=?4qf&{g%G0GH<30xBoqp!5X(n+VCO<-(Vu(lnJ z@g2fmULg1n?1o3S2K%2z3K!?Oa}e+Mn<=4IGcZn=OHJwuBggR*9I%^_xxdV=XxO*h z?TI+j?FzuAID2pJNcXFxSg{Tlb0C`>xqYw0pEvLMBg3k%iY?d2PWm`GyVRcLqi1_e&zdd0ly99ptB`N;85;d7 zSo$!8osV)W7x*eOZ`6Ns==5YJzb;3jci#gKy+|do5Vr8;sOLD%Ug5@Rxhg&z;(di3 z`3G-CWg3j6;TsR*!5v1gMY)PrxENd?q`(fx4ltA&>KxS=d4mo4yGJT2+lsA@RM`z)1~33f8so z`FGI_l#4L?_#Zbw*3N?6Khp<=4yuA8?$<=p0q?@GC*yL*zwS5LGelFHX{dIPjmfruK6)=yuY1YL;zzwgi0%Qchk-<%Sa=nC zo>H2&LMBy&E=A2|B)8@f_aUEjo=@{T&w={=i{IiRqP29EA zwK4)f&V=8o$I{7kqVPMGqpWmp2bH96w;R?H=M-g&wHwQvuuu>Gvc7u>h*`l}*h`ra znpVRlNNo80wG|#hkxgPJ+A2|*-^vK(pQ~_eZXmsy?y*%DX&xhy<%(IN?|>Lm%JaU% zA<vJQ zkis4m5IM_Y%OuD!l4b>0u^kxOY#O>R}Z1W=K1 zFPCLLKlR}!>f)NBAlf0{Rw|8xt`63tyiQ`x?!WL8mGc#j2E++BI$sw{vN{A3S=RAp z<3Q(JK}=aJr^Re5Xg%D#H%q&3SpxUCaLZnCZrk#8X^x$sG)Et1b3N5Ble3DpmQUJ( z>$yDpKMk8B*)0L}i0avFr}PRudzp^1Xxl<{V-PZDADXr8gcmU)gq1DZZpVlCy70Fp z846AL8!N~$y44OnshVPsbxSue8WqwwAg?D zdHuJKvJ>3ZLH?f^e;F%uP_Bul9W0jy#5Tmp@O%?kCc~3Py<{Uy0 zW~@7GNnoYN7Frt~E*C{K%MN`!;g0??n=N2*(U7&~Z}awIY1(tAi$%MR`{NCe)G0eM zsX<0nA6w*}QyN*?U8D7>z;(*4i9TfQ{Jdq3&DPE>y#ixh%#55*rC5L3r*PG>X%0=wT=?o%yOAT~AZ@r^O#)@}A~y|+|vUw2>%H%fxzl@L2HT9P_8 zr48HPn^O~^X;C&@yz9X8{akFRwOYb5UiY_4g3jMp3D)>QzVf5*-tq&2%`0{Joiemx9D|lfTzL4B1X{CJW`3Z6a3- z1SuPwFUpZF`Rs&*^X_&oY*0e0d5NnkRC;#Z14P$>LPwd~i&x`n4lwdwIl86|ob-#s0#-@Kq@{Pe&b*i*Lk$~cP&@6)2!n?TO`<} zj~M>>)!(bq0{q{PF9E#SaQI7P^D;bCHs|7%)IE4=*HriDyb;EJZzj9UvgOm!g0yEN zO6ppE8CoLK%f*AHn@(z*?>^Oi6VTAL5Q%hyZ+dBWeC{O_W(B%zkC~obNSR>J$Afvt zL-N)OJ;}(P4*LmNr|CkE)%eb5$1ef(v(Zo{I|6D9Oc<{E-MkeGQS+8V z_|Uo8ez2{H^u`Ji^Y)q1|r=R$IN;gk=9r@?J1AS+T_ib)#koZsn<(YS$?jy zQJaAnznGLdd1hiKUCs8-QTdIg>&QUUOk|6!02@$03=B+}Qk%Wf=n5!|1UMifW}_1v8Q( z{oXvWnO{drODtVO;yJ%C=F|HYYC2bQ6DlG`C`i|UtA$9cl~)*vM%@P|rGw3T#~Fci z0Y$f~Pwhk5f6x9CgR4pKEw;kn4GXPP8l|Gc^Hp9;RS zbPbePyU-;p-LG1qhE9Pgk5h(+(&{c#+)gic9x?Hc4%KG4ah3m6K2td{6Y)T#5V1(`y&T z*QNDr;|jcg)8XK5ydq?bo=-)i{)<%@xM+EHNuqt*0j~`IxL#}e)K^)(uuY{ou-WQ& z`}&_<63xAHC`5qJeJ)KJ6};Mhm8eR1w+h$p(vqGbDMJ3`y?RnP=YqQ(2%Q*XFHInQ z_179Nwuij-TC?{NQ~O@r7S9_Rnv$8Ar3TN*wn+8)qLs*g?n%g4hZeZGd?SGRIcCwY zq*jA9{#QH8hx>x)!1s2GV7H@Q)SUhN7`N30=97?g`7Z!0O2)}1!wQRx70O)N97oxU z4Qs&yMcv>ehdGw!4cM5*86{rg0uJ#zXD5xf(-JmUOFRfCpX~H;u`xWbdNg5JyT!Gy zpiKV~&^5v=7V}t8HY^xSC2789dln?0B-+Vr_y|e*JGxz|DB?)+tOi=$5N}y4<5UP9AiP4u7=C8B@u;)_BLbx0 z;%=Nh&ApxJye)qB($at0c|7gy@^D>#*thH$?6Y@qZa`GN_@>3|D#!}u3Wgs-l-K$B z@xv~G{-a^{KVjzmJk+S#;C~7rcg`pD6FSlmpV7)*F3+$6`A*+F+F4OIu^VT)pDV^N ziA#n)8=j)^Du$6r>RM!FUx-k z^axdj@QJmREyKWJI+5TBh~&2c{4PftFh*&9q}gAE^vl{3}yx*6;`^mgXiSrS)bcgv0YAGE53^Y#uZGRT*=4f5)Iz-woez_z*y8m+V*k=K`mLCI^ zhFqWag6LiC!4kk`U_RSKqgw&Ag9}D6m?OKFDWIh^KQ?na73^SQg>cz(RH*CXr2#7gV^&DtNWii_xv z4{1NpAN7JClNnD_p!Yoy{Hu$6j=)FlIB*aB%V3EvTONo0t4r(8x`n}uZ-)p8s2f2o z>^DCZnb1aPX_F6wAo7F$P|03w&{`9b)ej@s#Tbn~?C{}_Yrpn8Pi|bf&72%4FcbNy zEkKs7goqiG&`=B>*QBY|db%KM%OaLR-l9cV^QpM7cCkuU^>2iNv_#1oQIsJ~1 z2HeF9>o`()^*jeK=%2kismUHyRL98sB`Xh_oav}KpEjbIMzT~${9_(lIq=8n`5`Gs(> zJ}BKq9ONptzRQX;t1+Kj>lUo{Im+9#<^;*GApTW)vwu1M;6U2>B}uMM&a@Xs1*Fpw zvHgu-mcmAFtg-gUcUGdMw8TT;X4c?g>ciYR7us}{q@*{%2}%+JFV?vx4)!WPDwK#a zbpWmTB+SxNnSYai++_P`*;8f@GY4A{M!u6nv*I6)LtM(1gQr&8YrKC+(&I~3E92Y8 zstBR0E+LIn2Mh0gQ|>@5_swY~n`COvMA8u#B@RM-&y!S;RbwA|aepOinSd%FKq7IWGH*mBjEm<-qv*zu01|~3$&N=tWs9v-?{mt10 zzLG-5w)0(l)#6?u24P8vZxFfq*=K|r&_9SKdt(-(yWhO3zZ#|CLqr>Yq@y;SzF$*S zS+HjEwPFu?p;K}wz`h2&;SQC^k>PzD{c`$Go9=?~B>X@krB~KD=K-7EXj+!C+0pG! z{1LJS($q@(+8tWL0y2(blteHw%^iKtxaS+_>I=_U22qOs*n| z_dQm-`TKU~+C+LXAa*5!qw{b03-SloJk?TeoIW7Ja1thyCo|Zkk_h8wdY)7#zcQTKxwIw9;0x_K}*4Wt8TyNF}_s$Cc+swbqo?X@W zBv-P^?pscNLu&ogzqYUO4r8BlhsMxhPt#4bMw>>8FA~VEIh2A-;|T=c?bMQ*lq24# zB50uT{RV{SwW}HC%3u7xpLf*dBhr{ykfvRtp093jLbG)-=9DYu&ACwpV2xb_tj)KKKFv?jq{ zMVOu=q6r~-J(bt`HxDdUrqu?McnM(IZfBj??+Jyb%WkE+N*5&g_H8&&%l5oge0MQr zOZthVY5>g#;h$fm2LP!QJdjlF0>2%Ya9U++i>?m0aVBuFOa!WlYWAP6Ir`oR-p?g> z%45NkHv<=%E~w8E&*2+FH)2-vi?Z4$Lg2C;0N(yxS7Umt(QKTI*9&k zHT9cbl4;w${sKy5evA4mA@JNL(IVkDn!6~+UN;CE81J$n(l8cK0q*B>O)&TQbmduu zwNv#PF$>mdU4?vgVTG^5$;O_GK_swpT|i2r{G=C2(8ChUpf#z)$mY@Pac2hMN}S)I zvE4uLD!j9=eJz(Nit|G)@f7zM$=CW|Z7u-J2`1{IT5leSKJn1lb<1OKNrIU((2b^k&{tjY@ln>BJKtJoyDtH3i*tisVu%xz)t!NCm7uK2 zkJVK!$x-h|S+CHvdROdpL~v73G3Wd(wlS$Lq85Fb_wiR7Yj>%uttJb%`rvxdnz8um zf^tqw7H~WRuXj-f1&|idmw!NltpJf7igY`S5Tmn zw_%mq@TW;_xu;&UehDDmI45ta4WaFviVWsjEOpr4{9eW=0fkz7+vAR$lz-6tTQSPn zVfri2CgdRH&@n$@Yik`})|)At((rDD5A@*I!4<=%&8;(s2u2Eze42wlOSY%IJU(w* z4QSCjX9Azfm&d}(ge>*v3z$vfl9(i!lYiJpU06|LU)l9?4ZZIj)XtO$7#=xH|55R$EQ_GGhR+s@<#i9ZI(?h2k#nDN3Hc1ro6u1hP5Vu| z;C@>iXAiw1W~PJei2f?!@2e>!D4N#ikh7%Sx?H$AW6mcrw+>!4FKN~xS`($THT8k{ zGLjn!&WU0U+!QW*;mC&`CsTMfY*Uv{+zLy;lH59bb$Qt8l4>UlNHg?WsgnJxzF%Q+ zULrGQ4v*u@iqn@`#q`r;<`r6w!8MM-aT96LhP0^b>xCFmx?o*=f#Fc z;6VYWb5*go*3eJ=T>W$=f-*p#rp+2W51m`KojtY#b4Z=A)i1zCjx^kH2M_4&AGa~0 zv><)31O3ATtK66Nj>`&-lLLBm^&*~*4BDcfs5hPiO?Lm5lKrXI&=Emimm0PJIesEh{~L2~8#Lp@QPRyA;&ckgdzO&&-lG|8(y^1M^C{oG&Bka#z)-1)?> z>d~9>@)rxg676ga3|H{``$s_4k@e`97Z%TRw;gaN?)bkBD?+Y?2{;qh)kDIq)4jHU zb6el z<|KaC&1DX^gf3U-$gUmcVSyCg5G9*@?Wis5n_nrFIN&g-r(QGeFzmkq;%tVd>} zgX$919zQp*e^9jgSxrvd3&IiBp>OD6PrwaZL|)Z%U*etCX}NX=4=5vHYwcrk5Q0t= z>yv=ist}Dl#gEMGSU%+@F@sYD*?_CLmw+b5&iMmj+~M9Z&KzWzXE0zf>)g{oW6sc}Tx0zgbxS~5I_a)EmHPX+7td;W!t=bE2{A#$aL zCq&6I=R;vu?@IG@e5T0~ zC@~ktz*QVqAx?M^uBL$pRVGs z8^E2I@g2L7UKv8qRvmIhe#0azDYEn4Zf4tr&-$@Yu!H`x$~(*_I!B$?+HwU05^r7K zB*+Dg%KW*qV3E7Y8XHEnu-1EfKfjlePVOK!UGj7`{m$c1{ zJkAhn8}0FCd880x_qHaZ>SU}Iqzv!z^3i0~qo*2zT3?>-A?ifyHLTQyegF(rr?#`ZO$vI2eGaMuw|p0jQ@n_|>j=YHwk zWY7uQdJ9|4w1xh_POS;1YMQJtL5w|cscVxE1C*9TuwI|-wd^%m?ASNk{t##H=6gLX zi|!6KA?s}+vN9V9`YCe*5?7K7r-Dw%d2aGCI%`#<8REoMdDjDeaM(OyV>>jP(d>;6 z1V^;re%094)LfUle;^#4&W(BBhpQEo@)n4tx{x||B#hz8)(-b;$>umqU_ZZ4RK%9W zD<38-(`y8#`4td6I(ec_1Dg@iZ85Q!WCkI=M~Oy>Mn3BNsaBPi0e^p4QcVADZ7`<`$C-ad(0(55e1B26!hi zC^BcQm#^QM+$_JA1NGRdpZ{ymGu~_2IU6G$*-&_Z93H>WnQE25McTJVjCBiALKSy| zPU-q+tu?6w+(p$jxy8_5^CC5IlSm8TOU5}M{>ubnlW>Yd_Cf_Ovb8uNKaJfBEb}B&T#lxg4&Y7RM-yTflOGGMy)wxn|jcFt%wqp=-7jqad z$PL%@xdhxujcf(KZWfz|N$WHDmjQbAMVTrS1McOl_jWKI)s{V|*lxPXBr9|9!eA9fV0$A(bp3WWNSTazfX8%^i$T=a>Jj|B z`ZE|;WiL6C86n@;MAO=YGZlfgX;dZ~rNQs9G%aap7qBjJQ2Kz3I=aM^e=wG-)d33zcBA0H0GqGasW91yQ<)_fS33`*=o1avpz8mL?Z zLn*gKq%BdMFmp~rnuP&;yfrtEsom?+a%ToDWdtu6|MPT$!{ zZBdjY5xB3`9fHp)NYHw;jL_ZHEDtXUm(F?w*Zz9|_ulYgWg)4J(S-K5RBhSZh z@8_zx-qTe6^-3|kvvXrlugui;&OoPT`6DYPKGF_EUtQow&B>RGI@sz8Xl?ehKUsJ-a-@9wc&=!ERyFVp!;vvTs-12yQZ=a`c_;JImiv~;2jzyMCaoiEt zTL5LcqC+Ak^#);V4UhC&1I7t(%o4dV9?}oBqOZJMZUO~E9BOfIqtiRBezkX)CaC@aU zFVq4F*g-AxOw00+BpvBlm2>wDos9z3h8`FFLa(em%Tyoe9J=sbx04YaacLZvG2>#Zf18t>SJ4K#ZvUvSkOGc-T^&b!Adsv1+fL2t-(jqb;vu{!Tv^uU3vFrj93pdxZ1wTle5_5<;djR; z8;kGyxqBhwueFu$o4vNRcZ$Uf(SxniVShejPAYSuO$0*UIQq`g>v}IHM;|vJTrH3AtC+-F7n%zjiZP#B?br+vRs$ zQa^=>LN3~~;dAnG+$F%^Fd|g6otvPJE$a3ga>?&rp;w}3a2vD9nbNC!_vPa8OOldR zSkb)f=MuN(H^7fM;ZYn?H@R4@JL*R=I@JS{+0yH3xAoR^GuccZ|Ch?Or!@_`GKR}` zM!R-lEjI7_WymkJlG&9z56n9&8=i<~Oyqw=B9KIuO1#ZQW$WGWVnWl}R&3PNK^C=_ z`r|-96N+#+ZOi%`&mza>PeO|DgK^&?q+n!38Pn#*VPf0as%O9s<>4$o%T&>-L<7C zuT($*B|#VpUf01%yo2a`BN+8V`A|eb4E(k^N5R?{i(B2cMq9bV4cC`Xdc#E@7cpov z`8k-Ei)V+mg39bnIxe<_>40Z5qy{8{oCA-=D_>MAwInjeuh2Fac#F|_9m1=G6|L|3 z{jyV`%G%HK^AdI01&^)tfeA_;Yr2RqzYwe)J`o3w5DGC`*cQ0i0A|_7MwqbMIx7P1 zZ7R*^wu|}YJayL#ILq%+;$euJJS2@Yn%Uiq+6==2yV|G?5VcJUo7ybwrV&g|+h9}$ ztg~Q+SLa~r+%{Oovp!WRn7jD<#|*LEf>EEa)e z4{qw=lzj0u7~CED?CdlyVDMRTnypP2T)OIw7Un&*=(`N?GMLCLMYC`fy#Vu@UrUDnEb|VH)^?7+?ok8OP0&dU#&r=t6?nk tC!8MH$Hl2syc?%57#t37f#v^&zB>7B+%i28i2QTPSeS6zWa@JMzX2BhGt&S7 literal 0 HcmV?d00001 diff --git a/src/images/category/demo_store_c1004.jpeg b/src/images/category/demo_store_c1004.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..16e75453abc3225654388557d938024c5c1c1af2 GIT binary patch literal 12860 zcmbXIbzD?m^gfCY(jg^XBaOn)or(eiQcBmTNRGn@NXY;K(lG+k2vXABE!`kp5;K(a z3^~96m-qMg`Q7^K-n-7(=XK8O?6c2)cC7WRwfF7Z?J9s;OI=ePfOii7z`HvDw~K&h z0KEUJ-1}dT|6T9>{{&MCZ=ZQHt%ii>>V7P+&;N`czSt%4*D7#5*ijB z5f}eGAu%aAB{e%IH}6+|L19r2Fzb98)idUlSzxcmMCtSFdU=$;Lvjnq*N1G^xCyqv9tpPm z-MgLVjyI<{utivJU(6xTVi$g;wXO1QQn(y$W#iA2m*rVEMUbRBycl_56Q{1L=i3qs z7HFs^J`GjZ8gTy%+Ft=TuX|@MfCdNU{lWgLenV=$5J`xTTkpT$)H|M!##+rxOz;wd z@c#tOv@7B`G3R>IC2!=dt05opoul8Ua6j1N9*%bD=i!h6;0ucjZo6TWXEo40hv5ry zhb1T1EIMkX`oW2+MOwdn7~bHWjQW_2BVB65K24ho|J%+Rt3H4&Q3qPfEUsAn|#+;+@3XKz3`Yqt`Bf#(V z^;3SPfdfa#Kgyrk5dwh!N%-X5e!Sy~yt!j#UZDo{6DQ5~FE*PS{u)X~(MlQVo24Xw zp?}J+^jI54?U3XV?n_jfuLp#l+n{Gp=Bav zk^?-63PbmGXQVQq%A2(2kDf!18VJ7W$A0T0)MfJX#C^mHVycmdE(8bmxYNY}Oy>-j z$Qmj3?*y*y%fraAhdmyDR{yHm^G;P;um*n};_4hF2oW#Ru8KIuBw(g^$3k<9R2Pcp z^UGHzF-IC8r{oCNmWS!SP@A1r*jY6CI|mn-a^5MiswG~M+>$Kf})?xd+M63Mo;bZ{hnjF*G9l=@s6pR zu}CV0Z3Y);N(tPGC;^(cFkDhL-)IpeQT2(E^J!xUIT=a?x)PC^*~Qvw4)O8vRX>vD z8b6?c8TPPEJRatbQg~$VktoEm&k}_ffvING750|gHPMuwiLAb8zT9q)?J}>`O4fMw zD|IeZA6t%I?7aM1T!yVW?34dP#ntf;p@zO{qZ(o_F>8o@de!zm-xE;qPXS1E^XE+3 z2BL;J1E1zvY>^WO0>k8xE>*~YO!9$4hVQFci-3ZR!`Pf@&F`G|)v%1$pVptT2B!>b?S!7e;)4(6ZDUTa>!`$|sDhxStEp1)xWCY|kcC(S?Z4Q|&g`ogrOjT;+fwCzTXRWT9|zQ4a; zYoXxP@o?2o_iozdtc}eTciaMq;9_VCq;V@o{kT`A$uL8?9t+K~giMYp=eQL%DJNEv=yF`rhJgajtl)g#6bNx!_v)>P@?mPY2g+8zV-?xI?P}E|eQT2GBHK>xH?We+xKiAe%-vqz&dcDHi7YDBJqG@8^}w{#YtQJR^VP zBRj3V3%f`0N4R+ETP&Lbl0x1U;v{It^J{0ef;iSVuIQwhf!KDs=pMf-(}HLd^GH5UQBApR;hX~9gWi< zll!{!x^px;zWSrVxw}cbMD&Ue#{nb$qjIO#nVIl|YpR2p2wd`AUEcb4SSl0T0ywisqpI8zf_dqhJS)ww6&^GbI^6>Hhpvnv z!0MI2-gxxUnC8@t05)QzOtR6vk=u&AQ~FJfy+I3Qht*OS5A}o4_p!j$QVn_)ob;ZoOjGV#XRY4y#G!Q8Rg+V38a6y(|uSp9@u{WRG~hoKmNya_MU zgw88Hs*|)laU0NA^Nt=j52~pG-DjnAI4^#v1hhMhQEscVZ~;RWG#REmwq1S-*L?BUn^w8r(J#(;$PigB$? zu=`8cbEIF8ko0*XnBmmd-mC$mUcDx#2z5k8%QJ77z8-+EmM~55gd4GNiY-XAR7?A@ zB%KA{0=`D}vV^1*LO!Rn2yrlapA3Am(zp`QuWO7$$v*S$rp~gF0K_nBe%p{Oc+k7d z(~<#E!D_mbe{V6%x|#4%lD;x{u^wv))dO+U_WmrAP~Yw6=c`Zfo=A1%J3CL(X$Prr zZ(d`0)>E&kicXcDbpokRp`KP4MA)g12uBB<=nhNL7e#H)U;kJ>F&M)V17oVP0r$BBt{6bB4T`= z*{zVYB1dI5h?%voTMtWHfWaLRbLcmG(5-0lPDa z@Sbx_S~1hUh%qU*SY#8AFeTQtmt8_#lRt&7 zzbe7VwByZt2b7(wItknC=0%%NOj@Fq&iwJ{fs%=exXxuBv~BHVSm`kxH?ve}(mI^= zO3ZIa0xpJ~U%dsec#(Hoi=q)>irgh#MOe@7<@*hZv)%F((LQX{?EP*+ABGDCxSHe{ zD56N|Zz83+R?QYbi^NS94n0G`Bpf=Co76c0iA%p%O}2o0uq#?Geq_v#Jh&EyBR+RW znRn(>F=T}N1%n_cDfG=ZQ1|P<%?FUQ8Q%BH>%0w|2A)LUZsPF*BCdl1s^GK2T}Hij zljpmxwd@zKnrBCjq2s)zC)SkqkvS1XtzV(^vkeAn^yi_;bOvewx=M9TaIhjU2QrS(sPB#9?ZWGqt{uJqs9eE3Jqo8uVuld{do&Bo zX3a}As~ZwW={>}T{|#C66~s~G%5V<*(9t+GDO3@H(v&RLqtPyDZJc;F?y-GopFlz+ z6S1@TC^Cf-(4i)Gf~~w{{F7OVisV#6{PXNL zHgj%qcxBpWL0GUmrfA4anHPP!R6Z}c{p*jE?CYTx^psX!+}lsylpFZsu`zlxZLZhJ zjNLZ^fiPyA;WX#8^9|vSCkw-m@};mucE>zZpql3!Jnwfao`TF0oD5wqAButNJ16M* z??v{e<)}t2BW}+_Emzm*mUt)We{IMAvX>saWG9C0;of3o&i>XnjW2d{NTAhY3!F;X z|7MVWm0A2?*kBv;PsmQ9^V>gGY#6iD1@IO?_-VSV#pvoejte~#oqrhL0j4TDuutS0 zmOfjk%el^>bEOqy=`MUoh$eZ6$xwMGIYzC65kb8)u5-CABG*oAZJRoLk&s+w_TB@y z4|u}FojT_~m(vA&;O{h|vDQ{!@Dv55>Rh3e%%t4TAWg)RYo9K4KIDzK{3kp2E`&MT z6!qr!V2B2=S)8<6P@~av{KgZUy>1vjmJae|_gK_NXl^Blh zx)%O4PbExI0=cC3vOS?r!^k$dEJM7k&ZJPpCtUlQf2>2x7zh^@cUf#bK!SSz8eR=P`x z$OEf({V5Opx{7;?x@)3;4a>>Oy=5zD>ujE7c_$%cS)>}x+_SHjs-Jm7=%cdx+^ojP-IiIVz-nB{!_6vX92gB#^~k~II>y!K^hFABS()(51nNv7X3%g_l8Qjq<)I zM}fq%#G#P*ePc|5<@d)i>GzoB97KmMNY6RNh!S7 zHGlBrM5W})fwQ(gWMNqr8MsUzNb(NvZ7_{$(a)QI0K7dyJ!`2eC2Sj*9mjx$pnTH8 z%F4@e{En1)ZWI|#mX?eB^Y-6>XUnu$#ppGz*2MPmiiQZU7AZv|kr0O8ozp!q9O3-<@UV*q}2DLZqGh`0sR z=O(Ss*Rfl-DCuo1o?)&_LjzFYugY{&H4rOE_v}m?a8@cUT+7Ts(?|Zvk>vo#CQWyo zV1>T!_!o(Y3j|8%IzI@cA)0Op4xlM(+?j zY7_>1ny>V%)@}iFetmsFSR=-|-n+=@d|$e@%!weg=I^knM5XgjVmYRNqGG?xC8ym% zf_+V}fKztL4R>~7i50xdKswj zY||}()J&yk|Ad}ZcS5=EIswNHLuQf>pad@zo1=|d=6Ex>jx-ZSw}=CC+Syd@xPG)b`=U9PQEQTWA{Jg=|JN*XMC-Id(_jv7@{7xIo8hF& zYPS4lO3?_iJ$jj?&PpDgmn+{|i*EtMPVvUaX@9w~zLO z4PJ?Lq6+e^H*y-Iwm|c{%aT|tv;@j8wdq726g)gzS#tKutU@!-jO2}`zT0`IZnyDD zm)=}CvMu7AWh*kn^kgns>)VobYw52PR)G)S@;7+`W(yU`a7kE~tLNBTz}c&5?g{sO z79hJ9%fiNr&ZN6SArvMVqVb_MH{v6vkOH26;VSz^`Sqm_T3wI*W;uhh5gUqJVco84 zqnwbsDyITtITpY%ntg53{`ihWM%2|2fjo`n#ksTUzLobhwo0w1wd|vBbHC~e~QM=Uu*q7rL2*{Nk zAWuh>3*7>0a0XcezQvaFI~@GcCI&h$EbJ_7NNLG^R5g!~j=EaLr^7jshx3s= z%LJ1@b;!`(3>T?9wXrQ}@zXJXod@I;PjQ0(R=!%xPMzr3-Dm8Pj$hDbD`xF;EvZ;~ z97k4c&tz-YKW2`-JS66aOKfTvFJ0aOz!G)zY`%*Q{u(RjmnzgtJDEg^MtN3$byUt6 zV_u4;*b32EE@;S+HLh*)E4N)kPO92P@9ag&4KS^1nE~7GVBuSgUG9V`8=Tt()NDG; zQU1=!DxVy@NnZ^g%_o2J_uK%oo;!h~Ic}&)$@LD5*lZQCs^D&?d;u&g2D-G{nxc9+?|Hs%y;^z!_l=)z({5jW zDg2I86UyBJg3{cZl`Jf=;489=HZpW?+(b{Y-=7RA^gw9$vVfr(JtDYfcP@2#aBg3y zJ_)1gBJeP;wW3Sh+zH4cRgUL{j|%O9Y%BU>9(04LPQWy9qiIRL0Qd0P9~#;FP9b7QqVa_K{fQi_I)4!8^F|2|?>4uXDrA3+x3rodkdX0bb^za3ydo|S* z7H$FMu#^oTQ0l%$r!qc9IVlsNSXKRTyb zFomC>)3Qbg&ScH4$Vfl9P#Z;}KXU2>sYcQkh@4dVjiV_VXt?Q-hT-@s{CorYr zQyVTPdFL#*oR>C}r=`Mc&)PEKw%?w|KcsahxX|NQ5|=CAdZjYI*y~>_6D6fWi8V2r zsL>}QnYw$1uH2X1%=anAM+qt;We0=g$+<9=tRG}@lg#+^0aARg5;Og-<#Og`BZP^qrEZR_wbFsB)Pr;KdIVG|y8({ z0k-PC5_)pyQSB%zpp6s%^w}%tcyB^js1aZOSXL;%=hP&UV^zF=XBSWT&P^h_7bsJ% zQ!DSwZw{25HYX7w10Oq!t!9wNpL=bz7H^8dlOH4IMy0q;HW83R=jiRMR*~gWqm+xT za=6-$7BH8W$DphQt;HxodT#;tu%MYcP2k_> zxK}2bR?tR?Q%V#Z<4|-ROuRgaXS85vx3#1ewjv)1WQMLLB^=Yu7HTsGMpHpwNk=i1 z;u4b5K675lX{G~%Rcy;?{N{)zW;@%cE%b=z^mr3yyRAH?_fG`H8dKtkR+sb|5eGl} zi4R-eY_=6+Ij?B3V`r3@n@H5y*U$M;ithQ?>`itFlu4)*QQ*q++0w6RTn#lf`r|!P zm9fd%JW;(8kHtC&{Z=t6UBEC8G4p50a{9iv`Hs)c9G2N9g=V!UYQo;J(vm>4xnw6q zMY8}*_~qsp$CJaDLa&M?fvE&n2BRsnZw0+fhyUE7VqBW#%H+08_k5X=j?)oc+8V^u z;9`$y^GowFs5@Vt zLLc|In2%n5_`IraT-99VLb&sSRDizk;nuIcBe59B8jK1qj}1Z*h3L^*`o<0T`ByFk zaI*(%JIk?#zRpNDnO`CFW4Z;rxAJWt&Oix-pwSFsYIsrSZPfmbKer6a>27 zl-iT1saQa;e=kzBGjx4BBUGO-D~$r!H5Ku|3I25Ls}-45Dglaa$gvO(ie_v8rmyct z4(o}5^jYIi+|YP&ZFMgI!w-}xddd)t4q`h`)~=o}d40YaU0`~btj%rF$i<9IxRw#< znXl{>kFPNr8)(PMHs6q0U=Gh9({TDLVH_ids1O~gj%n|5ROW`i!gl2hU+P7`B)7|9 zA0CcN`o5r^5yQ*>JL2Q*JoNE-#q+r5ZI1q^oIW76pQP7o@KjAE6%JJ2GW%*xex?#b zZh1vGsV81i##d*iJT-w^ZESS^CdT<)RO&j=zoW}@1#}o{V$-riPhXU$Ai#BpmiDL!+UosVQY(i6`#GkwTrO9nAcKZPYDB-k_v0^)tVZ zSspawsyyMeEmQluMjFME%n)R$*iEM0V%z5HObc`ka!qVjg~|Uanatl_l{CV^Jk9#L zt|PokC%4N5Pze-lltb$H+iI^mO5F!`w>?5wwO5Sa0+8erpBABf^S1z3;kMsZqGW&Z z*ob)g05x5)b?srT{yi1DEW(A}rMs!6Aps=}brm%gjXvbz+5QQ9gKq-6c+_39EH;_B zfsMZHswcrv>6;Art7R!4MabuqALZb;_-V#B*B5RUuTcAcYV`R>Fs&ZG4VF&>Yz%Aw@tgEQ%Gk}fYw zG4)^lSMxI2a<5b1&?_0I&&HLgav(Ooo70aKr&cw!b>}v#Cl&5+9h?3sI|+_`7x!S( znzy<)Z$e=!ydt(&&HpQq!tarnNuNGW7aLma(Bzj{gcW&(cJB+7gbeUb?}N&bv;v5C zOf+qOVh0|IS1M#?&_hCH`nQCnybM!kQw_{z9tm7Exofs&#LRq_P(+YMX6NgQZZ=zd zNV>?JuC4#Q0#I|yg|x9Sw(&PlPWqmQNwqUrVOM(0({nSiR}C3Y3CB09y8)h@}&{tVA5?9Dx&1{em<7G>siBEs&k500@>-4XFlWpwivP>i}6oe|L zG+%jEbjRgsZa{alQ>N?6f|V)jtz!M>bWv8pIq5@AP`Bs(O4Y)C{v)^^!ImVOi&K3~ z(2~}UCg`)9pvUa7a_p#N!cHDt?Gn()OAiTJ>4nmPcT?S`LxNT9(?mlIP=`Q1>70zuJ-D!ueBri9W(WeO)>2yKRj!}D;Rs0( zR9!~ye3nYM$@z4dQOWzA;or*+o@PO*E@2Xq1|?F(pxC)jg;J0qqh$4Oi;}^bVg$@` z%=+Ci;u2$xYcYz}Ac*l4)01i)9tkmJ%NO@5WnF6fbibtADB8=F9cxVTe>Z>X{n5Tz zROrLew?ez1W|w0Hw=aGzCPs?n-w&4J_UuPD@?zGySR@xV<`N;cF@uDU*mFg$7UMJ@ z(XM5uzger7I-BhPhYp~CKre;PHcNkpnOdJ0Qtu-aHEi-1HxCYYx4t|KD^xj|WZzw1 zQs|bq4}#iGZN_qGLp zUo|VUa$9;E!!!Uq{yX~@9b)zjm^R+2X=QylF4%m%;@uJXJx6O7ikJ%<++(GC91yH8 zN=NyH$~iMwx!B?bGo62xf{#(^O_E|9`IoXlY1TwznyU0K9WfJBb)@A-#n(SoKKRpn z*`w;aR_0NQ$X}u8!L2i1j7GOgKpS4t+2_gAG?j={!kc;&RCTClp{=&yKQ>l&nq2ZB zc&U@gneUmH!1AZq%+veW`ZdxP#??}YaYdS%mFFIeIJES1_xSCvC2P@ch#(@lXuZ+! zBAIVIYTaKP%&5$FGsdBeF^T$Ak8Vrg@8gSEGjGDwT&f4TAjg>XT)2OjZW9eIFlx3; zOuiuTwpX`1wtMdemdITDr@xWov1Om_0fUN6EY4ewnq?2!@6#FP&F?QB`MVvf#QBG1 zJjN!h0Yfv`u;Bb1KVghW2wY_CDwEMcg%VT-w3wVUodK;*x|6pm&!}@){T=UuZ3^o* zXp(b&t5jito1nKMKGZUxGox@4D1V|Z=WOqqavBF24vy(sQbt)3iXz2+Zdv{zp_rbJ z>mn+x9D>)8ih7vHo)sEpew=a)jKBd%ne((9a`wj(>nr86SSeZOF*8)j9fuOb`*9({ z;{6`+L&whtu8-ZtWEzaSXMVi}FrR`RpsZsZon}&@D+omu`{LajHe1VQzIjd^3@H95 z;w58JF85(wPkAi(Gbt*sD3Ojv+XiV8&*5Ei~>D4Uy7^hPtR zE?teQMfro!Vzy^gjk64=F#z#7(N@5mQu%Q0MkC7vWR$%#S@7og~LH>67q|?O&Vc1QIl>z>MPw|wKN^GRMW6PqqMzANl!E1I1L85>*4F1_SH;3 zUi8+U2C9AW!Rl6z2o>BH?HSYpr0QmvXt|#~;3Ng&5G>%FIiU4ujI;1QY2ZuTL``@Z z8#1^Rm)N?2Lz~)vLzH0PX+^bc2#0W_$+UZMwDqC>%%MiO+Q#&7DQN2W@1XIHNveju zH&5(RO1RxS%@V8ENR8;67#{{q)l+iGNUkn#|LphjVH*@*_TO^hN=jbXuCBXSQI{r7 z73|EMryYKph1OIeDu*jhlzuP{InQ`ronBM@8#<%MTyJ&i&99v~VW&~$SiX83=kh}g zu z7>+K;V%EJ?Mh!Dkj!1^=y{VrP`Q%f+*ZfjY_L#@5iIKKt9=Q8G9Ip$bajpd zr-QVnP@VmAaJkR*B2Xgv<0d4g__S8G=2H5g&A9TKP^WAR735Neh3Ll|je5$Mm}^_I zdPVgeYLnyDF{c&h;M0Az{o=oD6wPO$9d7q+-l}yF`e0s3lWQa8=4 zdJJ{90_`jkwoIOJrPVemImVs_aRbE(jbpVm%PPCw`eR!Zm`*iQLQjQ5L?!9?;f%Z zCbpXD9hmSz!k~C#cI4OWa_x~1O=6eakdvoIhbxm6)rpF`P!A{dtk~OE;d{O>EqM>0 zN9rR?Fu^?ukwWNSg&t5`UO(x**apm0+mp2n9e>^SYN`M(tS>sJBZDz!33LFhscD&- zHX+_Od8jQQxAmC9{5^q8v2I?&Ng+@p#nVD%kqo6-{o`g9qR5^So3S4`qHGsIE>)dAB#~ zZ1DO!?ls2ya1Cu06Mzh!;uQyj9h=l@gZD89M?-W@!}D7_@fp6mXJsh*1QI2Mpg*(R z1rEl?L{u!_G!$RCL^{@1r0N+X)>llf3r97O(J1Kib0I+WftF$ROA=D}9Zb+VPwQHU$-jGYI-DmTguqK z%Yx`Kh2Asou1w*qYHzKN99aMe7uPc489p@9zZU?G^H}DqY5>>dB)sS_<0jtV=Lv}N z{iyfSPii}}?rsxH8z*-6EDpn0zV^?)hLHuDiZxNUv#a}a5;kEM$P}aO;mv|FuU7U9(DE7&y>z52=gTv$Zt}jXvSk3*saGPnNpG}=fj1qT2xIUm)X5UKc(TMWQ z5e+~yS3*lOMqt(BgNWtYN@JgH!i2`JrQv>f0cIJHxZ9(tAvTRPPCJvBr zak-cFtLYC?J{pX@8c+qJS~pNkK0)xX=TqfN27MWkk;<+|a`bl`HK&KS8e1fl%9NdP ztUbk72??(We;>7|G(|~Q1$_YTaAo~93oY_@z}-2e1gqFJjLFmb?{FDS7?FL|L=J|q zhGm#F#9}BzjRBeYW&DnS<8O{}AM7*Uka9xT^uGF2N~(mf5TD+S$)==0MQ=#KF3T+d z0oVTJba@zc(%?7k#utnHAv|i|Kx=KSNf5uZ%=L^yKhcaoe(>q`c$Xn0uEab^hofC7 zDP_~R=k=?oEM9>n@X$u{1qc1rgPYz5jvfnR5pWR{$i^fTbsky+g_#Fuzn^d};|ksg zIa*+*Qxtx+J)Y1cKps$IvORjYPln(aL)lvJv~X$Le0m=#@OG+H%3_4uwE7{glyIXZ zT=Jy?-5aH+Y$khDdpTDk4wt+!nV&8tr9C`6T+GePx&YcQlg}u)ZbtbciCAVZ#ZAO?nyJrK4%P16rtL0?u8OF z$8G0(MIVfqnAio)3`|(n#U^Syk)m^t1*yIUex+ZEtD0Wg-kg(OY$jyl*eaEe5d8Vn zXd~Fnl$wN_?X;LqpP0GGjOhONQC$*zesp;c4ExA4@B~5Q$N`*gvC1PSl~f3SGg<3n z<}8(*H#xoxDZmxz=eqVEI(OL4bw5%FEaX2|huFU9i;AP-p3H+^VW`eNU@b60fBieb z$cx$nXFEvZkKk@0@2wB$a#6=}Y%lqm8R;2qsF#HFC=&Qs6G z_dEbzbN%=2qT{!&)%Lkb>-reNhVj?NQ%gw?p5;}VTHK@*F5fv*eDC_$n@lcAo!ZfQ zdV%N9_AdQHK1GWUQ^O;Do(o~Oo1P`Yx@RFsmAN1!V=yi;v@7)kg3;|mknDMnI^*Nc zw{NnOB&@94L;9@brwftD&{q?W7aaYS@4^*0efZseh(H&(9_H&=XV>rgXjTA0)f|%{ zWe`tH#`L8ddiI6{xi*gsvC`^OpD>6>)TjeX0{w`UAeX=I{OitJ06Er=AV_zjq%`Lx zfV1B87LX*h@GNVt>&v&^pPxEU%GG%39ZE?)ANVU|klg)B)v+$)8RT;bf%-Gix?0u{ z((OC_bQbzWWi{;p}(WLiaX^5s$G zx=WlJ!s&7wnr(@h$)n*~Ba{6}`RpmWE;HNw8N>#{#(;VFVnXuw%gq@?TAmpQ50m zB-i?XE|={9Ryx2tz~!QnTHV*P>xJbDZXz|$6%G$=(&h@FAyN9QjcVJL(NGLQcJUS*e zF8)n7k700=j8MZfByGhxvl^x|7*yukf-6_^1sQ&N|uX)ii(nomORGfo1ylKtNa7WMxn z+5Zsif66rvxJr42Jb9F?01$xm_vXh$z^%lEBo^(Lhlbs;qQR7jUE@lkQ)08ix>x7j zziZ~-zHXLrR}_#IoMlR&dqi`>VfGI-huQ1!Yo36Q>8Ui&4E8zP(#EWnKI2C_?F4#P z>~MPVK}j#3IZrDsIBFs;PLF5^J>nCK%z23@NT_e5Kj(BoH@8*I`)tO1uWZb6utuB# zN0xJ>mT;v7;A7&=|Kr#LD?{aa;th$#Bt@9~lpmY&3<0=?N+xl?IB9BVv`1gvyK--} zX}prReTP`WOS*w9-dhEx!f$-TdK}DM2<)*r+Igizb5_rK<>>Jle=%lM<~#M{PW6!)rz48Gr$e@EP$Y%spUNeMM*mSj&rl<9=GMtlujVkIN$` z?fn<)ZBpH>2Dt2qsF^m-1_|4eEe(!iR`V#Q4Wj59HlR-d$%*jFb zY{M)qQTX(?ds9pP7`I03_4H>&-x6~lCz}meaMQJDTSd^IaeDSs8}goX%}j|IOb6Wt zVU-TfSW6R^7+`?NF+u#Bj7At{2#mb&I#jQC4GSK*w`=^ayT zIDN}RgkFw3*_Ms89o~EFcknK!7r_M!oY^n)XWIREkCo&6FG~~}WAJ6MbR{2l)M6lO z0@p9Nt0D5FjY?2@MzOr4`70I`ztJ2O$aJvv{Rv69EzWuF*7FR7{nw!eG>2y3Qv9f3 ztMwqT_N;w!-IQq;u7OoNa}va()~aL<6_-qPn=Y=Bq~hlItR@aEh?ecaR@csV7aU^x zt;NE;%hU&UM+7!V;?LS>h?Q_zD7F9ldO@zKD!Je0xIYUA0`ogFCgrun3?9+s2iHTg z8JIC2nm3T&G`Zo6g={#vImJWZj@R0C^RTPNh%y7&q7S!Zj_ydYsB%OPFaQC93o$o)Pp2i$-E(56x3}SeTc~H5 zu9akL+kSIH7Cnzy^s$fQ`}MK2zE9;vPG$x=J3psQiXGE_^>&#}p4h89YCrs5Hzh6i zgne%L=Z^-f9Q|;O=eH!g7WrDhF)MUvPb84QKV6klGP&o(nYY2@(U~)G#TQykII=ek zi`!sn5n5|xqqz?9)?is5WrS&u`Lt@U89R+yer;(;4ZY^jC$~`cmW-afqQP& z213TBhr0FXDypl)=SYohBRU+=tEGjqmw>2D_@o>rNvZ(y08fjZ zw@0zSXt6R=2mYsw^iM6DX8qq=EfC8-hsh7zIdXZS380!HKU++&C1$jW z_^z@f@ZGxv^rp@APUq?Wd0Un!#{*L{xL*8rC)9$Ku0i(TMqR6vr{i4A>D8W%W4E-j zklh`@Gy)O9{M`=IePNif`SEZml!Qis4j_ZA=3EAk3$M@>+JLHTQ)xxHRPP8VF3XOdhL1n@ zbp^1@_lxgu&Sly~5p}n#SD$xAUZmE*GT6P2B0GHG1r7B13I?6v%I0-Uh``6YDCc6kbaJ+|Wure7 zG^iEbxTtY_`#}RJGaJny(;{Lcq2eipoK`vDys#tC60>3Sp*a3^R1XU+K?dvF_Uq#e z%&|O4ciNp&c*Xdejdf$zhh zQvC{EdlyPf4QJbFJV5?2mhGTeu(d~Baj8$?zOIE*#g=|3+YPOrr;~up8CH7lwdxOd zSYErD(fyj@Wwr!>-SXyLsUg>To=~~8z~BBcz&dp5A27=`K7oudL%t^COlEiXN9tVO7PQ18K6`zSM z@Kqc-h+3Cc9o(M)$+B-PbrPP-zM@P^nnN56odIS8!KJ0$9^c_y~ zDq2Z9n#0dEhtjwS)&1IzTr{94mh7_5JCtK+)YtUW##6HVc;%MPwPKxbFqTdY=V z<;@VI_(^k%LC*;;TzNxXuD!|J*B0rih4o)M>^!7fA(#=1G;cry+n2e=6?1UZ8=-vf zEFAQ_t}RatR9EvkyYdc5(>h6ESbpY{7_~1%2?4|gn9KzTKB}hIy#rIhe80cfVFyk; zxyLYTfb~!KQh4VU^kx15pvaz{qd&SR<+A~5OOC|Ae_>DXCJ*8p_#}t}^z;%iXWiYf z%uRgPcD3*G-X(ws=2g1e9J?Lg3RZsWsI)|`JCJI-`K`Xuwkl{(N>nab!AQK<0+{nx zjy#y!A_^_Dp4~jI&}; zeJZ1Y?{X*J8y;YLrS>7cQ)v2~_Z2^C-Ioex3LWjwgDwGaipe)vLgtanSXIE^)bA-W zO1D}6QSE%$r?}oeK*bV}_?IoJ5gHr|Vm)D^3_TRV8kbhrgsOudwY(5OENH+v7p({9 zO<%RmUU)-~JIDKNgFtghoy{Y|uA;hs(-L780$~S(KS7%Y^_8^Kie@^uuf4t^@q)$x z)oVKMar$zSBtlxU1MQcqdy$0j)~krQV+WjG&*9ZYAjlY}T!Jymccfutd|y`e1*wFk z6zUUy-xsfyHdpgA{44Mist=Xe#)y@B^)YFEG-khc0hpKvuL#C&W9V*cgiobk0z4O; z^c&c&<|La^n#6qKJq8FRT*1{KA(DzalOZMsLqDX-Rv_n&g7p?}ou6+fmZy9;5L4sy znw%diH+%j$<=**|?V+0FCil7of)=9V@g-n29n67nMhQR=>>5{!pwWHE>iC2cw)^+&waVo_$RNZqBF@=DVI5A{J{;Iqa<@ z{6PtNa&)u;9-R&BFi;6DMpNP^@C_F_dn68gS1G{&5BltlWY%yg_K!fY;@KU(WBpLx zNAl7$4a(*{(){_`o*1{3w-o(LmjFFY=1V}wAQ)>g8VhHfC4exd34cxde2pGWx{Seq zm`gxP^L>0$H;JMlHfdOE4);@j_ z6d|2D(WJS1U8IkwfGX;oEHjC5HCP6PpYy3b%Q%}Jtpa&n0u~NWzY)LI-9n)~LCGXJ z+)`@>y(@OHIofNPrB;&kBrM$Lfp(U}<|6Y_MQSc8wa~!Br+*Cf0 z7ovk6?GIjH(XGWJKSB9Th;J_e?u{5nZChdq$eS@2&Ph;B9XhO?H?IAq#ALg~WqQj; z$g^PTR-r~5YUYrJphQ-8M?{Cpm#SK_;TT;bfU%D*0rL$;-M$z4q;XA-R|FQU+g}&> z`08jp)c{0FO45L7t9~{^q_2r$=5A#OI~6)iE^I#=^_ysFDl;gbn_Qs51Pb;$O@=KN zCLKr0!j(x~mjJ9TdOqoNV3KSL6550tvD^Ct7b+tNrZ<-WL6U08R*ox1H=Co;-k%og z&9h>QlUeWlh3hI=Xw`cr7r?d||0nlC1g1`m0j(mNYr{kLU9k2x`0WdAFBPVeJy1RH zz;aE>3ugIYxs&ABN4Vic>wFqcGawSo?#Q2ny}}|S^ywH8zfy}jI9MMQ#CKtsYj8<+ z6G~vM!o1mZ| z#uu90CPmO0(^+{56Jy#irC!eexZ|@mzob#_#Omc)b&FQP$akWyYjyXrcVI|-;r>yX zB2qDJ0ErhmY}akZtABtQU_+xTHS}=Yy@Gd}ru_+~f$O!{m^@9SZvgm4dHX>PETaXztlDn~_t)J$P$A2%BKOvN^#Apstryr}+M_%@0?^e8J}8S2nT zPCpLaM^&M_Q41<01|UxPhegC1f(DOn2Y>5}52hAcFb!T^VI07KSfxdQ`GZp$K{G!h z?&UMTpX~?LZy#8GB=uba7-cnYt3+u8Vo=vt_E@13Yv|Zk_SGf59zI}-hViH3q@ta_ zCnJ>#dL=fCrhJw2SzG-SQOMRTjP@TSfi2%?9L`G`&4AI&1XouQg2^saju3&n1lTlB zqQCjI`eP9MyVlL5I*hu_fM!U3K)G@GoUOx+TN_^Tx*@GTNz;bUGtF{NHXtSynVZ?$ zyJ8$>j=CEb3Y9*#QOUs)fQVVlXdjrv0d^ICUIlhkD!2r6ArsrgS6ne(m6=A^?1Im` z&wH+6<6j}*y9Tn;UzmJ?L@7NES2eO&+60SW*jV zq8}$YjS&orZT6giv-{f}XKionr<}69@H$EYim8 zhOZYE4J)a(HZZ~Ka4~`xKJ9{mV1qr0e^qOmstF<%XxMwX6v06F>GxjYIXx@a2;4Iw zO^tCtI%sz1(8!G6pL3ZExqTv3M``$Gh1YYxZnHtnO)Ri?B??rFj`ksdOLs|pINhwk z=AZc4wckblpOoqbaWYklx4$0wi`FzsUk7A6vy4oAJKx2hYOR@fT_-RTuyY}{9lO0z32~6ZaE*6 z!0T5FY@E(?+h<862JQ=XvU@0j^Y8q1xCGR4Rj)aMI?4ku1=4%&G9Y8_XFvOs<$Si< zvqBOyirFeZ9}U#?M@HkP$u{6C!3P@}1JlADt{%3hglz0w0$4QpywEIuhhKyvRUE(C zKL`wze9*2^5Uf5ps*wCih}lFhjc!}1#&)c0UQzYQ$HR(D_@CP8nnto-o8e%?lg22U&)>Su4Ih=6GBOyOm+{(XJg>4WH-s&YB|C(fTbG{#4_e6B{w977 z_hZ`t7kXfZ8?~w)C+Lc{V&kJnI;Q;Xrqs*xA7bk=ulRaTh^Ci}bly)LTzi_yl)86n zG}%Un-|I++{ezYLN)oebx)3Z2sPsaWK=^#e9vv|CRBUvIe0A1xbAHZJcD!9e>O-=^ zj8>~$`{r|!6z{^cJRpdOh&BF;g%%`-!{Sc!6Nq)V&zUbzjJLK)091N>3%brz@ZniM z8U_6NuS%b0OT|nWoB+CQ?HMCt zle>fsMDDab;nxN}k2BWNX?z@5fe1JKizxg)nlaLd&+~y5*svuc>A6)*iAh9nsEgASJ%oH`R_@r^>sewtF+4a^jPk*cR)ptFQ5E*`|=|S z`yrrGqzZP3M32VVub&oxdeiWd+&v=_9hU$)4S63JIPgLNrioLBYOm48Ngup?vj`pS zmJ*7XWCJdXKIdFIs_Glr1djPfT>`2Ro#3BcrwDvO1eT=(#L_0{ga@znR$;R@mV1=!`nR3V5yGu zlHB_oG7gU7J8UP1z>;`%$XXTms%e4-&+b%yG9a>?CT7d4FS(cHtVI=_w_MqDAl7j5 z;b`~yo4ms9QpMfwg3Ux&iPq;MhnKyW_gB-W61zx~3A5piqGte)DvNxJGzeF(9xABeRTw7NuTk5hSdvc%uj zCWzgP-VG zD*u-!>2N|rfU&^(7;xQk#d?)d4_|Lfc@;V(sK7RcOcd0Xc~1CB+Cy;yR#I0X0?J=M zB{IFjr71lu!?iBr^ZVwfR}#qN(ym(DhjJ%_$cWH#$L}N48#S8eZdpHT?#PSfzRh+W z5IuJ4S{-EqLrZ?UOnzZbTU%1Ry`Q4|915dOVv59H0zUs6|E(X+`CGO%r?sP53ChdzSlt{%xF5UW%pW(MHzKNi`4LZ! z!t!rB?ia1UOgm^7coFH@Uz5lC+o^hrGi#Hp@b5j%6OYXZU;w5s&bBWG=4ugL)0|#z zr}%4XJHA8C%UJbhLvyT2c<5w)X5QebaS-!u17QE`8~k4T3|y!#%l#!I=Q-F9Q%3s- zWm_!CbL}6Y6O093<)PGSd%OymOX;KZFGllVDO9 zQ!X&f8XsH%MXjpzNo6qx-~v|<{=k8=FnxAvVVq|6j(84gVFU1Fx~dfB@pSwhEAi1D zoPDD1lUv*_-P}_i-+pGuCh|IbIQ#Fb!gYPmuEzdXrIs~?_gYB7cVfhw+`qganUlm} z&&Wy}4dcNw*R3s(ksg`TnLRN6)ZuooEqWasuc>(nh&3wrmVL|^ri7&1O^^=wru+~& z#}{4vGWF+&_C8#&7_u9cifHhwCP#%HojAM)hHuaA4M}3m52gZ2R6L|!*$H?!F`%3( z%C^+uaq~i3YwL-Qc~1c|KT)3$a3KSISs39JG?lCW)IvBXc_SQyme(Xx${jQ$I@0tq z2z%JQBG5xd=m6OLF^ajq^~2~k;hgq1g{i8sCwKk7q%(|cGIgrv!hTIB(kr{@@wHEs zshB6$=0Of6WqQ6?ocCb+y3$^OYtcQR7_vXrpvTS+bqez0>#!ZIS`lBMHC+`fy(}@B ztkcK~Q1^T#?qII81K}nRqHOhx^S7K^f;KDFN6?<;N(Yi2?SYDI0I|Vk@o8l2$^d7> za~m~$gAn}?HS;zd{%l$B=pJpcZ643srQEFpH?b#E~L;@;UK4Z)2 zo8b~|7mkH*6DCFP{B?A}6*vdJsvg*~^(u>i7#HvfW+pldOftE1M7DLw3}T z(hlXh;76UEVD6*l3BxyP5w^OI?vX>OZSv>^<5&(XHCAf2J5qp;@!$)w9qam8O`&*m z)&>0by4!{VZ{?TZ-h^D=KaIRro_{|5jFyIob!RGi2_SM;Xf!#T@I#LqQhetv-EAp# zDJv+h@Q5U{j!i(5I<5GYYO5XF8*UF4>Wqn~uy*|rd-XD7EL+wBbbDzf{RFtr8BhjO zYndUa;~1^St-F@_$43+XTmpE#!>ihmCBHt&x+Ja}<=H;;Rs6?6N0j~JwU1IUPq>G= zpT4u!RvMZ_nS<=?`%J?w0l~q4?0xrEiDK{+nCY4d=epF!Plmd?VRnxzZZ`G4xt-P#2$ojkr5_dGP?<)GhHBZ4Z=8MAZFjhW-oP;RS z?gCcVJjEqk?6bL2O+Xq(g>LKpl_T|&xs;&oeRiDFOc!}=)}mraH%KGP5}8BwId&P` zxQ1vx-QA&bo6ZR;s%;f3vvq;~aO4*TlyoP5#&A@K=@mJgv@K*DP z)#N{)#OGLKJPNTh5>2oA-qhdKlF_g5;3*EgIZRJ=P5<7jJ*TWS8Lr6t%gpaJzAX;j z*v!(hadnEcF+I1oG<-aN+ZY%lnGG&NW?2^I@ll*5hzKtY1!%J%oFfePM3L&gaP%=E&_rQF-V3w-LqP zEK84Gv@H@oR6DU=h!GfD$)lS9pR;q1t(b?LA}I;CBK*VFhrWvorxZaW1#K%U#hRqc zef;xi^0q>p_qKd>!r1PPZoj?d3LRC*azM01mmJ=eY0Wx&o@48m5mGl!oa+g0l=>CD zwmpUClq8s?njmL(bs|iICCrPT{4O6aoj(n-@D3KZZf%{8^g?u8YmoOX0izCw_4}}wIvkIvjgq8n zI}{drZjfoNDwL`7O;2yjU84P4Mwf} zqnfv3P#d-Nr~Pi8P1Twxy#df(f0aT(RUmM79-X~{mpwcf$0eQW5Q{m-??E*Qv=GvIlw-Rqb|SKh%a)yHPAc_j&sJYVtr7Q+LC6cTHO ziV0`w7@aqA#4?@rez#vIFU@IxekckP^0{3jbkfP&DsP`#KF+e$*15UkNFcjduTz;q@^- z*_?FBX>5&~6ZDAdRArIx;QQ7?ac5xDKJ}^Z20n4lK@FJ8v|%5+8BKY8q}*u{+edko zR&vpK_NdoC{AY9BvuCiBCYgnr$OYfCy)DF8e9Uz9J5c+%m2I!hFH?mQ-2$~#2KmzB zkD1>}i|BObbk**w+1*ke=kV!CkItHhbqM(;#{>zbY6(QlkTDEPLhwCx)2S1FCT^1{ z|JZkJH)gpuel;7o{XDo4rQ&w~%SYo^8*+p)_s6;$LhH;&L>2X+QBZFJ>yTd@@^c6iBNob{_i1LEphz`uO>Jrf05**2G zu^TY=!=jrL$3tgs%4lH1S*^rjDJEq*8J!nUIXO{UIH(-(=H2AW^F1;vKO#tn4efzs z<3lm$nzsp{+6b?cx{0h-DTH*~HUBEby>j6U75PT!TH{fkDj?8(ObfJ{;*O7Hm>(t>a4E^{Ozm{6z9a7 z-%FCh#@6S2w5L{CH~U^!fU$CWB;K%WK>d~_M?$<+uQvl~)C0bH0t6UfPgnGF9A{LQJk8l%;NS__*GpRhmR%yL^0DJMdNaQv(z`<)l@iGK95yKY z=3uzzD>F}I5*dAfvGE2qGca3>`U<;kS5Z%}TN&QSuq|(9mu$W0G@`@q^?c3fr4vsV zmVY;*k***ohhDTCj@~p%OGJ6&-5ygTRPIbFEq0dgV_{IahiW&XqWK zXh@2P9oD+@<~nxtg6 zoeK#v_i|Okk-SNJh9tw3Zg3(WI!VJmFz^es5WzYJRXKIQ`Q-+bIe3|}B*P3u*&L0E zr9(sSRF%F-iIj3ssH9g6&;ZXhbjtngTRnXF$C$FS@EYE0Et0aUP_QP=WIV`MMJI8^ zc=EoeF2u?Bh3DUw(zl5H{ef=JZK-}!qB1|ckotle z-tPn?zG>qtiwz1WT_$f^stw^sF?tEL1@y2xrT841>}7sSd#1bU#3ZB11K$J1r8}m_ zq8Bn*$&wRBQlpB@y+`||a1c)qlz^v0B-+~v&@lSA}+V>!$oQsiyC?5k2M zdc&m)cpXrvHb!IFP1O298A(TgoRd?4qTgt8?6gVXZ(%*w73-UMfy^gFkM_LZMOC_N zGxG~h_2eWj;ig6jpGS+1p3mnGU;EmkeEXmJmY_=`<_v#RU6aool>z6Y8%#S8jPNls z6Gys1;K65=8I|KHF?zATTjfyNepc%JY;MEcAzz?I`Cb`}ufRa**EcrYTNhVkO7h*N zpK*rdt<>0+9eDxm+uwoTV!64U@3u&il=-|397}H2uHUV%Gko+s<*yTwh(eM(2DwdXqyx5btY zrgSh`laU-@lC5J0h;$9FXI785#2(vBxnrlJz9f};Hv>^S1bBJZFAyEYjTwBUs1G2MS;-TH3P|7pgwH)?XbMgK2IurV!G!Gtx9H9#52`zn_Heu0J^aL`x52w&t&X(b zBu+k)_nzNndHZbUH2MAKAz?NoCus&*d#@giv%mnmWdvutLgpJ%g3nR4`7Ct5qC49J z3N2Ib{;s?0!|gq9KO}7M{E1Eq=NE?J0J;85m^?8Z0U__kyRQC@Uavs0j+PSCCwxx0 z@h)Zf7H}Ol->i*MgBo6cZJv_&pKXCVVEoygcX!5PcGqOrjjon)-kj(jWZN!R zEGRRSMb_eXjWV2mlzsmdesGpjtDfKwb1TQ^&HS}Tu@kc|9)+z(BsEbQKR@T+NS~Wd zGH9%L*z=Ec;PTwco?2gW5Gn>pMc}L=lU#k6TO+9nt0;!~0^NP(u7SNFdR4!aoszl0C~No}qW1c7&ii>V=w%!2E}Uzu)t;oUPJULj;oFj$Vbq}iIi61 zSo+M9Wd3{w2SR9HmUBMajD<^V4aeydsl>qrn1I)xgIAUTq<3yg`NKaA&fzsFU+{66WPz1b?Sp z-#$nPC?YuHx2e*13k9%3TAyL!cq5_ibUGKex$>0<9f%1xaLt3gw@=bvG=e7eqTxW} zJ3XZ2`#C=_^wI$t1|X-p9VZ&R=L;=qY(`^ye{Z zndqD$HCg3+H028jgyZMs@B9RSCF9qwQo=|Ni>0m|i8 z>pnq_XuImh+NM`r^N;U{Ya}lC3WMkH}Vvc=Hb`C4`vjkR;(<)+0 z@IfdBxIZG>gj-o{)}N0ZiOYN{rzwi}n+ugU_V_3H$+-v*xWTJq0g#i(3?bUU?6H_x zhladcz7v+P7d!Wn_fq;~b z;vcVyvfbvwZ0r23Tycd$mp2#*-R~+RyqzZONsg{JYcYgLlfH8hOdbEye?8yW$Oy-j zg^q(+mp05TcOI=Sh`(P^7^qjh{p;6WeCj{LEpaT5ln<{<6Vx@oBSIk%7wQ_Ny@g>v znavCpH~o(chAr~#lu^Z*z4WL84#V9vo3aF12q(?Tv> zf~qLjv`^lx4G|6AJX3E1a*DjbRzUGi{5X@e3eROhd=tvkPOvhs2mLY_!I$FS$(_-S zd0;Sp(0$12%&50T!ctV~OS7~;X}#C^xR>ZkuW9I8(L3r_u6}ZC(s#ydMhdhioHB#nG4(i=^A}mDc{>DKQV=Ve=DiZvUk>5$d7Zd@Iug&_@N$a zXRm@+5;YZYs1Eepmt({6I{pK_wXph>ATYc4EO(Clev;{!bWFyIgS~oj=iuNBTZM2g z%ww&OK;Cw`(DOvsQm^!y&JFb~3la;f2wK6R%GE_=s;NVnq>h~_5G>{mmV(IKmA9?j zzS?cGSlWMF=Vr;k{kN5DM_qU|S;E>B@hP}Fy(_h*eN~9AnPo1VY47N(?9)8UrM7g4 zP-ApgAd-z8?sIx$ZoREAmx& z?v{=Zb!=6CJP&PXa!->?Shnex77;z_vH9}h0d#x7K_iNop%~C z{1(+q?(9m*fEGef4Fq}YjJi-pe+-C6{mObYQEH-9eYM3`oNl)N=UT{XJz9cP zQ{vJiS5KZl;5U&{vxbBHnA^1@GQPqLpJ~emZ%e&T6;j>i*}X04rlVEMeCM6TC-UEI zoXyAoryBovb*7^1;1!H}pE0xSkZ>cVV>Qkp+G6}4fzqN?6w~g5y51cB*5mISQV7Yd zl{Kd*a5$hKs#bCxm=zw$aizx4gg`=g{J;C%_vYO@^X9#`&ROT2J$s!s`?uGg*{kfc*|QY@+kFEg0{|5@ z06=wq0nX+DdH|~bov8oS{O3vipF~4LOY;v=Q~&cp`wvmm(9zM-p5L^z|0wyliu1py zX=%=-{-5dWD}bE=5CQl|LnR8JW~ZWIr#kBc2%nFW?mu(`{!LWp+UYLPGcaCcIu~eU z15i_)4~+I-!#S4@JMRb3veR)~Rn)n_Y4L$Fb{V!B^?xGl$V;!00nMKE6E z;pMx`FCi%(>{IaVH8uc#Bo1;HGYvtTp1&Q{|DN?kp15Qi}?RS z_CJCBFI;E5o>~I{=rAuQbygL;b>h+Cs!TYJ|~vSq_UgS<@r(Zke&T(o56YUvuzqKFCa8 z{_UJUg9cp%$R*Br^pZU>4c>5Q(jDwgfWY24`)w=#%vAw&n78dz?huo4lPnyTtA{ zzj2EJD^iJ&-0(HGv^8gAn8GkaEpa65kX6iX_GWcOL8<3@r)5C(5nqvotVdeKHwjZJQaH(-6DN92(F-rtXZsk)G)4Y(4 zv?!ZnFake8a{L#F1sZ;kBvsTL?Lcb2bk@Wk(Gns$JuC2hVHLjNf zLq63VR*Yzxk=w8Qyiy@W^Cz>m%?@#Y{21}~3=m=IUR8wd5+OS|svnU!kxIQsS*X|L z+Y&Yqwj!7LflGQq7uydmU+?&p`VeOpKhxhOTtAhhIKQB}6S@O=pD!(ygw@v#zW%D% z?Sl%;W@kyN1*M|LwT*lGqTDC*{;yq;Bf|m_yMu-Qcm$7H+iqcvy{QGLnCMcAzaZ(2~=gr$ZZ|DusXiD?rDL$<2+#?nEK z7tJyq@QI|BUAe-hD7qBBDbBISR0V^G)tvn>dz*)L0FfjYmZjDzQ1#LDr|Cz3d}<;v zt_{?l^XBRoVk1RgrMpxL7^%wBp@2gLUx;gOG`xpt|BZeQi>35On-!={0&X z-Dmjyb&PMf?@K?FpuVr^t5*tMtX^XQt{QrrNg;;_(8QnVM+2rtTan*ZOQ7FNmXBqV z{$5XcC*`x|bh@&uksb)nJOjk490Gqk7jNGnvYOBM zV6zrgLO;>H<-BJ2cegl4^+jm+J1xQ#1C06kl62d6V*%$D;gucHYF9nEtFiiySSV1P zU2uNhP>Stp^hM=5D2chiUy)|JfOfDL5qog#&)vu`I90dseAI>aw;$+cc~iRRE$L0} z$&||8&KJ#$)>y}2vW$Eas zII#;NSxq(CZ#FC{nM6~$(Qj!pQDOP+2_uS;6a&3j){9rN$Y526~HO=?K3>+w(6>_=ChDrR1B3;9tj1J!kZp4o;{YY`l=sm+e)xCQ9o*~CDrkNIpB?u^OomW-enc9;SYC# zcS~Nl4csX6_;m*Gd^rtf@GoidY-r8J%Et?q&AO(r=#<(?r3=?}6i5}Ui}KxlXYkgb z_U?{RTM^e6nlW4^H`faaYoy}Q`atg39$=BM! zh3whxPf|D1#WS7zq8W}Vq09r#xZ-SQOll19vh1N3FY-jFS(&kR>3N0+I`nIuzB9I6 zBY4(@7(-~p${jX z=9;#~dfav9@9ajq*hm^$-rm2C*_s+h?3|ENMYEp#K1I*VcW;CS9{SwP%LU%|@^2Tk zVPAXGL`tYulhf*bd5=^hRzAY8Vr%S-+v~08PInYDcz@*P=e~K`2@uYNUc;>tV(@Np zWG#%N2l6YrY_j4f+gsT_=pbK=iA@>0PsCcipIuLGxJ_A8dU}U?>oRU=UyJ zumlwyU+Kc_5jL~?!HuxjjIDOGmg0%e%0P}kX2EUcA@wvd{eFXT(SNd6PXurN{EV~B zO?P^keFhMPg>O31nJCk=e4y=1OdM7qsCi5 zv6O8xcdVhHw55=^e8nr^48UT7@u4^Ls+uJhnWy&Dd)}#D5^N7Ge6#cj^y9w7X>WX* zI8U|L$9+JK^VO6kaNB{Fx|W#1g#SC|1nGuORTlMI7|S;UpYNst!vAu;SP}9CXH#f! z1KD^5Y+27vo|{SIvm> z(<6sa9}p?9lY?3`VQ+D5Xm0dM&NeJ~z8Ykw*;)F#8EIct3x)7(3xbq6*8yYQarUA1y!=Hn@Ci5;D$y8$K-XCc1g zw1jv-%xsSa57m&=OZOE+`%*P1bF~4I=Y62TC_6989-; z-j}7CQ%2v!zo_vi1=*M6T8jR$pq2W)dBrrWfZ%`nLAJxELI*E^RiA5))JBhDSXsf> z?`TUJyQ03+{VxA0p3^Il;$9T5M5w8qBWb?s$amR(Xf*W}^tP?@fNVMAJuP5lCnID_ zl7{t$T*}E2?nlIjxTt02SS4Ha3UN=#>1`dETB)8SpVk8q92;SsxwYRD#V0DF3^FL= zWaiVn4qH5Oz+!Ipv~oft*mBAlhPLW0ZI44NwnMKXV4C3{Oi=26$Gy^j1JfV)C)BRC%9oP*+AY@Dzh_6a~lx4o_391GhMN65U_i401^3GA9;}XfB9b+=kQ~iqL;=s88;TTTnz^mGE3m zjfY=6SmuMkt#L<*9ZID{lx_>E@q)d^y!d1dIy7rv4D$5ZO?`!1c3A0$kue%|nrDCz z)~paA8!?*8-$!!mDP0>IHCgd83&g}bIQ`K`O~yicB7D_;YE1L8&*k=50`CM_YxQz* zj`6L?eymGgX=59!{3haQe3EzC4P9%SuJo1(nD`dIeEWrhC-`NfJk1+94?!iPy?aq$ zx}+J->ZTplB6#Tf63lEE8$pw*&m$V;PpQC_oi0ID?!xFJQsWe~Iqq8#t!d5)B4D=JOiRKs@ z)fT1wh*@Ird-HWwWNN?{h4`_YaVra)U|cwT^6)&;;G@uws^^_HRh7;Wm8|fpdDz_7 zRnI9`_!W|Y?%nLrmy=mc)=f(7M7>^~L>KF)5su@^Jp!-fPX}q18h|lfnt1Dh*F_LN zlh|GgPh)VS9Q*;^_Vo)27x{Ke1i?&R1x&L!Q-DS%MJ2C563t_-IVTT^VcwovV0;)H zw<^4|Yy#D}->RV;!V-S!J@Kd2^CVfZe+cW7#M38+Fwy5!^x01h5!{&KrwI&(SQsQa2$ahK6i)ZfXpdYs^b;Y`HNzFNy@vN@6FBq$Z|J zfBevp<`MsuV)u2vWmS;=$|b--Rpt~!%fP7LOqnTH(GZ;r)QS{L8J|7_)MtMMvwIMD zne)~0c^ylah;UkYyu)CaAG@6ovVytl8B+)8wXk|0l|UUZ8OY}N{3wX`3#8D*^6&D) zpCO&6jX!7j5Bp@Udm2h3HtEog= zbW@2!oTdUMS8YmVJ%+;cEQTPU{IgzG?!~tqj{5Qsstev?$64cW7X>tYRX9Q5Zgvk$ zlxSBn=M)^0)wpURv}!b!AuiYy;_yi-7%)04opR&eP{!YxZyRibPwTm3qXZHfYnqLl zQEkUUF@mV5+r@{Pwmms&v6_C^J!Yr^(fh=-1_5ceG&Yf3-?vE_89+;8nB+fIfZ1%A zLLZ4;u>18rQg0PlB+r%wxv;1mK)8g%O2eja02t$xoE8z#30lRTB}Q{=GOA+YxfdEESuO zjdZU;#}mKrBmqK-r$RWm{tS@NVR9w$N$s}oxl>~*-0tfaR<1fIv&=qUGMR$Ryn74D zt+KiDs`7RiZ(Kjf3Un+JxW9j_pjm12DlihY56m}93|tbz!v|Sx`v)x4q9~U=tcZFT zx!S)5U(^|E4pTXonAax$tnFz=y#hgsVr+lZUDzSh<3Q!S;?4#?nz}v?}O9} zhU<-aHSJ5Y{cfSrx}x_cMraf4nqb&@sPFE+s#=;!N$r=~QSW_6y(iw5_K{DhS|$~e zhS&7yitoVwuCJRd-i?fw%Ls2I<&q@Gv|YFhxo!y092cH0g~=CB8`J~3TpDm;amc|E zovUlVXz5!DGL+|l0bI5`{Lu~r9VJ@4wsYEv!<4&z5&~j>M(3RPoyObRPPVDPB;b5Z0x&u%#kcG%iKig{u7sw znP^SDLP+ktcQis3m{Us@H?tQ>XMmdM_c{b|VUOOKu4_b=vrEkM3TJLYHQ!PpM^I*f4c(Dv09Qmbns-29w)+7QRS0#$ zEA$P^U|vBrrYO>I5Aro!UzbQ`!;Y5I8KBRX?{GfUQ)51tgMg~Il(Zd~;(3rrkRsm3 zrxK8O*1>LJ*m##5KIT29(-l2*Kh%fm<~&5KFJCGpbjWyTQx5SsXU3v2(e(3pnrN0} zGS4q+o;!hldN=ZnuA4{rh2>4pgykF;zV+`&-Mo7*>Kc8F;}2gX%~<3@Xu@dcbVHc3 zo5hs>4poOC<$WmkmjxXWwx6sboTE>`8NA)pX8`x*IRg^~3!)=FIRGBRh!tRwKhk+; z686NIWo_~X+Y(Qg+KrC_se8(vLw6$O2$of^2cfQ~pEQBEeo@MFei*o~OCrI<=D8@7 zZ?#iwTEt7=A+|FBr1E<2@1NzxhyeBayvY?5csjLW7*tnMI91S4iF4GwEOh&0&JDe5 z9QxO9ecO2R<7=w94uXytiQC7h#7}q!+*`*r&cu-o-7#S|z34!iSr`&wC+iR7m@7%}(6ec9 ze`-R|kz{1~dEt>fyBNgfuDHWE zvRLe~z*MMC@P+0=`<VWqc)a%X)WF2`?y# zpNN7*23&BTofi*XWYD02jb%E|lFvjlOuGnkHh<&l8Gt=&OT=cdPJ|LbP9V|~3jc{g zpxloR&)>iX`A&QRGCL_irkjdv1t&gGDILmA*GLw&evhCnj$u7bhW+{?F1-Z~f^we$ zA|np$!%Q^ANH(z1C25>|r^k{(8CD^BRI=WaW`phzRHgh~08;=hht1{M6s2e_W>gk` zpzmEj9dEdPU_LkQG>e)41>H>12xu!76|6FLJ=*-^W2$h#SK(-A4^DtEdYawsp8H&a zD1$HS(Y`q;nWUM|OBq*ZO_8NI_PdSk@d*49dt>(2RxC!0_7s?w&e(J14dlro_Y^l* z=VG#cVZya=n7Gi#6o%THdzdpol#kE)l+?KF5(R6firpMwu2&qfOZ6KC{oed|DFoGf zBA0f7>DE}q>KfmPEykA2y4P>3@?-8=ngcFpR9DV(BKRkA@5B|2~5J|HR z{*$ypbA?#R%C0|QI@7$aQq)R5f%TpN>ioCSK?8enCwhhzrinqgJ*4gQY#2Wy=h{?l z(Ubn4KlCUjqdYB={-TYen4 z@l#-DL(o*O z^0QKib1!HwnQT>S_T&>$4cVM8ju)IlG31~}&6?ByZq=FcGID)j#fnv^Z1eJLHR+q* z5m}}G$1;0l-n~_)64JSE+;h7l%=eS#m}zFT*?nEYU!cd$6#)&64*0CbCrd z3VhVh>Un>w_=5sjht$MII8lb0XhyJ{0=gF@z;59s>&^h2ntIstxY@YpkM zvVB}uR$0S3*{(YC1-r9Ev0ZUOu%4@}-UhrOwdYt{3U(f`bHZ+tornck;n*{PK*uwZ zwg*LaBHOt0^F8H7c|rbt^ZGIQt7&Q)+w8_{t?6^CX-?bXLzU`A#AWO#6VV=f1_(co z@ndoXzfO{AFyOfzBt?=~#@{2_n734*3@UARmRz%}Pb3|$%D+b%OU^Mm%*>tvni0Dy zC7VGYpZ>e}wb}xVy*+}JXo-9f2HQu51ms6nZY$b@J({WHk_27z3{U;FgHH3H`uNBd+uy9%?x-c&seonP^HhjWU+3*E zCCEM~xuH9%>&kRYa`6_`$-O#H<)i%t;+0txo|v|IBGtRfQ8Lh4 zy-bX?@5pNuG_#x(Pg&ovYq{>0_H zN|x+cswbT3E*yV=uVT>sC0w`AyjLia1TVVxPGr3uah}JiSBra$b1lO1oo8aA1Hv@= za!NZfyM}$QW{J5Lc>kcFjFI&13W6^~Bg?BaeU=>i@3c1xt`(vamO0UL9^Dt7;j$B; zq1aSTNFAvUwAdU$wpi6tu#2@A4`2y$?6P-cdSG_R$j`@DC9m!Nn4bD~mEjH^ce%kI z84JuMj02vw!>CR~3o5xbrP+okh%x-&LAgAsf}r2#nP4xQUo@qNPSoU??v9zg?QRnJ zd-++5Sl!IzGDEkI4^bNYdv-cdUAWK07`qYi`(iZiC{-+DRWkO91r6zoQbWjY&hGBI zLFH|MH7H{%kUt%XKziMBW*MK5C+DV$-l_hsX=%n8Eg}9= z$!QVC`ZdQbS<|}IkyyC7g?`|=eROY3!NyUhPe>u#RJCx|%i`_5rly+U=knffqb_Vq zkE0Eb10VgE>Ob}DSgJ7_Fb3 z=3g(nOp{{B{cD-8iygwcY8!E=KtBv@zg zV`qfVW%6M}h3Uij#;Jw{QvwREW&86Cpfbt?n-Zo5x|zsed3zB8#Md2)t6^3cBr82D zmxt=f=>m4tzKvsc`v~*`=vLp=8N(oH@5d$fv~ri@<(xLdY55-PCS*dGf0N(owbu%Q zU9SWZ)CW>Xej4f+bf>9#xO#sUd}od!&B*uVla_>gYpgNJj4#dr=G~34WOe}zu+Q-o zVF#IQquycJH{KM9_cToG*HEKs0724~`D?nyJ{f+Pxu}YGz)uz-em{4t@`=eLji!>| z!bhGk#xEHGjny+_%}JWnJ6Gp&ec0^1|1z;@8@G&w2Rlc2raifKUGdW`r)v^{e-_)0 zS~n&k?~Eo>(!D951G2If6IQs7=?uU{elRIdX2f4-vG48TXLk?bdCyG_AtXC{dNL~w z$+a=R4K8e+lyali{hKT4wZ*5mwZwg14qKGMXc1EJGD!8B!MN&x+ka$HdMsg>R_9RH zQ_?~*s-OEas!?C@-CE9F(ly%7o`)284UC2SjL5oLHMEy-QrnGTK$N`qNAS9<+45&2 zE4&u&Cp_s6*YwRw36yn3KYU|$y;^$)*WC|{Ym>}=Qod+hbbf9D7azqxkf&_R(bkZ~ z^0qDf^HUDAS!TT4TdUOfqnfxMaxGiOc6sJiqgTvPq8#t4G4%b+$driWx5S9;1 z{Ht$ga@}TkU%MSw_B$E}#5%>|>9Lb|V1hF-b=9+gAL8C2_QKzX$4=JWM0u(qGQQ8|dRT-B;i-AePkL79ZtquAP_Y+KTe$GlgDiNQByqvhh8>edi`kno;;fScyPj> zJp~oxygT##$~zLnKanHp?ozFt?={EdCH9dwIeNP-fltlmL}vzeSo;eSy146Odo2v6 zyQqlpO80Nmwu;sBIqQF^RqsWQi~IK&<|rrmq%7vI=F(hj`9Ya5-LY@pnDeUqtM2;g z{xzM@pX9RBi0+l@g2r-u>hB|*!A#G2K?Wv6mYjro0$)=^h$!1>!z3COWU@?V?f-9+OddDs<{Wa-v!digB zxs9w?HqerGfxkpFg*rVPL>Etvwq3V$4uC`ZScTs1L?^(Mz#U@jil;){O$p?@COR-f z0SQd7Db;*Ww-gDf^3jmW5>Op^9Zu^e+Vz5nToFbC9f`(RIo7Xg-E0T&7>Yc2S4#|2 zv!0=;Er|~p_(1S=@KF8LFE!`16s$cmZm4P5J?mZa(#li#fI=K3T_Up(F(plDc$!|2 zLfo#7f(N=br+#tkrw-L_?ZfJ^&#Nq)6?{Sw-9p-G=l(IP%DlkwAv|1|t)$>Vz{_RU zE)k7ww9=ZRu1-S-%U-_0ED7s*j^lKt;5~0=N~Y|K zU4N2{v4FrM+3M<=^ofy?X^G~>h6D-5D;5TTi*c2el@|c!GRL3)SF zh?n}BuY@ZjU)8>d(!Mh9p`P7eg69oi9aE0Vx0f-IGK<)4zP~@TucXJbmgSmBqvS)$ zEOIQb+H6sNylKdyZ=Uob+t$k;^oIgYpKZBs<$ziUvYyTT546`TkpKVy literal 0 HcmV?d00001 diff --git a/src/images/category/demo_store_c4004.jpeg b/src/images/category/demo_store_c4004.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7b4f097fb9a84e525d0c25d4994155d1d55cb083 GIT binary patch literal 16022 zcmbWecU)7!*FG3T1q4BQl_0$%O*)837b3lbfOG-r0RmBw-UI}cD!qgBPUyWzmrfD^ zX_8PQgz(Gv-S^$y-~P3`=ibRD`OIYQoH_T-ob#OL-u}AX0zA@E(^LZx+yMXx@CV>_ z6`%qj_}}HufBpQ==bir%Lc+U*|B*X){`2MTf8-9~y?b}>;?KKx|I^8TcY*)cox6ni zR{x*nwg*5-4EPSnCL~}7+@T~Oq$Ic<008mhy!U_f4ft;%!1sRdJ`pj=15$j0rbmD~ z1o(m7{jcHRTZiE50e30yQ9Th=zE7=ZOT_L)Bla;lpP1uCT`#Tv42o0S&O40c0UbR9 zBNG=l4=*3Tgyb_RX&G6Sm#S*&8k$-LhDOFFre@~$Zyg++oLyXfeEs|bz=1*GpCTfo zqGMuHQop37XMFvZSx{J1TvA$AUQyrB*woz8+ScCJKQK5nJTf{qJ2$_uxb$mz1&%=e z-rm{$v$u~vIXyeSxWxRs`j1`&0K)&CG6K9A{v-bny(sZ|-MM?0@GcR4j`5WN|7k#Z z_udoH`&7z$M7Cbk>|!5@X^-+6oFxwGcYla0_x})mPezg1Tmi9o>gRpaG;DX z6FW@;-HF?}-7Fa5b5*NeeiWMQ|L2cVP2SOw*G}$`Je0)dLwlECO|}@HYhEn-%@?dv zd7$|%;D`fFhAABKPhV1YVx>XZD??^L47=m)i^7dYjPQt0{dKk4Jmaprj5R?1LbOq~ zeduVH!!5w0a`YdYwC6GqN8W^iqN6Sn8ZkE4Dxp)0w*Ue~YVhiSy*esjP)81-g6ZDv ziIFH_)|9t(5z2lP=RFBr@$~&?CU{BjT>O!<6?8DfSkM|Pvz5#hX-K6msLPqC`sP9X z56(x*cOPl6g^>$jwf>%$H+I?UE+BXl?EPCfqle~B-IF!`C_na@rydfxAy?Ykn8xtS zLX1%AkxF*3grMtDB#0dR-ZFHmn{UCB>;yCXqQ2#n2bDe7w$Al8nao`%nX~cgojXvZ zv_t!1(^4)$~yJ)j_# z7hfh9ni2$*f3z<6RcnK0CB~mu`<3ly%(%3NlsTEskIToGeP}2M8*uohu73~UqNhQu zpfr^J;Q?>K|5lg|DK!;7%A=%rQ-1~L-h*a%V(FJIDu7K;EX@)!Vk)UJ0R%tpq4d0# z#40+MTI47y!-q3%D6M+N{KeMX0x~ONXma)(NJarB7tFVSdz0vh-9+ExFr|7!*}ruT zTeYkzHCRW?b|EIfvIBLq6zdBlf0k49N0u(%%bi{8oo7>yw_MwI6Fq6v#_$-u0oDWe z>lW}M?oT(PXAJO8*hWgQZgykZ`l6i3d+h9^J<6jup8)%U9mbqR*519 zs~$Vf=QRDvT9$&&uKW#E!6f(si6KI_fKOq!0IkOPPBWwp9V`+{x74F;|NYmVm$F}t zE7VC|TO!4JulZ@=2~+0bk-9rOKNOfnD&i!<+Y<$>Qsbd6b=xpcF%rW2Cxh;nU| zhsX~Qj(Dc9^_)Ba1le^r-6Ufv71I!vR@w;ls7`H)-djL)H!!K!S{U{td<1$p{YXx= z)b(e_!wz?m!~Ble_sWSOGFG~OP|z9dPDf%+J0rEQ(_dTj*)8B( zPOJ_{=lCX+=qeK0D-7NGZq0hr1#?gtPKvMU*3Hu$n*}#ZByn#y>r9TU&`~%N^fhQ0`A`<_S4#sCM&E^zcMDnyfSVA5-%o+Bn`yOTiRcMnm zkV}Ax$ycw%1nWO|(rzd?19A%>*NptT2;OaOYw^rvJla;c>jdl*WKeHM9c zhb9^b(chpD&5sn#NSxiA_*irN;4s25#@iv22AWl@R>NN9{4?&$@57XZmfsRt{_5qp zMWtr-!<%bbh-f#a^7=XWR2P*VK{ZMjQ&=c;9M|dK8*6IjeD&UzYoh4rUL<>x|J!6D zNi6hWvjsFXjSjgrP&gNct5hUT|paptcr&-Vkp=X6D()6&kf$u~jDH1A&~zldYe z$hVK7cYXOCP*M2fHGuG^VWXZ6e~77`Dh=R&ioWOrQtA))HH&K#VeXr&N^qV-Ih5QW zkTF!iZN=l8eUVG5$ec-qWrI###=zt6-AWd9ZZmOq`lG1J8raaQ<6_PxZWZ_VO0~jPK)wu zr`UM%r|2|0pyuEOx;DDgZL6%C7raRNOWpxZ_fQ4V5^pLBKI(4fh ziu!eTXS$9(0@UX&quK#Zu@Q{%J0|C4h%*myvEXvaErXv)ST_MWcFpJ!J_~(T;4aK?* zhCK>PFLDuj6VvI5=7F~i!D71k8*j290VSnz?p0Ntq!r-0PAQ~XTSMcu)hDkvt12OO z4c!G3CG1xYMQvv0jv4>7veZ6G1}`m~`5@meyz>C|U+t74PT@LKgNWy}o>1SpxM&90 zw^H@S6oXyoshvSgNU14A2W^}Ow_(P#^lg$tsDrCkU4qi{3;*~x|1h=Ge)u!#b=zsS z*35H5$$=r2dcL87H6yp1NTgtYqzjT=|uqJl~_6*C}OZ?)v_)Z7n$sn zE?b)q_E3|Y>DJ7s+}y!d&{U!@cR@&wy5Q2OS3ItvEjP^NT(fP1M94o2oc@lh{q7EnFh6Q*F*z4G}FHR!U=evE|y$ zMsgkJOQ>k);x#61&2$3yN@W$eVS;UC+0<9T>X#0Wi(GQqo1Q|nF>!*Sa+vs}iA^UC5^A698RgjaG)~Y+h)vlE? zOoAq_lqm!+H$wAyJ-gq%eM~NJEvVNB(6nF6ExP1}<%u#T3Mfsw?P4wi=RL*?tf)@3 z*R3_M0)6}7Tqy)gKT z3p^_pg?Wh`!`ezc}9I$iorFPn5$Y+hXpUOuB=ZX zBls<-N>8aOFM2}}wcB@m2Mj}q#QBkii1f3P{1k?$*Y4Ash^|8yuJ+9neq#Y| z>2Gz%(xXrWKAzCZJ#(js!(3iZ54u?aRWG*oRt?AZv-DrNLbbrdIJ_%yt-f#buo1+F z0jh=%Ue3m8TbaONQB^hEn1t^NSGN9UvK4EA@3b`D2=<8j3ewj7OSebtMm-(60Ws&; z?rG5)F{&Ba<;c#)W*a#`*QMy%LQ46U{MSJAv8ef04ykn297NfTtJv$5Qe#>}p2`dF zG#M??%!VD4%TPvhEj^o7;E$G}hxV2?dEHc5Hcb20;wZc?D9`CDP?=za9nTUtu;rA> zgdB`SBF6N75VSzwP1uv$Tlh^NKZ-u->{2P}zg3!MTs+6+O% zthr}!EEsj<-CF=Dga-j+bzNmqlf5*epUG;bG9 z4lSLR%67H9y~8!v)vMkfjkV0KXVo9<1IdqTC7M}*^WlO4#Ex}>-sL=8$)LiI9gm|G zo7PR~b+{nLG*Q7#A3HV%UxEeeK?H zT9ntp`U0*rbKib$(-z7R)xPIh{d$v@oC=8)TC4MXe zRk)b=V2w};iPbl8)tKC4H)6?2)^+5y)G9LJx8twz5zn!Kz#4nbnC0@xV>&J1Am)E;?t$3Vq6Mp0Np&{PdC0%Dx zXRc)4ZsSd^tn*rlWc)uE(#*bb5OU;Cg|xAESKp-J*quY~p=$>)5Y6g5GG_zGvn&K%ns4%& z4wY*+OYVl5ZNeMBw71>$t(`4o9Z_GKadr&zUvNDLYtHG0&f+&-MwaDskbM%)tfmed z)nFla|McBF#4*K=rB2VU&JKZcNn<|H^3Z1Y@5>yX;=@a0*AqS6{Xe$=btr}dIGD7Y z+6yHW31u8d3-q^39g(0ZhE0OHYvCf);$SC(rP&$%IjtW*{|Z0rtzZ!9ALo4LaXKip z&;vFUMqY1_tG!n*vu%o+H~H5ZI(Z9tBrmb@?&^MNfM+1w%3>6K9C0kKOtDHe@r%v`UqshOIN^P))JS+|LA`Bx!o>Q^{t{Fy}^pC$zhW0&1-nhD(UxPmS zCy8jIsRCOTTa6yntqc8raG#E0m;+H?g^U05g0|3M-R<)H-}%Py7LF!_9jrq11r7$u z75zBruXUIvnyRJuaGAq#T6Xhk@w<$+I3L2QWCidW+42(Z0oS#B=ud;aZWg9B{DOny z+)N7-iOQoY4p-}5D0Q!FP@P|xj4Vy(_A1EF zWid8~kGnJJ;9ZNvxKBKb=szQ{aiLH#37;x<$!Ni&Jx-OzI0|e`AJbSl>C?ZmlT_+v zf@6j)NCa0u8y}E0FWe8JS)w~pp*{NX{`EMa?AXU%s~KT60sn4?n-Zv-$fvw|Sfs?d z4T8KdupE;&C?&QBqfn&B=rWu`W0a^wp6HzP7VRDWkuOs=Zkrd*WoDLmb4gFhXSEg> zY5Q^Phh&4`R3k6ETy?5gbM(cdPe$8(S~_Z?u?wS(DGT*Z(gtza>nZD9NpQ~#JnRvs zjD_4Jc*v`xRR(1_z?Xd@?>(?O=qu9YPTiHkf%?1dDwgv#X2(LM9p4sWHz?cPl7v`| zS7BKhUI|I~xZt<0t030t8mNxxRBEp_1VPaDV z8V}V3mM|g6mZ*EX?--V|h__dMRr2;}PPwW~%i#~94P2?px><=Rl({*kz7c>tpOhBM z1H4^$5|Pi)YFPV1ajaU)U-N~0vthycZki+`=w-J3MCmpYeg82DSo~#D|HcE<&`0>g z2h87U-OoS|UFfd3Q^}U77(KX5*^Qo`vXoH!PJD6X?z)#@jJ{jSASi70LiMaA zQB0|G-EEZGe5qDsa;nV2DANVI+FK^mnz&8CsBRbVl#w zqm1GhvU%hS`V>loUP^2{CdZT_h@z`9ucrHC9VRyS42ItoQdx=JN%x;J60RwV75p%m zaVdZ!MWP~+I7*7;Ys6yQ-8@v{n(GQI^0-%sts&)NN}%K27BpC^D1QoxfVBHgxE8mBCy5G=;5<=sti2CDKn~#eZfgBN2}{(b7<@p>jz;dAY)Hi} za$dj7Wtch3I(SU4^P|BcTK=HvRQPVo)55jR_-NQf%aJM`r+mMNqk%Z0=~Ax+v1}Nb zVhC;cpl3N&5s&^Q4jZC@Fx5=RHSjv$@VFK*K^eg7_@%N!Qj()#ASsU z2^zeHlJugL5IixR_C#TJ^X^y~^2(qi+RFWt)iqb2e{Rtem)_>)nqJa+oI{J;-iP^> zmxMTyC)aF{`#0Z1$sjK<3Fs{N{4IbAt5Xi%0Fk)FAs*Z7|Mblv)oy5L`eNfEZXxmN z666;kCNa|)N0S-!t3((JR^PuVg(wej+1qsDTCk>&T8eD?il2q7P3+= zQuQtkH0NJ)#FYOweMi64U@6t8mr}32;f`I>-Z(x}V(V7G%|e-BZkzG+o0OrPD&!57 zo64-;@-d*kOr1VwYqGig1VmWBW&^jTeGF-5&1Ab-v11^o-CAfm7J#?KCr_wdQXKGJ zC?`1TIVvEQW6m#uLi=Z@eNZmT(nDmgORe+oRm*!{?sd;@M+ES$TxGuf$i{P#dSQsS zqbFAMCZ!1!Yd+n73!n#YTtQ<}Rb1yVpO!&YU?1(~^g#HW`>}ltV{hQNwp>AHByYW< zHIxJ9nfGavv|BKAP8Qa`85QIdeJHPjO47cj9|FY$oiBd|hZ}S~$`RLWX;Eb^Xi`f~ zn9u77MKDoogkRcOWHR7|(g=?0*4a{qxrkEbUT>9^c~j>T z-Ku@VFWiOWe3COge&W_rh*%cJ-hb~(kBrKTko11EJm3!AL9-2AbBk|{HK8h5twL#; z7IDGvkK*Mk7~byQ)0`$`TQb_RQdgf>3th9fZZF7vx-p0pWT$;0>sp`F6`R6Bc!aqXfWSWIcQ~Ja^j@uQD4k}?%U)AWs_l_ zc&2OQ7SUl@^DTg(Q$}(^q=@3~ez;9nR(}BZ_-nJHzzF?IH`=#pUlQ^&e9h!O^x_(j zo{umVAM3|jH`oSvrTYwCo6o0MoDAz$bFOOrU23}q5`qg zqi74Kumm1md!+0jrtJ_IVE_KR*mz0f4-L6^f?=g7bEIE_#ZYF*0v@fx@$BK)yHFWX zT(QUfK)Up~Yjy3;meya%!bN-OnqT^!WY>R)r=1^5DNBOQ_>wYjM^x43XUecs3yp?P zG&!*4j6da8D9wHZ!{rX?hxVz~5Wv2v6KnwV-o$jj(?IZFv{fr!M7VFxDKNsm-wg2;5Xc}C%$E=tIa zr>*+3BL`JbO0s(wC!6;{^!=J8Apxj7{+-UpeBurlkh zCk=CFs|-dp9>>BZUNm$+I3^|HX$`ZJ&rJDS$27HxxHqk;f2X%&r$3@j2R&(|-RRZi ziIQpsUv7^dt|=6~UDbLN>z!IXS=%9PE<8r>v3ogv&5HX4B!#`(jBvrDWBr>hmqFHL z5J_b1y#o;G0q*`n3bBXz6dd6g>s%BG_7M6D=a!3hRAXk*q=A|&{ierKE?tOVBCdHL z57180icifn;hV9*$MV`vNFf{ewRL})4r=q&+!@-wa8K%Vz?@N1tbTpn`X4!}UudgE zlZ$T0MajnPOi-dy>l0VBah7?l_)YWHgb9^B7$iL86+!%Sl1DAOaxVPR)@aaY&`rSX zZ(H%$-?p3@ob*kbl1rENg&BssTLje{Q;JDNfD$2Ig%BV{yTC2-Eoxyp8ml7zdBxJT zn#3%0(BWR!ITk%IE;#zeHeqJR#AX*^Ljg`TMXN_EvSYQ-#>L3ISVfVSNkc$Ntdsn+ zD_kv&?yRz{yBjOpobR~5|FbLA*kQN(+O+BRTmyNtJV&5waSZ82BSsP-5)OSN+_cU# zZO~DVCW`E|hYJkML7Y&R*0UZd*Q!frZW$&Te-CTyG-)(yY04ZT4Z+396sP(4G$t>8 zar}Ur(%-PgqYP)$t3>dHEQuI2>4kT+a~>Vyqs5&N3-}=Ry7+6nc*32lQ!gHe3Np4^ zfMRzJjuw21@HhI<4|eA>8QD`Frw%Wc9;((FGfB`?ZoLK%$ydYAs$6E*>RJ}w=}m^Kr*3mUm9MUhILYRFWzWE<$P5>WXC*@Kl$K!v zUZSb`kq^lY=%XQo_(!Ui7@~$+i++#ZS7hx@e5|(o1qJza=SuXzx}j+Qs^*($TOF*m z@k>H+wTC%-|4iL{Fw-r75zWZz)t9#aI}pcO0;FZM)~nPt-0xjk{K8#uv^Z<-=2&z5 zZyh{;HC=D`Pk&P#nuA9~$(vEzt#2QawsEqEZZ}v>$5kCJ_6>s?P)Sh`N%?e=-SJXQ z$(x(&%F*V46tl;LYYbu0FMd4GfP3jFvb*sUcQm1J1rspnYt(jj%fsP7)A6Fu1;dF<13pr>0MWaw(phY+sd%uM4wbw2((zUc+CHdFuR zB2Y~xN=~ykrtfcj*bSXkl7()S;-emU1GM@DA3ETZJYz|B6Vm4X$}pN*Yfj>Xv&-4{ zpiNkkfre#!Q`cSnGDPF62y+CKR@U?5ceF@kC#ZH6Q`@^jJN&824yFi1i$pW)F3P*? zGLo;8i&La=7SI~}9_8=+1o)J0q_h@w^boy)gnNeJM6iY(bDmA6*vD`R$_;IYVvD{z zWvKIs2NOxr16p$q_0m_THWL|GYK{w)?wcY-L5vB4VlXK(C@%);2#S;y|K%36Q%CBo zNQ#c^uy)6&> zzwt%lZTT(l2i|Qvib0F(FF~L#6?=INm;IU??dXAWmS%cuv94A}HxPxX<^UE2L`J8h}13Xi73hN6goOwc$~b5B@b^3J2N~|M+(30ZkI0J@k?C zUYWIE>#tAcNlnGVOYW_t)~ZVoP~>*H2D)px~?57RpQw zM@hcXcK*EN=WmRXqh3^zkX3)~`K)|57X8=;e!d&A)3$&meYdot&>wRSjf&jrb@p0x ze>iTpVM&2G_gt6K82R@`(mhnzHArX79Gs_m>YkmZqphPP_*KFD8B(!=STXGY$GUU| zqIy2(BK2d9mpOMWCFALC!%!fw?6UUv6a^Ca2*Ngz>y|oMA=c7ZDgvc27AV#zEnMg0 zVH`S6*ETrMV}uZ+ruPVY(^{nlI%{&J2#kWOi>Gx#F0 zYIaIZ9sRqj0~_KW?eLaxY3M6IBtT5Z9i zp~KsX;p$m~SeOKRH6JuqdUN?8@`@L2Efs^JDgNrv#DyD;OVNSb3O#1}to5^OeRkm4 zf<}{$^eAX06w6=np#nhooe-cudxznz)6cL6$%pE$=D5!afFge8NWj+bw@x&TuZbpr zjZTO5*H1$igWQ{Qu9YFQD5Zhm1WEM^`dG<_GL5y-*0gUlshn|Kjm~}+M0bBnR!=~X zY)D$nHQEVByooM_FSp@ig}2ZZF8Sd67bO8nW)gbo}UcQcPt(}XmDDX@usn79A!ziAsJR=z(5h!HaFjf19ey&Br@a5 z?@f~)AMRHgmSFd$L?(6ywot7jCy4U$pub(L2fwG0;t1nv)~_Ek+4VapBUM z^4oL;Ts!J z@XejMYgus^ccCsCJgdxImR|FZN_N)2IE-U2thAS}yhFmWbOEd$FFn9>L5lVl{mpCA z%2&J6ON(8NlU-%43&~>jH9Xvlj1vvtXz;N)u$|Rzu0#0&AO$2i(5dP4M`_u z@P7bRC00p+Jc2(#L_MB#(@T%+N`B_*jH3MW*U|W7@Ijp{>}L zbk*7|ARbn6G9lJVsZYO5+1c(#-fi9#|D zv?T}@Mse_et*H4~>fw0S(bQD0*-}_<-dzgcJW4i(Cwo!|Ca)@eH6nb&CwN}~4#jW{59hJEpdtD<--___)U+iM>7#-c z=w({}q{=zVz2qln>RFZiQ9z;bNZjh9FlQLJ*jjH){a+WFaBDcWs%HG4C3RoKGvFrA z6VKA(J~8%5GqukP(5K!uvVMUQwQjlwLUevAIVMH7pHC`05pofFNrw7V*ck*VuV5*0}`(Wxkl%o;Fk-R^9m%Nq0-0Sz{I(j8t znHQ;-g=(}Wl5?4r(%vgNN<`GX$vtlwvKuIPtaV-WI%&9y3Ts6qs<~L*X>yO;mabqZ zT+_YbXt-T(teK#m_6|J>!<*NBy+cRe&wGcpPDEDmv1EMXag;2mXEW@C0%HXO)@Jl< z0OzS3B1HhsOQd3Mx!fJ89Ak+ai_8NFSAWg2p=FZ)tPptWp;Mntq=}SvX>o3CxpcvK*cIjI#%q9#p7 zm0+q@ZT-bwzshQ_{lw#SBvW>^emmr}te|Wt%ZQ6Nn~c)elo7n*979%S2cMrRMysI4+UZ9u+6>BfbT0x5seQOupWz4 zR^!OWK~pE%5zj6{bvpXFHcFLNL_GD)3OpM^vhVD%5&px>o%5bCGiS{H@QeFrJ+ih> z`N4Pf&3m%<5q)Fpui}TtS@^>$133yhf-;q$1Sv%PqlKgDsaP zrRH(E8)nCTLOzx$8b|Y0FSxE1GTRG!zV&ZdUWRDSnS;lV|*iP3?tgi0H2>ajRlj7xuVy3<#!YS$)UQ>9i!pjtQk z=wzPJ)xe&#~wM%|9qwE zCJILekw=AAmga?LY>3YAw8fl1_C6lWoHtOH*V?(iNtWkGWoNQ7o6jcau9un@{x_5X zt9g^rDUK!_P$EziHsvlyC{cuj54Cf5d^cY?Fg7k1n7lWY>fKvF|7=HdfjhxyX~Ir) zXfqD!p|n*C6eE6rp<`V`Px;_%`-KrAjj4KrYR9*$v%IWNXUG5#7zU2iAhtahvCmKe z1Ji|xUM6uqmRw}xBDGQFWUt;g>{M&2rxz(?Rv*%;^C!n!zWM#nu-L7PFLdV5;>FTZ zgXyy-+saA4fh#vP>p$Y}pY`>KmGdyX@mc9mMj0R;H=Rjs(4qnos{f`~^}1svgBha3 zNC1uY{Lt3r!BElAepo&1Nagx1)(+#2l7nX?hH`^52F)kOTsItc$iXUAG26>rlGf#>I^BGmg0GGL}v;UPJG(HTw#;qLT$Cq zxjCZ)_a+%Hm@Z2tg}(S`JzuG3ka%{W!HHMX?D04qwpl5)ivylFWRbwVh%`hIMIZf* z1uB@RXUW(gR>PjZ5f7hj6Jf#%EJ#-K@2aC~!~Z7cJfTjmFze3as*1}=RTg)5F4CQS za@SYpZum{l-e%qIVJ+jmP$CTZF$>b@N0x>0Fvt7W^yiz2ZuN~fUzHpW7-j`PA8hWy zUvi}?k)CNs=?8tDwGj6?uSUUMKr#qpOOwV=$L2*JrF?NB78uf8mu}*fZamkKtJxjg zvC$#(aC-0+;-R8d%~(=QqC4XiB;AOVKrALGEbhXcu#Y@1s&0y~0SI6cus(0_n9>H~ zhH*nF^_v6Zx~U=WyW4a?1EEyS3pK*-%y=eL^f6M1c44x@g6k+gz7H&wQoNXg7QIkbhHk&fXCqF4Re!9LWaIu>4$@E8q=lIFTop z6C6b?hdRW9GtagP`DbI}DzW!8bFK{Drm-{n6aEa43=gaTFbIpTW}brtYeRpHOog1zwz+*9 znby7kl-vgwSYC5}XJUBs*rWGs53_i0VD;pw+Wnwi?D=;x5jsqZ3d$);a+3~Is2`_+ z+Ku%6c0TE2_{|)A=DZQ3A?aptX%% z8jl}1^WZ2!QLL1id&1T79Pm|=;*^zQ!UmBO}M|oW}zJ!wy#9tTosYl{JB@y)A6I|OhjCwD)b4C90f|m z$zdk2LKqbn7omkBH>m_{VA;TMpAxy?a^0?##(h@%rp~Ol<749y4CJGjTR_a3_J=W) zUumXYepC-U|46_nYa5@F9KFyiO6mAgR7lGwU3eY-XY~teGb&po8l4yaHZ?1aMZ&zZ zm}VuTK53=g*y{^>N_#w)uycP-o_M85ES{bzd*uVJP!LgbH?eGLs1I>`s5rIZ>^^a+ zuU1t@oa^Q%c-Sh&qu`djAOR%?CKodx`uuZ2AA2c^({UUOyg{rpDIAcJ|dFRbd{ z^j*=B+9SdX3cO$Lh!KZ-h70|D#grTV{a~g)00E-e*B~00jyq9fh}m|$CwQotZb0*f zmh_3}FbDPfO=k!mRS5IL`)t(I0WmQAOAL|EuEzEbN+=k>Dxj>MP+9Qjl!6d@PzrNg zI+?adySPJ}%#gqUDk-jYJQ1Htey64_&-$v(_(3ywVWa@9?%280C&R2lE%SE$ax=qh z7S6q5?xmB>XtOD^0Tzp-=^qjtQKqr=<%hP%YI))vmP-w(0bjnD@Ta;y)8xR;`)v|q zJg%;Fo6+P^EpRuuDYekSqyp_M{IK~|3{Gw-I4%vI8qw8${5ZOeXEGE4Mqs==*5Z8&FL(4@>ICwnp^GFKQE<>^FCmBp8PSq>DgA^h+?`-#-rb0 zGFDp^Yq-OPYp7i)2^`enIw;3`o0)pR6B{DgO>juvz!#r1Vu)G^l! zKAUv^MShSepMXSGe5#H0{#GH%GX%FjcQLSPt=|GrtuBv5AQ#rD>2daK-c(amM~RI&-eh z6dQR#czTyXkX$_c#%%^iim48zg_xtF;v5>2UeBF{c*r!l%R1izyefXZf@J+-2$C1m zj`wvh@~u6cCd#v|`&TXP*ktLf>$RJ?@zkAf)Oo4Bsj2A@TGVzVuVdLl9X-xg8j~QS zm2LIUfp-v3Ojt}<)h^0{ed}4lC|-iHhMD{>zF%H4sb#Vv5JQf^qF9a!gLF7bS!jQB5FK1+j0dg|$-DOIh&I=0O@&@*X))%KA(ZOZL@`60T!?^Xl6?Ng|HZjg(0p?9#%GdMxq zoJ|8of0wpS%Y2pOaZ)Zbn!DxR1iNVl2<3Z%**SSf+4~YTTjnt-b~fd9AkRAB*whIc zJz3*YXGDlfly5v#G_6REU+F^3YJm)q4*r=+K(vqSxC=%-cWIJ$sF)Ydqo@@-<73Dn zU6NjYy0X|T$SbHz_I*pTW#SM8!hBg$hFqU~~HYCTN|7 zx|@wG7h+*|-*G81Vt19gfOUzglcy)Q05b^%u|J=LC&YUghW{O_M>UpN83+0|p30<{ zD6EeVwgmpk2*YkL;B9n#WdYGz8l%vN|I;poh$$?R3eehhgF~m&c#HO4kJ^ z{L7}xIUig!C$KykBX<)!&;w4l*=sks(JN%%B^h_i+RJIPQ>n?ynEdN!^g7@BELkomJWxv zx=8!+i0AK6wp7i}t`vUd$`@Gzs~3cm^Byyi2dgb?)CwCfK2)+iEvQIZUG)sNrkMGA zTyr-40PHaqqIKo2d*LQTzPNlWEX*7-I8gkEKHYd+KH*emJ4P}HN@P)xOq` z@a&@Y<1ogvUuMw-B#Dq!vhdwK;+v~<(TlK73(4q}t?MeEs>rLe=`q~qPboid+hulI z{!34if#5%}ecxE9mLToI^j?$4^LXAZvkJ$b5_DZ5nlvzL;TCYWG0uB1(d=t>YCOg1 zksXL;C5m@ zQ+p~m@$Ucy@L;GiZu1sUSJHuetafnm4Rh~%7M{v#E}TkRI*=6QuPlhXDQJ|V8F*C5 z!j4JRiGDigk%v<(xIbj4+zh@21UCs0Z-4qh`&h>MDfGdXqzLKYQ?KpcRDr8kOHl*a zQYmPE^%(fZlkb&p4hDzbXBf?twtun8ep}5u%0rj=>QdS*M!e?H^!qi<{)KII#ur+z zvjadCZcdB>LwW)61#53J-GL+YpX5#8(=1>p2u&a5$$F_fPZ=xmS+Z%NDp^j|%iV_% zp&`tc#u@3%Nq|U^QUk>9E$Le6eG+}Dqjqo8miY&$#r@!s%n)v$Vq;r*)beH<4~~-E zL_?HOmsV)?qrhuLu-ofJwr-(n+#K{iM9R^r1O4`C>2YT;yh8%`tigrKWB#y!xk zgatw~)yaeih%DPS5vW@2H*rJQoc=9tG-7W|nb8bJYyB0)zwpyKQ35r+XwN${ zS;kpMBNA%nTYh(aTdQ!@V%Su3-A75g4t?*aIlSr*LLS=x?qVr-;ni!m0E%u!ti`pQIQSY_hoVdM3BO*K z>XDU9Pw@x-&9N{`h{+y1)6RseZ`I*Lxj3Eye^#5ev0{m!C(wroBl196; z0=E@eQ8j@cjAiq~i={fN0b>iAO1fHn?oQl*2mqcjIbNTVNpA_iabyTj!EU=jB)4!|ZZ}!~FHK z9Rhbqh>)1$kFCK2)=UHMTc~Ds`xnd=ign%K<+|o4QzC{JK_%H1pu<+uL`+hDC{I7y ziOl!{oCz}ObXCS0?hDj7>o_kSXsVWTE};m^F&SEQbEyN=R;%4f4sJIcl4ssk=?PAE zNZWYKh{g=Y60)Cel}$q5+Mr$mBTSUYV78#;q?e0F=9>ddE&Zg>7;D}zXGm7GACz%z z9o(;{sk|GcQ`4xEs~q*X5`KwKg9ItrOJFM95eZ5|n~!~K!_=*9s9a(75lM0HqIw_e z8@5`cmIx>mx;9@))D%w69Q~bLM+y-ylS-&xCT?Zi5*9_j2k#KmWa+`X7ank%{r&a_ZE-Uzq+arx;J4W@4hhnV9}<6zI%?6-Lw zp0M`)$NI+4%`MXJ{ewT`L*VbxzjiTz82@X?80gdRZ}~s$;-cGiiiwGliJ3me^qax| zR^Vbfeev2EZe0sz7e5{e<(Fr9Z>8pa?q-oxxliPK^lb7RzmzIon)I(}|FP`<&ahYi zUzYt(!~U0DI1n2n1AX!sxj;}5ZT%01*DJVXCzqG_xxTTbCdv(4zp#LASlASq(b8oS zI%W5@=JR5ZzSuLt_vZw{**?vn-eI`5oux^!7gp`=wHb3GD*`1oD zq}tT>9Pi7%#l@P$4--UgI7E|@^Ml=pPB${M;A}yqe%z{+m;RV1Ls$2z<3pFSb~cC+ zcyi8jRbh=Jns!~wkES;%jota40$J9dzc4egR6R;(PMW;3#ZVm`E*n0xEJ@Pn@hAfP zs|K0lT>&vX7VtSuQMYh1=ZlUK%_L8ag^x9YT^vq8HE|>nb6yX#H9_swpFI^T(A!%3 zZzSHRHXn#m@L0sRDDT-tBicyEJ-hRK-}{F3az_}%0+ z8`7EfP&be?LE|2BNO~5b-b(>ailEOHAo$2~JX5C?5y2J~wJJ^$YZ8!o@qZ zPvywoxMc`^hArj5=}e2;JwoWcd24;!ex*KecJS2+Xf+!~G*dVwDD$Ze_)8KYr0iZK zaSjVLHer?ON_TYB@Z)tvp}DC+`x$%C-*Zay(JI*sJo*{epG`Z3y>;2LN?XqyTtu9J zPEU}ak%aU+zzrg3>*$W`g+`Lit^jGgPy8yWqoK5CaRs-z^EIt;`7$nNnH4_z#O2o$$_9y5-f>m10Aw)+PmVm{rg@*K|yHp*G zvMl;5T!S-ZuPSTQzIOsrR?m7*G$f1N*v>QO_gdz5fC(YPe>*|@!Wm}|PC&8FLNng; z`AyUHP!1SwJM?+qlk05h-|jr)xYe7drd-VbN=@o5tpv*6A%Qd}Z1kRh&Y;WzbZJ%R zYBd7yh{8}Y0}2@nI+ z=V*MymBf0gZ||JvlaC6J@jmX<9 ztn@C6U3e{W*YI7#ZAR)-1n!T3g6lOVe*s3o+_@fq0y;PQu2&o^!%UMV`EOz=ayT{q zu^gqtwhE4(vgfDSE6_}6Vz9|Z7qr&?yFV$|Nt01b6%mfMr+GryDb^jcG)|<0X=`hU z3~{tBR|GfS%DK>dtl7OIfyDmIpvurEZ;@?x)px!^97Ajf+zG`1=?*reL1JUSZ$8e; zKJ2UY6*qy)FDT78z9!0P&*&@#^ZSUw?3|P`R0v_HYR4^dtV_r30yFV3*J~&bjP4DM zjj@kOupQPD5R=yF(1`$jrd zAzSN>m6yK1&A3sKGDKC}bib30J2q*F{4!B7m)%~!sQ8lsIXn3^^WGOb-LEl@FH>`i z%}M;P-`&lXBDSy*IpPC$9v+^6oM1NSZpaD9jbmY-d_;67XLbL=8Q=$dec4eLX50aT zRm^#0`;VITjx77ynvU5gb>2KilY6;$(pYa?uey|Z^|72F+jpa67I$_?3GG_z$nLPIB;zE0QqC($9{$Dd&7FO9$ z1`BKE&|#O@qk?k12kRE~wCVc%tzRD@;njk~47Q;ke6_+R+-3Ud5!o%}+RrRQH?R9E z+V1UDq$qwOxyPjY{Ne+Q%=1V-+1HX!K-=Y$JAnx|DtfJ^dipM=SqoQ)zy(AgBO|vT zvb24nd_<;?n6@@5`gOXY0m5Y?gN0j<;6i6GK?`{$;-_{BNsMtIk8h}z;} zkc8ad^WOHFean_DAC33QlkhA!`S3aVL_@tfz7^jC99F%9$r!+!^ax8hJ(pUHG=eZw z^czSSnMq;z>B2$$PZ>{d_|>*6=l}68)_*ML#rI9{YtH2jyXT?X?8X&N`Z%K-4i1Iu z6$ihcr_A|vh>`{z(%Viz;EcKAhQi0voHU-5k766`B>`3&zdiVSr?MJxKb0bx82t`Sk)Jiz1{PYwCG*c6VPrb zm4&245wWDZrx`GJq?FJhOPgA$Wsaj56#u*igyR(3o5HXTdOhQo#Ugzk} z(T(+{qdx3!T;<}uZbb1)Nan6L8Kb^1Y`7B2)4-!TO!`AYI-Zxvv2U^~3&fv${l4Tu zaGjjKvd{Y!`S$seucWlbmfgR9bb`(|&Qf#C*Scp41E$JNRo`zmq`kL%<9m6@tA19z z6;6P03^(-?(5%Li=GQ3IJl{+{KjZz}H^`dFD3g41PwoSW)kGk=&A7VW7Ws^Xlf1wq ztJe0V$}$>f%eR#1o`{{Jojw6Ygmik|Fd!5sbesYh$@C@i>M@YAmYG^;UJP`uu0+!y zTP-Pl?*!pUnWo0psp#bCzR5QAUFF>s-zeosM{GAu3Mf4`0H*sfVmchhW)wq`Zy!f2 zn5iO=Bg*C)P~K+&yhhrunauo=V>kZ#m7sQZf;B-Mx0w-m$K{2e6X}gBu{N*U!2bvU z_D|=d?#V_AoP#7 z;yLA7Ip?BB!QC1Zu@M8xg_T-O(5V%EHL}!G&B+RYYKrDm4_09c85){r#%+&%7q`~=swpMd&K zK*HPD1`RFO!Pvbvm8#7-T*fP)wpSgOoK-w@rnY!~TtYzE$VK`c{U>l^KTK{0sCcLtjy49XwRuU?^00@+R;2gYW8!s~3xRhJrj$(EQcf4< zEbcU3t`<}tVl!~TRrIvWkUvwCq2Bb-0W(*(*^vgx%0LJa-fb-$m62S&_MEY+AsZa) zUDVvtpXV7h{3TBECBwB3)*R78-m^fFb~KP%6z0Hc5MN^XwG3YJs5la-^{jf-?18Mj zR$tpKKPwqyWmxluF{+F-Nn`v65F;pRCwRGQI!h)hYc(ASMSjA}mjw#pg_;wP!UC+(&T7yB516GfZPIv1S$!~e;J$(q!5}7_Z*#&C zWk@oeQFm6K-aS}yu$=scI6{+snw4VeS;VYX(-0yazI{O|j*bSzEQ;tc^o5QJ(S*hV z#*bPbujXcu*2k?deNa&>euy}S3H4o@K=JriZZ&q!v;HWoCRc=hu>1TyD;akA>g|-S zU-NJpOF12P*nw^$YxfC=izYxD?yMb52p2)l;kNG+W8xw5+v4m~ZLso%8;d2_ICfeg z`$XK2#?*`1wl9&pFYZt7j*qT12JgU+ooJ)sk^o$0mzfBr2R;_aMf>rONG=Ggc^(2H zPSTq#m|)p0@|NBE{=DgV&BWP4*T0)q5tAT`gJet7a6AZ4Mb&S1e{5 zk8R<$pL5{AoR8rN-xUSE<492!|#a}V^E-$RFid1+#(ha_}A=EVt! zvyLOaLv{*vjcC7MF^5v}T=f+}`Vx4d;&j3ruzfglf0?CkLZ|3)^0!;ggx@%~K8wr+ zSX9RiV7vecrkytgOi17dK#Zra3`Oo`;WENL=|GDQ8yTno@1jXJ)J_#7TU&bi3w6|A zU2r(76BUz2oK~`EXeVTP2arqJMi} z`@-X=PrvFiMZolz(cKq2SIdIQ!KP5U+kxA(vQ5ve*dsA`iUwBMIISRh`TI7b%C$Gj z`@g@Wu3lyWkD0&J@~Oq!b!Z_i`$D~!69`Ido<{h}Fuj=vdL^D34FXwn!9lepn%sKw z%KBZ8UC*-!R%1zigJBuh0t$KChnwb|SrlPW2=VqntbdkVzboGlEju^G96K~uiK%I! zIxegKQvM~3;^bsuEwl}jd_@Yw{in#OKupO%G#5D;fTvzA?NH$km)Mq~W7F&KH`fQf zCA!eYa>EXii|eUWM#_bBdO%UZ{ADhlF0FQNdno^%Y3ylvAQ3D7h~F>IdUFs z4^?~8?=5c7>_n3bNOz`cn=GLbXh6G44aPtli3+3GlbF$_!egD$N3=D1I=q)9(}k`D z`<;MT;e9&K0}vNsy-^RnWT`*KtLHk=Cm^4BQF<8B>|BjybF4-8R0Ho@|Ji$@*qRSg zehvbKf=-8nlq~*KuT(G8uG3NVDY~1}JP>dt>A-1gIE4qnwAPQV{(ERZo5b^zjl?pKZ4IJ=&ONwf%s*m(@S37H!@;f(+qd>Kewd0-&fCLW@Gd|mZ7n_ za17p|Mxs5mp-G`p4T%bM7$#&^&ock)F8Xu*3a3HfS{S?bv3?J8YC-NYe>~y3lp|;? zf_(_~{RBi-0K$$J=_ywD9{y1__zhXKf=(T2f1gy#wC6`z%z_!VU8Ibmx*E zuUY2k_IzE$Fh>1qvG%NAF)Kcxvjrw#5~ZiHV?ksWu_DbCyH`+D>%Ad|2K8Z1+C8b= z=unzoh2Pf|&zunz2i2O4ciuL!nJob=$n%Zg%`z=Ba=%khe_(lyOR#zfBg(&W;OO{sY z_lX^icy#>oRRCS&`Q@WwRbFkw^sl@IWFbb`a9zS~?E>^nn>jfTDx%cp@No;nuOmc~ z>7LjU4rw6f#;pAk+|Gp+E}b3JK+%56W_GW;y{q_Vb-GxJVdhlg9T9 zU-$EgI(NRfF~Q{9v3OAF09Q+PzDW0RX`!6IzcH-0jpM+cq!fwralQigPn4<&jO%}N zBk?MCl&1k_xvWKCp|yo&(YE?lzrRU#flaGwKCL8N3vgdO0VN&LKL^lQI=}CXdPrnW zUT*~~*Qyx-!oGFqOh7B35Y^T6Tz`%*<7AAQ&A$90S2|u$Oz}=s6j};Kv_P|OcF?oS zS2PqG(YJdTk)%G|i>WyQMF;qDYzAi+9PKWZLb$L$()dFhzdH3*%Vc$5x?A?*X7!hq zm=1cH_bLKF;AyG&92MPr}2panZ{L~xgCh;U`Zk4uVd7;V{ zr{5V*d7gmmfy(s3z7A1>Xah!CG|2N+X=H|{-VE?*FH+j#y8natL)XjARR}xHLUGuE z5vjPpQyg&us?AL({z*FnL@+1ROMfPkivq9gg1fSHJ{jf}e|mXILAbx zFY69*FU4(IH)!Ql<%uk8@ngB1mIihF>7uXlmntzQhu2*j*@wzcQhIVht2hb^9%32W z<8tkKk&0TSytQ(ba`=M4xqAV5vMoJHmnRcF`_b`^({GBE#*i8@6nLLsl9>i6MW@G2 zu*9`Vry*tbQv&<23G4lOGtasypZgU{%?>t*cNzL})U&i}s1?pXwM{3W!J_Ooam}fn zn1heyDEriRgGYGQrn66Mu5TwnCPKq39R1>d7;Lv-CYZa6$0O@bJ=2|@NaP45FJSxA z556QO8`L8;x(C6;SP!vqCoSkq_MvvsXnL;MBOOfP6|ZlEok@x~x_dDRbBZ?N^fX)! znZQU}ol~Re*c{R`D`vl|kh9c(9-t>5kYvE7U~@W0r-2bU<=P_W+713YtgEfi(T1-5 zypjx6>Q#!{DAqyXE+L2vp(&Ne?F(@$a7_wfeLp> zOeDHnfv(2|16JOI>Zoj5IRV1~unrvk7^^QwrsH=$HTHR*!>jhaFwO7wmkO#`1k3X2 z%BRBpw2#gm!D;8<$ELl$#MXWoV;f&Ju+c9rN-D|^DcKe-?l)<*BrIqn)kxAwb@yKx?3s7J44^USiQ+$*@TKEN2YHo;o_&$Lo=_crxq71ir2mRtXXf{R?5S})|M zP4!rHH^xSv?-0PpNEKT*)+Yrk`uKS0{dUOO=`Zz3**gKzSpMbmnbeoz>gaAQC_E(| z%-g{Slsl5flj;1vLy9C`$~=JP1wwJZx5B8_GRU3XU)+LkVkH?QtnM-2O*8-QP7x&? zv(ScDKAZQhe0$fAuC;lg=F74zt_ai<5}pT{`V$n}*WTSQ^b8UQx74P%{uwFfzqA9i6Mi=(7-(%?=QtyM_iXs~vVHo!ePJsn=66^;fXn5aA@Bs-oEn zmyiQ?V|APCwa`JP&y}rl&>+;@;8%1bUCq!v_6eWNRVAj=u;Cii5;dxJ4_SblA~VtH z87GtAG^tRP$Y_x}59x+`OPbzjiD`;nvaPt9f9-dFxK(c(!{BvyL7iVJqkN76^_6O; zwJLv`W6~6r9TT#$wT%kBIbQdwi)fN4Rp1>xn|T22mQh${1N4Dw_{!UTw6lO7K|$Cd$Dnurr@d;HpZ&_h7ZW43 zkHh2$7Tx^?z4H^#SpJ&hi+g^>lffKW#xrO)@Iu!8deUQky8mFo>@HZ8%4!ODe#~yy zp3vv9e_JbrgMVJI=^3lo*Hxtv$l0s`^f`#?Px7)Pk-joy`ddyPZ)$|IO;;2Wi&H+P zt2NLDXhUex%VQ1CV2J$8hbgtQI!YCuJ=3ttzbV%J zOw|pMlI#IrlM;fso-0sdV#K6$@OkZT(Se;e5D{0;QWc0ON6c@`RzvI5?3Tk8-U?Ou zoGZ<|@A&I=$ztDow$+g9J{+pOZvV6ZZ4bO$+;`fO)XdW!G(Vg*^U9ra#^zeTdH(I0 z+~9KixQ%lE4aSopm4hbVF&-=Y z`;{T9`xtt20IO<+j`tZH?6|N2z0tIJ0y2AT;k;!we7mRl_z%(NE?{trPGbjO1+PUo zZ)%@_@*18(gThEtZLF&cC!l`GJb3A6ODyOaVzCNLWf?HL-!$iAUhudc?9^cfz%=!61%Ml!ELj+jPG9<)x|X2 zitAi`k0I(=B*Ota(mm=m0{gj6jM^5Yp2|YQf}j+hEZW)T0Ykuw^zgUebe}z+rnX_+ zUP@8tYV=C|`O;(g@F5Hr%BXl#I1z_V==AVBP`GUuzx;c!C$lAsEEBUf#nXrDukcpL z#R!j=eC1c?9+r$sdOD>=RiZn(H?<*931>-`p?*LKgy1u0>cA|{fHh&QKl^I?9OaZ6 z%dfiOcP8a_ijj?4dcQ~1L~K4a=On&%yz_JCZUSud*N(%nH*$sSG|_Pdd1-;*p3ruk zxJ@w2l)zG0iYU-Y+GV8n0QV^Po3G?-K$7v++3+xp$40lW*(9qkyt%Kvf)k*fV_f49 zr;Xa9cZOG?aWA7qD7`l^>iBNT9OvCGFkBJ?QTwrS?q4^JG6*^=xAv-UqUP5OghF?DY3BrqXnCjnn+*^@Olg_MJ} zk?OL2<9wlY?o(CuA_-@w4S#=UBlZU(iZ+iD9KQ5@nB}s+YQspPrxSPRP*hEufY!SA zQlVYK8vRuNuDNiY&%#O(N^Kg%m|mL7%*SbGJ0F?PZLLi$^-Za_zv#Re>$y-M*89+0 zgj$aF{DqSv&ycL58_TwFgMHxhC`}@*ki?-kCjs~tqSR+x8lx&tKn;K1Z6mbf`jXf_ z8-U**a$mKbiMl_EnIyFtbk{4x%3VG^v&Fa@>nvUWxVnK}R`Zrhw=i9Dp7ViybbDKU z28-YN$FY;+zUJor$Oo97qW2;1>Xx&ONA>r%_1w`1{=f~of1Dvfs)<bCv-X|jG zt`V%EL~Bd}1T?*e5-AR!qyu=ssHF7-16H+;nxi9E>{!3A_b3(Z(JNkdq0Q(+SiV%O zgv?{umGfUa|AF$+G?n^);kco3v}+_xyjta@-GgK8-B2aQO>sf2{7zoIp<83aq)V=Y zl;QB**baEei!9%_vDIZHjl?$faln`FC7w;p9{IH%uDYeql_=4?mmc{;ss8MIsrMCs zxspL(yGJx(V5BF|Z6A9XQaHaQU{dN?E5UBYx*Zg2 z5>^T`CVCD1kceiAIsskjWJT0$=UxHYt4Dvxx$M2w7zYuiFjf5?B*&DY|PFK z24lGIJcXLf$gSFil;25nYWWp3z9qkLtq1AChEJzS^y0Lsr5)2GCp7|U74=K1k;5lSIQcgSkq=Pw1=(in!%#bm;?`cbgBdmMjDwJ{k$4BJ4ush zR?`BPbk^EXc=pNqKzcPYzX!${&bz5WQ*M~9H|O)fX~a~bv{!Q=3;GiW3pwTwT64n^ zuILOg1x+(0dV`w>%m_AFKga_JPu$7&jPb-F><|b*S@a(gD0%l{GI8x>YhRRxQjk; z+1Zpe!Uh)K_eGWzY7U9o>=e^+{}uHO)I%wTAJ?DK zLkNql_|Vu=tJtrAUmkCd!|mL90s6Z@rmu`wK6J(UGzy-F1b45nR0eQxhnc#CFU1>41U@plJsyR+oj}*wDc%I7 zSQw{X6X{HIf&FGLmsP|ww`EQ6B0I&#OL@PS-aYLSlG>ZnS0c2Ew{ zz-A%1%y|h3zxi%J*fYUAcYV#wVa@I0;;GK72bNssLO@gl56t3r|`YkC>$vYW|Ju5H6MLe`j>2VetcX380 z`j<`1tQxCJpr=f1(BkEL@YqGZzYwQSe_uA}gL=j4hY#L#J=I_XEc)J_fFf)2;>Rve zm&%_3vuoJ58?dQ`;4FL`r%SC>^UY+h)p|la%`+k3N$q5cEg?nVH+}0g>vXoo&~r@P z$TizVCSm|@VM5+%bGz>u0H-8l zUfY=#@^IqA^egAT3_9h-Q#y^0k8g=`MbtMB!hZ13&NkeoE=M8FZ*)uwc#SeL*tD+9h<+TRhSs?uKz8~HFAxuS|p~+vS*_7+&^vNk}Rk@ z+cuVk92Gs>C3t<+LJijb>*Xaw-%dbxDdt^Bm&mVItu&Rmgy2r0sqbAhN5lAx6B6G= zcxqV98r^u3-fC{XjET=An8%7sKig_9QM{pt+~46m)udmo$eIj)x|a9F1kNnsnL}Ag(gPVvUgT6-7B?>$tyglyPb}k zT6VMyikZzJJvcBMBO%*;&S$BaKBwQO<1oqDMF~$QzwaKqy^yw&Vms9{;25mUj^;TU z?1gb{W+@le*LbOS4@G+vK6qV)JfEn`j1?09^FHs2vxWXw<13d!aDTw|v^c2euKl(y z9b)J~sGIlC0$)^hop}tJr#?)&>9%yM34$=rJ}Maajy?_ePs_x9e0Msm<+_i7KV*!px)Iki&m5}ge8 zZx*J;DmJ$=3Tv+g&=p@R_jmpNEeloIBo!0s&)fs7weM?Bje(r<)9-EAA%wKw zshBhuKzepb% z)WNFx`TlI`+8uiu`XJ0}^4LBiQA_e5bDPF0bBq`*H2ARSg=Te|dh|-pwqgaJ@lM{N zi(r^4p z)0Ka@5Xvi=_*5V9qdeiE^3zaJke0vMgsQ2DGYK41Cnhn4Sh92=ox$X7X5Q0(oV!KX zBQGzXonZT3`z0Q+-4%zWa-S~? zwXlL*rj3DxI~3?A(B7^oF#u?bS(IWYSKtb>9c-R{E~aiD>2B3ZoF!vH5e?f$&Cc4T z9}67Qp!t|2XI7Fx&x*h{O=k*q9ZkSQ=U#24&6C6$;(V~#m2@v|4m0V zs+@AE(H9kU&(tC1GCMa_XV5OuzM@$=lvn!8D0hhzt-ZW+c=wu_>Nb@$Gb0zcJj3`6 znBQSZ;@p&IzTC3RY6^w#Hu(urV>kc!Ix-*M5wV7Va!_=q15LoOFqSrpvTsnb^Gm{W zejAJ#VnmX!zS&OkN%2F$3Y$bg`zksD6X(n|2@wN2Er?2kVsduW+;Hj5X`Rr)NFDSC z7&N9z?7Z;CojGqprbw$0$0%DHdj%*2w1}SB@9+G?u@i@1Vzj~rnnxdE)w7*Sb1GL! z<8f{+ZO?A$G06ss3Q0YS{XohbS{0^D02%a9@*Pkjxyg;H(3PP!HCMcL(y;rgTJqt* zXV28nQY=b=tZ@!wd!uK%&Oc=~ZnF9wzWUx(`gj<;VN&V=W_FFrfv8ZFQHiou#i0(< zd(;5Ie& z-Ju&@v=wBdAskd*@Gc>w>SEfJN@m1zo#~-9+$rB!mzh#kfwFP?Vm{o-R5z^m#RHWdi-nPg2JRm{i8#dYr3z};XNkLZ7OD@2lhvU@jP9Q{Kb+om6AlW1Y2%tO`zdWQxnUG)9iVyzR95ih+h7g~Sn zE9Ne-hc9O|c3DU)1Rn*I_=6>(qeas+79o0okeGG- zO`xViq~@zhPKeNzXjOK|#U(nivo@SL|JRF3pSxF2>BGYZ^=xNctA0t7gaL>y8WcEQ z&3VMZgAxWz3t)}OG;WkSNxI_YLA5Z-ilj&1F>_6l({1{#rb?t`-1sq88tCfltJ?57 zYad-_1YONSf7^|F%5{DGpM-I6|_VU-|E^~7hGZE5rW}`n&H*dje2D_ZJ$qrNugr9O| zN{wnT;7->xVoV!4*Dzd^<%=X*^K*YlDM5*I<;BxR;i}T-rC!`0DP@Nh`7bV4qoQrA z9>o)wja+iovaj$y*80T6_2*3dtC8v&-)zDYb}WxTYU}D#<{y+YKew~s%c5`)>SF`{ zg^rkN-Q)venPwLyg>w6v#F$7wl5tzY1^+|6yDhxN zO}4KezRbAk|I2CR&5h1q**gEJJi&~C##~HI5L`R>Vv+4mkyKwRyKn+}kwUD#^E;-I zx^MJ7#Sz`52MYN{9Q`!Lb>?}DniNDlp5 Date: Tue, 19 Jun 2012 20:23:45 +0400 Subject: [PATCH 106/562] E:0041629 [!] Clean URLs: wrong URLs parsing in DrupalConnector module. Fixed --- .../XLite/Controller/Admin/Base/Catalog.php | 9 ++--- src/classes/XLite/Core/Converter.php | 35 +++++++++++++++++++ .../XLite/Core/Validator/String/CleanURL.php | 5 +-- .../Module/CDev/DrupalConnector/Handler.php | 12 +++---- src/etc/config.default.php | 4 +++ 5 files changed, 48 insertions(+), 17 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index a371a913ea..621fabb5e8 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -35,11 +35,6 @@ */ abstract class Catalog extends \XLite\Controller\Admin\AAdmin { - /** - * Use this char as separator, if the default one is not set in the config - */ - const CLEAN_URL_DEFAULT_SEPARATOR = '-'; - // {{{ Abstract methods /** @@ -175,8 +170,8 @@ protected function generateCleanURL($name) $result = ''; if (isset($name)) { - $separator = \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')); - $result .= strtolower(preg_replace('/\W+/S', $separator ?: static::CLEAN_URL_DEFAULT_SEPARATOR, $name)); + $separator = \XLite\Core\Converter::getCleanURLSeparator(); + $result .= strtolower(preg_replace('/\W+/S', $separator, $name)); $suffix = ''; $increment = 1; diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index 6023aeb7fb..153c371d7e 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -42,6 +42,11 @@ class Converter extends \XLite\Base\Singleton const MEGABYTE = 1048576; const KILOBYTE = 1024; + /** + * Use this char as separator, if the default one is not set in the config + */ + const CLEAN_URL_DEFAULT_SEPARATOR = '-'; + /** * Method name translation records * @@ -290,6 +295,36 @@ public static function parseCleanUrl($url, $last = '', $rest = '', $ext = '') return array($target, $params); } + /** + * Return current separator for clean URLs + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + public static function getCleanURLSeparator() + { + $result = \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')); + + if (empty($result) || !preg_match('/' . static::getCleanURLAllowedCharsPattern() . '/S', $result)) { + $result = static::CLEAN_URL_DEFAULT_SEPARATOR; + } + + return $result; + } + + /** + * Return pattern to check clean URLs + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + public static function getCleanURLAllowedCharsPattern() + { + return '[\w_\-]+'; + } + /** * Getter * diff --git a/src/classes/XLite/Core/Validator/String/CleanURL.php b/src/classes/XLite/Core/Validator/String/CleanURL.php index ca986d171d..5c275a3bf8 100644 --- a/src/classes/XLite/Core/Validator/String/CleanURL.php +++ b/src/classes/XLite/Core/Validator/String/CleanURL.php @@ -125,10 +125,7 @@ public function sanitize($data) */ protected function getCleanURLPattern() { - return '/[\w' . ( - \Includes\Utils\ConfigParser::getOptions(array('clean_urls', 'default_separator')) - ?: \XLite\Controller\Admin\Base\Catalog::CLEAN_URL_DEFAULT_SEPARATOR - ) . ']+/S'; + return '/^' . \XLite\Core\Converter::getCleanURLAllowedCharsPattern() . '$/S'; } /** diff --git a/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php b/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php index 33ad277686..8709ef4822 100644 --- a/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php +++ b/src/classes/XLite/Module/CDev/DrupalConnector/Handler.php @@ -333,22 +333,22 @@ public function getURLByCleanURL($path) { $cleanURL = null; - if (preg_match('/(\w+)\.html?$/Si', $path, $matches)) { - $product = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneByCleanURL($matches[1]); + if (preg_match('/(' . \XLite\Core\Converter::getCleanURLAllowedCharsPattern() . ')\.html?$/Si', $path, $parts)) { + $product = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneByCleanURL($parts[1]); if (isset($product)) { $cleanURL = $this->buildCleanURL('product', '', array('product_id' => $product->getProductId())); } } else { - $matches = preg_split('\'/\'', $path, 2, PREG_SPLIT_NO_EMPTY); - $category = \XLite\Core\Database::getRepo('XLite\Model\Category')->findOneByCleanURL($matches[0]); + $parts = preg_split('\'/\'', $path, 2, PREG_SPLIT_NO_EMPTY); + $category = \XLite\Core\Database::getRepo('XLite\Model\Category')->findOneByCleanURL($parts[0]); if (isset($category)) { $params = array('category_id' => $category->getCategoryId()); - if (!empty($matches[1])) { - $query = \Includes\Utils\Converter::parseQuery($matches[1], '-', '/'); + if (!empty($parts[1])) { + $query = \Includes\Utils\Converter::parseQuery($parts[1], '-', '/'); if (is_array($query)) { $params += $query; diff --git a/src/etc/config.default.php b/src/etc/config.default.php index 580abeb13d..71a1c1c18b 100644 --- a/src/etc/config.default.php +++ b/src/etc/config.default.php @@ -85,6 +85,10 @@ [clean_urls] enabled = off +; String with one or more chars. +; It will be used to autogenerate clean URLs. +; By default, only the "-" or "_" characters are allowed. +; Empty string is also allowed. default_separator = "-" ; From 39db9ccc9612be63094722bf57d697cd75d67be3 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Tue, 19 Jun 2012 23:07:02 +0400 Subject: [PATCH 107/562] E:41544 [!] Bug: Mechanism for determining a last administrator with root access has worked incorrectly. Fixed. --- src/classes/XLite/View/Model/Profile/AdminMain.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/View/Model/Profile/AdminMain.php b/src/classes/XLite/View/Model/Profile/AdminMain.php index 58342ad81c..983425f93c 100644 --- a/src/classes/XLite/View/Model/Profile/AdminMain.php +++ b/src/classes/XLite/View/Model/Profile/AdminMain.php @@ -398,10 +398,13 @@ protected function setModelProperties(array $data) unset($data['password']); } + $model = $this->getModelObject(); + // Assign only role for admin + $isAdmin = (isset($data['access_level']) && \XLite\Core\Auth::getInstance()->getAdminAccessLevel() == $data['access_level']) + || ($model->getProfileId() && $model->isAdmin()); if ( - isset($data['access_level']) - && \XLite\Core\Auth::getInstance()->getAdminAccessLevel() == $data['access_level'] + $isAdmin && $this->needSetRootAccess($this->getModelObject()) ) { $rootRole = \XLite\Core\Database::getRepo('XLite\Model\Role')->findOneRoot(); @@ -422,8 +425,6 @@ protected function setModelProperties(array $data) $data['roles'] = array(); } - $model = $this->getModelObject(); - // Remove old links foreach ($model->getRoles() as $role) { $role->getProfiles()->removeElement($model); From c46a880c588eb566c45d6ab9987998c2c9b26be0 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Wed, 20 Jun 2012 03:02:16 +0400 Subject: [PATCH 108/562] [!] Bug: Finder 'getCategoriesPlainList' of categories repository has not translations data (need into \XLite\View\FormField\Select\Category). Fixed. --- src/classes/XLite/Model/Repo/Category.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/classes/XLite/Model/Repo/Category.php b/src/classes/XLite/Model/Repo/Category.php index 638a827a2b..f7e6fdf0a7 100644 --- a/src/classes/XLite/Model/Repo/Category.php +++ b/src/classes/XLite/Model/Repo/Category.php @@ -301,7 +301,8 @@ protected function defineMaxRightPosQuery() */ protected function defineFullTreeQuery($categoryId) { - $queryBuilder = $this->createQueryBuilder(); + $queryBuilder = $this->createQueryBuilder() + ->addSelect('translations'); $this->addSubTreeCondition($queryBuilder, $categoryId ?: $this->getRootCategoryId()); return $queryBuilder; From e70fb0f83ded73e2e1d23fa3ed107a8071514539 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Wed, 20 Jun 2012 07:16:59 +0400 Subject: [PATCH 109/562] E:41631 [!] Bug: 'Roles' menu item displayed if admin has not 'root access' permision. Fixed. --- .../CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php index fc7b3a5833..5951a44da6 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/TopMenu/Node/Users/Roles.php @@ -35,7 +35,7 @@ * * @ListChild (list="menu.users", weight="300", zone="admin") */ -class Roles extends \XLite\View\TopMenu\Node\Users\AUsers +class Roles extends \XLite\View\TopMenu\Node { /** * Define widget parameters From d0e162f45e61b1fe9f113486e68783d4656d68c3 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Wed, 20 Jun 2012 07:20:12 +0400 Subject: [PATCH 110/562] E:41632 [!] Bug: Access to Address book page denie if admin has not 'root access' permission. Fixed. --- src/classes/XLite/Controller/Admin/AddressBook.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/classes/XLite/Controller/Admin/AddressBook.php b/src/classes/XLite/Controller/Admin/AddressBook.php index fcde7ed3b7..01c81ded39 100644 --- a/src/classes/XLite/Controller/Admin/AddressBook.php +++ b/src/classes/XLite/Controller/Admin/AddressBook.php @@ -44,6 +44,20 @@ class AddressBook extends \XLite\Controller\Admin\AAdmin */ protected $address = null; + /** + * Check ACL permissions + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function checkACL() + { + return parent::checkACL() + || \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage users') + || ($this->getProfile() && $this->getProfile()->getProfileId() == \XLite\Core\Auth::getInstance()->getProfile()->getProfileId()); + } + /** * Return the current page title (for the content area) * From 857be783d95bd46bed7f26a8e111a5e19b81972a Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Wed, 20 Jun 2012 09:01:23 +0400 Subject: [PATCH 111/562] E:41634 [!] Bug: All assigned roles are deleted if admin without 'root access' permission update profile. Fixed. --- .../XLite/View/Model/Profile/AdminMain.php | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/classes/XLite/View/Model/Profile/AdminMain.php b/src/classes/XLite/View/Model/Profile/AdminMain.php index 983425f93c..980e41a78e 100644 --- a/src/classes/XLite/View/Model/Profile/AdminMain.php +++ b/src/classes/XLite/View/Model/Profile/AdminMain.php @@ -398,6 +398,14 @@ protected function setModelProperties(array $data) unset($data['password']); } + if ( + isset($data['roles']) + && (!\XLite\Core\Auth::getInstance()->isPermissionAllowed(\XLite\Model\Role\Permission::ROOT_ACCESS) + || (isset($data['access_level']) && \XLite\Core\Auth::getInstance()->getAdminAccessLevel() != $data['access_level'])) + ) { + unset($data['roles']); + } + $model = $this->getModelObject(); // Assign only role for admin @@ -409,7 +417,7 @@ protected function setModelProperties(array $data) ) { $rootRole = \XLite\Core\Database::getRepo('XLite\Model\Role')->findOneRoot(); if ($rootRole) { - if (!is_array($data['roles'])) { + if (!isset($data['roles'])) { $data['roles'] = array(); } @@ -417,22 +425,22 @@ protected function setModelProperties(array $data) } } - // Remove roles from non-admin if ( - isset($data['access_level']) - && \XLite\Core\Auth::getInstance()->getAdminAccessLevel() != $data['access_level'] + isset($data['roles']) + || (isset($data['access_level']) && \XLite\Core\Auth::getInstance()->getAdminAccessLevel() != $data['access_level']) + || ($model->getProfileId() && !$model->isAdmin()) ) { - $data['roles'] = array(); - } - // Remove old links - foreach ($model->getRoles() as $role) { - $role->getProfiles()->removeElement($model); + // Remove old links + foreach ($model->getRoles() as $role) { + $role->getProfiles()->removeElement($model); + } + $model->getRoles()->clear(); } - $model->getRoles()->clear(); // Add new links if (isset($data['roles']) && is_array($data['roles'])) { + $data['roles'] = array_unique($data['roles']); foreach ($data['roles'] as $rid) { $role = \XLite\Core\Database::getRepo('XLite\Model\Role')->find($rid); if ($role) { From 322389436ba33733d5653ba82a1b0eababad42bf Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 20 Jun 2012 14:14:59 +0400 Subject: [PATCH 112/562] [*] Billing address form is shown even in the zero total case. --- .dev/tests/Web/Customer/ZeroTotalCheckout.php | 45 +++++++++++++++++-- .../XLite/View/Checkout/Step/Payment.php | 18 +------- src/skins/default/en/checkout/controller.js | 10 ++--- .../steps/payment/parts/inactive.method.tpl | 2 +- .../steps/payment/parts/selected.methods.tpl | 2 +- 5 files changed, 51 insertions(+), 26 deletions(-) diff --git a/.dev/tests/Web/Customer/ZeroTotalCheckout.php b/.dev/tests/Web/Customer/ZeroTotalCheckout.php index f9b819f9cd..70b4b841a4 100644 --- a/.dev/tests/Web/Customer/ZeroTotalCheckout.php +++ b/.dev/tests/Web/Customer/ZeroTotalCheckout.php @@ -81,9 +81,11 @@ public function testPayment() $this->openAndWait('store/checkout'); - $this->assertElementPresent("//div[@class='step-box' and text()='Payment is not required']"); + $this->assertElementPresent("//div[@class='step-box']/p[text()='Billing address is not defined yet']"); - // Change the product price to 1.00 (No "Payment is not required" block should be) + $this->fillShipping(); + + // Change the product price to 1.00 (No "Payment is not required" block should be visible) $this->openShortAdminAndWait('admin.php?target=product&id=' . $product->getProductId()); $this->type('//input[@name="postedData[price]"]', '1'); @@ -92,7 +94,44 @@ public function testPayment() $this->openAndWait('store/checkout'); - $this->assertElementNotPresent("//div[@class='step-box' and text()='Payment is not required']"); + $this->assertElementPresent("//ul[@class='payments']"); + } + protected function fillShipping() + { + $this->typeKeys("//input[@id='create_profile_email']", 'test@test.ru'); + + $this->waitInlineProgress('#create_profile_email', 'email inline progress'); + + $this->typeKeys("//input[@id='shipping_address_name']", 'test name'); + + $this->typeKeys("//input[@id='shipping_address_street']", 'test street'); + + $this->typeKeys("//input[@id='shipping_address_city']", 'test city'); + + $this->typeKeys("//input[@id='shipping_address_zipcode']", '12345'); + + $this->waitForLocalCondition( + 'jQuery("ul.shipping-rates").length == 1', + 60000, + 'No shipping rates table' + ); + + $this->click("//input[@id='method1']"); + + $this->waitForLocalCondition( + 'jQuery(".shipping-step button.disabled").length == 0', + 600000, + 'Check shipping method' + ); + + $this->click("//button[@class='bright']"); + + $this->waitForLocalCondition( + 'jQuery(".address-not-defined").length == 0', + 30000, + 'Billing address is not defined' + ); + } } diff --git a/src/classes/XLite/View/Checkout/Step/Payment.php b/src/classes/XLite/View/Checkout/Step/Payment.php index bca0de7a98..da3d03379a 100644 --- a/src/classes/XLite/View/Checkout/Step/Payment.php +++ b/src/classes/XLite/View/Checkout/Step/Payment.php @@ -76,18 +76,6 @@ public function getTitle() return 'Payment info'; } - /** - * Check - step is enabled (true) or skipped (false) - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - public function isEnabled() - { - return parent::isEnabled() && (!$this->isPayedCart()); - } - /** * Check if step is completed * @@ -97,12 +85,10 @@ public function isEnabled() */ public function isCompleted() { - return !$this->isEnabled() - || ($this->getCart()->getProfile() + return $this->getCart()->getProfile() && $this->getCart()->getProfile()->getBillingAddress() && $this->getCart()->getProfile()->getBillingAddress()->isCompleted(\XLite\Model\Address::BILLING) - && $this->getCart()->getPaymentMethod() - ); + && ($this->getCart()->getPaymentMethod() || $this->isPayedCart()); } /** diff --git a/src/skins/default/en/checkout/controller.js b/src/skins/default/en/checkout/controller.js index 5cdfeba8c2..69473abd8e 100644 --- a/src/skins/default/en/checkout/controller.js +++ b/src/skins/default/en/checkout/controller.js @@ -549,15 +549,15 @@ CheckoutView.prototype.refreshState = function() // Payment step - // Payment methods is selected - var paymentMethodIsSelected = 1 == jQuery('ul.payments input:checked', this.base).length; + // Payment section is ready (payment method is selected or no payment is required) + var paymentIsReady = (jQuery('ul.payments').length > 0) ? (1 == jQuery('ul.payments input:checked', this.base).length) : true; - // Billing address is completed + // Billing address is ready (completed) isSameAddress = 1 == jQuery('.same-address #same_address:checked', this.base).length; - var billingAddressIsCompleted = isSameAddress + var billingAddressIsReady = isSameAddress || (0 < jQuery('form.billing-address ul.form :input', this.base).length && jQuery('form.billing-address', this.base).get(0).validate(true)); - result = result && paymentMethodIsSelected && billingAddressIsCompleted; + result = result && paymentIsReady && billingAddressIsReady; } else if (box.hasClass('review-step')) { diff --git a/src/skins/default/en/checkout/steps/payment/parts/inactive.method.tpl b/src/skins/default/en/checkout/steps/payment/parts/inactive.method.tpl index 1321dfc39d..403ac8b4dd 100644 --- a/src/skins/default/en/checkout/steps/payment/parts/inactive.method.tpl +++ b/src/skins/default/en/checkout/steps/payment/parts/inactive.method.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 * @ListChild (list="checkout.payment.inactive", weight="20") *} -

    +
    {if:cart.getPaymentMethod()}
    {t(#Payment method#)}:
    {cart.paymentMethod.name} diff --git a/src/skins/default/en/checkout/steps/payment/parts/selected.methods.tpl b/src/skins/default/en/checkout/steps/payment/parts/selected.methods.tpl index 24474305a4..1f3cf8e315 100644 --- a/src/skins/default/en/checkout/steps/payment/parts/selected.methods.tpl +++ b/src/skins/default/en/checkout/steps/payment/parts/selected.methods.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 * @ListChild (list="checkout.payment.selected", weight="10") *} -
    +

    {t(#Payment methods#)}

    From 37b657e19d4b1e7af7e71a2a028ab8a6e8be096c Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 20 Jun 2012 14:46:39 +0400 Subject: [PATCH 113/562] E:41615 [!] Bug: JS code could be entered into prefix/suffix fields. --- .../admin/en/currency_view_info/js/script.js | 4 +- src/skins/common/js/php.js | 66 +++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/src/skins/admin/en/currency_view_info/js/script.js b/src/skins/admin/en/currency_view_info/js/script.js index f5fd44f841..0092b43513 100644 --- a/src/skins/admin/en/currency_view_info/js/script.js +++ b/src/skins/admin/en/currency_view_info/js/script.js @@ -48,9 +48,9 @@ CurrencyViewInfo.prototype.initialize = function () } ); - jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(value);}); + jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(htmlspecialchars(value));}); - jQuery('.currency-view-info .currency .suffix').bind('suffixCurrencyChange', function(e, value) {jQuery(this).html(value);}); + jQuery('.currency-view-info .currency .suffix').bind('suffixCurrencyChange', function(e, value) {jQuery(this).html(htmlspecialchars(value));}); } core.autoload(CurrencyViewInfo); diff --git a/src/skins/common/js/php.js b/src/skins/common/js/php.js index 7974b0e622..54f199411f 100644 --- a/src/skins/common/js/php.js +++ b/src/skins/common/js/php.js @@ -406,3 +406,69 @@ function echo () { }*/ } } + +function htmlspecialchars (string, quote_style, charset, double_encode) { + // http://kevin.vanzonneveld.net + // + original by: Mirek Slugen + // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // + bugfixed by: Nathan + // + bugfixed by: Arno + // + revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // + bugfixed by: Brett Zamir (http://brett-zamir.me) + // + input by: Ratheous + // + input by: Mailfaker (http://www.weedem.fr/) + // + reimplemented by: Brett Zamir (http://brett-zamir.me) + // + input by: felix + // + bugfixed by: Brett Zamir (http://brett-zamir.me) + // % note 1: charset argument not supported + // * example 1: htmlspecialchars("Test", 'ENT_QUOTES'); + // * returns 1: '<a href='test'>Test</a>' + // * example 2: htmlspecialchars("ab\"c'd", ['ENT_NOQUOTES', 'ENT_QUOTES']); + // * returns 2: 'ab"c'd' + // * example 3: htmlspecialchars("my "&entity;" is still here", null, null, false); + // * returns 3: 'my "&entity;" is still here' + var optTemp = 0, + i = 0, + noquotes = false; + if (typeof quote_style === 'undefined' || quote_style === null) { + quote_style = 2; + } + string = string.toString(); + if (double_encode !== false) { // Put this first to avoid double-encoding + string = string.replace(/&/g, '&'); + } + string = string.replace(//g, '>'); + + var OPTS = { + 'ENT_NOQUOTES': 0, + 'ENT_HTML_QUOTE_SINGLE': 1, + 'ENT_HTML_QUOTE_DOUBLE': 2, + 'ENT_COMPAT': 2, + 'ENT_QUOTES': 3, + 'ENT_IGNORE': 4 + }; + if (quote_style === 0) { + noquotes = true; + } + if (typeof quote_style !== 'number') { // Allow for a single string or an array of string flags + quote_style = [].concat(quote_style); + for (i = 0; i < quote_style.length; i++) { + // Resolve string input to bitwise e.g. 'ENT_IGNORE' becomes 4 + if (OPTS[quote_style[i]] === 0) { + noquotes = true; + } + else if (OPTS[quote_style[i]]) { + optTemp = optTemp | OPTS[quote_style[i]]; + } + } + quote_style = optTemp; + } + if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) { + string = string.replace(/'/g, '''); + } + if (!noquotes) { + string = string.replace(/"/g, '"'); + } + + return string; +} From 9bd333dceefc68e4f53397e1eb3f363d51a963aa Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 20 Jun 2012 16:28:43 +0400 Subject: [PATCH 114/562] [*] Small changes to add   entity as a valid special char. --- src/Includes/functions.php | 4 ++-- src/skins/admin/en/currency_view_info/js/script.js | 4 ++-- src/skins/default/en/common/price_parts/price.tpl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Includes/functions.php b/src/Includes/functions.php index 9764da1033..1fd37293ce 100644 --- a/src/Includes/functions.php +++ b/src/Includes/functions.php @@ -822,7 +822,7 @@ function func_set_memory_limit($new_limit) { function func_htmlspecialchars($str) { $str = preg_replace( - '/&(?!(?:amp|#\d+|#x\d+|euro|copy|pound|curren|cent|yen|reg|trade|lt|gt|lte|gte|quot);)/Ss', + '/&(?!(?:amp|nbsp|#\d+|#x\d+|euro|copy|pound|curren|cent|yen|reg|trade|lt|gt|lte|gte|quot);)/Ss', '&', $str ); @@ -1295,7 +1295,7 @@ function get_xlite_tables_prefix() /** * Find position of first occurrence of a case-insensitive string * - * @param string $haystack The string to search in + * @param string $haystack The string to search in * @param string $needle The string to find in haystack * @param integer $offset The position in haystack to start searching OPTIONAL * diff --git a/src/skins/admin/en/currency_view_info/js/script.js b/src/skins/admin/en/currency_view_info/js/script.js index 0092b43513..da9a4f10ea 100644 --- a/src/skins/admin/en/currency_view_info/js/script.js +++ b/src/skins/admin/en/currency_view_info/js/script.js @@ -48,9 +48,9 @@ CurrencyViewInfo.prototype.initialize = function () } ); - jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(htmlspecialchars(value));}); + jQuery('.currency-view-info .currency .prefix').bind('prefixCurrencyChange', function(e, value) {jQuery(this).html(htmlspecialchars(value, null, null, false));}); - jQuery('.currency-view-info .currency .suffix').bind('suffixCurrencyChange', function(e, value) {jQuery(this).html(htmlspecialchars(value));}); + jQuery('.currency-view-info .currency .suffix').bind('suffixCurrencyChange', function(e, value) {jQuery(this).html(htmlspecialchars(value, null, null, false));}); } core.autoload(CurrencyViewInfo); diff --git a/src/skins/default/en/common/price_parts/price.tpl b/src/skins/default/en/common/price_parts/price.tpl index 2bc3e4b77a..b0e6071824 100644 --- a/src/skins/default/en/common/price_parts/price.tpl +++ b/src/skins/default/en/common/price_parts/price.tpl @@ -12,4 +12,4 @@ * @ListChild (list="product.plain_price", weight="10") *} -
  • {formatPrice(getListPrice(),null,1):h}
  • +
  • {formatPrice(getListPrice(),null,1)}
  • From 9bc7f5f6b11faff57c9f326a22748a566bba9a26 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Wed, 20 Jun 2012 23:55:46 +0400 Subject: [PATCH 115/562] [*] Small logic changes into XLite\Core\EventListener\Base\Countable class --- .../Core/EventListener/AEventListener.php | 28 ++++++++++++----- .../Core/EventListener/Base/Countable.php | 30 ++++++++++++++----- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/classes/XLite/Core/EventListener/AEventListener.php b/src/classes/XLite/Core/EventListener/AEventListener.php index ce15e23d33..2cd3fc61b7 100644 --- a/src/classes/XLite/Core/EventListener/AEventListener.php +++ b/src/classes/XLite/Core/EventListener/AEventListener.php @@ -45,16 +45,13 @@ abstract class AEventListener extends \XLite\Base\Singleton protected $errors = array(); /** - * Handle event (internal, after checking) - * - * @param string $name Event name - * @param array $arguments Event arguments OPTIONAL + * Arguments * - * @return boolean - * @see ____func_see____ - * @since 1.0.19 + * @var array + * @see ____var_see____ + * @since 1.0.24 */ - abstract public function handleEvent($name, array $arguments); + protected $arguments; /** * Handle event @@ -86,6 +83,21 @@ public static function checkEvent($name, array $arguments) return true; } + /** + * Handle event (internal, after checking) + * + * @param string $name Event name + * @param array $arguments Event arguments OPTIONAL + * + * @return boolean + * @see ____func_see____ + * @since 1.0.19 + */ + public function handleEvent($name, array $arguments) + { + $this->arguments = $arguments; + } + /** * Get errors * diff --git a/src/classes/XLite/Core/EventListener/Base/Countable.php b/src/classes/XLite/Core/EventListener/Base/Countable.php index 608287543e..dc147c35b1 100644 --- a/src/classes/XLite/Core/EventListener/Base/Countable.php +++ b/src/classes/XLite/Core/EventListener/Base/Countable.php @@ -94,6 +94,8 @@ abstract protected function processItem($item); */ public function handleEvent($name, array $arguments) { + parent::handleEvent($name, $arguments); + $this->errors = array(); $result = false; @@ -103,13 +105,7 @@ public function handleEvent($name, array $arguments) if ($this->isStepValid()) { $this->startStep(); - $repo = \XLite\Core\Database::getRepo('XLite\Model\TmpVar'); - foreach ($this->getItems() as $item) { - if ($this->processItem($item)) { - $this->record['position']++; - $repo->setEventState($this->getEventName(), $this->record); - } - } + $this->runCurrentStep(); if ($this->record['length'] <= $this->record['position'] + 1) { $this->finishTask(); @@ -164,6 +160,24 @@ protected function startStep() } } + /** + * Run current step + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected function runCurrentStep() + { + $repo = \XLite\Core\Database::getRepo('XLite\Model\TmpVar'); + foreach ($this->getItems() as $item) { + if ($this->processItem($item)) { + $this->record['position']++; + $repo->setEventState($this->getEventName(), $this->record); + } + } + } + /** * Finish step * @@ -177,7 +191,7 @@ protected function finishStep() \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setEventState($this->getEventName(), $this->record); $event = $this->getEventName(); - \XLite\Core\EventTask::$event(); + \XLite\Core\EventTask::$event($this->arguments); } /** From 5c24f96eb5db398ec79326fe0d42d0bab10d1bee Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 05:34:48 +0400 Subject: [PATCH 116/562] E:41644 [!] Bug: ADmin can remove role if this role assigned to current admin. Fixed. --- .../View/ItemsList/Model/Roles.php | 24 +++++++++++++++++-- .../CDev/UserPermissions/roles/controller.js | 2 +- .../CDev/UserPermissions/roles/style.css | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php b/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php index 536953706f..5ffa3056f3 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php @@ -193,6 +193,10 @@ protected function defineLineClass($index, \XLite\Model\AEntity $entity) { $classes = parent::defineLineClass($index, $entity); + if ($this->isPermanentRole($entity)) { + $classes[] = 'permanent'; + } + if ($this->isUnremovableRole($entity)) { $classes[] = 'unremovable'; } @@ -200,6 +204,20 @@ protected function defineLineClass($index, \XLite\Model\AEntity $entity) return $classes; } + /** + * Check - role is permanent or not + * + * @param \XLite\Model\Role $role Role + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + protected function isPermanentRole(\XLite\Model\Role $role) + { + return $role->isPermanentRole(); + } + /** * Check - role is unremovable or not * @@ -211,7 +229,8 @@ protected function defineLineClass($index, \XLite\Model\AEntity $entity) */ protected function isUnremovableRole(\XLite\Model\Role $role) { - return $role->isPermanentRole(); + return $role->isPermanentRole() + || \XLite\Core\Auth::getInstance()->getProfile()->GetRoles()->contains($role); } /** @@ -260,7 +279,8 @@ protected function getRightActions() */ protected function removeEntity(\XLite\Model\AEntity $entity) { - return $entity->isPermanentRole() ? false : parent::removeEntity($entity); + return $this->isUnremovableRole($entity) ? false : parent::removeEntity($entity); } + } diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js b/src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js index 8d76a1b743..90de3a1b2d 100644 --- a/src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/controller.js @@ -12,6 +12,6 @@ TableItemsList.prototype.listeners.unremovableRole = function(handler) { - jQuery('.unremovable .input-field-wrapper.switcher input', handler.container).attr('disabled', 'disabled'); + jQuery('.permanent .input-field-wrapper.switcher input', handler.container).attr('disabled', 'disabled'); } diff --git a/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css b/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css index 712f9df57b..c288793036 100644 --- a/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css +++ b/src/skins/admin/en/modules/CDev/UserPermissions/roles/style.css @@ -14,7 +14,7 @@ width: 400px; } -.roles table.list tbody .unremovable .input-field-wrapper.switcher .widget { +.roles table.list tbody .permanent .input-field-wrapper.switcher .widget { background-position: 0px -32px; cursor: auto; } From 9c5f30b1836155cbb643b6e8196dbf4d8237705a Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 05:35:30 +0400 Subject: [PATCH 117/562] [!] Switch behavior did not work into models-based items list. Fixed. --- .../XLite/View/ItemsList/Model/Table.php | 27 +++++++++++++------ .../items_list/model/table/parts/switcher.tpl | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/classes/XLite/View/ItemsList/Model/Table.php b/src/classes/XLite/View/ItemsList/Model/Table.php index 6edae84015..9d4e383c1a 100644 --- a/src/classes/XLite/View/ItemsList/Model/Table.php +++ b/src/classes/XLite/View/ItemsList/Model/Table.php @@ -300,11 +300,19 @@ protected function getFieldObjects() } if ($this->isSwitchable()) { - $list[] = $this->getSwitcherField(); + $cell = $this->getSwitcherField(); + $list[] = array( + 'class' => $cell['class'], + 'parameters' => array('fieldName' => $cell['name'], 'fieldParams' => $cell['params']), + ); } if (static::SORT_TYPE_NONE != $this->getSortableType()) { - $list[] = $this->getSortField(); + $cell = $this->getSortField(); + $list[] = array( + 'class' => $cell['class'], + 'parameters' => array('fieldName' => $cell['name'], 'fieldParams' => $cell['params']), + ); } foreach ($list as $i => $class) { @@ -324,8 +332,9 @@ protected function getFieldObjects() protected function getSwitcherField() { return array( - 'class' => 'XLite\View\FormField\Inline\Input\Checkbox\Switcher\Enabled', - 'parameters' => array('fieldName' => 'enabled'), + 'class' => 'XLite\View\FormField\Inline\Input\Checkbox\Switcher\Enabled', + 'name' => 'enabled', + 'params' => array(), ); } @@ -340,13 +349,15 @@ protected function getSortField() { return static::SORT_TYPE_INPUT == $this->getSortableType() ? array( - 'class' => 'XLite\View\FormField\Inline\Input\Text\Position\OrderBy', - 'parameters' => array('fieldName' => 'position'), + 'class' => 'XLite\View\FormField\Inline\Input\Text\Position\OrderBy', + 'name' => 'position', + 'params' => array(), ) : array( - 'class' => 'XLite\View\FormField\Inline\Input\Text\Position\Move', - 'parameters' => array(), + 'class' => 'XLite\View\FormField\Inline\Input\Text\Position\Move', + 'name' => 'position', + 'params' => array(), ); } diff --git a/src/skins/admin/en/items_list/model/table/parts/switcher.tpl b/src/skins/admin/en/items_list/model/table/parts/switcher.tpl index 6aed131990..c7d664ad98 100644 --- a/src/skins/admin/en/items_list/model/table/parts/switcher.tpl +++ b/src/skins/admin/en/items_list/model/table/parts/switcher.tpl @@ -10,4 +10,4 @@ * @since 1.0.15 *} - + From 10d9fb18955aef23654fd8fecc0058ace9a00fa9 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 05:47:37 +0400 Subject: [PATCH 118/562] E:41645 [!] Bug: Product page (admin interface) did not work correctly if user obsolete 'product_id' argument instead new 'id'. Fixed. --- src/classes/XLite/Controller/Admin/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index 48bd3f320c..cce174148a 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -42,7 +42,7 @@ class Product extends \XLite\Controller\Admin\AAdmin * @see ____var_see____ * @since 1.0.0 */ - public $params = array('target', 'id', 'page', 'backURL'); + protected $params = array('target', 'id', 'product_id', 'page', 'backURL'); /** * Check ACL permissions From 5ba425519eaa166a787a08b2d3e23860a82ee712 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 06:04:41 +0400 Subject: [PATCH 119/562] E:41646 [!] RecentOrders controller redefine 'action' argument without arguments checking. Fixed. --- src/classes/XLite/Controller/Admin/RecentOrders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/Controller/Admin/RecentOrders.php b/src/classes/XLite/Controller/Admin/RecentOrders.php index eec1ca8dbf..3e09af25ba 100644 --- a/src/classes/XLite/Controller/Admin/RecentOrders.php +++ b/src/classes/XLite/Controller/Admin/RecentOrders.php @@ -56,7 +56,7 @@ public function checkACL() */ public function handleRequest() { - if (!isset(\XLite\Core\Request::getInstance()->mode)) { + if (!isset(\XLite\Core\Request::getInstance()->mode) && !\XLite\Core\Request::getInstance()->{self::PARAM_ACTION}) { \XLite\Core\Request::getInstance()->{self::PARAM_ACTION} = 'search'; } From 3d89fdb888be9b54739e5ab783f7ae9b80a0a44c Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 06:07:46 +0400 Subject: [PATCH 120/562] E:41647 [!] bug: 'Top sellers' page has not 'manage orders' permission mark. Fixed. --- src/classes/XLite/Controller/Admin/TopSellers.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/classes/XLite/Controller/Admin/TopSellers.php b/src/classes/XLite/Controller/Admin/TopSellers.php index 29d8d6cde4..e831cd4bdb 100644 --- a/src/classes/XLite/Controller/Admin/TopSellers.php +++ b/src/classes/XLite/Controller/Admin/TopSellers.php @@ -40,6 +40,18 @@ class TopSellers extends \XLite\Controller\Admin\Stats */ const TOP_SELLERS_NUMBER = 10; + /** + * Check ACL permissions + * + * @return boolean + * @see ____func_see____ + * @since 1.0.17 + */ + public function checkACL() + { + return parent::checkACL() || \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage orders'); + } + /** * getPageTemplate * From a6a4e654c75d90ed38b1ea1d9e2ea71d64ba90ab Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 07:27:52 +0400 Subject: [PATCH 121/562] E:41646 [!] Bug: 'Dashboard' page forbid all actions through GET request. Fixed. --- src/classes/XLite/Controller/Admin/Main.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Main.php b/src/classes/XLite/Controller/Admin/Main.php index a418cf5973..8621aa42ad 100644 --- a/src/classes/XLite/Controller/Admin/Main.php +++ b/src/classes/XLite/Controller/Admin/Main.php @@ -48,15 +48,15 @@ public function getTitle() } /** - * Check if current page is accessible + * Check ACL permissions * * @return boolean * @see ____func_see____ - * @since 1.0.0 + * @since 1.0.17 */ - public function checkAccess() + public function checkACL() { - return parent::checkAccess() || $this->isClearRequest(); + return true; } /** @@ -80,16 +80,4 @@ protected function doActionUpdateInventoryProducts() 'Inventory has been successfully updated' ); } - - /** - * Check - is clear request without action or not - * - * @return boolean - * @see ____func_see____ - * @since 1.0.17 - */ - protected function isClearRequest() - { - return !\XLite\Core\Request::getInstance()->action && \XLite\Core\Request::getInstance()->isGet(); - } } From 399289abe9734f213bce60a8676bd0da7a765f21 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 21 Jun 2012 07:47:21 +0400 Subject: [PATCH 122/562] E:41645 [!] Bug: Product options modifaction page did not use commonh controller routine (product model getter). Fixed. --- .../ProductOptions/View/Button/AddGroup.php | 2 +- .../ProductOptions/View/ModifyExceptions.php | 16 ++++----- .../ProductOptions/View/ModifyOptionGroup.php | 2 +- .../View/ModifyProductOptions.php | 36 ++----------------- 4 files changed, 11 insertions(+), 45 deletions(-) diff --git a/src/classes/XLite/Module/CDev/ProductOptions/View/Button/AddGroup.php b/src/classes/XLite/Module/CDev/ProductOptions/View/Button/AddGroup.php index 66889d6e77..7b3890d6de 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/View/Button/AddGroup.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/View/Button/AddGroup.php @@ -51,7 +51,7 @@ protected function defineWidgetParams() 'product', '', array( - 'id' => \XLite\Core\Request::getInstance()->id, + 'id' => $this->getProduct()->getProductId(), 'page' => 'product_options', 'groupId' => '0', ) diff --git a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyExceptions.php b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyExceptions.php index b5abe7e2eb..563d77974d 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyExceptions.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyExceptions.php @@ -54,7 +54,7 @@ class ModifyExceptions extends \XLite\View\AView */ public function getProductId() { - return intval(\XLite\Core\Request::getInstance()->id); + return $this->getProduct()->getProductId(); } /** @@ -66,13 +66,11 @@ public function getProductId() */ public function getGroups() { - $list = \XLite\Core\Database::getRepo('\XLite\Model\Product') - ->find($this->getProductId()) - ->getOptionGroups(); + $list = array(); - foreach ($list as $i => $group) { - if ($group::TEXT_TYPE == $group->getType()) { - unset($list[$i]); + foreach ($this->getProduct()->getOptionGroups() as $group) { + if ($group::TEXT_TYPE != $group->getType()) { + $list[] = $group; } } @@ -176,8 +174,6 @@ protected function getDefaultTemplate() protected function isVisible() { return parent::isVisible() - && \XLite\Core\Database::getRepo('\XLite\Model\Product') - ->find($this->getProductId()) - ->getOptionGroups()->count(); + && $this->getProduct()->getOptionGroups()->count(); } } diff --git a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyOptionGroup.php b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyOptionGroup.php index 62d2c69ce4..5b7a5242c3 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyOptionGroup.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyOptionGroup.php @@ -75,7 +75,7 @@ public function isNew() */ public function getProductId() { - return intval(\XLite\Core\Request::getInstance()->id); + return $this->getProduct()->getProductId(); } /** diff --git a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php index 571a70c2ec..07a078b884 100644 --- a/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php +++ b/src/classes/XLite/Module/CDev/ProductOptions/View/ModifyProductOptions.php @@ -35,12 +35,6 @@ */ class ModifyProductOptions extends \XLite\View\AView { - /** - * Widget parameters - */ - const PARAM_PRODUCT = 'product'; - - /** * Option groups list (cache) * @@ -60,7 +54,7 @@ class ModifyProductOptions extends \XLite\View\AView */ public function getProductId() { - return $this->getParam(self::PARAM_PRODUCT)->getProductId(); + return $this->getProduct()->getProductId(); } /** @@ -73,7 +67,7 @@ public function getProductId() public function getOptions() { if (!isset($this->options)) { - $this->options = $this->getParam(self::PARAM_PRODUCT)->getOptionGroups(); + $this->options = $this->getProduct()->getOptionGroups(); if (is_object($this->options)) { $this->options = $this->options->toArray(); } @@ -121,30 +115,6 @@ public function getCSSFiles() return $list; } - - /** - * Define widget parameters - * - * @return void - * @see ____func_see____ - * @since 1.0.0 - */ - protected function defineWidgetParams() - { - parent::defineWidgetParams(); - - $this->widgetParams += array( - self::PARAM_PRODUCT => new \XLite\Model\WidgetParam\Object( - 'Product', - \XLite\Core\Database::getRepo('\XLite\Model\Product')->find( - \XLite\Core\Request::getInstance()->id - ), - false, - '\XLite\Model\Product' - ), - ); - } - /** * Return widget default template * @@ -167,6 +137,6 @@ protected function getDefaultTemplate() protected function isVisible() { return parent::isVisible() - && $this->getParam(self::PARAM_PRODUCT); + && $this->getProduct(); } } From ba093f907c477cf02762a69e41182495d8f56ebc Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 21 Jun 2012 12:20:37 +0400 Subject: [PATCH 123/562] [*] Flexy modifiers are added. small improvement. --- src/classes/XLite/Core/FlexyCompiler.php | 22 ++++++- src/classes/XLite/View/AView.php | 73 ++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/src/classes/XLite/Core/FlexyCompiler.php b/src/classes/XLite/Core/FlexyCompiler.php index 93034171f0..d46f521d73 100644 --- a/src/classes/XLite/Core/FlexyCompiler.php +++ b/src/classes/XLite/Core/FlexyCompiler.php @@ -914,7 +914,9 @@ function flexyEcho($str) return ""; } $this->condition = ''; + $expr = $this->flexyExpression($str); + switch ($str) { case ':h': // will display variable "as is" break; @@ -947,7 +949,25 @@ function flexyEcho($str) break; default: - $this->error("Unknown modifier '$str'"); + + $wrongModifier = true; + + if (substr($str, 0, 1) == ':') { + + $func = substr($str, 1); + + if (function_exists($func)) { + + $expr = '$this->flexyModifierCall(\'' . $func . '\', ' . $expr . ')'; + + $wrongModifier = false; + } + } + + if ($wrongModifier) { + + $this->error("Unknown modifier '$str'"); + } } if (':s' !== $str) { diff --git a/src/classes/XLite/View/AView.php b/src/classes/XLite/View/AView.php index 64905fc0fe..500e26052f 100644 --- a/src/classes/XLite/View/AView.php +++ b/src/classes/XLite/View/AView.php @@ -1363,6 +1363,79 @@ protected function formatTime($base, $field = null, $format = null) return \XLite\Core\Converter::formatTime($base, $format); } + /** + * Call for Flexy modifier from AView class + * + * @param string $callMethod Name of method to call + * @param string $expr Exression to modify + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function flexyModifierCall($callMethod, $expr) + { + $callMethod = 'flexyModifier' . ucfirst($callMethod); + + return method_exists($this, $callMethod) ? $this->$callMethod($expr) : ''; + } + + /** + * nl2br modifier + * + * @param string $expr + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function flexyModifierNl2br($expr) + { + return nl2br($expr); + } + + /** + * Trim modifier + * + * @param string $expr + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function flexyModifierTrim($expr) + { + return trim($expr); + } + + /** + * LTrim modifier + * + * @param string $expr + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function flexyModifierLtrim($expr) + { + return ltrim($expr); + } + + /** + * RTrim modifier + * + * @param string $expr + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function flexyModifierRtrim($expr) + { + return rtrim($expr); + } + /** * Add slashes * From 8d9101af793e279b52186a326808decfd29032c7 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 21 Jun 2012 17:57:43 +0400 Subject: [PATCH 124/562] [*] Small model widget improvement. --- src/classes/XLite/Model/AEntity.php | 4 +- src/classes/XLite/View/Model/AModel.php | 111 +++++++++++++++++- .../XLite/View/Model/Address/Address.php | 14 +++ 3 files changed, 124 insertions(+), 5 deletions(-) diff --git a/src/classes/XLite/Model/AEntity.php b/src/classes/XLite/Model/AEntity.php index 6585728932..66e36869ea 100644 --- a/src/classes/XLite/Model/AEntity.php +++ b/src/classes/XLite/Model/AEntity.php @@ -373,11 +373,11 @@ public function prepareEntityBeforeCommit($type) /** * Call parent method safetly - * + * * @param string $property Property name * @param string $class Current class * @param string $type Method type (get or set) OPTIONAL - * + * * @return mixed * @see ____func_see____ * @since 1.0.21 diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index 808c25a4c2..444c548286 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -59,6 +59,8 @@ abstract class AModel extends \XLite\View\Dialog const SCHEMA_OPTIONS = \XLite\View\FormField\Select\ASelect::PARAM_OPTIONS; const SCHEMA_IS_CHECKED = \XLite\View\FormField\Input\Checkbox::PARAM_IS_CHECKED; + const SCHEMA_MODEL_ATTRIBUTES = 'model_attributes'; + /** * Session cell to store form data */ @@ -582,6 +584,97 @@ protected function composeFieldName($name) return $name; } + /** + * Return model field name for a provided form field name + * + * @param string $name Name of form field + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModelFieldName($name) + { + return $name; + } + + /** + * Return field mappings structure for the model + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFieldMappings() + { + if (!isset($this->fieldMappings)) { + + // Collect metadata for fields of class and its translation class if there is one. + $metaData = \XLite\Core\Database::getEM()->getClassMetadata(get_class($this->getModelObject())); + $this->fieldMappings = $metaData->fieldMappings; + + $metaDataTranslationClass = isset($metaData->associationMappings['translations']) + ? $metaData->associationMappings['translations']['targetEntity'] + : false; + + if ($metaDataTranslationClass) { + + $metaDataTranslation = \XLite\Core\Database::getEM()->getClassMetadata($metaDataTranslationClass); + $this->fieldMappings += $metaDataTranslation->fieldMappings; + } + } + + return $this->fieldMappings; + } + + /** + * Return field mapping info for a given $name key + * + * @param string $name + * + * @return array|null + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getFieldMapping($name) + { + $fieldMappings = $this->getFieldMappings(); + + $fieldName = $this->getModelFieldName($name); + + return $fieldMappings[$fieldName] ?: null; + } + + /** + * Return widget attributes that are collected from the model properties + * + * @param string $name + * @param array $data + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModelAttributes($name, array $data) + { + $fieldMapping = $this->getFieldMapping($name); + + $result = array(); + + if ($fieldMapping) { + + foreach ($data[static::SCHEMA_MODEL_ATTRIBUTES] as $widgetAttribute => $modelAttribute) { + + if (isset($fieldMapping[$modelAttribute])) { + + $result[$widgetAttribute] = $fieldMapping[$modelAttribute]; + } + } + } + + return $result; + } + /** * Perform some operations when creating fields list by schema * @@ -594,11 +687,23 @@ protected function composeFieldName($name) */ protected function getFieldSchemaArgs($name, array $data) { - if (!isset($data[self::SCHEMA_NAME])) { - $data[self::SCHEMA_NAME] = $this->composeFieldName($name); + if (!isset($data[static::SCHEMA_NAME])) { + $data[static::SCHEMA_NAME] = $this->composeFieldName($name); + } + + $data[static::SCHEMA_VALUE] = $this->getDefaultFieldValue($name); + + $data[static::SCHEMA_MODEL_ATTRIBUTES] = isset($data[static::SCHEMA_MODEL_ATTRIBUTES]) ? $data[static::SCHEMA_MODEL_ATTRIBUTES] : array(); + $data[static::SCHEMA_ATTRIBUTES] = isset($data[static::SCHEMA_ATTRIBUTES]) ? $data[static::SCHEMA_ATTRIBUTES] : array(); + + if (is_subclass_of($data[static::SCHEMA_CLASS], 'XLite\View\FormField\Input\Base\String')) { + + $data[static::SCHEMA_MODEL_ATTRIBUTES] += array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ); } - $data[self::SCHEMA_VALUE] = $this->getDefaultFieldValue($name); + $data[static::SCHEMA_ATTRIBUTES] += isset($data[static::SCHEMA_MODEL_ATTRIBUTES]) ? $this->getModelAttributes($name, $data) : array(); return $data; } diff --git a/src/classes/XLite/View/Model/Address/Address.php b/src/classes/XLite/View/Model/Address/Address.php index b951795efc..55e95c7071 100644 --- a/src/classes/XLite/View/Model/Address/Address.php +++ b/src/classes/XLite/View/Model/Address/Address.php @@ -253,6 +253,20 @@ protected function getDefaultModelObject() return $this->address; } + /** + * Return model field name for a provided form field name + * + * @param string $name Name of form field + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModelFieldName($name) + { + return preg_replace('/^([^_]*_)(.*)$/', '\2', parent::getModelFieldName($name)); + } + /** * Return name of web form widget class * From d19c846ecdb63e6c74da5281e94cc8ad316947c7 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 22 Jun 2012 09:27:43 +0400 Subject: [PATCH 125/562] E:0041635 [!] Cannot create 2 products with empty SKU. Fixed --- src/classes/XLite/Controller/Admin/Product.php | 16 +++++++++++++--- src/classes/XLite/Core/Converter.php | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index 48bd3f320c..2fd3b28520 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -537,11 +537,21 @@ protected function getPostedData($field = null) { $value = parent::getPostedData($field); - if ('arrivalDate' == $field) { + if (!isset($field)) { + + if (isset($value['arrivalDate'])) { + $value['arrivalDate'] = intval(strtotime($value['arrivalDate'])) ?: time(); + } + + if (isset($value['sku']) && \XLite\Core\Converter::isEmptyString($value['sku'])) { + $value['sku'] = null; + } + + } elseif ('arrivalDate' === $field) { $value = intval(strtotime($value)) ?: time(); - } elseif (!isset($field) && isset($value['arrivalDate'])) { - $value['arrivalDate'] = intval(strtotime($value['arrivalDate'])) ?: time(); + } elseif ('sku' === $field) { + $value = null; } return $value; diff --git a/src/classes/XLite/Core/Converter.php b/src/classes/XLite/Core/Converter.php index e340ccce66..1350ff856c 100644 --- a/src/classes/XLite/Core/Converter.php +++ b/src/classes/XLite/Core/Converter.php @@ -270,6 +270,20 @@ public static function isURL($url) return is_string($url) && 0 < preg_match('/^' . $pattern . '$/Ss', $url); } + /** + * Check for empty string + * + * @param string $string String to check + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public static function isEmptyString($string) + { + return '' === $string || false === $string; + } + /** * Return class name without backslashes * From f630cd397ae70abe26203dbcf26a32850b25e978 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 22 Jun 2012 10:20:01 +0400 Subject: [PATCH 126/562] E:0041637 [!] Minor fixes for the clean URLs autogeneration algorythm --- .../XLite/Controller/Admin/Base/Catalog.php | 35 +++++++++++++------ .../XLite/Controller/Admin/Category.php | 8 ++--- .../XLite/Controller/Admin/Product.php | 9 ++--- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/Base/Catalog.php b/src/classes/XLite/Controller/Admin/Base/Catalog.php index 621fabb5e8..6d33f8d361 100644 --- a/src/classes/XLite/Controller/Admin/Base/Catalog.php +++ b/src/classes/XLite/Controller/Admin/Base/Catalog.php @@ -35,6 +35,11 @@ */ abstract class Catalog extends \XLite\Controller\Admin\AAdmin { + /** + * Limit of iterations to generate clean URL + */ + const CLEAN_URL_CHECK_LIMIT = 1000; + // {{{ Abstract methods /** @@ -58,13 +63,13 @@ abstract public function isNew(); abstract protected function getFormClass(); /** - * Return entity class + * Return entity object * - * @return string + * @return \XLite\Model\AEntity * @see ____func_see____ * @since 1.0.24 */ - abstract protected function getEntityClass(); + abstract protected function getEntity(); /** * Add new entity @@ -153,7 +158,7 @@ protected function getPostedData($field = null) */ public function getCleanURLMaxLength() { - return \XLite\Core\Database::getRepo($this->getEntityClass())->getFieldInfo('cleanURL', 'length'); + return \XLite\Core\Database::getRepo(get_class($this->getEntity()))->getFieldInfo('cleanURL', 'length'); } /** @@ -175,14 +180,24 @@ protected function generateCleanURL($name) $suffix = ''; $increment = 1; - - while (\XLite\Core\Database::getRepo($this->getEntityClass())->findOneByCleanURL($result . $suffix)) { + + $entity = $this->getEntity(); + $repo = \XLite\Core\Database::getRepo(get_class($entity)); + + while ( + ($tmp = $repo->findOneByCleanURL($result . $suffix)) + && $entity->getUniqueIdentifier() != $tmp->getUniqueIdentifier() + && $increment < static::CLEAN_URL_CHECK_LIMIT + ) { $suffix = $separator . $increment++; - } - + } + if (!empty($suffix)) { - // DO NOT change call order - $this->setCleanURLWarning($result, $suffix); + + if ($entity->getCleanURL() !== ($result . $suffix)) { + $this->setCleanURLWarning($result, $suffix); + } + $result .= $suffix; } } diff --git a/src/classes/XLite/Controller/Admin/Category.php b/src/classes/XLite/Controller/Admin/Category.php index 5b38ef5c8a..7225821c7d 100644 --- a/src/classes/XLite/Controller/Admin/Category.php +++ b/src/classes/XLite/Controller/Admin/Category.php @@ -73,15 +73,15 @@ protected function getFormClass() } /** - * Return entity class + * Alias * - * @return string + * @return \XLite\Model\Category * @see ____func_see____ * @since 1.0.24 */ - protected function getEntityClass() + protected function getEntity() { - return '\XLite\Model\Category'; + return $this->getCategory(); } // }}} diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index c483408c4f..d166f8de06 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -73,15 +73,15 @@ protected function getFormClass() } /** - * Return entity class + * Alias * - * @return string + * @return \XLite\Model\Product * @see ____func_see____ * @since 1.0.24 */ - protected function getEntityClass() + protected function getEntity() { - return '\XLite\Model\Product'; + return $this->getProduct(); } // }}} @@ -365,6 +365,7 @@ protected function doActionUpdate() ); $product->getClasses()->clear(); + $product->getCategoryProducts()->clear(); $data = $this->getCategoryProducts($product) + $this->getClasses($product) + $this->getPostedData(); // Update all data From 381572704088cdeafc7b2e9d331bc75aa02e29c1 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 22 Jun 2012 10:27:24 +0400 Subject: [PATCH 127/562] [!] Minor fix for the Admin\Product controller --- src/classes/XLite/Controller/Admin/Product.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/classes/XLite/Controller/Admin/Product.php b/src/classes/XLite/Controller/Admin/Product.php index 2fd3b28520..dfc042eccf 100644 --- a/src/classes/XLite/Controller/Admin/Product.php +++ b/src/classes/XLite/Controller/Admin/Product.php @@ -412,6 +412,7 @@ protected function modifyProduct(\XLite\Model\Product $product) ); $product->getClasses()->clear(); + $product->getCategoryProducts()->clear(); // Update all data \XLite\Core\Database::getRepo('\XLite\Model\Product')->update($product, $this->collectModifyData($product)); From bb283d10ae464ce1b61bf3415adc09c9a417463e Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 22 Jun 2012 10:50:59 +0400 Subject: [PATCH 128/562] E:41623 [!] Bug: Background iterable task run all steps without last. Fixed. --- .../XLite/Core/EventListener/Base/Countable.php | 2 +- .../AmazonS3Images/Core/EventListener/MigrateToS3.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/classes/XLite/Core/EventListener/Base/Countable.php b/src/classes/XLite/Core/EventListener/Base/Countable.php index dc147c35b1..740ad6d22a 100644 --- a/src/classes/XLite/Core/EventListener/Base/Countable.php +++ b/src/classes/XLite/Core/EventListener/Base/Countable.php @@ -107,7 +107,7 @@ public function handleEvent($name, array $arguments) $this->startStep(); $this->runCurrentStep(); - if ($this->record['length'] <= $this->record['position'] + 1) { + if ($this->record['length'] <= $this->record['position']) { $this->finishTask(); } else { diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php index 3026b44301..1a4c5d18c6 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php @@ -127,12 +127,18 @@ protected function getLength() */ protected function getItems() { + $length = static::CHUNK_LENGTH; $chunk = array(); foreach (\XLite\Model\Repo\Base\Image::getManagedRepositories() as $class) { if (0 < \XLite\Core\Database::getRepo($class)->countNoS3Images()) { - $chunk = \XLite\Core\Database::getRepo($class)->findNoS3Images(static::CHUNK_LENGTH); - break; + $chunk = array_merge($chunk, \XLite\Core\Database::getRepo($class)->findNoS3Images($length)); + if (count($chunk) < $length) { + $length = static::CHUNK_LENGTH - count($chunk); + + } else { + break; + } } } From fdeaf7507db5e9e3d369250829519bdc6fe8fa5c Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 22 Jun 2012 12:00:39 +0400 Subject: [PATCH 129/562] [!] Bug: Settings form model did not work with a model attributes. --- src/classes/XLite/View/Model/AModel.php | 11 +---------- .../XLite/View/Model/Address/Address.php | 18 ++++++++++++++++++ .../XLite/View/Model/Currency/Currency.php | 9 +++++++++ .../XLite/View/Model/Profile/AdminMain.php | 9 +++++++++ src/classes/XLite/View/Model/Profile/Main.php | 9 +++++++++ 5 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index 444c548286..76b69fcddf 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -693,16 +693,7 @@ protected function getFieldSchemaArgs($name, array $data) $data[static::SCHEMA_VALUE] = $this->getDefaultFieldValue($name); - $data[static::SCHEMA_MODEL_ATTRIBUTES] = isset($data[static::SCHEMA_MODEL_ATTRIBUTES]) ? $data[static::SCHEMA_MODEL_ATTRIBUTES] : array(); - $data[static::SCHEMA_ATTRIBUTES] = isset($data[static::SCHEMA_ATTRIBUTES]) ? $data[static::SCHEMA_ATTRIBUTES] : array(); - - if (is_subclass_of($data[static::SCHEMA_CLASS], 'XLite\View\FormField\Input\Base\String')) { - - $data[static::SCHEMA_MODEL_ATTRIBUTES] += array( - \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', - ); - } - + $data[static::SCHEMA_ATTRIBUTES] = $data[static::SCHEMA_ATTRIBUTES] ? : array(); $data[static::SCHEMA_ATTRIBUTES] += isset($data[static::SCHEMA_MODEL_ATTRIBUTES]) ? $this->getModelAttributes($name, $data) : array(); return $data; diff --git a/src/classes/XLite/View/Model/Address/Address.php b/src/classes/XLite/View/Model/Address/Address.php index 55e95c7071..256c1c0527 100644 --- a/src/classes/XLite/View/Model/Address/Address.php +++ b/src/classes/XLite/View/Model/Address/Address.php @@ -60,18 +60,27 @@ class Address extends \XLite\View\Model\AModel self::SCHEMA_LABEL => 'Firstname', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-firstname', + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'lastname' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Lastname', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-lastname', + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'street' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Address', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-street', + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'country_code' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Select\Country', @@ -96,18 +105,27 @@ class Address extends \XLite\View\Model\AModel self::SCHEMA_LABEL => 'City', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-city', + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'zipcode' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Zip code', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-zipcode', + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'phone' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Phone', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-phone', + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), ); diff --git a/src/classes/XLite/View/Model/Currency/Currency.php b/src/classes/XLite/View/Model/Currency/Currency.php index 7be90ab1d3..efa2a8c2f5 100644 --- a/src/classes/XLite/View/Model/Currency/Currency.php +++ b/src/classes/XLite/View/Model/Currency/Currency.php @@ -63,6 +63,9 @@ class Currency extends \XLite\View\Model\AModel self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Name', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'format' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Select\CurrencyFormat', @@ -73,11 +76,17 @@ class Currency extends \XLite\View\Model\AModel self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Prefix', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'suffix' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Suffix', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), ); diff --git a/src/classes/XLite/View/Model/Profile/AdminMain.php b/src/classes/XLite/View/Model/Profile/AdminMain.php index 61a0947cce..357643021e 100644 --- a/src/classes/XLite/View/Model/Profile/AdminMain.php +++ b/src/classes/XLite/View/Model/Profile/AdminMain.php @@ -89,16 +89,25 @@ class AdminMain extends \XLite\View\Model\AModel self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'E-mail', self::SCHEMA_REQUIRED => true, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'password' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Password', self::SCHEMA_LABEL => 'Password', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'password_conf' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Password', self::SCHEMA_LABEL => 'Confirm password', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), ); diff --git a/src/classes/XLite/View/Model/Profile/Main.php b/src/classes/XLite/View/Model/Profile/Main.php index 140d23e6e8..886b46a58e 100644 --- a/src/classes/XLite/View/Model/Profile/Main.php +++ b/src/classes/XLite/View/Model/Profile/Main.php @@ -55,16 +55,25 @@ class Main extends \XLite\View\Model\Profile\AProfile self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'E-mail', self::SCHEMA_REQUIRED => true, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'password' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Password', self::SCHEMA_LABEL => 'Password', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), 'password_conf' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Password', self::SCHEMA_LABEL => 'Confirm password', self::SCHEMA_REQUIRED => false, + self::SCHEMA_MODEL_ATTRIBUTES => array( + \XLite\View\FormField\Input\Base\String::PARAM_MAX_LENGTH => 'length', + ), ), ); From 1695baac3a75e52307d0fa83bc6e13249a6ec6a2 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Fri, 22 Jun 2012 12:02:33 +0400 Subject: [PATCH 130/562] E:0041560 [*] Clean URLs: redirect from cart.php?target=<...> is added --- .../XLite/Controller/Customer/ACustomer.php | 55 +++++++++++++++++++ .../XLite/Controller/Customer/Catalog.php | 26 +-------- src/classes/XLite/Core/Request.php | 14 +++++ 3 files changed, 71 insertions(+), 24 deletions(-) diff --git a/src/classes/XLite/Controller/Customer/ACustomer.php b/src/classes/XLite/Controller/Customer/ACustomer.php index 5fa4e3ca5b..d1f51271a6 100644 --- a/src/classes/XLite/Controller/Customer/ACustomer.php +++ b/src/classes/XLite/Controller/Customer/ACustomer.php @@ -396,4 +396,59 @@ protected function needSecure() || (!\XLite\Core\Request::getInstance()->isHTTPS()) && \XLite\Core\Config::getInstance()->Security->full_customer_security; } + // {{{ Clean URLs related routines + + /** + * Preprocessor for no-action run + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function doNoAction() + { + parent::doNoAction(); + + if (LC_USE_CLEAN_URLS && !$this->isAJAX() && !$this->isRedirectNeeded() && $this->isRedirectToCleanURLNeeded()) { + $this->performRedirectToCleanURL(); + } + } + + /** + * Check if redirect to clean URL is needed + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function isRedirectToCleanURLNeeded() + { + return preg_match( + '/\/cart\.php/Si', + \Includes\Utils\ArrayManager::getIndex(\XLite\Core\Request::getInstance()->getServerData(), 'REQUEST_URI') + ); + } + + /** + * Redirect to clean URL + * + * @return void + * @see ____func_see____ + * @since 1.0.24 + */ + protected function performRedirectToCleanURL() + { + $data = \XLite\Core\Request::getInstance()->getGetData(); + + if (\XLite::TARGET_DEFAULT === ($target = $this->getTarget())) { + $target = ''; + + } else { + unset($data['target']); + } + + $this->setReturnURL(\XLite\Core\Converter::buildFullURL($target, '', $data)); + } + + // }}} } diff --git a/src/classes/XLite/Controller/Customer/Catalog.php b/src/classes/XLite/Controller/Customer/Catalog.php index 5e5d670a2c..aa54784a26 100644 --- a/src/classes/XLite/Controller/Customer/Catalog.php +++ b/src/classes/XLite/Controller/Customer/Catalog.php @@ -160,7 +160,7 @@ protected function getCategoryPath() } /** - * Preprocessor for no-action ren + * Preprocessor for no-action run * * @return void * @see ____func_see____ @@ -172,10 +172,6 @@ protected function doNoAction() if (!$this->isAJAX()) { \XLite\Core\Session::getInstance()->productListURL = $this->getURL(); - - if (LC_USE_CLEAN_URLS && $this->isRedirectToCleanURLNeeded()) { - $this->performRedirectToCleanURL(); - } } } @@ -188,25 +184,7 @@ protected function doNoAction() */ protected function isRedirectToCleanURLNeeded() { - return !$this->isRedirectNeeded() && !\XLite::isCleanURL() && $this->getModelObject()->getCleanURL(); - } - - /** - * Redirect to clean URL - * - * @return void - * @see ____func_see____ - * @since 1.0.24 - */ - protected function performRedirectToCleanURL() - { - $this->setReturnURL( - \XLite\Core\Converter::buildCleanURL( - $this->getTarget(), - '', - \XLite\Core\Request::getInstance()->getGetData() - ) - ); + return parent::isRedirectToCleanURLNeeded() || (!\XLite::isCleanURL() && $this->getModelObject()->getCleanURL()); } /** diff --git a/src/classes/XLite/Core/Request.php b/src/classes/XLite/Core/Request.php index ed3caf0346..1bbbab9b6f 100644 --- a/src/classes/XLite/Core/Request.php +++ b/src/classes/XLite/Core/Request.php @@ -139,6 +139,20 @@ public function getCookieData($prepare = true) return $prepare ? $this->prepare($_COOKIE) : $_COOKIE; } + /** + * Return data from the $_SERVER global variable + * + * @param boolean $prepare Flag OPTIONAL + * + * @return array + * @see ____func_see____ + * @since 1.0.24 + */ + public function getServerData($prepare = true) + { + return $prepare ? $this->prepare($_SERVER) : $_SERVER; + } + /** * Return current request method * From cae08c1021e9fd02a8ad1aace1794540c70a16b8 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 22 Jun 2012 12:24:34 +0400 Subject: [PATCH 131/562] [!] JS code could be entered into rich selector widget. --- src/skins/common/js/jquery.multiselect.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skins/common/js/jquery.multiselect.min.js b/src/skins/common/js/jquery.multiselect.min.js index 5ead32cccb..05de13a84d 100644 --- a/src/skins/common/js/jquery.multiselect.min.js +++ b/src/skins/common/js/jquery.multiselect.min.js @@ -17,4 +17,4 @@ * http://www.gnu.org/licenses/gpl.html * */ -(function(d){var j=0;d.widget("ech.multiselect",{options:{header:!0,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,show:"",hide:"",autoOpen:!1,multiple:!0,position:{}},_create:function(){var a=this.element.hide(),b=this.options;this.speed=d.fx.speeds._default;this._isOpen=!1;a=(this.button=d('')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(b.classes).attr({title:a.attr("title"), "aria-haspopup":!0,tabIndex:a.attr("tabIndex")}).insertAfter(a);(this.buttonlabel=d("")).html(b.noneSelectedText).appendTo(a);var a=(this.menu=d("
    ")).addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(b.classes).appendTo(document.body),c=(this.header=d("
    ")).addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(a);(this.headerLinkContainer=d("
      ")).addClass("ui-helper-reset").html(function(){return!0=== b.header?'
    • '+b.checkAllText+'
    • '+b.uncheckAllText+"
    • ":"string"===typeof b.header?"
    • "+b.header+"
    • ":""}).append('
    • ').appendTo(c);(this.checkboxContainer= d("
        ")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(a);this._bindEvents();this.refresh(!0);b.multiple||a.addClass("ui-multiselect-single")},_init:function(){!1===this.options.header&&this.header.hide();this.options.multiple||this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide();this.options.autoOpen&&this.open();this.element.is(":disabled")&&this.disable()},refresh:function(a){var b=this.element,c=this.options,e=this.menu,h=this.checkboxContainer, g=[],f=[],i=b.attr("id")||j++;b.find("option").each(function(b){d(this);var a=this.parentNode,e=this.innerHTML,h=this.title,j=this.value,b=this.id||"ui-multiselect-"+i+"-option-"+b,k=this.disabled,m=this.selected,l=["ui-corner-all"];"optgroup"===a.tagName.toLowerCase()&&(a=a.getAttribute("label"),-1===d.inArray(a,g)&&(f.push('
      • '+a+"
      • "),g.push(a)));k&&l.push("ui-state-disabled");m&&!c.multiple&&l.push("ui-state-active");f.push('
      • ');f.push('
      • ")});h.html(f.join(""));this.labels=e.find("label");this._setButtonWidth();this._setMenuWidth(); this.button[0].defaultValue=this.update();a||this._trigger("refresh")},update:function(){var a=this.options,b=this.labels.find("input"),c=b.filter("[checked]"),e=c.length,a=0===e?a.noneSelectedText:d.isFunction(a.selectedText)?a.selectedText.call(this,e,b.length,c.get()):/\d/.test(a.selectedList)&&0')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(b.classes).attr({title:a.attr("title"), "aria-haspopup":!0,tabIndex:a.attr("tabIndex")}).insertAfter(a);(this.buttonlabel=d("")).html(b.noneSelectedText).appendTo(a);var a=(this.menu=d("
        ")).addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(b.classes).appendTo(document.body),c=(this.header=d("
        ")).addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(a);(this.headerLinkContainer=d("
          ")).addClass("ui-helper-reset").html(function(){return!0=== b.header?'
        • '+b.checkAllText+'
        • '+b.uncheckAllText+"
        • ":"string"===typeof b.header?"
        • "+b.header+"
        • ":""}).append('
        • ').appendTo(c);(this.checkboxContainer= d("
            ")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(a);this._bindEvents();this.refresh(!0);b.multiple||a.addClass("ui-multiselect-single")},_init:function(){!1===this.options.header&&this.header.hide();this.options.multiple||this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide();this.options.autoOpen&&this.open();this.element.is(":disabled")&&this.disable()},refresh:function(a){var b=this.element,c=this.options,e=this.menu,h=this.checkboxContainer, g=[],f=[],i=b.attr("id")||j++;b.find("option").each(function(b){d(this);var a=this.parentNode,e=htmlspecialchars(this.innerHTML),h=this.title,j=this.value,b=this.id||"ui-multiselect-"+i+"-option-"+b,k=this.disabled,m=this.selected,l=["ui-corner-all"];"optgroup"===a.tagName.toLowerCase()&&(a=a.getAttribute("label"),-1===d.inArray(a,g)&&(f.push('
          • '+a+"
          • "),g.push(a)));k&&l.push("ui-state-disabled");m&&!c.multiple&&l.push("ui-state-active");f.push('
          • ');f.push('
          • ")});h.html(f.join(""));this.labels=e.find("label");this._setButtonWidth();this._setMenuWidth(); this.button[0].defaultValue=this.update();a||this._trigger("refresh")},update:function(){var a=this.options,b=this.labels.find("input"),c=b.filter("[checked]"),e=c.length,a=0===e?a.noneSelectedText:d.isFunction(a.selectedText)?a.selectedText.call(this,e,b.length,c.get()):/\d/.test(a.selectedList)&&0 Date: Mon, 25 Jun 2012 14:19:20 +0400 Subject: [PATCH 132/562] [*] Tiny changes. --- src/Includes/prepend.php | 2 +- src/classes/XLite/Controller/Admin/Log.php | 6 ++-- src/classes/XLite/Core/Profiler.php | 2 +- src/classes/XLite/Logger.php | 36 +++++++++++----------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Includes/prepend.php b/src/Includes/prepend.php index 926ab7b879..aeb54cb92f 100644 --- a/src/Includes/prepend.php +++ b/src/Includes/prepend.php @@ -59,7 +59,7 @@ require_once (LC_DIR_ROOT . 'Includes' . LC_DS . 'functions.php'); // Common error reporting settings -$path = LC_DIR_VAR . 'log' . LC_DS . 'php_errors.log.' . date('Y-m-d') . '.php'; +$path = LC_DIR_LOG . 'php_errors.log.' . date('Y-m-d') . '.php'; if (!file_exists(dirname($path)) && is_writable(LC_DIR_VAR)) { \Includes\Utils\FileManager::mkdirRecursive(dirname($path)); } diff --git a/src/classes/XLite/Controller/Admin/Log.php b/src/classes/XLite/Controller/Admin/Log.php index bed0616d60..5873133ac1 100644 --- a/src/classes/XLite/Controller/Admin/Log.php +++ b/src/classes/XLite/Controller/Admin/Log.php @@ -48,8 +48,8 @@ public function checkAccess() } /** - * Get log path - * + * Get log path + * * @return string * @see ____func_see____ * @since 1.0.11 @@ -60,7 +60,7 @@ public function getLogPath() if ($path && !preg_match(\XLite\Logger::LOG_FILE_NAME_PATTERN, $path)) { $path = null; } - $path = $path ? (LC_DIR_VAR . 'log' . LC_DS . $path) : null; + $path = $path ? (LC_DIR_LOG . $path) : null; return (!$path || !file_exists($path) || !is_readable($path)) ? null : $path; } diff --git a/src/classes/XLite/Core/Profiler.php b/src/classes/XLite/Core/Profiler.php index 8aff42ed91..8c1c51998b 100644 --- a/src/classes/XLite/Core/Profiler.php +++ b/src/classes/XLite/Core/Profiler.php @@ -392,7 +392,7 @@ public function log($timePoint, $additional = false) if (self::$useXdebugStackTrace) { xdebug_start_trace( - LC_DIR_VAR . 'log' . LC_DS . $timePoint . '.' . microtime(true), + LC_DIR_LOG . $timePoint . '.' . microtime(true), XDEBUG_TRACE_COMPUTERIZED ); } diff --git a/src/classes/XLite/Logger.php b/src/classes/XLite/Logger.php index bb73efa159..97a7e21313 100644 --- a/src/classes/XLite/Logger.php +++ b/src/classes/XLite/Logger.php @@ -36,7 +36,7 @@ class Logger extends \XLite\Base\Singleton { /** - * Log file name regexp pattern + * Log file name regexp pattern */ const LOG_FILE_NAME_PATTERN = '/^[a-zA-Z_]+\.log\.\d{4}-\d{2}-\d{2}\.php$/Ss'; @@ -91,8 +91,8 @@ class Logger extends \XLite\Base\Singleton ); /** - * Runtime id - * + * Runtime id + * * @var string * @see ____var_see____ * @since 1.0.11 @@ -330,11 +330,11 @@ public function registerException(\Exception $exception) /** * Log custom message - * + * * @param string $type Message type * @param string $message Message * @param boolean $useBackTrace User backtrace flag OPTIONAL - * + * * @return string * @see ____func_see____ * @since 1.0.11 @@ -360,10 +360,10 @@ public function logCustom($type, $message, $useBackTrace = false) } /** - * Get custom log URL - * + * Get custom log URL + * * @param string $type Type - * + * * @return string * @see ____func_see____ * @since 1.0.11 @@ -374,24 +374,24 @@ public function getCustomLogURL($type) } /** - * Get custom log file path - * + * Get custom log file path + * * @param string $type Type - * + * * @return string * @see ____func_see____ * @since 1.0.11 */ public function getCustomLogPath($type) { - return LC_DIR_VAR . 'log' . LC_DS . $this->getCustomLogFileName($type); + return LC_DIR_LOG . $this->getCustomLogFileName($type); } /** - * Get custom log file name - * + * Get custom log file name + * * @param string $type Type - * + * * @return string * @see ____func_see____ * @since 1.0.11 @@ -402,8 +402,8 @@ public function getCustomLogFileName($type) } /** - * Get log file header - * + * Get log file header + * * @return string * @see ____func_see____ * @since 1.0.11 @@ -604,7 +604,7 @@ protected function getPHPErrorName($errno) */ protected function getErrorLogPath() { - return LC_DIR_VAR . 'log' . LC_DS . 'php_errors.log.' . date('Y-m-d') . '.php'; + return LC_DIR_LOG . 'php_errors.log.' . date('Y-m-d') . '.php'; } /** From 653d6e60ac51de7e02dc0144265fef591bc29d42 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 25 Jun 2012 16:28:12 +0400 Subject: [PATCH 133/562] E:41584 [!] Bug: Successful migration scenario images to Amazon S3 treated not properly. Fixed. --- src/classes/XLite/Controller/Admin/EventTask.php | 2 ++ src/skins/admin/en/event_task_progress/controller.js | 11 ++++++++--- .../admin/en/modules/CDev/AmazonS3Images/migrate.js | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/EventTask.php b/src/classes/XLite/Controller/Admin/EventTask.php index 167c49a208..bda0bbe50a 100644 --- a/src/classes/XLite/Controller/Admin/EventTask.php +++ b/src/classes/XLite/Controller/Admin/EventTask.php @@ -93,6 +93,7 @@ protected function doActionRun() \XLite\Core\Event::eventTaskRun( array( 'percent' => \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->getEventStatePercent($event), + 'error' => !empty($errors) ) ); @@ -126,6 +127,7 @@ protected function doActionTouch() $data = array( 'percent' => $state && 0 < $state['position'] ? min(100, round($state['position'] / $state['length'] * 100)) : 0, + 'error' => false, ); print json_encode($data); diff --git a/src/skins/admin/en/event_task_progress/controller.js b/src/skins/admin/en/event_task_progress/controller.js index 0338e6074a..d254871453 100644 --- a/src/skins/admin/en/event_task_progress/controller.js +++ b/src/skins/admin/en/event_task_progress/controller.js @@ -32,9 +32,6 @@ jQuery().ready( function(xhr, status, data, valid) { if (xhr.readyState != 4 || xhr.status != 200) { core.showError('Event task runner internal error'); - - } else if (!valid) { - bar.trigger('error'); } }, {}, @@ -42,6 +39,9 @@ jQuery().ready( ); } else { + if (data.error) { + bar.trigger('error'); + } bar.trigger('complete'); } } @@ -89,6 +89,11 @@ jQuery().ready( timer = setTimeout(function () { return o.updateProgressBar(); }, timerTTL); } else { + + if (data.error) { + bar.trigger('error'); + } + bar.trigger('complete'); } diff --git a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js index f589c2c555..72b5c99231 100644 --- a/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js +++ b/src/skins/admin/en/modules/CDev/AmazonS3Images/migrate.js @@ -25,7 +25,7 @@ jQuery().ready( ).bind( 'complete', function() { - if (this.errorState) { + if (!this.errorState) { self.location.reload(); } } From 559f65f2413c8c4eb8013e72b44e106a9ea46f00 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Mon, 25 Jun 2012 21:16:15 +0400 Subject: [PATCH 134/562] E:41650 [*] Update inline form fields --- src/classes/XLite/View/FormField/Inline/AInline.php | 12 +++++++----- src/classes/XLite/View/ItemsList/Model/AModel.php | 3 ++- src/classes/XLite/View/ItemsList/Model/Table.php | 2 +- .../en/items_list/model/table/parts/create_box.tpl | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/classes/XLite/View/FormField/Inline/AInline.php b/src/classes/XLite/View/FormField/Inline/AInline.php index 1951676d6c..3ba499a976 100644 --- a/src/classes/XLite/View/FormField/Inline/AInline.php +++ b/src/classes/XLite/View/FormField/Inline/AInline.php @@ -315,10 +315,10 @@ public function setValueFromRequest(array $data = array(), $key = null) if (method_exists($this, $method)) { // $method assemble from 'setValue' + field name - $this->$method($field, $data); + $this->$method($field, $data, $key); } else { - $this->setFieldValue($field, $data); + $this->setFieldValue($field, $data, $key); } } } @@ -521,14 +521,15 @@ protected function getFieldEntityValue(array $field) * * @param array $field Field * @param array $data Data + * @param mixed $key Row key OPTIONAL * * @return void * @see ____func_see____ * @since 1.0.22 */ - protected function setFieldValue(array $field, array $data) + protected function setFieldValue(array $field, array $data, $key = null) { - $this->transferValueToField($field, $this->isolateFieldValue($field, $data)); + $this->transferValueToField($field, $this->isolateFieldValue($field, $data, $key)); } /** @@ -536,12 +537,13 @@ protected function setFieldValue(array $field, array $data) * * @param array $field Field info * @param array $data Data + * @param mixed $key Row key OPTIONAL * * @return mixed * @see ____func_see____ * @since 1.0.23 */ - protected function isolateFieldValue(array $field, array $data) + protected function isolateFieldValue(array $field, array $data, $key = null) { $found = true; diff --git a/src/classes/XLite/View/ItemsList/Model/AModel.php b/src/classes/XLite/View/ItemsList/Model/AModel.php index 8793da58cc..3d84cd68f7 100644 --- a/src/classes/XLite/View/ItemsList/Model/AModel.php +++ b/src/classes/XLite/View/ItemsList/Model/AModel.php @@ -367,7 +367,8 @@ protected function createInlineFields(array $line, \XLite\Model\AEntity $entity) $list = array(); foreach ($this->getCreateFieldClasses() as $object) { - $list[] = $this->prepareInlineField($object, $entity); + $this->prepareInlineField($object, $entity); + $list[] = $object; } return $list; diff --git a/src/classes/XLite/View/ItemsList/Model/Table.php b/src/classes/XLite/View/ItemsList/Model/Table.php index 9d4e383c1a..3a2c7457dc 100644 --- a/src/classes/XLite/View/ItemsList/Model/Table.php +++ b/src/classes/XLite/View/ItemsList/Model/Table.php @@ -391,7 +391,7 @@ protected function getCreateFieldClasses() if ($class) { $params = isset($column[static::COLUMN_PARAMS]) ? $column[static::COLUMN_PARAMS] : array(); $list[] = array( - 'class' => $column[static::COLUMN_CREATE_CLASS], + 'class' => $class, 'parameters' => array('fieldName' => $name, 'fieldParams' => $params), ); } diff --git a/src/skins/admin/en/items_list/model/table/parts/create_box.tpl b/src/skins/admin/en/items_list/model/table/parts/create_box.tpl index c035a9e053..ffe2ce6b38 100644 --- a/src/skins/admin/en/items_list/model/table/parts/create_box.tpl +++ b/src/skins/admin/en/items_list/model/table/parts/create_box.tpl @@ -13,7 +13,7 @@
    - - - - - - - - - - - {w.display()} - - -
    diff --git a/src/skins/admin/en/items_list/order/orders_list.css b/src/skins/admin/en/items_list/order/orders_list.css deleted file mode 100644 index 92332aa2c7..0000000000 --- a/src/skins/admin/en/items_list/order/orders_list.css +++ /dev/null @@ -1,27 +0,0 @@ -/* vim: set ts=2 sw=2 sts=2 et: */ - -/** - * Orders list styles - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - */ - -.items-list .table td.id -{ - text-align: center; -} - -.items-list .table th.customer -{ - width: 100%; -} - -.items-list .table td.total -{ - text-align: right; - font-weight: bold; -} diff --git a/src/skins/admin/en/items_list/order/orders_list.js b/src/skins/admin/en/items_list/order/orders_list.js deleted file mode 100644 index 2bd4c39b77..0000000000 --- a/src/skins/admin/en/items_list/order/orders_list.js +++ /dev/null @@ -1,25 +0,0 @@ -/* vim: set ts=2 sw=2 sts=2 et: */ - -/** - * Orders list controller - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - */ - -// Orders list class -function OrdersList(cell, URLParams, URLAJAXParams) -{ - if (!cell) { - return; - } - - this.constructor.prototype.constructor(cell, URLParams, URLAJAXParams); -} - - -OrdersList.prototype = new ItemsList(); -OrdersList.prototype.constructor = ItemsList; diff --git a/src/skins/admin/en/items_list/order/parts/columns/checkbox.tpl b/src/skins/admin/en/items_list/order/parts/columns/checkbox.tpl deleted file mode 100644 index 0de8390db2..0000000000 --- a/src/skins/admin/en/items_list/order/parts/columns/checkbox.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Column with checkboxes - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="10") - *} - - - - diff --git a/src/skins/admin/en/items_list/order/parts/columns/customer.tpl b/src/skins/admin/en/items_list/order/parts/columns/customer.tpl deleted file mode 100644 index 6a41da65f9..0000000000 --- a/src/skins/admin/en/items_list/order/parts/columns/customer.tpl +++ /dev/null @@ -1,23 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="60") - *} - - - - {order.profile.billing_address.title:h} {order.profile.billing_address.firstname:h} {order.profile.billing_address.lastname:h} - - - {order.profile.billing_address.title:h} {order.profile.billing_address.firstname:h} {order.profile.billing_address.lastname:h} - - diff --git a/src/skins/admin/en/items_list/order/parts/columns/details.tpl b/src/skins/admin/en/items_list/order/parts/columns/details.tpl deleted file mode 100644 index 99fe3ad9f8..0000000000 --- a/src/skins/admin/en/items_list/order/parts/columns/details.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="80") - *} - - - - {t(#Details#)} >> - - diff --git a/src/skins/admin/en/items_list/order/parts/columns/id.tpl b/src/skins/admin/en/items_list/order/parts/columns/id.tpl deleted file mode 100644 index c661c39657..0000000000 --- a/src/skins/admin/en/items_list/order/parts/columns/id.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="20") - *} - - - - {order.getOrderId()} - - diff --git a/src/skins/admin/en/items_list/order/parts/columns/status.tpl b/src/skins/admin/en/items_list/order/parts/columns/status.tpl deleted file mode 100644 index 183649d764..0000000000 --- a/src/skins/admin/en/items_list/order/parts/columns/status.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.columns", weight="30") - *} - - - - diff --git a/src/skins/admin/en/items_list/order/parts/header/customer.tpl b/src/skins/admin/en/items_list/order/parts/header/customer.tpl deleted file mode 100644 index c79ecaa836..0000000000 --- a/src/skins/admin/en/items_list/order/parts/header/customer.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.header", weight="60") - *} - - diff --git a/src/skins/admin/en/items_list/order/parts/header/date.tpl b/src/skins/admin/en/items_list/order/parts/header/date.tpl deleted file mode 100644 index 85d31b001e..0000000000 --- a/src/skins/admin/en/items_list/order/parts/header/date.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.header", weight="50") - *} - - diff --git a/src/skins/admin/en/items_list/order/parts/header/id.tpl b/src/skins/admin/en/items_list/order/parts/header/id.tpl deleted file mode 100644 index c047fe2e5d..0000000000 --- a/src/skins/admin/en/items_list/order/parts/header/id.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.header", weight="20") - *} - - diff --git a/src/skins/admin/en/items_list/order/parts/header/status.tpl b/src/skins/admin/en/items_list/order/parts/header/status.tpl deleted file mode 100644 index 9e6fdc7701..0000000000 --- a/src/skins/admin/en/items_list/order/parts/header/status.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Item name - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.header", weight="30") - *} - - diff --git a/src/skins/admin/en/items_list/order/parts/header/total.tpl b/src/skins/admin/en/items_list/order/parts/header/total.tpl deleted file mode 100644 index 098e13b00a..0000000000 --- a/src/skins/admin/en/items_list/order/parts/header/total.tpl +++ /dev/null @@ -1,14 +0,0 @@ -{* vim: set ts=2 sw=2 sts=2 et: *} - -{** - * Order total - * - * @author Creative Development LLC - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @since 1.0.0 - * @ListChild (list="itemsList.order.admin.search.header", weight="70") - *} - - diff --git a/src/skins/admin/en/order/recent.tpl b/src/skins/admin/en/order/recent.tpl index 09403c17a7..499afe1cd3 100644 --- a/src/skins/admin/en/order/recent.tpl +++ b/src/skins/admin/en/order/recent.tpl @@ -1,7 +1,7 @@ {* vim: set ts=2 sw=2 sts=2 et: *} {** - * ____file_title____ + * Recent orders list * * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved @@ -9,11 +9,6 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 *} -{* Open tag *} - - - {* List of orders *} - - -{* Close tag *} + + diff --git a/src/skins/admin/en/order/search.tpl b/src/skins/admin/en/order/search.tpl index 65ff462eb6..f400c3c1e5 100644 --- a/src/skins/admin/en/order/search.tpl +++ b/src/skins/admin/en/order/search.tpl @@ -1,7 +1,7 @@ {* vim: set ts=2 sw=2 sts=2 et: *} {** - * ____file_title____ + * Orders search page * * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved @@ -11,11 +11,6 @@ *} -{* Open
    tag *} - - - {* List of orders *} - - -{* Close tag *} + + diff --git a/src/sql/xlite_data.yaml b/src/sql/xlite_data.yaml index 3874f2ddcf..b4f2cae5e1 100644 --- a/src/sql/xlite_data.yaml +++ b/src/sql/xlite_data.yaml @@ -308,6 +308,7 @@ XLite\Model\LanguageLabel: - { name: 'Add new label', translations: [{ code: en, label: 'Add new label' }] } - { name: 'Add language', translations: [{ code: en, label: 'Add language' }] } - { name: 'N items total', translations: [{ code: en, label: '{{n}} items total' }] } + - { name: 'N it.', translations: [{ code: en, label: '{{count}} it.' }] } - { name: 'Select language to edit', translations: [{ code: en, label: 'Select language to edit' }] } - { name: 'Add new language', translations: [{ code: en, label: 'Add new language' }] } - { name: Save, translations: [{ code: en, label: Save }] } From 37f405ec5772000e2418cf2eceb25447ad4a6c3d Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 27 Jun 2012 17:52:47 +0400 Subject: [PATCH 143/562] [*] JS code in admin area total refactoring. part 1. Items lists. --- src/classes/XLite/View/DatePicker.php | 28 +++++---- .../XLite/View/ItemsList/AItemsList.php | 44 +++----------- .../XLite/View/ItemsList/Model/AModel.php | 20 +++---- src/skins/admin/en/common/datepicker.js | 19 ++++++ src/skins/admin/en/common/datepicker.tpl | 21 ++----- src/skins/admin/en/css/style.css | 1 - src/skins/admin/en/items_list/body.tpl | 16 ++--- src/skins/admin/en/items_list/items_list.js | 58 ++++++++++++------- src/skins/admin/en/items_list/model/table.tpl | 12 +--- .../en/items_list/model/table/controller.js | 11 +++- .../admin/en/items_list/order/orders_list.js | 14 +---- .../en/items_list/product/products_list.js | 14 +---- src/skins/default/en/common/datepicker.js | 19 ++++++ src/skins/default/en/common/datepicker.tpl | 26 ++------- 14 files changed, 137 insertions(+), 166 deletions(-) diff --git a/src/classes/XLite/View/DatePicker.php b/src/classes/XLite/View/DatePicker.php index 4f66657a5e..70a57b87f3 100644 --- a/src/classes/XLite/View/DatePicker.php +++ b/src/classes/XLite/View/DatePicker.php @@ -81,18 +81,6 @@ public function getClassName() return preg_replace('/([A-Z])/Sse', '"-" . strtolower("\1")', $name); } - /** - * Get date format (javascript) - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - public function getDateFormat() - { - return $this->jsDateFormat; - } - /** * Get widget value as string * @@ -171,4 +159,20 @@ protected function defineWidgetParams() self::PARAM_LOW_YEAR => new \XLite\Model\WidgetParam\Int('The low year', 2035), ); } + + /** + * Return specific for JS code widget options + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDatePickerOptions() + { + return array( + 'dateFormat' => $this->jsDateFormat, + 'highYear' => $this->getParam(static::PARAM_HIGH_YEAR), + 'lowYear' => $this->getParam(static::PARAM_LOW_YEAR), + ); + } } diff --git a/src/classes/XLite/View/ItemsList/AItemsList.php b/src/classes/XLite/View/ItemsList/AItemsList.php index 4c4ed438cc..cd1409e2d0 100644 --- a/src/classes/XLite/View/ItemsList/AItemsList.php +++ b/src/classes/XLite/View/ItemsList/AItemsList.php @@ -552,26 +552,6 @@ protected function getJSHandlerClassName() return 'ItemsList'; } - /** - * getJSArray - * - * @param array $params Params to use - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getJSArray(array $params) - { - $result = array(); - - foreach ($params as $name => $value) { - $result[] = $name . ': \'' . addslashes($value) . '\''; - } - - return '{' . implode(', ', $result) . '}'; - } - /** * Get URL common parameters * @@ -630,27 +610,19 @@ protected function getURLAJAXParams() } /** - * getURLParams - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getURLParamsJS() - { - return $this->getJSArray($this->getURLParams()); - } - - /** - * getURLAJAXParams + * Return specific items list parameters that will be sent to JS code * - * @return string + * @return array * @see ____func_see____ * @since 1.0.0 */ - protected function getURLAJAXParamsJS() + protected function getItemsListParams() { - return $this->getJSArray($this->getURLAJAXParams()); + return array( + 'urlparams' => $this->getURLParams(), + 'urlajaxparams' => $this->getURLAJAXParams(), + 'cell' => $this->getSessionCell(), + ); } /** diff --git a/src/classes/XLite/View/ItemsList/Model/AModel.php b/src/classes/XLite/View/ItemsList/Model/AModel.php index 8793da58cc..cac02a753b 100644 --- a/src/classes/XLite/View/ItemsList/Model/AModel.php +++ b/src/classes/XLite/View/ItemsList/Model/AModel.php @@ -421,8 +421,8 @@ protected function processRemove() } /** - * Get entity's ID list for remove - * + * Get entity's ID list for remove + * * @return void * @see ____func_see____ * @since 1.0.17 @@ -446,10 +446,10 @@ protected function getEntityIdListForRemove() } /** - * Remove entity - * + * Remove entity + * * @param \XLite\Model\AEntity $entity Entity - * + * * @return boolean * @see ____func_see____ * @since 1.0.17 @@ -884,15 +884,15 @@ protected function buildEntityURL(\XLite\Model\AEntity $entity, array $column) */ protected function getContainerClass() { - return 'items-list' + return 'widget items-list' . ' widgetclass-' . $this->getWidgetClass() . ' widgettarget-' . $this->getWidgetTarget() . ' sessioncell-' . $this->getSessionCell(); } /** - * Get container attributes - * + * Get container attributes + * * @return array * @see ____func_see____ * @since 1.0.23 @@ -905,8 +905,8 @@ protected function getContainerAttributes() } /** - * Get container attributes as string - * + * Get container attributes as string + * * @return string * @see ____func_see____ * @since 1.0.23 diff --git a/src/skins/admin/en/common/datepicker.js b/src/skins/admin/en/common/datepicker.js index bedf2bae20..59a9a19b2c 100644 --- a/src/skins/admin/en/common/datepicker.js +++ b/src/skins/admin/en/common/datepicker.js @@ -12,3 +12,22 @@ function datePickerPostprocess(input, elm) { } + +jQuery().ready( + function() { + jQuery('.date-picker-widget').each(function (index, elem) { + var options = core.getCommentedData(elem); + + jQuery('input', elem).datepicker( + { + dateFormat: options.dateFormat, + gotoCurrent: true, + yearRange: options.highYear + '-' + options.lowYear, + showButtonPanel: false, + beforeShow: datePickerPostprocess, + selectOtherMonths: true + } + ); + }); + } +); \ No newline at end of file diff --git a/src/skins/admin/en/common/datepicker.tpl b/src/skins/admin/en/common/datepicker.tpl index 38a6cf66ca..c84bd1c83c 100644 --- a/src/skins/admin/en/common/datepicker.tpl +++ b/src/skins/admin/en/common/datepicker.tpl @@ -9,20 +9,7 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 *} - - + + {displayCommentedData(getDatePickerOptions())} + + diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index 9fee0c3176..f3cab069ea 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -1859,7 +1859,6 @@ form.list-form .sticky-panel.has-add-buttons .additional { form.list-form .sticky-panel.has-add-buttons .additional .additional-buttons { position: absolute; - top: 10px; left: 43px; display: none; -moz-border-radius: 5px; diff --git a/src/skins/admin/en/items_list/body.tpl b/src/skins/admin/en/items_list/body.tpl index bb84574fd1..37e7eee53b 100644 --- a/src/skins/admin/en/items_list/body.tpl +++ b/src/skins/admin/en/items_list/body.tpl @@ -9,24 +9,20 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 *} -
    +
    -
    {pager.display()}
    + {displayCommentedData(getItemsListParams())} + +
    {pager.display()}
    -
    {pager.display()}
    +
    {pager.display()}
    - - - + \ No newline at end of file diff --git a/src/skins/admin/en/items_list/items_list.js b/src/skins/admin/en/items_list/items_list.js index 74fbbfc083..71ca2b48bf 100644 --- a/src/skins/admin/en/items_list/items_list.js +++ b/src/skins/admin/en/items_list/items_list.js @@ -10,10 +10,31 @@ * @since 1.0.0 */ +function ItemsListQueue() +{ + jQuery('.widget.items-list').each(function(index, elem){ + new ItemsList(jQuery(elem)); + }); +} + // Main class -function ItemsList(cell, URLParams, URLAJAXParams) +function ItemsList(elem, urlparams, urlajaxparams) { - this.container = jQuery('.items-list').eq(0); + if (typeof(urlparams) == 'undefined') { + // Initialize widget from the scratch + this.container = elem; + this.params = core.getCommentedData(elem); + + } else { + // Initialize widget by the sessionCell class identification + this.container = jQuery('.sessioncell-' + elem); + + this.params = { + 'cell' : elem, + 'urlparams' : urlparams, + 'urlajaxparams' : urlajaxparams + }; + } if (!this.container.length) { return; @@ -21,10 +42,6 @@ function ItemsList(cell, URLParams, URLAJAXParams) this.container.get(0).itemsListController = this; - this.cell = cell; - this.URLParams = URLParams; - this.URLAJAXParams = URLAJAXParams; - // Common form support CommonForm.autoassign(this.container); @@ -35,9 +52,8 @@ extend(ItemsList, Base); ItemsList.prototype.container = null; -ItemsList.prototype.cell = null; -ItemsList.prototype.urlParams = null; -ItemsList.prototype.urlAJAXParams = null; +ItemsList.prototype.params = null; + ItemsList.prototype.listeners = {}; ItemsList.prototype.listeners.pager = function(handler) @@ -102,7 +118,10 @@ ItemsList.prototype.changeSortByMode = function(handler) // Change sort order ItemsList.prototype.changeSortOrder = function() { - return this.process('sortOrder', ('asc' == this.URLParams.sortOrder) ? 'desc' : 'asc'); + return this.process( + 'sortOrder', + (typeof(this.params.urlparams['sortOrder']) == 'undefined' || 'asc' == this.params.urlparams['sortOrder']) ? 'desc' : 'asc' + ); } @@ -125,7 +144,7 @@ ItemsList.prototype.changePageLength = function(handler) var count = parseInt(jQuery(handler).val()); if (isNaN(count)) { - count = this.URLParams.itemsPerPage; + count = typeof(this.params.urlparams['itemsPerPage']) != 'undefined' ? this.params.urlparams['itemsPerPage'] : 1; } else if (count < 1) { count = 1; @@ -149,11 +168,11 @@ ItemsList.prototype.addListeners = function() // Change URL param ItemsList.prototype.setURLParam = function(paramName, paramValue) { - var result = (paramValue != this.URLParams[paramName]) || (paramValue != this.URLAJAXParams[paramName]); + var result = (paramValue != this.params.urlparams[paramName]) || (paramValue != this.params.urlajaxparams[paramName]); if (result) { - this.URLParams[paramName] = paramValue; - this.URLAJAXParams[paramName] = paramValue; + this.params.urlparams[paramName] = paramValue; + this.params.urlajaxparams[paramName] = paramValue; } return result; @@ -209,7 +228,7 @@ ItemsList.prototype.showModalScreen = function() } ); - // FIXME - check if there is more convinient way + // FIXME - check if there is more convenient way jQuery('.blockElement') .css({padding: null, border: null, margin: null, textAlign: null, color: null, backgroundColor: null, cursor: null}) .addClass('wait-block'); @@ -227,7 +246,7 @@ ItemsList.prototype.hideModalScreen = function() // Build URL ItemsList.prototype.buildURL = function(forAJAX) { - var list = forAJAX ? this.URLAJAXParams : this.URLParams; + var list = forAJAX ? this.params.urlajaxparams : this.params.urlparams; if (typeof(list.sessionCell) != 'undefined') { list.sessionCell = null; @@ -257,14 +276,13 @@ ItemsList.prototype.loadHandler = function(xhr, s) // Place new list content ItemsList.prototype.placeNewContent = function(content) { - var div = document.createElement('div'); - jQuery(div).html(jQuery('.items-list.sessioncell-' + this.cell, content)); - this.container.replaceWith(div); + this.container.replaceWith(jQuery('.items-list.sessioncell-' + this.params.cell, content)); + this.reassign(); } // Reassign items list controller ItemsList.prototype.reassign = function() { - new ItemsList(this.cell, this.URLParams, this.URLAJAXParams); + new ItemsList(this.params.cell, this.params.urlparams, this.params.urlajaxparams); } diff --git a/src/skins/admin/en/items_list/model/table.tpl b/src/skins/admin/en/items_list/model/table.tpl index 1abe56ce72..32b1e25033 100644 --- a/src/skins/admin/en/items_list/model/table.tpl +++ b/src/skins/admin/en/items_list/model/table.tpl @@ -11,7 +11,7 @@ *}
    - + {displayCommentedData(getItemsListParams())}
    @@ -30,13 +30,3 @@
    - - diff --git a/src/skins/admin/en/items_list/model/table/controller.js b/src/skins/admin/en/items_list/model/table/controller.js index 765432ee37..315cd9f4a6 100644 --- a/src/skins/admin/en/items_list/model/table/controller.js +++ b/src/skins/admin/en/items_list/model/table/controller.js @@ -281,6 +281,15 @@ TableItemsList.prototype.listeners.positionChanged = function(handler) // Reassign items list controller TableItemsList.prototype.reassign = function() { - new TableItemsList(this.cell, this.URLParams, this.URLAJAXParams); + new TableItemsList(this.params.cell, this.params.urlparams, this.params.urlajaxparams); } + +function TableItemsListQueue() +{ + jQuery('.widget.items-list').each(function(index, elem){ + new TableItemsList(jQuery(elem)); + }); +} + +core.autoload(TableItemsListQueue); diff --git a/src/skins/admin/en/items_list/order/orders_list.js b/src/skins/admin/en/items_list/order/orders_list.js index 2bd4c39b77..a5d33faf90 100644 --- a/src/skins/admin/en/items_list/order/orders_list.js +++ b/src/skins/admin/en/items_list/order/orders_list.js @@ -10,16 +10,4 @@ * @since 1.0.0 */ -// Orders list class -function OrdersList(cell, URLParams, URLAJAXParams) -{ - if (!cell) { - return; - } - - this.constructor.prototype.constructor(cell, URLParams, URLAJAXParams); -} - - -OrdersList.prototype = new ItemsList(); -OrdersList.prototype.constructor = ItemsList; +core.autoload(ItemsListQueue); diff --git a/src/skins/admin/en/items_list/product/products_list.js b/src/skins/admin/en/items_list/product/products_list.js index 7e0b9f8e20..626eb35bcd 100644 --- a/src/skins/admin/en/items_list/product/products_list.js +++ b/src/skins/admin/en/items_list/product/products_list.js @@ -10,16 +10,4 @@ * @since 1.0.0 */ -// Products list class -function ProductsList(cell, URLParams, URLAJAXParams) -{ - if (!cell) { - return; - } - - this.constructor.prototype.constructor(cell, URLParams, URLAJAXParams); -} - - -ProductsList.prototype = new ItemsList(); -ProductsList.prototype.constructor = ItemsList; +core.autoload(ItemsListQueue); diff --git a/src/skins/default/en/common/datepicker.js b/src/skins/default/en/common/datepicker.js index bedf2bae20..59a9a19b2c 100644 --- a/src/skins/default/en/common/datepicker.js +++ b/src/skins/default/en/common/datepicker.js @@ -12,3 +12,22 @@ function datePickerPostprocess(input, elm) { } + +jQuery().ready( + function() { + jQuery('.date-picker-widget').each(function (index, elem) { + var options = core.getCommentedData(elem); + + jQuery('input', elem).datepicker( + { + dateFormat: options.dateFormat, + gotoCurrent: true, + yearRange: options.highYear + '-' + options.lowYear, + showButtonPanel: false, + beforeShow: datePickerPostprocess, + selectOtherMonths: true + } + ); + }); + } +); \ No newline at end of file diff --git a/src/skins/default/en/common/datepicker.tpl b/src/skins/default/en/common/datepicker.tpl index 03f58cc750..c84bd1c83c 100644 --- a/src/skins/default/en/common/datepicker.tpl +++ b/src/skins/default/en/common/datepicker.tpl @@ -9,25 +9,7 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 *} - - -{* TODO restore - - - -*} + + {displayCommentedData(getDatePickerOptions())} + + From c2bef1387d4b4ff137db79c5867ebfc9171ade0c Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 27 Jun 2012 17:58:30 +0400 Subject: [PATCH 144/562] [*] Datepicker widget small fix. --- src/skins/admin/en/common/datepicker.js | 2 +- src/skins/default/en/common/datepicker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/skins/admin/en/common/datepicker.js b/src/skins/admin/en/common/datepicker.js index 59a9a19b2c..a2ae2020e8 100644 --- a/src/skins/admin/en/common/datepicker.js +++ b/src/skins/admin/en/common/datepicker.js @@ -18,7 +18,7 @@ jQuery().ready( jQuery('.date-picker-widget').each(function (index, elem) { var options = core.getCommentedData(elem); - jQuery('input', elem).datepicker( + jQuery('input', jQuery(elem)).datepicker( { dateFormat: options.dateFormat, gotoCurrent: true, diff --git a/src/skins/default/en/common/datepicker.js b/src/skins/default/en/common/datepicker.js index 59a9a19b2c..a2ae2020e8 100644 --- a/src/skins/default/en/common/datepicker.js +++ b/src/skins/default/en/common/datepicker.js @@ -18,7 +18,7 @@ jQuery().ready( jQuery('.date-picker-widget').each(function (index, elem) { var options = core.getCommentedData(elem); - jQuery('input', elem).datepicker( + jQuery('input', jQuery(elem)).datepicker( { dateFormat: options.dateFormat, gotoCurrent: true, From b5eef3338056582f9eee512ba6a0019df1fa44b4 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 28 Jun 2012 11:25:56 +0400 Subject: [PATCH 145/562] [*] Profiles list refactoring. --- .../admin/en/items_list/profile/profiles_list.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/skins/admin/en/items_list/profile/profiles_list.js b/src/skins/admin/en/items_list/profile/profiles_list.js index d59648bca3..6565710c8a 100644 --- a/src/skins/admin/en/items_list/profile/profiles_list.js +++ b/src/skins/admin/en/items_list/profile/profiles_list.js @@ -10,16 +10,4 @@ * @since 1.0.0 */ -// Profiles list class -function ProfilesList(cell, URLParams, URLAJAXParams) -{ - if (!cell) { - return; - } - - this.constructor.prototype.constructor(cell, URLParams, URLAJAXParams); -} - - -ProfilesList.prototype = new ItemsList(); -ProfilesList.prototype.constructor = ItemsList; +core.autoload(ItemsListQueue); \ No newline at end of file From 8eb139e185c89aa47ee3b5d4bd278d4c30443cb5 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 28 Jun 2012 12:26:04 +0400 Subject: [PATCH 146/562] [!] Minor fix --- src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php index ff045f0ebd..76f5b03f02 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/Model/Role.php @@ -32,8 +32,6 @@ * * @see ____class_see____ * @since 1.0.17 - * - * @MappedSuperclass */ abstract class Role extends \XLite\Model\Role implements \XLite\Base\IDecorator { From 67e3dbcc41f65950d89eb51fb9e92d29e4aaceb6 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 28 Jun 2012 12:37:29 +0400 Subject: [PATCH 147/562] E:41679 [!] Bug: Typo in classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php Fixed. --- .../XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php index 131225f237..ef998a4a99 100644 --- a/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php +++ b/src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php @@ -65,6 +65,7 @@ protected function validateFields(array $data, $section) if ( 'default' == $section + && \XLite::getController() instanceOf \XLite\Controller\Admin\Module && 'CDev\AmazonS3Images' == $this->getModule()->getActualName() && !$this->errorMessages ) { From c7befc4fdff07bb000b2eacc35253e8c5d82a814 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Thu, 28 Jun 2012 13:41:23 +0400 Subject: [PATCH 148/562] [*] Paypal module added --- .../Controller/Customer/PaymentReturn.php | 33 ++ .../XLite/Model/Payment/Base/Online.php | 1 + .../XLite/Model/Payment/Base/Processor.php | 30 ++ .../Controller/Admin/PaypalSettings.php | 99 +++++ .../Module/CDev/Paypal/Core/PayflowProAPI.php | 95 ++++ src/classes/XLite/Module/CDev/Paypal/Main.php | 142 ++++++ .../Paypal/Model/Payment/Processor/Iframe.php | 419 ++++++++++++++++++ .../Model/Payment/Processor/PayflowLink.php | 273 ++++++++++++ .../CDev/Paypal/View/PaypalSettings.php | 116 +++++ .../XLite/Module/CDev/Paypal/install.yaml | 77 ++++ .../en/modules/CDev/Paypal/settings/body.tpl | 91 ++++ .../en/modules/CDev/Paypal/settings/style.css | 119 +++++ .../default/en/modules/CDev/Paypal/method.tpl | 13 + 13 files changed, 1508 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/Paypal/Controller/Admin/PaypalSettings.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/Main.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/install.yaml create mode 100644 src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl create mode 100644 src/skins/admin/en/modules/CDev/Paypal/settings/style.css create mode 100644 src/skins/default/en/modules/CDev/Paypal/method.tpl diff --git a/src/classes/XLite/Controller/Customer/PaymentReturn.php b/src/classes/XLite/Controller/Customer/PaymentReturn.php index 7b7d57b3e5..a2b490d80e 100644 --- a/src/classes/XLite/Controller/Customer/PaymentReturn.php +++ b/src/classes/XLite/Controller/Customer/PaymentReturn.php @@ -132,6 +132,10 @@ protected function doActionReturn() $this->doHTMLRedirect($url); break; + case \XLite\Model\Payment\Base\WebBased::RETURN_TYPE_HTML_REDIRECT_WITH_IFRAME_DESTROYING: + $this->doHTMLRedirectWithIframeDestroying($url); + break; + case \XLite\Model\Payment\Base\WebBased::RETURN_TYPE_CUSTOM: $txn->getPaymentMethod()->getProcessor()->doCustomReturnRedirect(); break; @@ -172,6 +176,35 @@ protected function doHTMLRedirect($url, $time = 1) If the page is not updated in $time; seconds, please follow this link: continue >> +HTML; + + print ($html); + exit (0); + } + + /** + * Do HTML-based redirect with destroying an iframe window + * + * @param string $url URL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function doHTMLRedirectWithIframeDestroying($url) + { + $html = << + + + + + +If this page does not redirect Click Here + + HTML; print ($html); diff --git a/src/classes/XLite/Model/Payment/Base/Online.php b/src/classes/XLite/Model/Payment/Base/Online.php index d378f452d0..dccdc5892e 100644 --- a/src/classes/XLite/Model/Payment/Base/Online.php +++ b/src/classes/XLite/Model/Payment/Base/Online.php @@ -46,6 +46,7 @@ abstract class Online extends \XLite\Model\Payment\Base\Processor */ const RETURN_TYPE_HTTP_REDIRECT = 'http'; const RETURN_TYPE_HTML_REDIRECT = 'html'; + const RETURN_TYPE_HTML_REDIRECT_WITH_IFRAME_DESTROYING = 'html_iframe'; const RETURN_TYPE_CUSTOM = 'custom'; diff --git a/src/classes/XLite/Model/Payment/Base/Processor.php b/src/classes/XLite/Model/Payment/Base/Processor.php index d478e2b7e2..2298aa8d55 100644 --- a/src/classes/XLite/Model/Payment/Base/Processor.php +++ b/src/classes/XLite/Model/Payment/Base/Processor.php @@ -45,6 +45,25 @@ abstract class Processor extends \XLite\Base const PENDING = 'P'; const FAILED = 'F'; + + /** + * Transaction types + */ + const TRAN_TYPE_AUTH = 'auth'; + const TRAN_TYPE_SALE = 'sale'; + const TRAN_TYPE_CAPTURE = 'capture'; + const TRAN_TYPE_CAPTURE_PART = 'capturePart'; + const TRAN_TYPE_CAPTURE_MULTI = 'captureMulti'; + const TRAN_TYPE_VOID = 'void'; + const TRAN_TYPE_VOID_PART = 'voidPart'; + const TRAN_TYPE_VOID_MULTI = 'voidMulti'; + const TRAN_TYPE_REFUND = 'refund'; + const TRAN_TYPE_REFUND_PART = 'refundPart'; + const TRAN_TYPE_REFUND_MULTI = 'refundMulti'; + const TRAN_TYPE_GET_INFO = 'getInfo'; + const TRAN_TYPE_ACCEPT = 'accept'; + const TRAN_TYPE_DECLINE = 'decline'; + const TRAN_TYPE_TEST = 'test'; /** * Transaction (cache) @@ -74,6 +93,17 @@ abstract class Processor extends \XLite\Base */ abstract protected function doInitialPayment(); + /** + * Get allowed transactions list + * + * @return string Status code + * @see ____func_see____ + * @since 1.0.0 + */ + public function getAllowedTransactions() + { + return array(TRAN_TYPE_SALE); + } /** * Pay diff --git a/src/classes/XLite/Module/CDev/Paypal/Controller/Admin/PaypalSettings.php b/src/classes/XLite/Module/CDev/Paypal/Controller/Admin/PaypalSettings.php new file mode 100644 index 0000000000..9b26a21cfb --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Controller/Admin/PaypalSettings.php @@ -0,0 +1,99 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Controller\Admin; + +/** + * Paypal settings controller + * + * @see ____class_see____ + * @since 1.0.0 + */ +class PaypalSettings extends \XLite\Controller\Admin\AAdmin +{ + /** + * Return the current page title (for the content area) + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getTitle() + { + return 'Paypal settings'; + } + + + /** + * Save options + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + protected function doActionSaveOptions() + { + if (isset(\XLite\Core\Request::getInstance()->options)) { + + $moduleOptions = $this->getModuleOptions(); + $postedData = \XLite\Core\Request::getInstance()->options; + + foreach($moduleOptions as $option) { + if (isset($postedData[$option])) { + \XLite\Core\Database::getRepo('\XLite\Model\Config')->createOption( + array( + 'category' => 'CDev\\Paypal', + 'name' => $option, + 'value' => $postedData[$option], + ) + ); + } + } + } + } + + /** + * Return allowed module options list + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getModuleOptions() + { + return array( + 'vendor', + 'user', + 'pwd', + 'partner', + 'transaction_type', + 'test', + 'prefix', + ); + } +} + diff --git a/src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php b/src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php new file mode 100644 index 0000000000..b88cb9f544 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php @@ -0,0 +1,95 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\Core; + +/** + * Paypal Payflow Pro API (name-value pairs) implementation + * + * @see ____class_see____ + * @since 1.0.0 + */ +class PayflowProAPI extends \XLite\Base\Singleton +{ + public function preprocessRequestData($data) + { + } + + public function sendRequest($data) + { + } + + public function parseResponse($response) + { + } + + public function getRequestHeaders() + { + } + + public function getRequestTimeout() + { + return 45; // Default value recommended by Paypal; Max value - 120 seconds + } + + public function getCommonRequestParams($trxType) + { + return array( + // Merchant login ID that was created when the merchant registered for their PayPal Payments Advanced or Payflow Link account + 'VENDOR' => \XLite\Core\Config::getInstance()->CDev->Paypal->vendor, + + // Username of the user that is authorized to run transactions + 'USER' => (\XLite\Core\Config::getInstance()->CDev->Paypal->user ?: \XLite\Core\Config::getInstance()->CDev->Paypal->vendor), + + // The ID provided to the merchant by the authorized PayPal Reseller who registered them for their PayPal Payments Advanced or Payflow Link account + 'PARTNER' => 'Paypal', + + // The password that the merchant created for the username specified in the USER field + 'PWD' => \XLite\Core\Config::getInstance()->CDev->Paypal->pwd, + + // Transaction type: + // S (sale) + // A (authorization) + // D (delayed capture) + // V (void) + // C (credit) + 'TRXTYPE' => $trxType, + + 'BUTTONSOURCE' => 'Qualiteam_Cart_LC_PHS', + ); + } + + /* + public function method() + { + } + + public function method() + { + } + */ +} diff --git a/src/classes/XLite/Module/CDev/Paypal/Main.php b/src/classes/XLite/Module/CDev/Paypal/Main.php new file mode 100644 index 0000000000..2463cd7be6 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Main.php @@ -0,0 +1,142 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal; + +/** + * Paypal module + * + * @see ____class_see____ + * @since 1.0.1 + */ +abstract class Main extends \XLite\Module\AModule +{ + + /** + * Author name + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + public static function getAuthorName() + { + return 'Creative Development LLC'; + } + + /** + * Module name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getModuleName() + { + return 'Paypal'; + } + + /** + * Module version + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getMinorVersion() + { + return '0'; + } + + /** + * Module description + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getDescription() + { + return 'Enables taking payments for your online store via Paypal services.'; + } + + /** + * Determines if we need to show settings form link + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getSettingsForm() + { + return 'admin.php?target=paypal_settings'; + } + + /** + * Determines if we need to show settings form link + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public static function showSettingsForm() + { + return true; + } + + /** + * Add record to the module log file + * + * @param $message string Text message OPTIONAL + * @param $data mixed Data (can be any type) OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public static function addLog($message = null, $data = null) + { + if ($message && $data) { + $msg = array( + 'message' => $message, + 'data' => $data, + ); + + } else { + $msg = ($message ?: ($data ?: null)); + } + + if (!is_string($msg)) { + $msg = var_export($msg, true); + } + + \XLite\Logger::getInstance()->logCustom( + self::getModuleName(), + $msg + ); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php new file mode 100644 index 0000000000..3b225223c3 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php @@ -0,0 +1,419 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\Model\Payment\Processor; + +/** + * Abstract Paypal (iframe) processor + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class Iframe extends \XLite\Model\Payment\Base\Iframe +{ + /** + * iframeURL + * + * @var string + * @see ____var_see____ + * @since 1.0.19 + */ + protected $iframeURL = 'https://payflowlink.paypal.com/'; + + /** + * API test URL + * + * @var string + * @see ____var_see____ + * @since 1.0.19 + */ + protected $apiTestURL = 'https://pilot-payflowpro.paypal.com/'; + + /** + * API live URL + * + * @var string + * @see ____var_see____ + * @since 1.0.19 + */ + protected $apiLiveURL = 'https://payflowpro.paypal.com/'; + + /** + * Cache of SecureTokenID + * + * @var string + * @see ____var_see____ + * @since 1.0.19 + */ + protected $secureTokenId = null; + + /** + * Get return type of the iframe-method: html redirect with destroying an iframe + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getReturnType() + { + return self::RETURN_TYPE_HTML_REDIRECT_WITH_IFRAME_DESTROYING; + } + + /** + * Get URL of the page to display within iframe + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getIframeData() + { + $token = $this->getSecureToken(); + + $result = $token ? $this->getPostURL($this->iframeURL, $this->getIframeParams($token)) : null; + + \XLite\Module\CDev\Paypal\Main::addLog( + 'getIframeData()', + $result + ); + + return $result; + } + + /** + * Returns the list of iframe URL arguments + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getIframeParams($token) + { + $params = array( + 'SECURETOKEN=' . $token, + 'SECURETOKENID=' . $this->getSecureTokenId(), + ); + + if ($this->isTestMode()) { + $params[] = 'MODE=TEST'; + } + + return $params; + } + + /** + * Get SecureTokenId + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getSecureTokenId() + { + if (!isset($this->secureTokenId)) { + + // Get secure token from transaction data + + if (!isset($this->secureTokenId)) { + $this->secureTokenId = $this->generateSecureTokenId(); + } + } + + return $this->secureTokenId; + } + + /** + * Do CREATESECURETOKEN request and get SECURETOKEN from Paypal + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getSecureToken() + { + $token = null; + + $params = $this->getParams(); + + $this->transaction->setPublicId( + \XLite\Core\Config::getInstance()->CDev->Paypal->prefix + . $this->transaction->getTransactionId() + ); + + $request = new \XLite\Core\HTTP\Request($this->getPostURL()); + $request->body = $params; + $request->verb = 'POST'; + $response = $request->sendRequest(); + + + if (200 == $response->code && !empty($response->body)) { + $responseData = $this->getParsedResponse($response->body); + + if ($responseData['SECURETOKENID'] != $this->getSecureTokenId()) { + // It seems, a hack attempt detected, log this + + } elseif (!empty($responseData['SECURETOKEN'])) { + $token = $responseData['SECURETOKEN']; + } + } + + \XLite\Module\CDev\Paypal\Main::addLog( + 'getSecureToken', + array( + 'request' => $request->body, + 'response' => $response, + 'parsedResponse' => $responseData, + ) + ); + + return $token; + } + + /** + * Parse response on CREATESECURETOKEN request and return result as an array + * e.g. the response "RESULT=0&SECURETOKEN=3DbhdANpkkkOZ8byxZtaRCQQ7&SECURETOKENID=82248f5c934f88466ab95965118f5ef1&RESPMSG=Approved" + * will return an array: + * array( + * "RESULT" => "0", + * "SECURETOKEN" => "3DbhdANpkkkOZ8byxZtaRCQQ7", + * "SECURETOKENID" => "82248f5c934f88466ab95965118f5ef1", + * "RESPMSG" => "Approved", + * ); + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getParsedResponse($response) + { + $result = array(); + + $rows = explode('&', $response); + + if (is_array($rows)) { + foreach ($rows as $row) { + list($key, $value) = explode('=', $row); + $result[$key] = $value; + } + } + + return $result; + } + + /** + * Get post URL + * + * @param string $postURL URL OPTIONAL + * @param array $params Array of URL parameters OPTIONAL + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getPostURL($postURL = null, $params = array()) + { + $apiURL = isset($postURL) ? $postURL : $this->getAPIURL(); + + $args = !empty($params) ? '?' . implode('&', $params) : ''; + + return $apiURL . $args; + } + + /** + * getAPIURL + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getAPIURL() + { + return $this->isTestMode() ? $this->apiTestURL : $this->apiLiveURL; + } + + /** + * Return true if module is in test mode + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isTestMode() + { + return \XLite\Core\Config::getInstance()->CDev->Paypal->test; + } + + /** + * Get array of params for CREATESCURETOKEN request + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getParams() + { + $postData = array( + 'CREATESECURETOKEN' => 'Y', + 'SECURETOKENID' => $this->getSecureTokenId(), + 'TRXTYPE' => \XLite\Core\Config::getInstance()->CDev->Paypal->transaction_type, + 'AMT' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), + 'ITEMAMT' => $this->getLineItems($lineItems), + 'BILLTOFIRSTNAME' => $this->getProfile()->getBillingAddress()->getFirstname(), + 'BILLTOLASTNAME' => $this->getProfile()->getBillingAddress()->getLastname(), + 'BILLTOSTREET' => $this->getProfile()->getBillingAddress()->getStreet(), + 'BILLTOCITY' => $this->getProfile()->getBillingAddress()->getCity(), + 'BILLTOSTATE' => $this->getProfile()->getBillingAddress()->getState()->getCode(), + 'BILLTOZIP' => $this->getProfile()->getBillingAddress()->getZipcode(), + 'BILLTOCOUNTRY' => strtoupper($this->getProfile()->getBillingAddress()->getCountry()->getCode3()), + 'ERRORURL' => urldecode($this->getReturnURL(null, true, true)), + 'RETURNURL' => urldecode($this->getReturnURL(null, true)), + 'RETURNURLMETHOD' => 'POST', + 'CANCELURL' => urldecode($this->getReturnURL(null, true, true)), + // 'NOTIFYURL', // For Express Checkout only + // 'HDRIMG', // The URL for an image to be used as the header image for the PayPal Express Checkout pages + // 'PAYFLOWCOLOR', // The secondary gradient color for the order summary section of the PayPal Express Checkout pages + 'TEMPLATE' => 'MINLAYOUT', // This enables an iframe layout + 'INVNUM' => $this->getOrder()->getOrderId(), + 'BILLTOPHONENUM' => $this->getProfile()->getBillingAddress()->getPhone(), + 'BILLTOEMAIL' => $this->getProfile()->getLogin(), + 'SHIPTOPHONENUM' => $this->getProfile()->getShippingAddress()->getPhone(), + 'SHIPTOFIRSTNAME' => $this->getProfile()->getShippingAddress()->getFirstname(), + 'SHIPTOLASTNAME' => $this->getProfile()->getShippingAddress()->getLastname(), + 'SHIPTOSTREET' => $this->getProfile()->getShippingAddress()->getStreet(), + 'SHIPTOCITY' => $this->getProfile()->getShippingAddress()->getCity(), + 'SHIPTOSTATE' => $this->getProfile()->getShippingAddress()->getState()->getCode(), + 'SHIPTOZIP' => $this->getProfile()->getShippingAddress()->getZipcode(), + 'SHIPTOCOUNTRY' => $this->getProfile()->getShippingAddress()->getCountry()->getCode3(), + 'SHIPTOEMAIL' => $this->getProfile()->getLogin(), + 'ADDROVERRIDE' => 'N', + 'NOSHIPPING' => 1, + 'SILENTPOST' => 'TRUE', + 'SILENTPOSTURL' => urldecode($this->getCallbackURL(null, true)), + // 'SILENTPOSTRETURNURL' => $this->getCallbackURL(null, true), + 'FORCESILENTPOST' => 'FALSE', + 'DISABLERECEIPT' => 'TRUE', // Warning! If set this to 'FALSE' PAypal will redirect buyer to cart.php without target, txnId and other service parameters + 'CURRENCY' => $this->getCurrencyCode(), + ); + + $postData = $postData + $this->getCommonFields(); + $postData = $postData + $lineItems; + + $data = array(); + + foreach ($postData as $k => $v) { + $data[] = sprintf('%s[%d]=%s', $k, strlen($v), $v); + } + + $data = implode('&', $data); + + return $data; + } + + /** + * Get array of common params for all requests + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getCommonFields() + { + return array( + 'VENDOR' => \XLite\Core\Config::getInstance()->CDev->Paypal->vendor, + 'USER' => \XLite\Core\Config::getInstance()->CDev->Paypal->user ?: \XLite\Core\Config::getInstance()->CDev->Paypal->vendor, + 'PWD' => \XLite\Core\Config::getInstance()->CDev->Paypal->pwd, + 'PARTNER' => \XLite\Core\Config::getInstance()->CDev->Paypal->partner ?: 'Paypal', + 'BUTTONSOURCE' => 'Qualiteam_Cart_LC_PHS', + 'VERBOSITY' => 'HIGH', + ); + } + + /** + * Generate random string for SecureTokenId + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function generateSecureTokenId() + { + return md5(time() + rand(1000, 99999)); + } + + /** + * Get array of params for CREATESECURETOKEN request (ordered products part) + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getLineItems(&$lineItems) + { + $lineItems = array(); + $itemsSubtotal = 0; + + $items = $this->getOrder()->getItems(); + + if (!empty($items) && is_array($items)) { + $index = 0; + foreach ($items as $item) { + $lineItems['L_COST' . $index] = $this->getOrder()->getCurrency()->roundValue($item->getPrice()); + $lineItems['L_NAME' . $index] = $item->getProduct()->getTranslation()->name; + $lineItems['L_SKU' . $index] = $item->getProduct()->getSku(); + $lineItems['L_QTY' . $index] = $item->getAmount(); + $itemsSubtotal = $lineItems['L_COST' . $index] * $lineItems['L_QTY' . $index]; + $index ++; + } + } + + return $itemsSubtotal; + } + + /** + * Get iframe size + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getIframeSize() + { + return array(600, 500); + } + + /** + * Get currency code + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getCurrencyCode() + { + return strtoupper($this->getOrder()->getCurrency()->getCode()); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php new file mode 100644 index 0000000000..409a47d37d --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php @@ -0,0 +1,273 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\Model\Payment\Processor; + +/** + * Payflow Link payment processor + * + * @package XLite + * @see ____class_see____ + * @since 1.0.0 + */ +class PayflowLink extends \XLite\Module\CDev\Paypal\Model\Payment\Processor\Iframe +{ + /** + * Get allowed transactions list + * + * @return string Status code + * @see ____func_see____ + * @since 1.0.0 + */ + public function getAllowedTransactions() + { + return array( + TRAN_TYPE_AUTH, + TRAN_TYPE_SALE, + TRAN_TYPE_CAPTURE, + TRAN_TYPE_VOID, + TRAN_TYPE_REFUND, + TRAN_TYPE_GET_INFO, + ); + } + + /** + * Get payment method row checkout template + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCheckoutTemplate(\XLite\Model\Payment\Method $method) + { + return 'modules/CDev/Paypal/method.tpl'; + } + + public function getAllowedMerchantCountries() + { + return array('US', 'CA'); + } + + /** + * Process return + * + * @param \XLite\Model\Payment\Transaction $transaction Return-owner transaction + * + * @return void + * @access public + * @see ____func_see____ + * @since 1.0.0 + */ + public function processReturn(\XLite\Model\Payment\Transaction $transaction) + { + parent::processReturn($transaction); + + \XLite\Module\CDev\Paypal\Main::addLog( + 'processReturn', + \XLite\Core\Request::getInstance()->getData() + ); + + if (\XLite\Core\Request::getInstance()->cancel) { + $this->setDetail( + 'status', + 'Payment transaction is cancelled', + 'Status' + ); + $this->transaction->setNote('Payment transaction is cancelled'); + $this->transaction->setStatus($transaction::STATUS_FAILED); + + } + } + + /** + * Process callback + * + * @param \XLite\Model\Payment\Transaction $transaction Callback-owner transaction + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function processCallback(\XLite\Model\Payment\Transaction $transaction) + { + parent::processCallback($transaction); + + $request = \XLite\Core\Request::getInstance(); + + if (!$request->isPost()) { + // Callback request must be POST + $this->markCallbackRequestAsInvalid(static::t('Request type must be POST')); + + } elseif (!isset($request->RESULT)) { + // RESULT parameter must be presented in all callback requests + $this->markCallbackRequestAsInvalid(static::t('\'RESULT\' argument not found')); + + } else { + + $this->setDetail( + 'status', + isset($request->RESPMSG) ? $request->RESPMSG : 'Unknown', + 'Status' + ); + + $this->saveDataFromRequest(); + + if ('0' === $request->RESULT) { + // Transaction successful if RESULT == '0' + $status = $transaction::STATUS_SUCCESS; + + } else { + $status = $transaction::STATUS_FAILED; + } + + // Amount checking + if (isset($request->AMT) && !$this->checkTotal($request->AMT)) { + $status = $transaction::STATUS_FAILED; + } + + \XLite\Module\CDev\Paypal\Main::addLog( + 'processCallback', + array( + 'request' => $request, + 'status' => $status + ) + ); + + $this->transaction->setStatus($status); + } + } + + /** + * Check - payment method is configured or not + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @access public + * @see ____func_see____ + * @since 1.0.0 + */ + public function isConfigured(\XLite\Model\Payment\Method $method) + { + return parent::isConfigured($method) + && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->vendor) + && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->pwd) + && $this->isMerchantCountryAllowed(); + } + + /** + * Check - payment processor is applicable for specified order or not + * + * @param \XLite\Model\Order $order Order + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isApplicable(\XLite\Model\Order $order, \XLite\Model\Payment\Method $method) + { + return parent::isApplicable($order, $method) + && in_array(strtoupper($order->getCurrency()->getCode()), $this->getAllowedCurrencies($method)); + } + + /** + * Return true if merchant country is allowed for this payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isMerchantCountryAllowed() + { + return in_array( + \XLite\Core\Config::getInstance()->Company->location_country, + $this->getAllowedMerchantCountries() + ); + } + + /** + * Payment method has settings into Module settings section + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function hasModuleSettings() + { + return true; + } + + /** + * Define saved into transaction data schema + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineSavedData() + { + $data = parent::defineSavedData(); + + $data['TRANSTIME'] = 'Transaction timestamp'; + $data['PNREF'] = 'Unique Payflow transaction ID (PNREF)'; + $data['PPREF'] = 'Unique PayPal transaction ID (PPREF)'; + $data['TYPE'] = 'Transaction type'; + $data['RESULT'] = 'Transaction result code (RESULT)'; + $data['RESPMSG'] = 'Transaction result message (RESPMSG)'; + + $data['CORRELATIONID'] = 'Tracking ID'; // Can be provided to PayPal Merchant Technical Services to assist with debugging transactions. + + return $data; + } + + /** + * Get allowed currencies + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return array + * @see ____func_see____ + * @since 1.0.9 + */ + protected function getAllowedCurrencies(\XLite\Model\Payment\Method $method) + { + return array_merge( + parent::getAllowedCurrencies($method), + array( + 'USD', // US Dollar + 'CAD', // Canadian Dollar + 'AUD', // Australian Dollar + 'EUR', // Euro + 'GBP', // British Pound Sterling + 'JPY', // Japanese Yen + ) + ); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php b/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php new file mode 100644 index 0000000000..a99d092535 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php @@ -0,0 +1,116 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\View; + +/** + * Moneybookers settings dialog + * + * @see ____class_see____ + * @since 1.0.0 + * + * @ListChild (list="admin.center", zone="admin") + */ +class PaypalSettings extends \XLite\View\Dialog +{ + /** + * Return list of allowed targets + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getAllowedTargets() + { + $list = parent::getAllowedTargets(); + + $list[] = 'paypal_settings'; + + return $list; + } + + /** + * Register JS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + $list[] = $this->getDir() . '/controller.js'; + + return $list; + } + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/Paypal/settings/style.css'; + + return $list; + } + + /** + * Return templates directory name + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDir() + { + return 'modules/CDev/Paypal/settings'; + } + + // {{{ Content + + /** + * Get register URL + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getRegisterURL() + { + return 'http://www.paypal.com/'; + } + + // }}} +} + diff --git a/src/classes/XLite/Module/CDev/Paypal/install.yaml b/src/classes/XLite/Module/CDev/Paypal/install.yaml new file mode 100644 index 0000000000..9dc97b3efe --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/install.yaml @@ -0,0 +1,77 @@ +# vim: set ts=2 sw=2 sts=2 et: +# +# Fixtures +# +# @author Creative Development LLC +# @copyright Copyright (c) 2010 Creative Development LLC . All rights reserved +# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +# @link http://www.litecommerce.com/ +# @since 1.0.0 + +XLite\Model\Payment\Method: + - { service_name: 'Paypal Payflow Link', class: 'Module\CDev\Paypal\Model\Payment\Processor\PayflowLink', translations: [{ code: en, name: 'Payflow Link' }] } +# - { service_name: 'Paypal Payments Advanced', class: 'Module\CDev\Paypal\Model\Payment\Processor\PayflowLink', translations: [{ code: en, name: 'Paypal Payments Advanced' }] } + +XLite\Model\Config: + - name: vendor + category: 'CDev\Paypal' + type: text + orderby: 100 + value: 12345 + translations: + - code: en + option_name: 'Merchant login' + option_comment: 'Merchant login ID that was created when the merchant registered for their PayPal Payments Advanced or Payflow Link account.' + - name: user + category: 'CDev\Paypal' + type: 'text' + orderby: 200 + value: 12345 + translations: + - code: en + option_name: 'User' + option_comment: 'Username of the user that is authorized to run transactions' + - name: pwd + category: 'CDev\Paypal' + type: text + orderby: 300 + value: 12345 + translations: + - code: en + option_name: 'Password' + option_comment: 'The password that the merchant created for the username specified in the USER field' + - name: partner + category: 'CDev\Paypal' + type: text + orderby: 400 + value: 'Paypal' + translations: + - code: en + option_name: 'Partner' + option_comment: 'The ID provided to the merchant by the authorized PayPal Reseller who registered them for their PayPal Payments Advanced or Payflow Link account. If the merchant registered their account directly through PayPal, the merchant should supply the value PayPal.' + - name: prefix + category: 'CDev\Paypal' + type: text + orderby: 500 + value: 'mystore_' + translations: + - code: en + option_name: 'Invoice number prefix' + option_comment: 'Prefix for identification of the transaction on paypal.com: you would find transaction by this prefix and order ID' + - name: transaction_type + category: 'CDev\Paypal' + type: text + orderby: 600 + value: 'S' + translations: + - code: en + option_name: 'Initial transaction type (S - sale, A - authorize)' + - name: test + category: 'CDev\Paypal' + type: checkbox + orderby: 600 + value: true + translations: + - code: en + option_name: 'Test mode' + diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl b/src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl new file mode 100644 index 0000000000..ad441f4b70 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl @@ -0,0 +1,91 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Moneybookers settings + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +

    {t(#Use this page to configure your store to communicate with your Payment Processing Gateway. Complete the required fields below and press the "Update" button.#)}

    + +

    {t(#To have access to Paypal services please register here for an account if you don't have one yet#)}: {getRegisterURL()}

    + +
    + +
    + + + + + + +
      + +
    • + + +
      {t(#Your merchant login ID that you created when you registered for the account.#)}
      +
    • + +
    • + + +
      {t(#If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users on the account, USER has the same as VENDOR.#)}
      +
    • + +
    • + + +
      {t(#The password that you defined while registering for the account.#)}
      +
    • + +
    • + + +
      {t(#The ID provided to you by the authorized PayPal Reseller who registered you for the Gateway gateway. If you purchased your account directly from PayPal, use PayPal.#)}
      +
    • + +
    + + + +
      + +
    • + + +
    • + +
    • + + +
    • + + +
    + +

    {t(#You can define an order id prefix, which would precede each order number in your shop, to make it unique (each transaction id must be unique for a Paypal account)#)}

    + +
      + +
    • + + +
      {t(#(optional: This options is relevant only if you share your Paypal account with other online shops)#)}
      +
    • + +
    + +
    + + + + + diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/style.css b/src/skins/admin/en/modules/CDev/Paypal/settings/style.css new file mode 100644 index 0000000000..1b3426631a --- /dev/null +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/style.css @@ -0,0 +1,119 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Setting page styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + +.paypal-settings #main { + max-width: 1000px; +} + +.pp-common-note, +.pp-register-note, +.pp-order-prefix-note, +.pp-support-note +{ + font-size: 13px; + line-height: 20px; + margin-top: 15px; +} + +.pp-register-note { + margin-top: 10px; + padding-bottom: 10px; +} + +.pp-account-section, +.pp-operation-section { + font-size: 14px; + line-height: 20px; + margin-top: 15px; + font-weight: bold; +} + +.pp-activation label, +.pp-secret-word label, +.pp-options label +{ + color: #456583; +} + +.pp-options input[type="text"] +{ + border-width: 1px; + padding-top: 5px; + padding-bottom: 5px; + font-size: 14px; +} + +hr.pp-line, +hr.pp-line-last { + height: 0px; + border: 0px none; + border-bottom: 1px solid #e9e9e9; +} + +hr.pp-line-last { + margin-top: 20px; + margin-bottom: 10px; +} + +.pp-options { + padding-top: 3px; + padding-bottom: 19px; +} + +.pp-options-option { + padding-top: 4px; + padding-bottom: 12px; +} + +.pp-options label { + vertical-align: middle; + padding-top: 3px; +} + +.pp-options li span { + width: 250px; + display: inline-block; +} + +#pp_order_prefix, +#pp_vendor, +#pp_user, +#pp_pwd, +#pp_partner, +#pp_transaction_type, +#pp_test { + margin-left: 12px; + margin-right: 8px; + width: 103px; + vertical-align: middle; +} + +#pp_transaction_type, +#pp_test { + width: auto; +} + +.pp-options li { + padding-top: 10px; + padding-bottom: 10px; +} + + +.pp-options li div { + color: #8f8f8f; +} + +.pp-support-note { + padding-top: 5px; + line-height: 18px; +} + diff --git a/src/skins/default/en/modules/CDev/Paypal/method.tpl b/src/skins/default/en/modules/CDev/Paypal/method.tpl new file mode 100644 index 0000000000..c6e76bbcfb --- /dev/null +++ b/src/skins/default/en/modules/CDev/Paypal/method.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Payment method row + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + + {if:method.getDescription()}{method.getDescription()}{else:}{method.getName()}{end:} From 8536cc8ab3cc9ed6301ac55c6002ba0f1586d6a0 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 28 Jun 2012 14:40:46 +0400 Subject: [PATCH 149/562] [*] Resource validation improvement. [+] Aggregation configuration is added --- .../XLite/Controller/Admin/Settings.php | 16 ++++++++++++ .../XLite/View/AResourcesContainer.php | 26 ++++++++++++++----- .../XLite/View/ItemsList/Module/Install.php | 6 +++-- .../XLite/View/ItemsList/Module/Manage.php | 15 ----------- src/classes/XLite/View/JSContainer.php | 3 ++- src/skins/admin/en/jscontainer/parts/js.tpl | 3 ++- .../en/jscontainer/parts/js_aggregation.tpl | 4 --- .../admin/en/settings/clean_aggregation.tpl | 19 ++++++++++++++ src/sql/xlite_data.yaml | 2 ++ 9 files changed, 65 insertions(+), 29 deletions(-) create mode 100644 src/skins/admin/en/settings/clean_aggregation.tpl diff --git a/src/classes/XLite/Controller/Admin/Settings.php b/src/classes/XLite/Controller/Admin/Settings.php index 261c1f5b86..ab45d4c68c 100644 --- a/src/classes/XLite/Controller/Admin/Settings.php +++ b/src/classes/XLite/Controller/Admin/Settings.php @@ -609,6 +609,22 @@ public function doActionSafeModeKeyRegen() $this->setReturnURL($this->buildURL($this->get('target'), '', array('page' => 'Security'))); } + /** + * Clean aggregation cache directory + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function doActionCleanAggregationCache() + { + \Includes\Utils\FileManager::unlinkRecursive(LC_DIR_CACHE_RESOURCES); + + \XLite\Core\TopMessage::addInfo('Aggregation cache has been cleaned'); + + $this->setReturnURL($this->buildURL($this->get('target'), '', array('page' => 'Performance'))); + } + /** * doActionUpdate * diff --git a/src/classes/XLite/View/AResourcesContainer.php b/src/classes/XLite/View/AResourcesContainer.php index d894441830..00b16a0dd6 100644 --- a/src/classes/XLite/View/AResourcesContainer.php +++ b/src/classes/XLite/View/AResourcesContainer.php @@ -68,6 +68,20 @@ public function getCSSResourceFromCache(array $resources) ) + array('media' => $resources[0]['media']); } + /** + * Check if the resource entry should be added to container + * + * @param array $resource + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isValidResource($resource) + { + return isset($resource['url']); + } + /** * Return latest time stamp of cache build procedure * @@ -145,7 +159,7 @@ protected function getResourceFromCache($type, array $resources, array $paramsFo */ protected function prepareCSSCache($filePath) { - return "\r\n" . '/***** AUTOGENERATED: ' . $filePath . ' */' . str_replace( + return "\r\n" . '/***** AUTOGENERATED: ' . basename($filePath) . ' */' . str_replace( 'url(', 'url(' . \XLite::getInstance()->getShopURL( str_replace(LC_DS, '/', dirname(substr($filePath, strlen(LC_DIR_ROOT)))), @@ -166,7 +180,7 @@ protected function prepareCSSCache($filePath) */ protected function prepareJSCache($filePath) { - return "\r\n" . '/***** AUTOGENERATED: ' . $filePath . ' */' . "\r\n" . \Includes\Utils\FileManager::read($filePath); + return "\r\n" . '/***** AUTOGENERATED: ' . basename($filePath) . ' */' . "\r\n" . \Includes\Utils\FileManager::read($filePath); } /** @@ -178,7 +192,7 @@ protected function prepareJSCache($filePath) */ protected function doCSSAggregation() { - return !LC_DEVELOPER_MODE; + return \XLite\Core\Config::getInstance()->Performance->aggregate_css; } /** @@ -190,7 +204,7 @@ protected function doCSSAggregation() */ protected function doJSAggregation() { - return !LC_DEVELOPER_MODE; + return \XLite\Core\Config::getInstance()->Performance->aggregate_js; } /** @@ -216,7 +230,7 @@ protected function getResourceURL($url) */ protected function getJSResources() { - return static::getRegisteredResources(static::RESOURCE_JS); + return array_filter(static::getRegisteredResources(static::RESOURCE_JS), array($this, 'isValidResource')); } /** @@ -228,7 +242,7 @@ protected function getJSResources() */ protected function getCSSResources() { - return static::getRegisteredResources(static::RESOURCE_CSS); + return array_filter(static::getRegisteredResources(static::RESOURCE_CSS), array($this, 'isValidResource')); } /** diff --git a/src/classes/XLite/View/ItemsList/Module/Install.php b/src/classes/XLite/View/ItemsList/Module/Install.php index 8a6600ecd8..fb808e6fa6 100644 --- a/src/classes/XLite/View/ItemsList/Module/Install.php +++ b/src/classes/XLite/View/ItemsList/Module/Install.php @@ -117,15 +117,17 @@ public function getCommonFiles() public function getCSSFiles() { $list = parent::getCSSFiles(); - $list[] = 'modules_manager/common.css'; + $list[] = 'modules_manager/css/common.css'; + // TODO fix with enter-key license widget. It should be taken dynamically from AJAX $list[] = 'modules_manager/enter_key/css/style.css'; + // TODO must be taken from LICENSE module widget $list[] = 'modules_manager/license/css/style.css'; $list[] = 'modules_manager/installation_type/css/style.css'; + // TODO must be taken from SwitchButton widget $list[] = \XLite\View\Button\SwitchButton::SWITCH_CSS_FILE; - $list[] = $this->getDir() . '/style.css'; return $list; } diff --git a/src/classes/XLite/View/ItemsList/Module/Manage.php b/src/classes/XLite/View/ItemsList/Module/Manage.php index cdd30b743a..ba2fb8201f 100644 --- a/src/classes/XLite/View/ItemsList/Module/Manage.php +++ b/src/classes/XLite/View/ItemsList/Module/Manage.php @@ -50,21 +50,6 @@ public static function getAllowedTargets() return $result; } - /** - * Register JS files - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - public function getJSFiles() - { - $list = parent::getJSFiles(); - $list[] = $this->getDir() . '/manage/js/script.js'; - - return $list; - } - /** * Return name of the base widgets list * diff --git a/src/classes/XLite/View/JSContainer.php b/src/classes/XLite/View/JSContainer.php index 0041d85e66..5ef609d077 100644 --- a/src/classes/XLite/View/JSContainer.php +++ b/src/classes/XLite/View/JSContainer.php @@ -29,12 +29,13 @@ /** * JS container. Must be the last element on the page + * TODO: refactor admin area JS code. * * @see ____class_see____ * @since 1.0.0 * * @ListChild (list="body", zone="customer", weight="999999") - * @ListChild (list="body", zone="admin", weigth="999999") + * @ListChild (list="body", zone="admin", weight="10") */ class JSContainer extends \XLite\View\AResourcesContainer { diff --git a/src/skins/admin/en/jscontainer/parts/js.tpl b/src/skins/admin/en/jscontainer/parts/js.tpl index 501405ab94..9afc10d416 100644 --- a/src/skins/admin/en/jscontainer/parts/js.tpl +++ b/src/skins/admin/en/jscontainer/parts/js.tpl @@ -10,5 +10,6 @@ * @since 1.0.0 * @ListChild (list="jscontainer.js", weight="100") *} - +{if:!doJSAggregation()} +{end:} \ No newline at end of file diff --git a/src/skins/admin/en/jscontainer/parts/js_aggregation.tpl b/src/skins/admin/en/jscontainer/parts/js_aggregation.tpl index b3d37ce438..0114d88f38 100644 --- a/src/skins/admin/en/jscontainer/parts/js_aggregation.tpl +++ b/src/skins/admin/en/jscontainer/parts/js_aggregation.tpl @@ -11,9 +11,5 @@ * @ListChild (list="jscontainer.js", weight="200") *} {if:doJSAggregation()} -{* - -*} - {end:} diff --git a/src/skins/admin/en/settings/clean_aggregation.tpl b/src/skins/admin/en/settings/clean_aggregation.tpl new file mode 100644 index 0000000000..0cf757a6cd --- /dev/null +++ b/src/skins/admin/en/settings/clean_aggregation.tpl @@ -0,0 +1,19 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Email footer + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.13 + * + * @ListChild (list="crud.settings.footer", zone="admin", weight="100") + *} +{if:page=#Performance#} + +{end:} diff --git a/src/sql/xlite_data.yaml b/src/sql/xlite_data.yaml index 3874f2ddcf..4879ecbbf2 100644 --- a/src/sql/xlite_data.yaml +++ b/src/sql/xlite_data.yaml @@ -20,6 +20,8 @@ XLite\Model\Config: - { name: anonymous_city, category: Shipping, type: text, orderby: 80, translations: [{ code: en, option_name: City }] } - { name: anonymous_zipcode, category: Shipping, type: text, orderby: 90, translations: [{ code: en, option_name: 'Zip/postal code' }] } - { name: check_templates_status, category: Performance, type: checkbox, orderby: 10, value: Y, translations: [{ code: en, option_name: 'Check templates status in runtime' }] } + - { name: aggregate_css, category: Performance, type: checkbox, orderby: 20, value: Y, translations: [{ code: en, option_name: 'Aggregate CSS files' }] } + - { name: aggregate_js, category: Performance, type: checkbox, orderby: 30, value: Y, translations: [{ code: en, option_name: 'Aggregate JS files' }] } - { name: cli_key, category: Security, orderby: 110, translations: [{ code: en, option_name: 'CLI mode key' }] } - { name: company_address, category: Company, type: separator, orderby: 385, translations: [{ code: en, option_name: Address }] } - { name: company_contacts, category: Company, type: separator, orderby: 455, translations: [{ code: en, option_name: Contacts }] } From 482ae83cc49fad0f33d845254e0147a2bfe941b9 Mon Sep 17 00:00:00 2001 From: Vadim Sannikov Date: Thu, 28 Jun 2012 16:20:46 +0400 Subject: [PATCH 150/562] [!] Fixes for the Doctrine 2.2 and UNIT-tests --- .dev/tests/Classes/Model/DataSource.php | 2 +- .dev/tests/Classes/Model/DataSource/Parameter.php | 2 +- .dev/tests/Classes/Model/Language.php | 2 +- .dev/tests/Classes/Model/Module.php | 6 +++--- .dev/tests/Classes/Model/Order.php | 9 +++------ .../CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php | 6 +++--- .dev/tests/Classes/Module/CDev/ProductOptions/Main.php | 2 +- .../Module/CDev/XMLSitemap/Logic/SitemapGenerator.php | 6 +++--- .../Plugin/Doctrine/Plugin/UpdateSchema/Main.php | 2 -- src/classes/XLite/Core/Database.php | 2 +- .../CDev/Quantum/Model/Payment/Processor/Quantum.php | 3 +-- 11 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.dev/tests/Classes/Model/DataSource.php b/.dev/tests/Classes/Model/DataSource.php index 22341ab95c..4c327f2fb5 100644 --- a/.dev/tests/Classes/Model/DataSource.php +++ b/.dev/tests/Classes/Model/DataSource.php @@ -60,7 +60,7 @@ public function testCreate() $this->assertTrue(0 < $s->getId(), 'check data source id'); $em->remove($s); - $em->flush($s); + $em->flush(); } /** diff --git a/.dev/tests/Classes/Model/DataSource/Parameter.php b/.dev/tests/Classes/Model/DataSource/Parameter.php index 188b4e1d16..6f2351ad3c 100644 --- a/.dev/tests/Classes/Model/DataSource/Parameter.php +++ b/.dev/tests/Classes/Model/DataSource/Parameter.php @@ -51,7 +51,7 @@ public function testCreate() $this->assertTrue(0 < $p->getId(), 'check parameter id'); $em->remove($p); - $em->flush($p); + $em->flush(); } } diff --git a/.dev/tests/Classes/Model/Language.php b/.dev/tests/Classes/Model/Language.php index 559b420558..cf832d0dbd 100644 --- a/.dev/tests/Classes/Model/Language.php +++ b/.dev/tests/Classes/Model/Language.php @@ -50,7 +50,7 @@ public function testCreate() $this->assertTrue(0 < $c->getLngId(), 'check language id'); $em->remove($c); - $em->flush($c); + $em->flush(); } public function testgetAdded() diff --git a/.dev/tests/Classes/Model/Module.php b/.dev/tests/Classes/Model/Module.php index 1ea8f43929..716993280f 100644 --- a/.dev/tests/Classes/Model/Module.php +++ b/.dev/tests/Classes/Model/Module.php @@ -46,7 +46,7 @@ class XLite_Tests_Model_Module extends XLite_Tests_TestCase /** * Test modules */ - const TEST_MODULE_1 = 'DrupalConnector'; + const TEST_MODULE_1 = 'ProductOptions'; const TEST_MODULE_2 = 'AustraliaPost'; /** @@ -105,7 +105,7 @@ public function testCallModuleMethod() // Main class $data = array( 'getAuthorName' => 'Creative Development LLC', - 'getModuleName' => 'Drupal Connector', + 'getModuleName' => 'Product Options', ); foreach ($data as $method => $value) { foreach (array('moduleCorrect' => $value, 'moduleIncorrect' => self::SOME_WRONG_VALUE) as $module => $expected) { @@ -388,7 +388,7 @@ public function testGetSet() 'iconURL' => 'http:://www.example.com/1', 'pageURL' => 'http:://www.example.com/2', 'authorPageURL' => 'http:://www.example.com/3', - 'dependencies' => array('CDev\DrupalConnector', 'CDev\AustraliaPost'), + 'dependencies' => array('CDev\ProductOptions', 'CDev\AustraliaPost'), ); foreach ($data as $name => $value) { diff --git a/.dev/tests/Classes/Model/Order.php b/.dev/tests/Classes/Model/Order.php index d9a3b08e85..1fa2959770 100644 --- a/.dev/tests/Classes/Model/Order.php +++ b/.dev/tests/Classes/Model/Order.php @@ -183,15 +183,12 @@ public function testUpdate() public function testDelete() { $order = $this->getTestOrder(); - $id = $order->getOrderId(); - - \XLite\Core\Database::getEM()->remove($order); - \XLite\Core\Database::getEM()->flush(); $this->order = null; - $order = \XLite\Core\Database::getRepo('XLite\Model\Order') - ->find($id); + \XLite\Core\Database::getRepo('XLite\Model\Order')->delete($order); + \XLite\Core\Database::getRepo('XLite\Model\Order')->clear(); + $order = \XLite\Core\Database::getRepo('XLite\Model\Order')->find($id); $this->assertTrue(is_null($order), 'check removed order'); } diff --git a/.dev/tests/Classes/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php b/.dev/tests/Classes/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php index 198632b020..ad867ddc22 100644 --- a/.dev/tests/Classes/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php +++ b/.dev/tests/Classes/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php @@ -71,13 +71,13 @@ public function testPay() $sid = \XLite\Core\Session::getInstance()->getID(); $amount = $t->getValue(); - $urla = \XLite::getInstance()->getShopURL('admin.php?target=payment_return&txnId='.$tid.'&txn_id_name=txnId'); + $urla = \XLite::getInstance()->getShopURL('admin.php?target=payment_return&txn_id_name=txnId&txnId='. $tid); $urla = str_replace('&xid', '&xid', $urla); - $urld = \XLite::getInstance()->getShopURL('admin.php?target=payment_return&cancel=1&txn_id_name=txnId&txnId=' . $tid); + $urld = \XLite::getInstance()->getShopURL('admin.php?target=payment_return&txn_id_name=txnId&txnId=' . $tid . '&cancel=1'); $urld = str_replace('&xid', '&xid', $urld); - $urlc = \XLite::getInstance()->getShopURL('admin.php?target=callback&txnId='.$tid.'&txn_id_name=txnId'); + $urlc = \XLite::getInstance()->getShopURL('admin.php?target=callback&txn_id_name=txnId&txnId='. $tid); $urlc = str_replace('&xid', '&xid', $urlc); $etalon = <<getMain(); - $this->assertEquals('1.0.12', $main::getVersion(), 'Wrong version'); + $this->assertEquals('1.0.13', $main::getVersion(), 'Wrong version'); } /** diff --git a/.dev/tests/Classes/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php b/.dev/tests/Classes/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php index b70f9dc100..fe6c5c9674 100644 --- a/.dev/tests/Classes/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php +++ b/.dev/tests/Classes/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php @@ -112,18 +112,18 @@ public function testgenerate() unlink($path); } - $this->assertFalse(\XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->isGenerated()); + $this->assertFalse(\XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->isGenerated(), '#1'); \XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->generate(); - $this->assertTrue(\XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->isGenerated()); + $this->assertTrue(\XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->isGenerated(), '#2'); $list = \XLite\Core\Database::getRepo('XLite\Model\Product')->findFrame(0, 1); $product = $list[0]; $product->setPrice(10); \XLite\Core\Database::getEM()->flush(); - $this->assertFalse(\XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->isGenerated()); + $this->assertFalse(\XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance()->isGenerated(), '#3'); } } diff --git a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php index 1fc34d784e..6b1a702b57 100644 --- a/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php +++ b/src/Includes/Decorator/Plugin/Doctrine/Plugin/UpdateSchema/Main.php @@ -45,7 +45,5 @@ class Main extends \Includes\Decorator\Plugin\Doctrine\Plugin\APlugin public function executeHookHandler() { \XLite\Core\Database::getInstance()->updateDBSchema(); - - die; } } diff --git a/src/classes/XLite/Core/Database.php b/src/classes/XLite/Core/Database.php index ce6356b2e7..3677b2c040 100644 --- a/src/classes/XLite/Core/Database.php +++ b/src/classes/XLite/Core/Database.php @@ -1301,7 +1301,7 @@ protected function postprocessAlterSchemaTable($schema) $schema = preg_replace('/ ADD ([a-z]\S+) /Ss', ' ADD `$1` ', $schema); $schema = preg_replace( - '/(`\S+` ADD FOREIGN KEY \([^\)]+\) REFERENCES `\S+` \([^\)]+\)$\s*)$/Ss', + '/(`\S+` ADD CONSTRAINT \w+ FOREIGN KEY \([^\)]+\) REFERENCES `\S+` \([^\)]+\)$\s*)$/Ss', '$1 ON DELETE CASCADE', $schema ); diff --git a/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php b/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php index 75022a400e..c2708a77a4 100644 --- a/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php +++ b/src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php @@ -167,8 +167,7 @@ protected function getFormFields() 'MAXMIND' => '1', ); - $shippingaddress = $this->getProfile()->getShippingAddress(); - if ($shippingAddress) { + if ($shippingAddress = $this->getProfile()->getShippingAddress()) { $fields += array( 'SFNAME' => $shippingAddress->getFirstname(), From 9b642253324b64e3ce8912a2f43e60167a5145bc Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 28 Jun 2012 17:30:09 +0400 Subject: [PATCH 151/562] [*] TinyMCE update to the newest version. [*] TinyMCE refactoring to work with aggregation JS --- .../View/FormField/Textarea/Advanced.php | 18 + .../CDev/TinyMCE/form_field/textarea.tpl | 1 + .../en/modules/CDev/TinyMCE/js/script.js | 11 +- .../CDev/TinyMCE/js/tinymce/jquery.tinymce.js | 2 +- .../CDev/TinyMCE/js/tinymce/langs/en.js | 2 +- .../js/tinymce/plugins/advlink/js/advlink.js | 11 +- .../tinymce/plugins/autolink/editor_plugin.js | 2 +- .../plugins/autolink/editor_plugin_src.js | 25 +- .../plugins/autoresize/editor_plugin.js | 2 +- .../plugins/autoresize/editor_plugin_src.js | 58 +- .../tinymce/plugins/autosave/editor_plugin.js | 2 +- .../plugins/autosave/editor_plugin_src.js | 6 +- .../plugins/contextmenu/editor_plugin.js | 2 +- .../plugins/contextmenu/editor_plugin_src.js | 17 +- .../js/tinymce/plugins/emotions/emotions.htm | 2 +- .../example_dependency/editor_plugin.js | 1 + .../example_dependency/editor_plugin_src.js | 50 + .../plugins/fullscreen/editor_plugin.js | 2 +- .../plugins/fullscreen/editor_plugin_src.js | 2 +- .../plugins/legacyoutput/editor_plugin.js | 2 +- .../plugins/legacyoutput/editor_plugin_src.js | 2 +- .../js/tinymce/plugins/lists/editor_plugin.js | 2 +- .../plugins/lists/editor_plugin_src.js | 141 +- .../js/tinymce/plugins/media/editor_plugin.js | 2 +- .../plugins/media/editor_plugin_src.js | 36 +- .../js/tinymce/plugins/media/js/media.js | 32 +- .../plugins/noneditable/editor_plugin.js | 2 +- .../plugins/noneditable/editor_plugin_src.js | 559 +- .../js/tinymce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 2 +- .../plugins/searchreplace/searchreplace.htm | 2 +- .../plugins/spellchecker/editor_plugin.js | 2 +- .../plugins/spellchecker/editor_plugin_src.js | 8 +- .../js/tinymce/plugins/style/css/props.css | 1 + .../js/tinymce/plugins/style/editor_plugin.js | 2 +- .../plugins/style/editor_plugin_src.js | 22 +- .../js/tinymce/plugins/style/js/props.js | 80 +- .../js/tinymce/plugins/style/langs/en_dlg.js | 2 +- .../js/tinymce/plugins/style/props.htm | 7 +- .../js/tinymce/plugins/style/readme.txt | 19 + .../tinymce/plugins/tabfocus/editor_plugin.js | 2 +- .../plugins/tabfocus/editor_plugin_src.js | 2 +- .../js/tinymce/plugins/table/editor_plugin.js | 2 +- .../plugins/table/editor_plugin_src.js | 121 +- .../js/tinymce/plugins/table/js/cell.js | 4 +- .../js/tinymce/plugins/table/js/table.js | 23 +- .../plugins/visualblocks/css/visualblocks.css | 21 + .../plugins/visualblocks/editor_plugin.js | 1 + .../plugins/visualblocks/editor_plugin_src.js | 63 + .../plugins/wordcount/editor_plugin.js | 2 +- .../plugins/wordcount/editor_plugin_src.js | 20 +- .../tinymce/themes/advanced/color_picker.htm | 8 +- .../themes/advanced/editor_template.js | 2 +- .../themes/advanced/editor_template_src.js | 205 +- .../js/tinymce/themes/advanced/img/icons.gif | Bin 11790 -> 11982 bytes .../js/tinymce/themes/advanced/js/anchor.js | 25 +- .../themes/advanced/js/color_picker.js | 60 +- .../js/tinymce/themes/advanced/js/image.js | 6 +- .../js/tinymce/themes/advanced/js/link.js | 12 +- .../themes/advanced/js/source_editor.js | 32 +- .../tinymce/themes/advanced/langs/en_dlg.js | 2 +- .../themes/advanced/skins/default/dialog.css | 5 +- .../themes/advanced/skins/default/ui.css | 7 +- .../advanced/skins/highcontrast/dialog.css | 7 +- .../themes/advanced/skins/highcontrast/ui.css | 6 +- .../themes/advanced/skins/o2k7/dialog.css | 5 +- .../tinymce/themes/advanced/skins/o2k7/ui.css | 7 +- .../tinymce/themes/advanced/source_editor.htm | 2 +- .../CDev/TinyMCE/js/tinymce/tiny_mce.js | 2 +- .../CDev/TinyMCE/js/tinymce/tiny_mce_popup.js | 2 +- .../CDev/TinyMCE/js/tinymce/tiny_mce_src.js | 21382 +++++++++------- 71 files changed, 12864 insertions(+), 10317 deletions(-) create mode 100644 src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/example_dependency/editor_plugin.js create mode 100644 src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/example_dependency/editor_plugin_src.js create mode 100644 src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/readme.txt create mode 100644 src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/visualblocks/css/visualblocks.css create mode 100644 src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/visualblocks/editor_plugin.js create mode 100644 src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/visualblocks/editor_plugin_src.js diff --git a/src/classes/XLite/Module/CDev/TinyMCE/View/FormField/Textarea/Advanced.php b/src/classes/XLite/Module/CDev/TinyMCE/View/FormField/Textarea/Advanced.php index e90e3173c1..67eaa3b784 100644 --- a/src/classes/XLite/Module/CDev/TinyMCE/View/FormField/Textarea/Advanced.php +++ b/src/classes/XLite/Module/CDev/TinyMCE/View/FormField/Textarea/Advanced.php @@ -94,4 +94,22 @@ protected function getDir() { return 'modules/CDev/TinyMCE'; } + + /** + * Return structure of configuration for JS TinyMCE library + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getTinyMCEConfiguration() + { + // Base is the web path to the tinymce library directory + return array( + 'base' => dirname(\XLite\Singletons::$handler->layout->getResourceWebPath( + $this->getDir() . '/js/tinymce/tiny_mce.js', + \XLite\Core\Layout::WEB_PATH_OUTPUT_URL + )) . '/', + ); + } } diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/form_field/textarea.tpl b/src/skins/admin/en/modules/CDev/TinyMCE/form_field/textarea.tpl index 55b1a0bf24..3aa8412b9c 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/form_field/textarea.tpl +++ b/src/skins/admin/en/modules/CDev/TinyMCE/form_field/textarea.tpl @@ -12,6 +12,7 @@
    • + {displayCommentedData(getTinyMCEConfiguration())}
    • diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/script.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/script.js index 04e694a550..8384e17d17 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/script.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/script.js @@ -10,8 +10,15 @@ * @since 1.0.0 */ -$(function() { - setSimpleTinymce($('textarea.tinymce')); +jQuery(function() { + + // Retrive configuration for the tinyMCE object from the PHP settings + var configTinyMCE = core.getCommentedData(jQuery('textarea.tinymce').eq(0).parent().eq(0)); + + // Change baseURL of TinyMCE object for correct loading TinyMCE plugins + tinyMCE.baseURL = configTinyMCE.base; + + jQuery('textarea.tinymce').each(function (index, elem) {setSimpleTinymce(jQuery(elem));}); }); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/jquery.tinymce.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/jquery.tinymce.js index 8e61a3cddb..b4d0c3977a 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/jquery.tinymce.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/jquery.tinymce.js @@ -1 +1 @@ -(function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}p.css("visibility","hidden");function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);s.onInit.add(function(){var x,y=v;p.css("visibility","");if(v){if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}}})});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit=c.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;if(j.script_loaded){j.script_loaded()}o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}return p};b.extend(b.expr[":"],{tinymce:function(g){return g.id&&!!tinyMCE.get(g.id)}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==e){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(b(v),q)});return r}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery); \ No newline at end of file +(function(c){var b,e,a=[],d=window;c.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}p.css("visibility","hidden");function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);s.onInit.add(function(){var x,y=v;p.css("visibility","");if(v){if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}}})});c.each(r,function(t,s){s.render()})}if(!d.tinymce&&!e&&(g=j.script_url)){e=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}d.tinyMCEPreInit=d.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!d.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");c.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}c.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;e=2;if(j.script_loaded){j.script_loaded()}o();c.each(a,function(q,r){r()})}})}else{if(e===1){a.push(o)}else{o()}}return p};c.extend(c.expr[":"],{tinymce:function(g){return !!(g.id&&"tinyMCE" in window&&tinyMCE.get(g.id))}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==b){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(d.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(d.tinymce)&&(l.is(":tinymce")))}var j={};c.each(["text","html","val"],function(n,l){var o=j[l]=c.fn[l],m=(l==="text");c.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==b){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent({save:true})):o.apply(c(v),q)});return r}}});c.each(["append","prepend"],function(n,m){var o=j[m]=c.fn[m],l=(m==="prepend");c.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==b){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});c.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=c.fn[l];c.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=c.fn.attr;c.fn.attr=function(o,q){var m=this,n=arguments;if((!o)||(o!=="value")||(!g(m))){if(q!==b){return j.attr.apply(m,n)}else{return j.attr.apply(m,n)}}if(q!==b){k.call(m.filter(":tinymce"),q);j.attr.apply(m.not(":tinymce"),n);return m}else{var p=m[0],l=h(p);return l?l.getContent({save:true}):j.attr.apply(c(p),n)}}}})(jQuery); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/langs/en.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/langs/en.js index 6379b0d958..19324f74cd 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/langs/en.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/langs/en.js @@ -1 +1 @@ -tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"}}}); \ No newline at end of file +tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"},visualblocks:{desc:'Show/hide block elements'}}}); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/advlink/js/advlink.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/advlink/js/advlink.js index 837c937c66..9ca955c928 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/advlink/js/advlink.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/advlink/js/advlink.js @@ -54,6 +54,13 @@ function init() { document.getElementById('popupurl').style.width = '180px'; elm = inst.dom.getParent(elm, "A"); + if (elm == null) { + var prospect = inst.dom.create("p", null, inst.selection.getContent()); + if (prospect.childNodes.length === 1) { + elm = prospect.firstChild; + } + } + if (elm != null && elm.nodeName == "A") action = "update"; @@ -481,7 +488,7 @@ function getLinkListHTML(elm_id, target_form_element, onchange_func) { var html = ""; html += ''; html += option("video"); html += option("audio"); - html += option("flash"); - html += option("quicktime"); - html += option("shockwave"); - html += option("windowsmedia"); - html += option("realmedia"); + html += option("flash", "object"); + html += option("quicktime", "object"); + html += option("shockwave", "object"); + html += option("windowsmedia", "object"); + html += option("realmedia", "object"); html += option("iframe"); if (editor.getParam('media_embedded_audio', false)) { - html += option('embeddedaudio'); + html += option('embeddedaudio', "object"); } - + html += ''; return html; }, diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin.js index 2d60138eec..e204328d96 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b,g;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(i,h,l){var k,j;k=i.dom.getParent(i.selection.getStart(),function(m){return i.dom.hasClass(m,b)});j=i.dom.getParent(i.selection.getEnd(),function(m){return i.dom.hasClass(m,b)});if(k||j){g=1;f._setDisabled(1);return false}else{if(g==1){f._setDisabled(0);g=0}}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block);b.onContextMenu.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block);b.onContextMenu.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file +(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret";r=tinymce.isGecko?"\u200B":"\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(z,B){var F=B.keyCode,x,C,D,v;function u(H,G){while(H=H[G?"previousSibling":"nextSibling"]){if(H.nodeType!==3||H.nodeValue.length>0){return H}}}function y(G,H){p.select(G);p.collapse(H)}function t(K){var J,I,M,H;function G(O){var N=I;while(N){if(N===O){return}N=N.parentNode}j.remove(O);q()}function L(){var O,P,N=z.schema.getNonEmptyElements();P=new tinymce.dom.TreeWalker(I,z.getBody());while(O=(K?P.prev():P.next())){if(N[O.nodeName.toLowerCase()]){break}if(O.nodeType===3&&tinymce.trim(O.nodeValue).length>0){break}if(m(O)==="false"){G(O);return true}}if(g(O)){return true}return false}if(p.isCollapsed()){J=p.getRng(true);I=J.startContainer;M=J.startOffset;I=l(I)||I;if(H=g(I)){G(H);return false}if(I.nodeType==3&&(K?M>0:M124)&&F!=e.DELETE&&F!=e.BACKSPACE){if((tinymce.isMac?B.metaKey:B.ctrlKey)&&(F==67||F==88||F==86)){return}B.preventDefault();if(F==e.LEFT||F==e.RIGHT){var w=F==e.LEFT;if(z.dom.isBlock(x)){var A=w?x.previousSibling:x.nextSibling;var s=new c(A,A);var E=w?s.prev():s.next();y(E,!w)}else{y(x,w)}}}else{if(F==e.LEFT||F==e.RIGHT||F==e.BACKSPACE||F==e.DELETE){C=l(D);if(C){if(F==e.LEFT||F==e.BACKSPACE){x=u(C,true);if(x&&m(x)==="false"){B.preventDefault();if(F==e.LEFT){y(x,true)}else{j.remove(x);return}}else{i(C)}}if(F==e.RIGHT||F==e.DELETE){x=u(C);if(x&&m(x)==="false"){B.preventDefault();if(F==e.RIGHT){y(x,false)}else{j.remove(x);return}}else{i(C)}}}if((F==e.BACKSPACE||F==e.DELETE)&&!t(F==e.BACKSPACE)){B.preventDefault();return false}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return''+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+""})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin_src.js index 916dce29cf..c0efe749c2 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/noneditable/editor_plugin_src.js @@ -9,37 +9,518 @@ */ (function() { - var Event = tinymce.dom.Event; + var TreeWalker = tinymce.dom.TreeWalker; + var externalName = 'contenteditable', internalName = 'data-mce-' + externalName; + var VK = tinymce.VK; + + function handleContentEditableSelection(ed) { + var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret'; + + // Setup invisible character use zero width space on Gecko since it doesn't change the height of the container + invisibleChar = tinymce.isGecko ? '\u200B' : '\uFEFF'; + + // Returns the content editable state of a node "true/false" or null + function getContentEditable(node) { + var contentEditable; + + // Ignore non elements + if (node.nodeType === 1) { + // Check for fake content editable + contentEditable = node.getAttribute(internalName); + if (contentEditable && contentEditable !== "inherit") { + return contentEditable; + } + + // Check for real content editable + contentEditable = node.contentEditable; + if (contentEditable !== "inherit") { + return contentEditable; + } + } + + return null; + }; + + // Returns the noneditable parent or null if there is a editable before it or if it wasn't found + function getNonEditableParent(node) { + var state; + + while (node) { + state = getContentEditable(node); + if (state) { + return state === "false" ? node : null; + } + + node = node.parentNode; + } + }; + + // Get caret container parent for the specified node + function getParentCaretContainer(node) { + while (node) { + if (node.id === caretContainerId) { + return node; + } + + node = node.parentNode; + } + }; + + // Finds the first text node in the specified node + function findFirstTextNode(node) { + var walker; + + if (node) { + walker = new TreeWalker(node, node); + + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType === 3) { + return node; + } + } + } + }; + + // Insert caret container before/after target or expand selection to include block + function insertCaretContainerOrExpandToBlock(target, before) { + var caretContainer, rng; + + // Select block + if (getContentEditable(target) === "false") { + if (dom.isBlock(target)) { + selection.select(target); + return; + } + } + + rng = dom.createRng(); + + if (getContentEditable(target) === "true") { + if (!target.firstChild) { + target.appendChild(ed.getDoc().createTextNode('\u00a0')); + } + + target = target.firstChild; + before = true; + } + + //caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar); + caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar); + + if (before) { + target.parentNode.insertBefore(caretContainer, target); + } else { + dom.insertAfter(caretContainer, target); + } + + rng.setStart(caretContainer.firstChild, 1); + rng.collapse(true); + selection.setRng(rng); + + return caretContainer; + }; + + // Removes any caret container except the one we might be in + function removeCaretContainer(caretContainer) { + var child, currentCaretContainer, lastContainer; + + if (caretContainer) { + rng = selection.getRng(true); + rng.setStartBefore(caretContainer); + rng.setEndBefore(caretContainer); + + child = findFirstTextNode(caretContainer); + if (child && child.nodeValue.charAt(0) == invisibleChar) { + child = child.deleteData(0, 1); + } + + dom.remove(caretContainer, true); + + selection.setRng(rng); + } else { + currentCaretContainer = getParentCaretContainer(selection.getStart()); + while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) { + if (currentCaretContainer !== caretContainer) { + child = findFirstTextNode(caretContainer); + if (child && child.nodeValue.charAt(0) == invisibleChar) { + child = child.deleteData(0, 1); + } + + dom.remove(caretContainer, true); + } + + lastContainer = caretContainer; + } + } + }; + + // Modifies the selection to include contentEditable false elements or insert caret containers + function moveSelection() { + var nonEditableStart, nonEditableEnd, isCollapsed, rng, element; + + // Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside + function hasSideContent(element, left) { + var container, offset, walker, node, len; + + container = rng.startContainer; + offset = rng.startOffset; + + // If endpoint is in middle of text node then expand to beginning/end of element + if (container.nodeType == 3) { + len = container.nodeValue.length; + if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) { + return; + } + } else { + // Can we resolve the node by index + if (offset < container.childNodes.length) { + // Browser represents caret position as the offset at the start of an element. When moving right + // this is the element we are moving into so we consider our container to be child node at offset-1 + var pos = !left && offset > 0 ? offset-1 : offset; + container = container.childNodes[pos]; + if (container.hasChildNodes()) { + container = container.firstChild; + } + } else { + // If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element + return !left ? element : null; + } + } + + // Walk left/right to look for contents + walker = new TreeWalker(container, element); + while (node = walker[left ? 'prev' : 'next']()) { + if (node.nodeType === 3 && node.nodeValue.length > 0) { + return; + } else if (getContentEditable(node) === "true") { + // Found contentEditable=true element return this one to we can move the caret inside it + return node; + } + } + + return element; + }; + + // Remove any existing caret containers + removeCaretContainer(); + + // Get noneditable start/end elements + isCollapsed = selection.isCollapsed(); + nonEditableStart = getNonEditableParent(selection.getStart()); + nonEditableEnd = getNonEditableParent(selection.getEnd()); + + // Is any fo the range endpoints noneditable + if (nonEditableStart || nonEditableEnd) { + rng = selection.getRng(true); + + // If it's a caret selection then look left/right to see if we need to move the caret out side or expand + if (isCollapsed) { + nonEditableStart = nonEditableStart || nonEditableEnd; + var start = selection.getStart(); + if (element = hasSideContent(nonEditableStart, true)) { + // We have no contents to the left of the caret then insert a caret container before the noneditable element + insertCaretContainerOrExpandToBlock(element, true); + } else if (element = hasSideContent(nonEditableStart, false)) { + // We have no contents to the right of the caret then insert a caret container after the noneditable element + insertCaretContainerOrExpandToBlock(element, false); + } else { + // We are in the middle of a noneditable so expand to select it + selection.select(nonEditableStart); + } + } else { + rng = selection.getRng(true); + + // Expand selection to include start non editable element + if (nonEditableStart) { + rng.setStartBefore(nonEditableStart); + } + + // Expand selection to include end non editable element + if (nonEditableEnd) { + rng.setEndAfter(nonEditableEnd); + } + + selection.setRng(rng); + } + } + }; + + function handleKey(ed, e) { + var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement; + + function getNonEmptyTextNodeSibling(node, prev) { + while (node = node[prev ? 'previousSibling' : 'nextSibling']) { + if (node.nodeType !== 3 || node.nodeValue.length > 0) { + return node; + } + } + }; + + function positionCaretOnElement(element, start) { + selection.select(element); + selection.collapse(start); + } + + function canDelete(backspace) { + var rng, container, offset, nonEditableParent; + + function removeNodeIfNotParent(node) { + var parent = container; + + while (parent) { + if (parent === node) { + return; + } + + parent = parent.parentNode; + } + + dom.remove(node); + moveSelection(); + } + + function isNextPrevTreeNodeNonEditable() { + var node, walker, nonEmptyElements = ed.schema.getNonEmptyElements(); + + walker = new tinymce.dom.TreeWalker(container, ed.getBody()); + while (node = (backspace ? walker.prev() : walker.next())) { + // Found IMG/INPUT etc + if (nonEmptyElements[node.nodeName.toLowerCase()]) { + break; + } + + // Found text node with contents + if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) { + break; + } + + // Found non editable node + if (getContentEditable(node) === "false") { + removeNodeIfNotParent(node); + return true; + } + } + + // Check if the content node is within a non editable parent + if (getNonEditableParent(node)) { + return true; + } + + return false; + } + + if (selection.isCollapsed()) { + rng = selection.getRng(true); + container = rng.startContainer; + offset = rng.startOffset; + container = getParentCaretContainer(container) || container; + + // Is in noneditable parent + if (nonEditableParent = getNonEditableParent(container)) { + removeNodeIfNotParent(nonEditableParent); + return false; + } + + // Check if the caret is in the middle of a text node + if (container.nodeType == 3 && (backspace ? offset > 0 : offset < container.nodeValue.length)) { + return true; + } + + // Resolve container index + if (container.nodeType == 1) { + container = container.childNodes[offset] || container; + } + + // Check if previous or next tree node is non editable then block the event + if (isNextPrevTreeNodeNonEditable()) { + return false; + } + } + + return true; + } + + startElement = selection.getStart() + endElement = selection.getEnd(); + + // Disable all key presses in contentEditable=false except delete or backspace + nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement); + if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) { + // Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior + if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) { + return; + } + + e.preventDefault(); + + // Arrow left/right select the element and collapse left/right + if (keyCode == VK.LEFT || keyCode == VK.RIGHT) { + var left = keyCode == VK.LEFT; + // If a block element find previous or next element to position the caret + if (ed.dom.isBlock(nonEditableParent)) { + var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling; + var walker = new TreeWalker(targetElement, targetElement); + var caretElement = left ? walker.prev() : walker.next(); + positionCaretOnElement(caretElement, !left); + } else { + positionCaretOnElement(nonEditableParent, left); + } + } + } else { + // Is arrow left/right, backspace or delete + if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) { + caretContainer = getParentCaretContainer(startElement); + if (caretContainer) { + // Arrow left or backspace + if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) { + nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true); + + if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { + e.preventDefault(); + + if (keyCode == VK.LEFT) { + positionCaretOnElement(nonEditableParent, true); + } else { + dom.remove(nonEditableParent); + return; + } + } else { + removeCaretContainer(caretContainer); + } + } + + // Arrow right or delete + if (keyCode == VK.RIGHT || keyCode == VK.DELETE) { + nonEditableParent = getNonEmptyTextNodeSibling(caretContainer); + + if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { + e.preventDefault(); + + if (keyCode == VK.RIGHT) { + positionCaretOnElement(nonEditableParent, false); + } else { + dom.remove(nonEditableParent); + return; + } + } else { + removeCaretContainer(caretContainer); + } + } + } + + if ((keyCode == VK.BACKSPACE || keyCode == VK.DELETE) && !canDelete(keyCode == VK.BACKSPACE)) { + e.preventDefault(); + return false; + } + } + } + }; + + ed.onMouseDown.addToTop(function(ed, e) { + var node = ed.selection.getNode(); + + if (getContentEditable(node) === "false" && node == e.target) { + // Expand selection on mouse down we can't block the default event since it's used for drag/drop + moveSelection(); + } + }); + + ed.onMouseUp.addToTop(moveSelection); + ed.onKeyDown.addToTop(handleKey); + ed.onKeyUp.addToTop(moveSelection); + }; tinymce.create('tinymce.plugins.NonEditablePlugin', { init : function(ed, url) { - var t = this, editClass, nonEditClass, state; + var editClass, nonEditClass, nonEditableRegExps; + + // Converts configured regexps to noneditable span items + function convertRegExpsToNonEditable(ed, args) { + var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass); + + // Don't replace the variables when raw is used for example on undo/redo + if (args.format == "raw") { + return; + } + + while (i--) { + content = content.replace(nonEditableRegExps[i], function(match) { + var args = arguments, index = args[args.length - 2]; + + // Is value inside an attribute then don't replace + if (index > 0 && content.charAt(index - 1) == '"') { + return match; + } + + return '' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + ''; + }); + } - t.editor = ed; - editClass = ed.getParam("noneditable_editable_class", "mceEditable"); - nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); + args.content = content; + }; + + editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " "; + nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " "; - ed.onNodeChange.addToTop(function(ed, cm, n) { - var sc, ec; + // Setup noneditable regexps array + nonEditableRegExps = ed.getParam("noneditable_regexp"); + if (nonEditableRegExps && !nonEditableRegExps.length) { + nonEditableRegExps = [nonEditableRegExps]; + } - // Block if start or end is inside a non editable element - sc = ed.dom.getParent(ed.selection.getStart(), function(n) { - return ed.dom.hasClass(n, nonEditClass); + ed.onPreInit.add(function() { + handleContentEditableSelection(ed); + + if (nonEditableRegExps) { + ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable); + ed.onBeforeSetContent.add(convertRegExpsToNonEditable); + } + + // Apply contentEditable true/false on elements with the noneditable/editable classes + ed.parser.addAttributeFilter('class', function(nodes) { + var i = nodes.length, className, node; + + while (i--) { + node = nodes[i]; + className = " " + node.attr("class") + " "; + + if (className.indexOf(editClass) !== -1) { + node.attr(internalName, "true"); + } else if (className.indexOf(nonEditClass) !== -1) { + node.attr(internalName, "false"); + } + } }); - ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { - return ed.dom.hasClass(n, nonEditClass); + // Remove internal name + ed.serializer.addAttributeFilter(internalName, function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + + if (nonEditableRegExps && node.attr('data-mce-content')) { + node.name = "#text"; + node.type = 3; + node.raw = true; + node.value = node.attr('data-mce-content'); + } else { + node.attr(externalName, null); + node.attr(internalName, null); + } + } }); - // Block or unblock - if (sc || ec) { - state = 1; - t._setDisabled(1); - return false; - } else if (state == 1) { - t._setDisabled(0); - state = 0; - } + // Convert external name into internal name + ed.parser.addAttributeFilter(externalName, function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + node.attr(internalName, node.attr(externalName)); + node.attr(externalName, null); + } + }); }); }, @@ -51,42 +532,6 @@ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', version : tinymce.majorVersion + "." + tinymce.minorVersion }; - }, - - _block : function(ed, e) { - var k = e.keyCode; - - // Don't block arrow keys, pg up/down, and F1-F12 - if ((k > 32 && k < 41) || (k > 111 && k < 124)) - return; - - return Event.cancel(e); - }, - - _setDisabled : function(s) { - var t = this, ed = t.editor; - - tinymce.each(ed.controlManager.controls, function(c) { - c.setDisabled(s); - }); - - if (s !== t.disabled) { - if (s) { - ed.onKeyDown.addToTop(t._block); - ed.onKeyPress.addToTop(t._block); - ed.onKeyUp.addToTop(t._block); - ed.onPaste.addToTop(t._block); - ed.onContextMenu.addToTop(t._block); - } else { - ed.onKeyDown.remove(t._block); - ed.onKeyPress.remove(t._block); - ed.onKeyUp.remove(t._block); - ed.onPaste.remove(t._block); - ed.onContextMenu.remove(t._block); - } - - t.disabled = s; - } } }); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin.js index e47a5c630a..be7eee8f14 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
      ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

      "+o.encode(r).replace(/\r?\n\r?\n/g,"

      ").replace(/\r?\n/g,"
      ")+"

      "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
       [\s\r\n]+|
      )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
       [\s\r\n]+|
      )*/g,"$1"]]);d([[/

      /g,"

      "],[/
      /g," "],[/

      /g,"
      "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

      ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

      $1

      ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

      "],[/<\/h[1-6][^>]*>/gi,"

      "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
      "]])}else{if(e=="p"){h([[/\n+/g,"

      "],[/^(.*<\/p>)(

      )$/,"

      $1"]])}else{h([[/\n\n/g,"

      "],[/^(.*<\/p>)(

      )$/,"

      $1"],[/\n/g,"
      "]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file +(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
      ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

      "+o.encode(r).replace(/\r?\n\r?\n/g,"

      ").replace(/\r?\n/g,"
      ")+"

      "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:
       [\s\r\n]+|
      )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
       [\s\r\n]+|
      )*/g,"$1"]]);d([[/

      /g,"

      "],[/
      /g," "],[/

      /g,"
      "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

      ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

      $1

      ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

      "],[/<\/h[1-6][^>]*>/gi,"

      "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
      "]])}else{if(e=="p"){h([[/\n+/g,"

      "],[/^(.*<\/p>)(

      )$/,"

      $1"]])}else{h([[/\n\n/g,"

      "],[/^(.*<\/p>)(

      )$/,"

      $1"],[/\n/g,"
      "]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin_src.js index 73fe7fe9a4..9f1c35476a 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/paste/editor_plugin_src.js @@ -359,7 +359,7 @@ } // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser - if (tinymce.isIE && document.documentMode >= 9) { + if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) { // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser process([[/(?:
       [\s\r\n]+|
      )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
       [\s\r\n]+|
      )*/g, '$1']]); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/searchreplace/searchreplace.htm b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/searchreplace/searchreplace.htm index 5a22d8aa4d..2443a9184b 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/searchreplace/searchreplace.htm +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/searchreplace/searchreplace.htm @@ -93,7 +93,7 @@ - +

    diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin.js index 71fbb68a64..48549c9239 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1$2')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin_src.js index fb32af4342..86fdfceb40 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/spellchecker/editor_plugin_src.js @@ -208,7 +208,7 @@ }, _removeWords : function(w) { - var ed = this.editor, dom = ed.dom, se = ed.selection, b = se.getBookmark(); + var ed = this.editor, dom = ed.dom, se = ed.selection, r = se.getRng(true); each(dom.select('span').reverse(), function(n) { if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) { @@ -217,11 +217,11 @@ } }); - se.moveToBookmark(b); + se.setRng(r); }, _markWords : function(wl) { - var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, b = se.getBookmark(), nl = [], + var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(true), nl = [], w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g'); // Collect all text nodes @@ -279,7 +279,7 @@ } }); - se.moveToBookmark(b); + se.setRng(r); }, _showMenu : function(ed, e) { diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/css/props.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/css/props.css index eb1f264960..3b8f0ee777 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/css/props.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/css/props.css @@ -5,6 +5,7 @@ select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padd #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_toggle_insert_span {padding-top:10px;} .panel_wrapper div.current {padding-top:10px;height:230px;} .delim {border-left:1px solid gray;} .tdelim {border-bottom:1px solid gray;} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin.js index cab2153c40..dda9f928b9 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){var c=false;var f=a.selection.getSelectedBlocks();var d=[];if(f.length===1){d.push(a.selection.getNode().style.cssText)}else{tinymce.each(f,function(g){d.push(a.dom.getAttrib(g,"style"))});c=true}a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:340+parseInt(a.getLang("style.delta_height",0)),inline:1},{applyStyleToBlocks:c,plugin_url:b,styles:d})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin_src.js index 5f7755f184..eaa7c7713a 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/editor_plugin_src.js @@ -13,14 +13,30 @@ init : function(ed, url) { // Register commands ed.addCommand('mceStyleProps', function() { + + var applyStyleToBlocks = false; + var blocks = ed.selection.getSelectedBlocks(); + var styles = []; + + if (blocks.length === 1) { + styles.push(ed.selection.getNode().style.cssText); + } + else { + tinymce.each(blocks, function(block) { + styles.push(ed.dom.getAttrib(block, 'style')); + }); + applyStyleToBlocks = true; + } + ed.windowManager.open({ file : url + '/props.htm', width : 480 + parseInt(ed.getLang('style.delta_width', 0)), - height : 320 + parseInt(ed.getLang('style.delta_height', 0)), + height : 340 + parseInt(ed.getLang('style.delta_height', 0)), inline : 1 }, { + applyStyleToBlocks : applyStyleToBlocks, plugin_url : url, - style_text : ed.selection.getNode().style.cssText + styles : styles }); }); @@ -52,4 +68,4 @@ // Register plugin tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); -})(); \ No newline at end of file +})(); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/js/props.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/js/props.js index 6800a9a9aa..0a8a8ec3ef 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/js/props.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/js/props.js @@ -27,10 +27,41 @@ var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;out var defaultBorderWidth = "thin;medium;thick"; var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; -function init() { +function aggregateStyles(allStyles) { + var mergedStyles = {}; + + tinymce.each(allStyles, function(style) { + if (style !== '') { + var parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style); + for (var name in parsedStyles) { + if (parsedStyles.hasOwnProperty(name)) { + if (mergedStyles[name] === undefined) { + mergedStyles[name] = parsedStyles[name]; + } + else if (name === 'text-decoration') { + if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) { + mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name]; + } + } + } + } + } + }); + + return mergedStyles; +} + +var applyActionIsInsert; +var existingStyles; + +function init(ed) { var ce = document.getElementById('container'), h; - ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles')); + ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles); + + applyActionIsInsert = ed.getParam("edit_css_style_insert_span", false); + document.getElementById('toggle_insert_span').checked = applyActionIsInsert; h = getBrowserHTML('background_image_browser','background_image','image','advimage'); document.getElementById("background_image_browser").innerHTML = h; @@ -144,6 +175,8 @@ function setupFormData() { f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + f.text_none.checked = inStr(ce.style.textDecoration, 'none'); + updateTextDecorations(); // Setup background fields @@ -366,13 +399,41 @@ function hasEqualValues(a) { return true; } +function toggleApplyAction() { + applyActionIsInsert = ! applyActionIsInsert; +} + function applyAction() { var ce = document.getElementById('container'), ed = tinyMCEPopup.editor; generateCSS(); tinyMCEPopup.restoreSelection(); - ed.dom.setAttrib(ed.selection.getSelectedBlocks(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText))); + + var newStyles = tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText); + + if (applyActionIsInsert) { + ed.formatter.register('plugin_style', { + inline: 'span', styles: existingStyles + }); + ed.formatter.remove('plugin_style'); + + ed.formatter.register('plugin_style', { + inline: 'span', styles: newStyles + }); + ed.formatter.apply('plugin_style'); + } else { + var nodes; + + if (tinyMCEPopup.getWindowArg('applyStyleToBlocks')) { + nodes = ed.selection.getSelectedBlocks(); + } + else { + nodes = ed.selection.getNode(); + } + + ed.dom.setAttrib(nodes, 'style', tinyMCEPopup.editor.dom.serializeStyle(newStyles)); + } } function updateAction() { @@ -632,4 +693,17 @@ function synch(fr, to) { selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); } +function updateTextDecorations(){ + var el = document.forms[0].elements; + + var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"]; + var noneChecked = el["text_none"].checked; + tinymce.each(textDecorations, function(id) { + el[id].disabled = noneChecked; + if (noneChecked) { + el[id].checked = false; + } + }); +} + tinyMCEPopup.onInit.add(init); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/langs/en_dlg.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/langs/en_dlg.js index 9a1d4a2230..35881b3aca 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/langs/en_dlg.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/langs/en_dlg.js @@ -1 +1 @@ -tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file +tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/props.htm b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/props.htm index 76ab68d896..7dc087a307 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/props.htm +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/props.htm @@ -118,7 +118,7 @@ - + @@ -825,6 +825,11 @@
    +
    + + +
    +
    diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/readme.txt b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/readme.txt new file mode 100644 index 0000000000..5bac30202e --- /dev/null +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/style/readme.txt @@ -0,0 +1,19 @@ +Edit CSS Style plug-in notes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Unlike WYSIWYG editor functionality that operates only on the selected text, +typically by inserting new HTML elements with the specified styles. +This plug-in operates on the HTML blocks surrounding the selected text. +No new HTML elements are created. + +This plug-in only operates on the surrounding blocks and not the nearest +parent node. This means that if a block encapsulates a node, +e.g

    text

    , then only the styles in the block are +recognized, not those in the span. + +When selecting text that includes multiple blocks at the same level (peers), +this plug-in accumulates the specified styles in all of the surrounding blocks +and populates the dialogue checkboxes accordingly. There is no differentiation +between styles set in all the blocks versus styles set in some of the blocks. + +When the [Update] or [Apply] buttons are pressed, the styles selected in the +checkboxes are applied to all blocks that surround the selected text. diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin.js index 42a82d112c..2c51291615 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin_src.js index a1579c85f2..94f45320d6 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/tabfocus/editor_plugin_src.js @@ -22,7 +22,7 @@ var x, i, f, el, v; function find(d) { - el = DOM.select(':input:enabled,*[tabindex]'); + el = DOM.select(':input:enabled,*[tabindex]:not(iframe)'); function canSelectRecursive(e) { return e.nodeName==="BODY" || (e.type != 'hidden' && diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin.js index 2f3b0e2d7a..23c1a83f33 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin.js @@ -1 +1 @@ -(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){return S&&S[R?"lastChild":"firstChild"]}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'
    ')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file +(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE?" ":'
    ')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin_src.js index 8170e4ed44..54bab56c3b 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/editor_plugin_src.js @@ -287,6 +287,21 @@ endX = startX + (cols - 1); endY = startY + (rows - 1); } else { + startPos = endPos = null; + + // Calculate start/end pos by checking for selected cells in grid works better with context menu + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + if (!startPos) { + startPos = {x: x, y: y}; + } + + endPos = {x: x, y: y}; + } + }); + }); + // Use selection startX = startPos.x; startY = startPos.y; @@ -599,6 +614,9 @@ else dom.insertAfter(row, targetRow); }); + + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); }; function getPos(target) { @@ -1144,7 +1162,9 @@ } function getChildForDirection(parent, up) { - return parent && parent[up ? 'lastChild' : 'firstChild']; + var child = parent && parent[up ? 'lastChild' : 'firstChild']; + // BR is not a valid table child to return in this case we return the table cell + return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child; } function moveCursorToStartOfElement(n) { @@ -1214,62 +1234,83 @@ ed.onKeyDown.add(moveSelection); } - + // Fixes an issue on Gecko where it's impossible to place the caret behind a table // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled - if (!tinymce.isIE) { - function fixTableCaretPos() { - var last; + function fixTableCaretPos() { + var last; - // Skip empty text nodes form the end - for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; - if (last && last.nodeName == 'TABLE') - ed.dom.add(ed.getBody(), 'p', null, '
    '); - }; + if (last && last.nodeName == 'TABLE') { + if (ed.settings.forced_root_block) + ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? ' ' : '
    '); + else + ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'}); + } + }; - // Fixes an bug where it's impossible to place the caret before a table in Gecko - // this fix solves it by detecting when the caret is at the beginning of such a table - // and then manually moves the caret infront of the table - if (tinymce.isGecko) { - ed.onKeyDown.add(function(ed, e) { - var rng, table, dom = ed.dom; + // Fixes an bug where it's impossible to place the caret before a table in Gecko + // this fix solves it by detecting when the caret is at the beginning of such a table + // and then manually moves the caret infront of the table + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + var rng, table, dom = ed.dom; - // On gecko it's not possible to place the caret before a table - if (e.keyCode == 37 || e.keyCode == 38) { - rng = ed.selection.getRng(); - table = dom.getParent(rng.startContainer, 'table'); + // On gecko it's not possible to place the caret before a table + if (e.keyCode == 37 || e.keyCode == 38) { + rng = ed.selection.getRng(); + table = dom.getParent(rng.startContainer, 'table'); - if (table && ed.getBody().firstChild == table) { - if (isAtStart(rng, table)) { - rng = dom.createRng(); + if (table && ed.getBody().firstChild == table) { + if (isAtStart(rng, table)) { + rng = dom.createRng(); - rng.setStartBefore(table); - rng.setEndBefore(table); + rng.setStartBefore(table); + rng.setEndBefore(table); - ed.selection.setRng(rng); + ed.selection.setRng(rng); - e.preventDefault(); - } + e.preventDefault(); } } - }); - } + } + }); + } - ed.onKeyUp.add(fixTableCaretPos); - ed.onSetContent.add(fixTableCaretPos); - ed.onVisualAid.add(fixTableCaretPos); + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); - ed.onPreProcess.add(function(ed, o) { - var last = o.node.lastChild; + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; - if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') - ed.dom.remove(last); - }); + if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") { + ed.dom.remove(last); + } + }); - fixTableCaretPos(); - ed.startContent = ed.getContent({format : 'raw'}); + + /** + * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line + */ + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) { + var node = ed.selection.getRng().startContainer; + var tableCell = dom.getParent(node, 'td,th'); + if (tableCell) { + var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF"); + dom.insertAfter(zeroSizedNbsp, node); + } + } + }); } + + + fixTableCaretPos(); + ed.startContent = ed.getContent({format : 'raw'}); }); // Register action commands diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/js/cell.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/js/cell.js index d6f3290599..02ecf22c8a 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/js/cell.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/table/js/cell.js @@ -137,7 +137,7 @@ function updateAction() { do { if (cell == tdElm) break; - col += cell.getAttribute("colspan"); + col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1; } while ((cell = nextCell(cell)) != null); for (var i=0; i0')}}else{tinymce.DOM.add(h,"span",{},'0')}});a.onInit.add(function(e){e.selection.onSetContent.add(function(){c._count(e)});c._count(e)});a.onSetContent.add(function(e){c._count(e)});a.onKeyUp.add(function(f,g){if(g.keyCode==d){return}if(13==g.keyCode||8==d||46==d){c._count(f)}d=g.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},2000)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(k,"span",{},'0')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/wordcount/editor_plugin_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/wordcount/editor_plugin_src.js index e94743bae1..34b265553f 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/wordcount/editor_plugin_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/plugins/wordcount/editor_plugin_src.js @@ -16,10 +16,12 @@ cleanre : null, init : function(ed, url) { - var t = this, last = 0; + var t = this, last = 0, VK = tinymce.VK; t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’ t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g); + t.update_rate = ed.getParam('wordcount_update_rate', 2000); + t.update_on_delete = ed.getParam('wordcount_update_on_delete', false); t.id = ed.id + '-word-count'; ed.onPostRender.add(function(ed, cm) { @@ -49,12 +51,18 @@ t._count(ed); }); - ed.onKeyUp.add(function(ed, e) { - if (e.keyCode == last) - return; + function checkKeys(key) { + return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last)); + } + + function checkDelOrBksp(key) { + return key === VK.DELETE || key === VK.BACKSPACE; + } - if (13 == e.keyCode || 8 == last || 46 == last) + ed.onKeyUp.add(function(ed, e) { + if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) { t._count(ed); + } last = e.keyCode; }); @@ -94,7 +102,7 @@ if (!ed.destroyed) { var tc = t._getCount(ed); tinymce.DOM.setHTML(t.id, tc.toString()); - setTimeout(function() {t.block = 0;}, 2000); + setTimeout(function() {t.block = 0;}, t.update_rate); } }, 1); }, diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/color_picker.htm b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/color_picker.htm index ad1bb0f6cc..b625531a6a 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/color_picker.htm +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/color_picker.htm @@ -62,12 +62,8 @@
    - -
    - -
    - -
    + +
    diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template.js index 812578d0bc..4d5acfb3e3 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template.js @@ -1 +1 @@ -(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(e.isWebKit){window.focus()}v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:260+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file +(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(m,k){var q,p=m.dom,n="",o,l;previewStyles=m.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function j(r){return r.replace(/%(\w+)/g,"")}name=k.block||k.inline||"span";q=p.create(name);f(k.styles,function(s,r){s=j(s);if(s){p.setStyle(q,r,s)}});f(k.attributes,function(s,r){s=j(s);if(s){p.setAttrib(q,r,s)}});f(k.classes,function(r){r=j(r);if(!p.hasClass(q,r)){p.addClass(q,r)}});p.setStyles(q,{position:"absolute",left:-65535});m.getBody().appendChild(q);o=p.getStyle(m.getBody(),"fontSize",true);o=/px$/.test(o)?parseInt(o,10):0;f(previewStyles.split(" "),function(r){var s=p.getStyle(q,r,true);if(r=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(s)){s=p.getStyle(m.getBody(),r,true);if(p.toHex(s).toLowerCase()=="#ffffff"){return}}if(r=="font-size"){if(/em|%$/.test(s)){if(o===0){return}s=parseFloat(s,10)/(/%$/.test(s)?100:1);s=(s*o)+"px"}}n+=r+":"+s+";"});p.remove(q);return n}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},""),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true)}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template_src.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template_src.js index a3713b29e3..28ba9828fe 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template_src.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/editor_template_src.js @@ -11,6 +11,95 @@ (function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; + // Generates a preview for a format + function getPreviewCss(ed, fmt) { + var previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName; + + previewStyles = ed.settings.preview_styles; + + // No preview forced + if (previewStyles === false) + return ''; + + // Default preview + if (!previewStyles) + previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color'; + + // Removes any variables since these can't be previewed + function removeVars(val) { + return val.replace(/%(\w+)/g, ''); + }; + + // Create block/inline element to use for preview + name = fmt.block || fmt.inline || 'span'; + previewElm = dom.create(name); + + // Add format styles to preview element + each(fmt.styles, function(value, name) { + value = removeVars(value); + + if (value) + dom.setStyle(previewElm, name, value); + }); + + // Add attributes to preview element + each(fmt.attributes, function(value, name) { + value = removeVars(value); + + if (value) + dom.setAttrib(previewElm, name, value); + }); + + // Add classes to preview element + each(fmt.classes, function(value) { + value = removeVars(value); + + if (!dom.hasClass(previewElm, value)) + dom.addClass(previewElm, value); + }); + + // Add the previewElm outside the visual area + dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF}); + ed.getBody().appendChild(previewElm); + + // Get parent container font size so we can compute px values out of em/% for older IE:s + parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true); + parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0; + + each(previewStyles.split(' '), function(name) { + var value = dom.getStyle(previewElm, name, true); + + // If background is transparent then check if the body has a background color we can use + if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) { + value = dom.getStyle(ed.getBody(), name, true); + + // Ignore white since it's the default color, not the nicest fix + if (dom.toHex(value).toLowerCase() == '#ffffff') { + return; + } + } + + // Old IE won't calculate the font size so we need to do that manually + if (name == 'font-size') { + if (/em|%$/.test(value)) { + if (parentFontSize === 0) { + return; + } + + // Convert font size from em/% to px + value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1); + value = (value * parentFontSize) + 'px'; + } + } + + previewCss += name + ':' + value + ';'; + }); + + dom.remove(previewElm); + + return previewCss; + }; + // Tell it to load theme specific language pack(s) tinymce.ThemeManager.requireLangPack('advanced'); @@ -65,19 +154,27 @@ t.editor = ed; t.url = url; t.onResolveName = new tinymce.util.Dispatcher(this); + s = ed.settings; ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; + // Setup default buttons + if (!s.theme_advanced_buttons1) { + s = extend({ + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", + theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", + theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap" + }, s); + } + // Default settings t.settings = s = extend({ theme_advanced_path : true, - theme_advanced_toolbar_location : 'bottom', - theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", - theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", - theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap", + theme_advanced_toolbar_location : 'top', theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", - theme_advanced_toolbar_align : "center", + theme_advanced_toolbar_align : "left", + theme_advanced_statusbar_location : "bottom", theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", theme_advanced_more_colors : 1, theme_advanced_row_height : 23, @@ -87,7 +184,7 @@ theme_advanced_font_selector : "span", theme_advanced_show_current_color: 0, readonly : ed.settings.readonly - }, ed.settings); + }, s); // Setup default font_size_style_values if (!s.font_size_style_values) @@ -219,15 +316,21 @@ if (ctrl.getLength() == 0) { each(ed.dom.getClasses(), function(o, idx) { - var name = 'style_' + idx; + var name = 'style_' + idx, fmt; - ed.formatter.register(name, { + fmt = { inline : 'span', attributes : {'class' : o['class']}, selector : '*' - }); + }; - ctrl.add(o['class'], name); + ed.formatter.register(name, fmt); + + ctrl.add(o['class'], name, { + style: function() { + return getPreviewCss(ed, fmt); + } + }); }); } }, @@ -239,7 +342,7 @@ ctrl = ctrlMan.createListBox('styleselect', { title : 'advanced.style_select', onselect : function(name) { - var matches, formatNames = []; + var matches, formatNames = [], removedFormat; each(ctrl.items, function(item) { formatNames.push(item.value); @@ -248,12 +351,18 @@ ed.focus(); ed.undoManager.add(); - // Toggle off the current format + // Toggle off the current format(s) matches = ed.formatter.matchAll(formatNames); - if (!name || matches[0] == name) { - if (matches[0]) - ed.formatter.remove(matches[0]); - } else + tinymce.each(matches, function(match) { + if (!name || match == name) { + if (match) + ed.formatter.remove(match); + + removedFormat = true; + } + }); + + if (!removedFormat) ed.formatter.apply(name); ed.undoManager.add(); @@ -264,7 +373,7 @@ }); // Handle specified format - ed.onInit.add(function() { + ed.onPreInit.add(function() { var counter = 0, formats = ed.getParam('style_formats'); if (formats) { @@ -276,24 +385,32 @@ if (keys > 1) { name = fmt.name = fmt.name || 'style_' + (counter++); ed.formatter.register(name, fmt); - ctrl.add(fmt.title, name); + ctrl.add(fmt.title, name, { + style: function() { + return getPreviewCss(ed, fmt); + } + }); } else ctrl.add(fmt.title); }); } else { each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { - var name; + var name, fmt; if (val) { name = 'style_' + (counter++); - - ed.formatter.register(name, { + fmt = { inline : 'span', classes : val, selector : '*' - }); + }; - ctrl.add(t.editor.translate(key), name); + ed.formatter.register(name, fmt); + ctrl.add(t.editor.translate(key), name, { + style: function() { + return getPreviewCss(ed, fmt); + } + }); } }); } @@ -386,7 +503,7 @@ return v == sv; }); - if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] == v['class'])) { + if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { c.select(null); } @@ -433,7 +550,9 @@ if (c) { each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { - c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() { + return getPreviewCss(t.editor, {block: v}); + }}); }); } @@ -507,7 +626,7 @@ // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. // Maybe actually inherit it from the original textara? - n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')}); DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); if (!DOM.boxModel) @@ -552,8 +671,7 @@ if (e.nodeName == 'A') { t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); - - return Event.cancel(e); + return false; } }); /* @@ -825,7 +943,7 @@ }, _addToolbars : function(c, o) { - var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup; + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false; toolbarGroup = cf.createToolbarGroup('toolbargroup', { 'name': ed.getLang('advanced.toolbar'), @@ -841,6 +959,7 @@ // Create toolbar and add the controls for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { + toolbarsExist = true; tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); if (s['theme_advanced_buttons' + i + '_add']) @@ -854,6 +973,9 @@ o.deltaHeight -= s.theme_advanced_row_height; } + // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly + if (!toolbarsExist) + o.deltaHeight -= s.theme_advanced_row_height; h.push(toolbarGroup.renderHTML()); h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); DOM.setHTML(n, h.join('')); @@ -975,19 +1097,17 @@ p = getParent('A'); if (c = cm.get('link')) { - if (!p || !p.name) { - c.setDisabled(!p && co); - c.setActive(!!p); - } + c.setDisabled((!p && co) || (p && !p.href)); + c.setActive(!!p && (!p.name && !p.id)); } if (c = cm.get('unlink')) { c.setDisabled(!p && co); - c.setActive(!!p && !p.name); + c.setActive(!!p && !p.name && !p.id); } if (c = cm.get('anchor')) { - c.setActive(!co && !!p && p.name); + c.setActive(!co && !!p && (p.name || (p.id && !p.href))); } p = getParent('IMG'); @@ -1004,10 +1124,15 @@ matches = ed.formatter.matchAll(formatNames); c.select(matches[0]); + tinymce.each(matches, function(match, index) { + if (index > 0) { + c.mark(match); + } + }); } if (c = cm.get('formatselect')) { - p = getParent(DOM.isBlock); + p = getParent(ed.dom.isBlock); if (p) c.select(p.nodeName.toLowerCase()); @@ -1105,7 +1230,7 @@ return; // Handle prefix - if (tinymce.isIE && n.scopeName !== 'HTML') + if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName) na = n.scopeName + ':' + na; // Remove internal prefix @@ -1166,7 +1291,7 @@ if (v) { ti += 'class: ' + v + ' '; - if (DOM.isBlock(n) || na == 'img' || na == 'span') + if (ed.dom.isBlock(n) || na == 'img' || na == 'span') na += '.' + v; } } @@ -1225,7 +1350,7 @@ ed.windowManager.open({ url : this.url + '/charmap.htm', width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), - height : 260 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), inline : true }, { theme_url : this.url @@ -1294,7 +1419,7 @@ var ed = this.editor; // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) return; ed.windowManager.open({ diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/img/icons.gif b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/img/icons.gif index 641a9e3d314f4ea051692a2274aeb281456f5df9..ca222490188b939d695f5ff8823c42c0394c65f7 100644 GIT binary patch delta 5831 zcmWNTiC>G21Hhj>yPl?F9kNQb4wb80O;YP#_bKa8i()0(8)Z5?&yLn~sE7_ni2ghl5SHRicuj8@FYkW8zv27&e81mA$q%+@1_cLF)~C&(J%R7QB~1((g}SVZ zrY?n1#BSD*M;bd9P2AmfHsy0cz+}9$Z)c^B zen9%c9r7jh4sK?PqR?e19pf@nE5<+X!cu*TODx)UzKa&CZNgaNqPv4F;Y~I#yJhp6 z+7gWNuVr1CuGh8Fs|Y6#uCb;OC+sJgecK%1>X^Wg=E7Vn`lW5U76solFC;?QCac(t zer4K#4#}cqh3pc-tG*J^dSc?!4T}|^5n*p@v;pBjE}0f{t)W=5jnr%_`tfCYbM`&`2xD*jmdTBx$fg(iefS|_j8s5`h}skxfEGer&M#8TbQ5+H zT}j3trOa#S5y^~lTdsx;sC9MDv5%K8wXpLdNjaQ#flTsh)G+H&0CtrGSgC7W-^|x@ zn*>fc5Jhc+CVQqX1+|@$ba9QW(d-jwuQK688%-_Wy@iAirA)1bip`(>qwN$PaquRNV*-pWp5(p+;f(Rek>Ya~L z{+nd#gpwxDEL%=wAL6Bux@CG6ZUt{Da|k1r<$LoP2+C`Unzbb4Pk8w4U?NXNFVTzClO9`^seW`C zo3xxV3P#0;ejr;XCNNtk1Lrf2m)Uc%OGq|FORQ^X&cTN&E%&eH!hW(@k1%V$Hlvg5 z)1zpCN&X~nw~;d&ZarvQI9p?Tic#iV;gV9;>Es!rz#R^~=_5n=?EP>iWws2lUumiM zzPcvVta)|^#u`095HBV;iS74?b(UGV{j`6^yj*#CD*wYLcY$ZZNAq)50`+W77x~=B z`Sv4apG=qidC5W$===jH#b&8&PX>}287KY_T(i)M;z~CN;izwpWG&O}S!uP=iE}`y zu{|flL);&&e}mU;f-U=uBjtFeSEs$ny%$NZYK}c^u%hCCarIz>Q%H2W{;!*F9-8Dt z*;fnKXcrw`wPVL9%LJ7*>`3w|QZ@_L(u0ewy!crnUTo>gjBkR(+A*#nvzB~U>-u{e z9WNV^U+L0+;1emsE~izN#81~=3juKcvQ2P8gY~r5qKR*6@wbdkGrv_PZ8ZfSE;-yP z{9POwG;Q))eTa*Mto7k6nMLqVT#vZjPtz`EkCWfUo!zkCA!rAw4-Go1T~RVJV3$TS zYQ4&FVfSgbO8u7b6~0cBebHJ64aBE8=qi>%uXhrzCE6>_nWi@rU$bs&GfLXB?xinr z6#46?DR8EHeYA7uK+V05mj$ySxEu42J5q@44ROu%9G_#IU0?9l0M}XWI|@NQ!X!3# z8IdM4nHjz?+9fyKMkUy3a}2wF%|I831J~Wg?2&1a#=`SJ%*6H^5&mRwZJ(d5? zcAnKx|J=NmaS2*31Gffe20G>Y0&SQ8^!enLmE}&Out8-&a81T4-d41UB+J>iuf_g~ zUS~?hy>wgsYE=HabF`3{23=`7#Cse zrkaH$4zw&Sah_H14FCJ>lGac-3;aoRjBoxLq4_Hqmd> zQ{s(vj-TzWTsHj-Apju&(OD-!yT z<}OA!5d&nj5wg>7arCM3U=^CX;^U98pr)^1sOtDJGD;(?<`(asPUqJ%?HNvm)wi|f z9Y{uYT4?uERG`nLmW{Beg`!NHJb<9h8RKXhJ0L%VrVP;VmP%nz!Tj3VDI6jys4h#KIPLf# zWMx&eR4k3Lz4+^rJ(b=tw0yVedS^jMyXoirl*1FusWz zT`z>-Q1IKEx-N`hhYpKxctQ~#G0>pDo%k0;E6BBtRi1=yG!okTJpaTZ6wGFoI;#EfnT|3u z-#@OBkvHPo$P3K&)5qSq&a$2bkA|!N(6)s??zK`hfco*|xNR;dBmWGc_7jV;hhO|m zM})xpu(JfbHPf5GGOY`G%q6EEbxuC1VNRn0icb&x+KGS$zcgOof{EJF-2irt5}iGf zi~G8H=$<_W?^@k-NJ5l)+dqs%IXCjkn}1~t9WQie#>)AC*_3cKiwig3ibeFQWt7&Fl|paGspto%C>>^VkGu|HL<<$mJ(CQbRE ze)j~?U0S9W$$!IYB?T~HGyn3Q+z!nY9^&Yh+I{hk$nJ>w4x-i}cibXQ&cmd% z!L=wN)UWOtnXG&MO>*(~&E`29-ri5p}FbhRXG?q(3|KW!o@2H=oYEMy9>kk5e*!4Cx`~`$( zmusu)Vy$jAz;@a*Z(1fWP&RkoEis)$={PR^b6kK^BG%jutJw~#9r1e@sFkBPV7a9hduebr zfAb?C5$LI;ax=-EoyNoVQJyQPPEa!;iX{}VtXyc0>;-;~N2#u&XGthVZEwYMl7p5M z{?mGm0F~8)Z5SF^tY6sMK!JU#XniqBK2t8-(9`0I{h$?~d-Nmr*m8}!H8;0Q4?b+v zSkwq<{xu?C5YEz(t_`E3jv*ImAr~ct8Ik6UotMB7yexHAT47_zye~VU`U;Fx^KOGU znCJxFWaG9L;8c6OvwitL#(C~8=!kA_kMUdG1zuv3tCzkER$Yc+s0$`_@f;z))zt7# zRIwayf^b^sgxqQ>B$5rML;E~jZ>K{y<@lCyJS4+L`w?!k0Fon!7vdj!5=cTsdk&FS z@DJ_huJ&wfV4Z82ywa|`!lRU)VS)q-XLN+~q5F_}x#Wbt2(e)bW2r#GBtEa&7x;g? zCH?RwI+i4N`;SD-xyv=2e84Ky!*dMrBLuHGV!Y$kwUeM15%8)Xv3-x=?6604aadug zshqH(2W=t6;OF`T0EmJ3R3=8d9vB=2mMa0jUk`!e3oj8YIv`4TM$cxt+ntTxAsv7= z9oD!nA@s^4;-XM1>LpQl8=5nYV43fHoDacBK#TSZGa_!|HC-o;j3ZH7{Khln4Wcj&k5v0m?`Y7^#*T z)oUPYdW?xkC=s-n16R;J`ThiE!Z0lK6i}s5`S8K^;RX`gmcl0>rq0UJyW%pRpM0L3 z^+a6w6V1C%E5a8F%MVE}y*fWqNxT0z`~K#ZkpC{PXod*%kTMO5F2?9d?DQrD`3crB z9+ME#N`$pP+#pp&pZoL=v~!gW_$Y+5^6ph3#!U6ZRuyk1-PFFmQkz{865y zSO4OA?~9(7FWQ+&T_rF2Homx;@yJ+)dTn>ansP)(iKM4PVfE;h(3&LA5={Wy%tBdU zK?f@K(Jq8Z9vqSckeFk3#4V31V=~(VZI#f@bcmLQ7|3HRD27VCSOIzbYek8gP7ZoX z;5&%$u9Anm`WyMROJPm2ksQ|#rO39YraA`y&I1NJbN~M zGlk86Rme@m>XJwaXs>6rl~3DMk3|rV(IT-+0=OG>)8UfC+W#rGzr3ZvK+;G8R~k>C zXh}Y;`S)cTP{VuI+tG{dAsX*Etl#muccxRMHYy(fN;0r)zu?CnZa3y^&ZzeV+2x~K z61c@+u_JmgJ8T0q&1r0GL-`~L@oPeWYHY&qT|z*5%t3owGHFH)3mH{xOr7U5wB&*9 zsco6?2;YrZ)#NK!Wb(p9=S(SBb0&r$1OW)+A&c!`2!8|BvCXT_x2<~j}`_ZEsycGzvXQ^@!i!G?;Ej{yX0J5RfA{vYj8+O)Uoh45iqFu$ZLE_9>t+hceFv*)!N7x6>5 z7)gbdoj5PLPT%jbfH8wTux*!c26MnE^JK79_j@xhs4joofkKdSY{uqES?Y>1N7hZt zFIeIMP;5Uv5;ZSQnSW!_SQV3I36&TIX4&%6su0BJ)bz4w#Ka4-V%bQShn{%we(J^i zl_GDI6=I3g?N>FxRtb{d(K_;r>Xok>et82$A1P-P zbN%l5i+{g=KwwjLe0ufw$V~IW61u0&RNN@*sW88n2uB|`4 zay0he2eDZ%p~N|ABCRZrc`Rs)Cl%lyndMgBCoC1kRc=qcCFzm8Uvh<_JVOH@N4pmh z;ZKXgCt-tdk&1{yxs?tHU44|J3`1qgpTD47bl@yIe2c`CU$pj5|MZK&s{4Y_F6P8jIvYKJj`7? zl>5zjLH6f@Fq3OOj3J1SFcn8VBi7VaA>*fVpTY-rk@0)hH|_CoZ+zCaUZ4VAO7?iU zH)g32)!%zOS|>t^A)ls$@wB}Gsf+%%HaRrS%)2g(NOwLf`eJx>(WpZ+?CclA4$Wm@ zv%IKJe&%^G4tcTOUt=7)xqf-^IeDAmJbG1LLQ`I1M_$scyyS;@TVCg-e9lW%=P`8h z)6C)gtq%Fyyz|o|^D|QOx98;Vfb*GE`I$}mSv&F+z4_Vd+N{_4yFcgWsPkDm`~LX; zt>y3stM?@&mqt3fV{>1XJ82)gYTy2*eFYu+3U7TMp#pon^-|e48fc}yR0OIoNs!-f zpnuoBU!uwU?oLPc4eb+FvDF8g*kv8;a(DQv@mxu9N7ddOp*54gS_+yeFnTJC`X$8Q z%s#p-$nqAu4&Gm1wZEb1M?nyfI?4X2+$Ughe7nIS_EC3BzPoCeM^*JD?x#2VHKrD{ z<`kTT3ncr#=Dud{Z8~V(4QdN1Aw~Jp^vr}}p;A!e^nr}&Y1@t8w#N*y*qg`Ws2ew_OI$&TVD-a>0SNb2Qp zQlRt@{L50j+5*837J_hz_s`8MPsau?9rr#k8+qVu>H)d~hM__>)wczaRSAp<51FN6 zUx%fKr5CjKo%(=M2ma!HpxZ&+-PC)go44?rjp#xCoFT$o>N*32=#1Z+L>Q0?-=*G<$j#J1P}VSoM@lY-5MkOvsMFI z7r& zyY;AR=E{~o6Ry*57QIiyqZ^+avn9B%Yp1$%{~Ein^Sk}4o`UZSpUS%iAIstjIiB^3 zn(7XXuJbSTlB96Pv*Z_3%7b6UD7-6k>gT7AKV0VIr-P2z@A~PQRR&@3gLPlYr!h@2 zQUCIpA7_$_P7TbP?kvS)APVNEug?8L6Qgx5Ie-6Jzc@E`_WQ)}&#W~5)@!Us>!!&~ z*f&E}ISQQ58Ok6!I_L9$8-J-5{u=M7B62!D#HXS!9J{HzYR5MX3Ymj7W|O%Z1@ZUs es8uR5UpIteQL;3VZ6Pqq>b58~y}pbHZ1^9m0}}WE delta 5637 zcmWO8hg(t$1Ay@Z9N>rxw>fc>W})Rst#IQWnIjvx5-rOtua?z099a@7j*`YLQcD_^ z+0aT0SD`JfOq*95H=5VXL00m8|HJ$Ip7+7}igj9{VIkhj)08+rU{-xm3&dgYm-KLS zBe;qrmEwWzQ1>nPxH#WNB4*n1iY?5PgW0?jD_f3HBUQ4I+tHn`r-dz1nVd}11&#$0 z{fAN$*NsejrGMRGtkp6@-w>u_l;q}~Ig&wwNo0MnI!ZEj%HKr9IN zOF-e7Za2FSd*BHDUNS>WIl3Mh>b?zcusn&>>et!dKEJWcHel*Y%Ck%4N6rZo@?K^) z*P7-`ijb#cK=X}Ui)YH`MSRPryNpuE(q?`7=n$Qq9YGg z+YyVuk9A&#M6m%(p*rJLB}O<{?b5+IKOa9P;^{&9Jqm>4!NS`f~BM`Hq)EGH1B=ku&HAxoWt* zI^9G7y(wq(e@=E~iix9o6r9%RcD&sJ2Qd?8dQ9YK<`T^gJz+C(xeDv69u2r$w~F?> zN1rgG#1lcuTd4_QaZ3;+I#&GlNIiLE zOrT*n(cuJMR7cCbV`@(>=NZ{tW@F2UM(MP!q4@<}HQ5i)-Wu@K`}fb_%d9SAqM#Kp zd~(kgDoZ4z{T|}o&q8d4%q}bediF`#AP%X}W!g_3_B zQY(}#s8i9(bFv82lE`#E|J3IzqnqyD^L)AUt*cE8`PYXWzS?G2?;?hM!}HvRbtQMW zd0PZ0sv=j))7WP7VNF#WN7L-1Xg{rQM}=^#+BzMf80J&jkmYe#2ymm zrbrgO3_;8mY4LQe_sG&T6C>{kDvz5fktb>4?DaNA$1h8{rVcFyrCYD}msV;h2Qk60 z?+NvH5%nhYZtjblEdu;J=QcTPA6DG3hdZ!p)t{tc=0AJ6nWBAjpZZ4T_kG(oWu;Pu z8iI^m4Pp?5=!ZB;WH~xJlEEVcjMMU=oDxr;9>|IesHGYJ0YeQ77yvr8k9KMPMdMno zrErXdT{`>Y1r26K+7??lxH=^sKE=srM}4Jea#cL@zXs35ufaK{A{d8S2V18h*AlNsH?IW$Epc0Q1`(0#xq>Z5`A=vadIXPE1@T}GAD*i1XSXRsD> zDQfv-)g6)C-j1vh@j7&q&9Cr!@53OHzyalq#omr~;m z`nPJ-_~`dmlF~p}WQg{k-|M<1!^PbH5#eE&?9y@Yd#}Bpo(J133rtt>aStY&&sr=y zq3JqcATGNXB9`iGvJ-ggzu~o=#OM|@m{TXjJaes#I*sKVy3a(V&KG$N*M;QUUDf{C zyGyUUw4Y?<#qD47peeHbXuxDk#oB^sOAoQGm*)x6*ejS=NTCdyHC`u-G~4V7s(SUM zAQS+DsMtL+f9-+{H^*!2gC2?=v)7KI_>in!FUJTj$={(=!;@M|+v7BD*x_R7op|>I>Bb4F;3+OAp*veqdv!Q)&uIHbzRmZcfL$1ax3& zB)*X=jB)D2JiR)Dvry3wTLJ!B~SS9uou*?k~a-8u9~d zWU){*88szidN_UqapqM|v`eZ^Yc?`hzfc4$C5;mZWH;kK5s=o-D;tvjoDynWOE)eW z)(`s~ZnM$wsmGKie*WNhvusY7navKJ<;UPay@z95Z+#{&mD+94K1hwTIw1~ar5W;> z)X2+nf!}QCg2z*Yb90utVxIGsW;+N>Z<)hEf#Gcsu`7SC)6?AfJ#L zyyUPL`t^9|0|!WV)XQlQjN7Vd5z_PNIYj~V$CvKD3km2h^)3Es?ZYU=%#caf@fbsU z%a9k2K+Pp;s14^*MI39ca)&pJX)^uzz);eH9@jadp@4D&cDCrm7HkPU#exr*i?u#EsSp8C_F}y>FO5%n^@cws-beTC`Z! z+mBq{C8ukt^^fp}{<>Py^yf7Zh{%_G`G~3Do(s045geCWyh#*nfh`>$*u!-+5@4e0 z)|{`bF!vm{b&@s;TPAHg>OqSM49>0IQJ1>O%|jlf{mu~g$}tG+SpRJsjxpc(ynAm~aZnLJA znQp+w1v`1dHI$@#!@IL4(7D}1rne;_Mqnk_Z8vTf4$v~mASu=!YbR`fno`W(?;Wj) zt+9q|qN)hKkt)3)N~wV;w)S7QomwJqjzI1IW>?vD6G((HtZ=dA5KNwOxI`FW-9X>70IG|k0oQu1*cgZP>R%dg>@W*X| zUc2AECE3<`wt>B{0E0;RnDW?b<_H7xmItxRYN__fqKTu>D6 z1oWR+USLY5LlI>z^H z;V+4EULy|J?ECi?m#Wj@e{cPD73hI525rnyw9mVZIl+!#;`M1BD+OHj>D@=n$%GKZ zT>@z(D!gn)+v)*STZ*puja>;Vk=|~Mh3PfFmx0bIG;ke;tJz!iqGoM%wP-)$70VHp z>YEn_mDL0}+61kf3ZxqbNk)SLgMxy82T5d@*Hy%WH&D#z^~NLDo{^eXi~Cl~Icu4G zOXYGjnWLS&cnJ$|5gUwXrm&}W_ypx+-Q)x(Id4NdeBE?+ErWfH)ec$+ zd4{7l7w>W{M=`pl2QEM65heh;TwfRF5*HeA2b1m8dIN5^)n*!niNVAnV6D-#j(U+@soNmd)*F0^XatWn+{*wN zkiCA!3JC@7DyR9!1$I4OiVYXq@85;BQ;KW8aBIP`1BN#@Ni-gyWs~3gkG~7!GK43S zflGGb{iXxwXancO!f}CUoP3i*LoZ5NzuDpADY%K%f`cN?`KfS;s9(no?I`9kck^aa zZ{-Gns>e9brMPJ6E$P**{2p8iz$lG6S-{0<4jLVh;5m)F#SEw2%W25{A z)mpLg^jO^2hiaJ9T#_7%wY&z?YRnjD0P~tHBeou56II+iI-n(w(~{wnk~#T`K3LI{ zIfX55K^sajy6*8ATJfg>xyFMl8DgI;G<;4k^!XEhO9#jNI%qB6SxzqIj^WlnBY4I3 zII#d7I!?We9*XAUw33&&v}1NCF~;K3OhM>cSZPEXMCNv577PLl#*7vqW%~>}%*aRt z8Ed1&I?y}NMZ!(~3OK)mL;Zh*3_&eJVv2L}=8#yH?i0iT5s5wrqU6R$e)peDg+JYS zeDgdpjI0cmIttvqSGZ1_v+mJ%My-0|dQMu)jvZ_dt6ojOpno9?< za;{7;S{4Pl$+`RUyz}0}PvdXk@&N@LI!BI z0K|#4DTs%z0sF? zHugnpUaH(7^=j0RnVkKKTw_nE(VYM?BB4kLZsEk)6hE#OfKAG0TjQ}y=-h{S2n!0i zEeyEepWRFD%X2uVW>+v9C02fxid;y|mXL|k<;bZ3~vSt2Da6UU&4 zZ{Z#zSPNQU%-rDHxe}GHrj7d64Ti2IKk?V@a3&umh|dxbEFHmy78-9VdvZI1vnN&% zzSpj)>q%Jx6wU;x`5fa3B6ToXq2eS;@Tdy(_dzRP3Gz;MR=K8(_TSu448AJCrhFxv z0?#mxDK&*jXUEnYhj1IqsZOZ~;!u?i=jm(z%gpM#rNKnfOnJ)~IIhAWRVey$e=*zMKh19*-yk_PQwm;QhZyZ5sCHo6zBq1ey>(W$v^Mw|vKPCTR@$2o z={vzhP_xq?>8S#~b2w7*b@bO70U$A6Jd?f-c&mo<$I6R22kf8W#L+2dvg^joPLUv}nn^_h3$(N@?0&w}vOD>Om?T&R9m zKZ@~^VRkmN-*gH|E%;Pw`aJ1H{UG~_N2(Y7g?&PnHS>L6HLjU@e0=QOS9#W1Rn}GQO(GSHn5h6TfRZd&Q7`A@3D}kppWe7hcl4z-K3@GBAa^Z zvO`!LT@^4ARXfrLEokNBWg@Im+}7Upp^%kq9YV;*fh>+U`8Ay(aAmFDMo_+ej@An{ zlq_R?b|u-9{iy9=er>D{Eld5~gMkkNIY*y_IY85$Z~`uMqX&uvA}A;p*^%vcE;rG4 zS;J*yfSWS%@-uLoE@pGX?4&uCj)DUl-tH+uJ@;ie+$3$#7SfVe+I;8g>_h8~(-hvh z4I#PXII{|$G+PL7wD^<5=J9d_Fy*Bg#{p)JkX`br^WfdXS94zUn%SmUJ``~RjgOYczd>TJpS-q5nF2OmDVM45NNU$Fr0IT0&E3c4@1W)!y|I;b03cJ@Gtc|OnfIT zS@rm@@B_Rrn#Z?jSDx%^A-#B7cGmk-{RSjd>Yy9F-8}ib@odg`NZRRRpE$CcA6!X? z-c9J#4Om?eHiHGta;RVsZR$T2mspTW##J5r>eRM^!Y}A&zIJY#bh$7&Wma(OSOGr= zwN`*6DH5r|sNaaR^i;qj-sCX6>8sU$lV1EE-qvQL)z>&GlKP@bJE|)^p!C90dxeCa8ugv7mm#C{V=<4b`~ZUr(9rf$S?XyF5)uKkan!g z7$%y+R>zF~gVd?YnqZZ%O|`$S7@Xjum6gRYkO`IJA}1!M*##8iDtcA5Nk0!{|2$Z< zYyIpDs#_#spe|zwOHTB3*AHhPUip)C#5t+S+zF?-`jLZ1+|I_(-HlB@T>yeP1+*Jy zCnLmb!s3QIbLU3pnm^1*V^BJkvvUmi|L&QOabje1ux|^ROy`_0`qjq&)m~SUUWZRn z@vmR_b>mJ+=fhteP6GR6)VPzgW(=c`@O$_~8-(9`xaJPC40$y4om6*~VeY5x5`MWCEm0Rxp@uajjDN0-c}$oBp_GXM3% z{I_j0lA_r|{E5((n71RmRQbODlGM}L>Y0bre|;$4Bc30KL}D12Too9k*f;w@JwK~f z69q7qsK1CcLFtA)cCTP5Crf^HZpVu((D)^%OZl@62hE^}inY16MbxvyC z@^RAPp2R)-(Yc%-jt`Fd6ixb-$xV8t+Imxqa;K<|8pG?{^FB>2d?Jf)if_)Hc7A$p iZCkV;QK$okiISe diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/anchor.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/anchor.js index 04f41e0cac..2909a3a4d7 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/anchor.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/anchor.js @@ -6,7 +6,7 @@ var AnchorDialog = { this.editor = ed; elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - v = ed.dom.getAttrib(elm, 'name'); + v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id'); if (v) { this.action = 'update'; @@ -17,7 +17,7 @@ var AnchorDialog = { }, update : function() { - var ed = this.editor, elm, name = document.forms[0].anchorName.value; + var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName; if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); @@ -29,12 +29,25 @@ var AnchorDialog = { if (this.action != 'update') ed.selection.collapse(1); + var aRule = ed.schema.getElementRule('a'); + if (!aRule || aRule.attributes.name) { + attribName = 'name'; + } else { + attribName = 'id'; + } + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); if (elm) { - elm.setAttribute('name', name); - elm.name = name; - } else - ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + elm.setAttribute(attribName, name); + elm[attribName] = name; + ed.undoManager.add(); + } else { + // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it + var attrs = {'class' : 'mceItemAnchor'}; + attrs[attribName] = name; + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF')); + ed.nodeChanged(); + } tinyMCEPopup.close(); } diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/color_picker.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/color_picker.js index f51e703b0a..4ae53ab674 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/color_picker.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/color_picker.js @@ -77,7 +77,7 @@ function init() { if (col) updateLight(col.r, col.g, col.b); } - + for (key in named) { value = named[key]; namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); @@ -93,40 +93,56 @@ function toHexColor(color) { return value.length > 1 ? value : '0' + value; // Padd with leading zero }; - color = color.replace(/[\s#]+/g, '').toLowerCase(); + color = tinymce.trim(color); + color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#' color = namedLookup[color] || color; - matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color); + + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color); if (matches) { - if (matches[1]) { - red = toInt(matches[1]); - green = toInt(matches[2]); - blue = toInt(matches[3]); - } else if (matches[4]) { - red = toInt(matches[4], 16); - green = toInt(matches[5], 16); - blue = toInt(matches[6], 16); - } else if (matches[7]) { - red = toInt(matches[7] + matches[7], 16); - green = toInt(matches[8] + matches[8], 16); - blue = toInt(matches[9] + matches[9], 16); + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else { + matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color); + + if (matches) { + red = toInt(matches[1], 16); + green = toInt(matches[2], 16); + blue = toInt(matches[3], 16); + } else { + matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color); + + if (matches) { + red = toInt(matches[1] + matches[1], 16); + green = toInt(matches[2] + matches[2], 16); + blue = toInt(matches[3] + matches[3], 16); + } else { + return ''; + } } - - return '#' + hex(red) + hex(green) + hex(blue); } - return ''; + return '#' + hex(red) + hex(green) + hex(blue); } function insertAction() { var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); - tinyMCEPopup.restoreSelection(); + var hexColor = toHexColor(color); - if (f) - f(toHexColor(color)); + if (hexColor === '') { + var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value'); + tinyMCEPopup.alert(text + ': ' + color); + } + else { + tinyMCEPopup.restoreSelection(); + + if (f) + f(hexColor); - tinyMCEPopup.close(); + tinyMCEPopup.close(); + } } function showColor(color, name) { diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/image.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/image.js index 6c2489a168..bb09e75bf5 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/image.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/image.js @@ -104,10 +104,12 @@ var ImageDialog = { }, updateStyle : function() { - var dom = tinyMCEPopup.dom, st, v, f = document.forms[0]; + var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0]; if (tinyMCEPopup.editor.settings.inline_styles) { - st = tinyMCEPopup.dom.parseStyle(this.styleVal); + tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) { + st[key] = value; + }); // Handle align v = getSelectValue(f, 'align'); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/link.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/link.js index 53ff409e79..8c1d73c502 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/link.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/link.js @@ -68,10 +68,16 @@ var LinkDialog = { } else { ed.dom.setAttribs(e, { href : href, - title : f.linktitle.value, - target : f.target_list ? getSelectValue(f, "target_list") : null, - 'class' : f.class_list ? getSelectValue(f, "class_list") : null + title : f.linktitle.value }); + + if (f.target_list) { + ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list")); + } + + if (f.class_list) { + ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list")); + } } // Don't move caret if selection was image diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/source_editor.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/source_editor.js index 84546ad52e..dd5e366fa9 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/source_editor.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/js/source_editor.js @@ -16,7 +16,7 @@ function onLoadInit() { document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { - setWrap('soft'); + turnWrapOn(); document.getElementById('wraped').checked = true; } @@ -37,11 +37,33 @@ function setWrap(val) { } } -function toggleWordWrap(elm) { - if (elm.checked) - setWrap('soft'); - else +function setWhiteSpaceCss(value) { + var el = document.getElementById('htmlSource'); + tinymce.DOM.setStyle(el, 'white-space', value); +} + +function turnWrapOff() { + if (tinymce.isWebKit) { + setWhiteSpaceCss('pre'); + } else { setWrap('off'); + } +} + +function turnWrapOn() { + if (tinymce.isWebKit) { + setWhiteSpaceCss('pre-wrap'); + } else { + setWrap('soft'); + } +} + +function toggleWordWrap(elm) { + if (elm.checked) { + turnWrapOn(); + } else { + turnWrapOff(); + } } function resizeInputs() { diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/langs/en_dlg.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/langs/en_dlg.js index 42c9a13c85..50cd87e3d0 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/langs/en_dlg.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/langs/en_dlg.js @@ -1 +1 @@ -tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","":""}); +tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""}); diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/dialog.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/dialog.css index f01222650e..879786fc15 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/dialog.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/dialog.css @@ -105,11 +105,12 @@ h3 {font-size:14px;} #plugintable, #about #plugintable td {border:1px solid #919B9C;} #plugintable {width:96%; margin-top:10px;} #pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} +#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} +#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} #colorpicker #light div {overflow:hidden;} -#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} #colorpicker .panel_wrapper div.current {height:175px;} #colorpicker #namedcolors {width:150px;} #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/ui.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/ui.css index 2b7c2a59a9..77083f311d 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/ui.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/default/ui.css @@ -83,7 +83,7 @@ .defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} /* Menu */ -.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr} .defaultSkin .mceNoIcons span.mceIcon {width:0;} .defaultSkin .mceNoIcons a .mceText {padding-left:10px} .defaultSkin .mceMenu table {background:#FFF} @@ -109,6 +109,10 @@ .defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} .defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +/* Rtl */ +.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0} +.mceRtl .mceMenuItem .mceText {text-align: right} + /* Formats */ .defaultSkin .mce_formatPreview a {font-size:10px} .defaultSkin .mce_p span.mceText {} @@ -212,3 +216,4 @@ .defaultSkin span.mce_pagebreak {background-position:0 -40px} .defaultSkin span.mce_restoredraft {background-position:-20px -40px} .defaultSkin span.mce_spellchecker {background-position:-540px -20px} +.defaultSkin span.mce_visualblocks {background-position: -40px -40px} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/dialog.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/dialog.css index b2ed097cd0..6d9fc8dd65 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/dialog.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/dialog.css @@ -1,7 +1,7 @@ /* Generic */ body { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; -background:#F0F0EE; +background:#F0F0EE; color: black; padding:0; margin:8px 8px 0 8px; @@ -94,11 +94,12 @@ h3 {font-size:14px;} #plugintable, #about #plugintable td {border:1px solid #919B9C;} #plugintable {width:96%; margin-top:10px;} #pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} +#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} +#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} #colorpicker #light div {overflow:hidden;} -#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} #colorpicker .panel_wrapper div.current {height:175px;} #colorpicker #namedcolors {width:150px;} #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/ui.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/ui.css index a2cfcc393c..effbbe1583 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/ui.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/highcontrast/ui.css @@ -58,7 +58,7 @@ /* Menu */ .highcontrastSkin .mceNoIcons span.mceIcon {width:0;} -.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; } +.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; direction:ltr} .highcontrastSkin .mceMenu table {background:white; color: black} .highcontrastSkin .mceNoIcons a .mceText {padding-left:10px} .highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black} @@ -90,6 +90,10 @@ .highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} .highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +/* Rtl */ +.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0} +.mceRtl .mceMenuItem .mceText {text-align: right} + /* Formats */ .highcontrastSkin .mce_p span.mceText {} .highcontrastSkin .mce_address span.mceText {font-style:italic} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/dialog.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/dialog.css index ec08772248..a54db98df1 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/dialog.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/dialog.css @@ -105,11 +105,12 @@ h3 {font-size:14px;} #plugintable, #about #plugintable td {border:1px solid #919B9C;} #plugintable {width:96%; margin-top:10px;} #pluginscontainer {height:290px; overflow:auto;} -#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px} +#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline} +#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap} #colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} #colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} #colorpicker #light div {overflow:hidden;} -#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} #colorpicker .panel_wrapper div.current {height:175px;} #colorpicker #namedcolors {width:150px;} #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/ui.css b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/ui.css index 0916c34e83..a310223719 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/ui.css +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/skins/o2k7/ui.css @@ -86,7 +86,7 @@ .o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden} /* Menu */ -.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD} +.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD; direction:ltr} .o2k7Skin .mceNoIcons span.mceIcon {width:0;} .o2k7Skin .mceNoIcons a .mceText {padding-left:10px} .o2k7Skin .mceMenu table {background:#FFF} @@ -112,6 +112,10 @@ .o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} .o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +/* Rtl */ +.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0} +.mceRtl .mceMenuItem .mceText {text-align: right} + /* Formats */ .o2k7Skin .mce_formatPreview a {font-size:10px} .o2k7Skin .mce_p span.mceText {} @@ -215,3 +219,4 @@ .o2k7Skin span.mce_pagebreak {background-position:0 -40px} .o2k7Skin span.mce_restoredraft {background-position:-20px -40px} .o2k7Skin span.mce_spellchecker {background-position:-540px -20px} +.o2k7Skin span.mce_visualblocks {background-position: -40px -40px} diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/source_editor.htm b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/source_editor.htm index 3c6d65808a..dd973fcc05 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/source_editor.htm +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/themes/advanced/source_editor.htm @@ -4,7 +4,7 @@ - +
    diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce.js index e7139c08ad..13da7f8bdc 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce.js @@ -1 +1 @@ -(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.7",releaseDate:"2011-11-03",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){if(o.hasOwnProperty(i)){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40}})(tinymce);(function(k){var i=k.VK,j=i.BACKSPACE,h=i.DELETE;function c(m){var o=m.dom,n=m.selection;m.onKeyDown.add(function(q,u){var p,v,s,t,r;r=u.keyCode==h;if(r||u.keyCode==j){u.preventDefault();p=n.getRng();v=o.getParent(p.startContainer,o.isBlock);if(r){v=o.getNext(v,o.isBlock)}if(v){s=v.firstChild;while(s&&s.nodeType==3&&s.nodeValue.length==0){s=s.nextSibling}if(s&&s.nodeName==="SPAN"){t=s.cloneNode(false)}}q.getDoc().execCommand(r?"ForwardDelete":"Delete",false,null);v=o.getParent(p.startContainer,o.isBlock);k.each(o.select("span.Apple-style-span,font.Apple-style-span",v),function(x){var y=n.getBookmark();if(t){o.replace(t.cloneNode(false),x,true)}else{o.remove(x,true)}n.moveToBookmark(y)})}})}function d(m){m.onKeyUp.add(function(n,p){var o=p.keyCode;if(o==h||o==j){if(n.dom.isEmpty(n.getBody())){n.setContent("",{format:"raw"});n.nodeChanged();return}}})}function b(m){m.dom.bind(m.getDoc(),"focusin",function(){m.selection.setRng(m.selection.getRng())})}function e(m){m.onKeyDown.add(function(n,q){if(q.keyCode===j){if(n.selection.isCollapsed()&&n.selection.getRng(true).startOffset===0){var p=n.selection.getNode();var o=p.previousSibling;if(o&&o.nodeName&&o.nodeName.toLowerCase()==="hr"){n.dom.remove(o);k.dom.Event.cancel(q)}}}})}function g(m){if(!Range.prototype.getClientRects){m.onMouseDown.add(function(o,p){if(p.target.nodeName==="HTML"){var n=o.getBody();n.blur();setTimeout(function(){n.focus()},0)}})}}function f(m){m.onClick.add(function(n,o){o=o.target;if(/^(IMG|HR)$/.test(o.nodeName)){n.selection.getSel().setBaseAndExtent(o,0,o,1)}if(o.nodeName=="A"&&n.dom.hasClass(o,"mceItemAnchor")){n.selection.select(o)}n.nodeChanged()})}function l(m){var o,n;m.dom.bind(m.getDoc(),"selectionchange",function(){if(n){clearTimeout(n);n=0}n=window.setTimeout(function(){var p=m.selection.getRng();if(!o||!k.dom.RangeUtils.compareRanges(p,o)){m.nodeChanged();o=p}},50)})}function a(m){document.body.setAttribute("role","application")}k.create("tinymce.util.Quirks",{Quirks:function(m){if(k.isWebKit){c(m);d(m);b(m);f(m);if(k.isIDevice){l(m)}}if(k.isIE){e(m);d(m);a(m)}if(k.isGecko){e(m);g(m)}}})})(tinymce);(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup";l=d(l,",",d(l.toUpperCase()));h=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(r){var A=this,n={},o={},y=[],q,p;r=r||{};if(r.verify_html===false){r.valid_elements="*[*]"}if(r.valid_styles){q={};k(r.valid_styles,function(C,B){q[B]=m.explode(C)})}p=r.whitespace_elements?d(r.whitespace_elements):b;function z(B){return new RegExp("^"+B.replace(/([?+*])/g,".$1")+"$")}function t(I){var H,D,W,S,X,C,F,R,U,N,V,Z,L,G,T,B,P,E,Y,aa,M,Q,K=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,O=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,J=/[*?+]/;if(I){I=i(I);if(n["@"]){P=n["@"].attributes;E=n["@"].attributesOrder}for(H=0,D=I.length;H=0){for(T=z.length-1;T>=U;T--){S=z[T];if(S.valid){n.end(S.name)}}z.length=U}}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g");C=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;J={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};L=e.getShortEndedElements();I=e.getSelfClosingElements();G=e.getBoolAttrs();u=c.validate;r=c.remove_internals;x=c.fix_self_closing;p=a.isIE;o=/^:/;while(g=l.exec(D)){if(F0&&z[z.length-1].name===H){t(H)}if(!u||(m=e.getElementRule(H))){k=true;if(u){O=m.attributes;E=m.attributePatterns}if(Q=g[8]){y=Q.indexOf("data-mce-type")!==-1;if(y&&r){k=false}M=[];M.map={};Q.replace(C,function(T,S,X,W,V){var Y,U;S=S.toLowerCase();X=S in G?S:j(X||W||V||"");if(u&&!y&&S.indexOf("data-")!==0){Y=O[S];if(!Y&&E){U=E.length;while(U--){Y=E[U];if(Y.pattern.test(S)){break}}if(U===-1){Y=null}}if(!Y){return}if(Y.validValues&&!(X in Y.validValues)){return}}M.map[S]=X;M.push({name:S,value:X})})}else{M=[];M.map={}}if(u&&!y){R=m.attributesRequired;K=m.attributesDefault;f=m.attributesForced;if(f){P=f.length;while(P--){s=f[P];q=s.name;h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}if(K){P=K.length;while(P--){s=K[P];q=s.name;if(!(q in M.map)){h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}}if(R){P=R.length;while(P--){if(R[P] in M.map){break}}if(P===-1){k=false}}if(M.map["data-mce-bogus"]){k=false}}if(k){n.start(H,M,N)}}else{k=false}if(A=J[H]){A.lastIndex=F=g.index+g[0].length;if(g=A.exec(D)){if(k){B=D.substr(F,g.index-F)}F=g.index+g[0].length}else{B=D.substr(F);F=D.length}if(k&&B.length>0){n.text(B,true)}if(k){n.end(H)}l.lastIndex=F;continue}if(!N){if(!Q||Q.indexOf("/")!=Q.length-1){z.push({name:H,valid:k})}else{if(k){n.end(H)}}}}else{if(H=g[1]){n.comment(H)}else{if(H=g[2]){n.cdata(H)}else{if(H=g[3]){n.doctype(H)}else{if(H=g[4]){n.pi(H,g[5])}}}}}}F=g.index+g[0].length}if(F=0;P--){H=z[P];if(H.valid){n.end(H.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(o){var n=k.settings;if(j!==null){switch(m){case"style":if(!e(j,"string")){f(j,function(p,q){k.setStyle(o,q,p)});return}if(n.keep_values){if(j&&!k._isRes(j)){o.setAttribute("data-mce-style",j,2)}else{o.removeAttribute("data-mce-style",2)}}o.style.cssText=j;break;case"class":o.className=j||"";break;case"src":case"href":if(n.keep_values){if(n.url_converter){j=n.url_converter.call(n.url_converter_scope||k,j,m,o)}k.setAttrib(o,"data-mce-"+m,j,2)}break;case"shape":o.setAttribute("data-mce-style",j);break}}if(e(j)&&j!==null&&j.length!==0){o.setAttribute(m,""+j,2)}else{o.removeAttribute(m,2)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
    "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
    "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p;m=m.firstChild;if(m){j=new h.dom.TreeWalker(m);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){p=m.parentNode;if(l==="br"&&r.isBlock(p)&&p.firstChild===m&&p.lastChild===m){continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if((q===3&&!i.test(m.nodeValue))){return false}}while(m=j.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(v){var t,r=v.childNodes,u=v.nodeType;if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){k(r[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){if(!s.isBlock(v.parentNode)||h.trim(v.nodeValue).length>0){return}}else{if(u==1){r=v.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(r[0],v)}if(r.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}s.remove(v)}return v}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(d){var f=d.each,c=d.DOM,b=d.isIE,e=d.isWebKit,a;d.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(m,p,l,j){var g,h=this,i=h.events,k;if(p instanceof Array){k=[];f(p,function(o){k.push(h.add(m,o,l,j))});return k}if(m&&m.hasOwnProperty&&m instanceof Array){k=[];f(m,function(n){n=c.get(n);k.push(h.add(n,p,l,j))});return k}m=c.get(m);if(!m){return}g=function(n){if(h.disabled){return}n=n||window.event;if(n&&b){if(!n.target){n.target=n.srcElement}d.extend(n,h._stoppers)}if(!j){return l(n)}return l.call(j,n)};if(p=="unload"){d.unloads.unshift({func:g});return g}if(p=="init"){if(h.domLoaded){g()}else{h.inits.push(g)}return g}i.push({obj:m,name:p,func:l,cfunc:g,scope:j});h._add(m,p,g);return l},remove:function(l,m,k){var h=this,g=h.events,i=false,j;if(l&&l.hasOwnProperty&&l instanceof Array){j=[];f(l,function(n){n=c.get(n);j.push(h.remove(n,m,k))});return j}l=c.get(l);f(g,function(o,n){if(o.obj==l&&o.name==m&&(!k||(o.func==k||o.cfunc==k))){g.splice(n,1);h._remove(l,m,o.cfunc);i=true;return false}});return i},clear:function(l){var j=this,g=j.events,h,k;if(l){l=c.get(l);for(h=g.length-1;h>=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j"+(h.item?h.item(0).outerHTML:h.htmlText);l.removeChild(l.firstChild)}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(g,i){var n=this,f=n.getRng(),j,k=n.win.document,m,l;i=i||{format:"html"};i.set=true;g=i.content=g;if(!i.no_events){n.onBeforeSetContent.dispatch(n,i)}g=i.content;if(f.insertNode){g+='_';if(f.startContainer==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}if(/^\s+/.test(g)){f.pasteHTML('_'+g);n.dom.remove("__mce_tmp")}else{f.pasteHTML(g)}}if(!i.no_events){n.onSetContent.dispatch(n,i)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}if(v.tridentSel){return v.tridentSel.getBookmark(r)}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(r.tridentSel){return r.tridentSel.moveToBookmark(n)}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
    ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(o,g){var m=this,j=m.dom,l,k,h,i=[];l=j.getParent(o||m.getStart(),j.isBlock);k=j.getParent(g||m.getEnd(),j.isBlock);if(l){i.push(l)}if(l&&k&&l!=k){h=l;var f=new c.dom.TreeWalker(l,j.getRoot());while((h=f.next())&&h!=k){if(j.isBlock(h)){i.push(h)}}}if(k&&l!=k){i.push(k)}return i},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;if(k.hasChildNodes()){l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;break}if(l.nodeName==="BR"){o=m.nodeIndex(l);k=l.parentNode;break}}while(l=(p?n.next():n.prev()));i=true}}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}e.remove_trailing_brs=true;i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.select("#menu_"+g.id)[0];h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var h=this,i,j,g;if(f!=h.selectedIndex){i=c.get(h.id+"_text");g=c.get(h.id+"_voiceDesc");j=h.items[f];if(j){h.selectedValue=j.value;h.selectedIndex=f;c.setHTML(i,c.encode(j.title));c.setHTML(g,h.settings.title+" - "+j.title);c.removeClass(i,"mceTitle");c.setAttrib(h.id,"aria-valuenow",j.title)}else{c.setHTML(i,c.encode(h.settings.title));c.setHTML(g,c.encode(h.settings.title));c.addClass(i,"mceTitle");h.selectedValue=h.selectedIndex=null;c.setAttrib(h.id,"aria-valuenow",h.settings.title)}i=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='';i+="";i+="";i+="";return i},showMenu:function(){var g=this,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.role="option";h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(d.isWebKit&&(k.keyCode==37||k.keyCode==39)){return b.prevent(k)}if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(i){i=i.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");g=c.add(g,"a",{role:"option",href:"javascript:;",style:{backgroundColor:"#"+i},title:p.editor.getLang("colors."+i,i),"data-mce-color":"#"+i});if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+i;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);if(j.adapter){j.adapter.patchEditor(m)}return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:p.convertURL,url_converter_scope:p,ie7_compat:true},q);p.documentBaseURI=new m.util.URI(q.document_base_url||m.documentBaseURL,{base_uri:tinyMCE.baseURI});p.baseURI=m.baseURI;p.contentCSS=[];p.execCallback("setup",p)},render:function(r){var u=this,v=u.settings,x=u.id,p=m.ScriptLoader;if(!j.domLoaded){j.add(document,"init",function(){u.render()});return}tinyMCE.settings=v;if(!u.getElement()){return}if(m.isIDevice&&!m.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&v.hidden_input&&n.getParent(x,"form")){n.insertAfter(n.create("input",{type:"hidden",name:x}),x)}if(m.WindowManager){u.windowManager=new m.WindowManager(u)}if(v.encoding=="xml"){u.onGetContent.add(function(s,t){if(t.save){t.content=n.encode(t.content)}})}if(v.add_form_submit_trigger){u.onSubmit.addToTop(function(){if(u.initialized){u.save();u.isNotDirty=1}})}if(v.add_unload_trigger){u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(u.initialized&&!u.destroyed&&!u.isHidden()){u.save({format:"raw",no_events:true})}})}m.addUnload(u.destroy,u);if(v.submit_patch){u.onBeforeRenderUI.add(function(){var s=u.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){u.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){m.triggerSave();u.isNotDirty=1;return u.formElement._mceOldSubmit(u.formElement)}}s=null})}function q(){if(v.language&&v.language_load!==false){p.add(m.baseURL+"/langs/"+v.language+".js")}if(v.theme&&v.theme.charAt(0)!="-"&&!h.urls[v.theme]){h.load(v.theme,"themes/"+v.theme+"/editor_template"+m.suffix+".js")}i(g(v.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(z){var y={prefix:"plugins/",resource:z,suffix:"/editor_plugin"+m.suffix+".js"};var z=c.createUrl(y,z);c.load(z.resource,z)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+m.suffix+".js"})}}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,H=this,I=H.settings,E,A,D=H.getElement(),q,p,F,y,C,G,z,v=[];m.add(H);I.aria_label=I.aria_label||n.getAttrib(D,"aria-label",H.getLang("aria.rich_text_area"));if(I.theme){I.theme=I.theme.replace(/-/,"");q=h.get(I.theme);H.theme=new q();if(H.theme.init&&I.init_theme){H.theme.init(H,h.urls[I.theme]||m.documentBaseURL.replace(/\/$/,""))}}function B(J){var K=c.get(J),t=c.urls[J]||m.documentBaseURL.replace(/\/$/,""),s;if(K&&m.inArray(v,J)===-1){i(c.dependencies(J),function(u){B(u)});s=new K(H,t);H.plugins[J]=s;if(s.init){s.init(H,t);v.push(J)}}}i(g(I.plugins.replace(/\-/g,"")),B);if(I.popup_css!==false){if(I.popup_css){I.popup_css=H.documentBaseURI.toAbsolute(I.popup_css)}else{I.popup_css=H.baseURI.toAbsolute("themes/"+I.theme+"/skins/"+I.skin+"/dialog.css")}}if(I.popup_css_add){I.popup_css+=","+H.documentBaseURI.toAbsolute(I.popup_css_add)}H.controlManager=new m.ControlManager(H);if(I.custom_undo_redo){H.onBeforeExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.beforeChange()}});H.onExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.add()}})}H.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){H.nodeChanged()}});if(a){function x(s,t){if(!t||!t.initial){H.execCommand("mceRepaint")}}H.onUndo.add(x);H.onRedo.add(x);H.onSetContent.add(x)}H.onBeforeRenderUI.dispatch(H,H.controlManager);if(I.render_ui){E=I.width||D.style.width||D.offsetWidth;A=I.height||D.style.height||D.offsetHeight;H.orgDisplay=D.style.display;G=/^[0-9\.]+(|px)$/i;if(G.test(""+E)){E=Math.max(parseInt(E)+(q.deltaWidth||0),100)}if(G.test(""+A)){A=Math.max(parseInt(A)+(q.deltaHeight||0),100)}q=H.theme.renderUI({targetNode:D,width:E,height:A,deltaWidth:I.delta_width,deltaHeight:I.delta_height});H.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:E,height:A});if(I.content_css){m.each(g(I.content_css),function(s){H.contentCSS.push(H.documentBaseURI.toAbsolute(s))})}A=(q.iframeHeight||A)+(typeof(A)=="number"?(q.deltaHeight||0):"");if(A<100){A=100}H.iframeHTML=I.doctype+'';if(I.document_base_url!=m.documentBaseURL){H.iframeHTML+=''}if(I.ie7_compat){H.iframeHTML+=''}else{H.iframeHTML+=''}H.iframeHTML+='';for(z=0;z'}y=I.body_id||"tinymce";if(y.indexOf("=")!=-1){y=H.getParam("body_id","","hash");y=y[H.id]||y}C=I.body_class||"";if(C.indexOf("=")!=-1){C=H.getParam("body_class","","hash");C=C[H.id]||""}H.iframeHTML+='
    ';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){F='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+H.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:H.id+"_ifr",src:F||'javascript:""',frameBorder:"0",allowTransparency:"true",title:I.aria_label,style:{width:"100%",height:A,display:"block"}});H.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=H.orgDisplay;n.get(H.id).style.display="none";n.setAttrib(H.id,"aria-hidden",true);if(!m.relaxedDomain||!F){H.setupIframe()}D=r=q=null},setupIframe:function(){var q=this,v=q.settings,x=n.get(q.id),y=q.getDoc(),u,p;if(!b||!m.relaxedDomain){y.open();y.write(q.iframeHTML);y.close();if(m.relaxedDomain){y.domain=m.relaxedDomain}}p=q.getBody();p.disabled=true;if(!v.readonly){p.contentEditable=true}p.disabled=false;q.schema=new m.html.Schema(v);q.dom=new m.dom.DOMUtils(q.getDoc(),{keep_values:true,url_converter:q.convertURL,url_converter_scope:q,hex_colors:v.force_hex_style_colors,class_filter:v.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:q.schema});q.parser=new m.html.DomParser(v,q.schema);if(!q.settings.allow_html_in_named_anchor){q.parser.addAttributeFilter("name",function(s,t){var A=s.length,C,z,B,D;while(A--){D=s[A];if(D.name==="a"&&D.firstChild){B=D.parent;C=D.lastChild;do{z=C.prev;B.insert(C,D);C=z}while(C)}}})}q.parser.addAttributeFilter("src,href,style",function(s,t){var z=s.length,B,D=q.dom,C,A;while(z--){B=s[z];C=B.attr(t);A="data-mce-"+t;if(!B.attributes.map[A]){if(t==="style"){B.attr(A,D.serializeStyle(D.parseStyle(C),B.name))}else{B.attr(A,q.convertURL(C,t,B.name))}}}});q.parser.addNodeFilter("script",function(s,t){var z=s.length,A;while(z--){A=s[z];A.attr("type","mce-"+(A.attr("type")||"text/javascript"))}});q.parser.addNodeFilter("#cdata",function(s,t){var z=s.length,A;while(z--){A=s[z];A.type=8;A.name="#comment";A.value="[CDATA["+A.value+"]]"}});q.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,z){var A=t.length,B,s=q.schema.getNonEmptyElements();while(A--){B=t[A];if(B.isEmpty(s)){B.empty().append(new m.html.Node("br",1)).shortEnded=true}}});q.serializer=new m.dom.Serializer(v,q.dom,q.schema);q.selection=new m.dom.Selection(q.dom,q.getWin(),q.serializer);q.formatter=new m.Formatter(this);q.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(s){return true},onformat:function(z,s,t){i(t,function(B,A){q.dom.setAttrib(z,A,B)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){q.formatter.register(s,{block:s,remove:"all"})});q.formatter.register(q.settings.formats);q.undoManager=new m.UndoManager(q);q.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return q.onChange.dispatch(q,s,t)}});q.undoManager.onUndo.add(function(t,s){return q.onUndo.dispatch(q,s,t)});q.undoManager.onRedo.add(function(t,s){return q.onRedo.dispatch(q,s,t)});q.forceBlocks=new m.ForceBlocks(q,{forced_root_block:v.forced_root_block});q.editorCommands=new m.EditorCommands(q);q.serializer.onPreProcess.add(function(s,t){return q.onPreProcess.dispatch(q,t,s)});q.serializer.onPostProcess.add(function(s,t){return q.onPostProcess.dispatch(q,t,s)});q.onPreInit.dispatch(q);if(!v.gecko_spellcheck){q.getBody().spellcheck=0}if(!v.readonly){q._addEvents()}q.controlManager.onPostRender.dispatch(q,q.controlManager);q.onPostRender.dispatch(q);q.quirks=new m.util.Quirks(this);if(v.directionality){q.getBody().dir=v.directionality}if(v.nowrap){q.getBody().style.whiteSpace="nowrap"}if(v.handle_node_change_callback){q.onNodeChange.add(function(t,s,z){q.execCallback("handle_node_change_callback",q.id,z,-1,-1,true,q.selection.isCollapsed())})}if(v.save_callback){q.onSaveContent.add(function(s,z){var t=q.execCallback("save_callback",q.id,z.content,q.getBody());if(t){z.content=t}})}if(v.onchange_callback){q.onChange.add(function(t,s){q.execCallback("onchange_callback",q,s)})}if(v.protect){q.onBeforeSetContent.add(function(s,t){if(v.protect){i(v.protect,function(z){t.content=t.content.replace(z,function(A){return""})})}})}if(v.convert_newlines_to_brs){q.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
    ")}})}if(v.preformatted){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
    '+t.content+"
    "}})}if(v.verify_css_classes){q.serializer.attribValueFilter=function(B,z){var A,t;if(B=="class"){if(!q.classesRE){t=q.dom.getClasses();if(t.length>0){A="";i(t,function(s){A+=(A?"|":"")+s["class"]});q.classesRE=new RegExp("("+A+")","gi")}}return !q.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(z)||q.classesRE.test(z)?z:""}return z}}if(v.cleanup_callback){q.onBeforeSetContent.add(function(s,t){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)});q.onPreProcess.add(function(s,t){if(t.set){q.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){q.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});q.onPostProcess.add(function(s,t){if(t.set){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=q.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(v.save_callback){q.onGetContent.add(function(s,t){if(t.save){t.content=q.execCallback("save_callback",q.id,t.content,q.getBody())}})}if(v.handle_event_callback){q.onEvent.add(function(s,t,z){if(q.execCallback("handle_event_callback",t,s,z)===false){j.cancel(t)}})}q.onSetContent.add(function(){q.addVisual(q.getBody())});if(v.padd_empty_editor){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}if(a){function r(s,t){i(s.dom.select("a"),function(A){var z=A.parentNode;if(s.dom.isBlock(z)&&z.lastChild===A){s.dom.add(z,"br",{"data-mce-bogus":1})}})}q.onExecCommand.add(function(s,t){if(t==="CreateLink"){r(s)}});q.onSetContent.add(q.selection.onSetContent.add(r))}q.load({initial:true,format:"html"});q.startContent=q.getContent({format:"raw"});q.undoManager.add();q.initialized=true;q.onInit.dispatch(q);q.execCallback("setupcontent_callback",q.id,q.getBody(),q.getDoc());q.execCallback("init_instance_callback",q);q.focus(true);q.nodeChanged({initial:1});i(q.contentCSS,function(s){q.dom.loadCSS(s)});if(v.auto_focus){setTimeout(function(){var s=m.get(v.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}x=null},focus:function(u){var y,q=this,s=q.selection,x=q.settings.content_editable,r,p,v=q.getDoc();if(!u){r=s.getRng();if(r.item){p=r.item(0)}q._refreshContentEditable();s.normalize();if(!x){q.getWin().focus()}if(m.isGecko){q.getBody().focus()}if(p&&p.ownerDocument==v){r=v.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((y=m.activeEditor)!=null){y.onDeactivate.dispatch(y,q)}q.onActivate.dispatch(q,y)}m._setActive(q)},execCallback:function(u){var p=this,r=p.settings[u],q;if(!r){return}if(p.callbackLookup&&(q=p.callbackLookup[u])){r=q.func;q=q.scope}if(d(r,"string")){q=r.replace(/\.\w+$/,"");q=q?m.resolve(q):0;r=m.resolve(r);p.callbackLookup=p.callbackLookup||{};p.callbackLookup[u]={func:r,scope:q}}return r.apply(q||p,Array.prototype.slice.call(arguments,1))},translate:function(p){var r=this.settings.language||"en",q=m.i18n;if(!p){return""}return q[r+"."+p]||p.replace(/{\#([^}]+)\}/g,function(t,s){return q[r+"."+s]||"{#"+s+"}"})},getLang:function(q,p){return m.i18n[(this.settings.language||"en")+"."+q]||(d(p)?p:"{#"+q+"}")},getParam:function(u,r,p){var s=m.trim,q=d(this.settings[u])?this.settings[u]:r,t;if(p==="hash"){t={};if(d(q,"string")){i(q.indexOf("=")>0?q.split(/[;,](?![^=;,]*(?:[;,]|$))/):q.split(","),function(x){x=x.split("=");if(x.length>1){t[s(x[0])]=s(x[1])}else{t[s(x[0])]=s(x)}})}else{t=q}return t}return q},nodeChanged:function(r){var p=this,q=p.selection,u=q.getStart()||p.getBody();if(p.initialized){r=r||{};u=b&&u.ownerDocument!=p.getDoc()?p.getBody():u;r.parents=[];p.dom.getParent(u,function(s){if(s.nodeName=="BODY"){return true}r.parents.push(s)});p.onNodeChange.dispatch(p,r?r.controlManager||p.controlManager:p.controlManager,u,q.isCollapsed(),r)}},addButton:function(r,q){var p=this;p.buttons=p.buttons||{};p.buttons[r]=q},addCommand:function(p,r,q){this.execCommands[p]={func:r,scope:q||this}},addQueryStateHandler:function(p,r,q){this.queryStateCommands[p]={func:r,scope:q||this}},addQueryValueHandler:function(p,r,q){this.queryValueCommands[p]={func:r,scope:q||this}},addShortcut:function(r,u,p,s){var q=this,v;if(!q.settings.custom_shortcuts){return false}q.shortcuts=q.shortcuts||{};if(d(p,"string")){v=p;p=function(){q.execCommand(v,false,null)}}if(d(p,"object")){v=p;p=function(){q.execCommand(v[0],v[1],v[2])}}i(g(r),function(t){var x={func:p,scope:s||this,desc:u,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});q.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,v,z,p){var r=this,u=0,y,q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!p||!p.skip_focus)){r.focus()}y={};r.onBeforeExecCommand.dispatch(r,x,v,z,y);if(y.terminate){return false}if(r.execCallback("execcommand_callback",r.id,r.selection.getNode(),x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(y=r.execCommands[x]){q=y.func.call(y.scope,v,z);if(q!==true){r.onExecCommand.dispatch(r,x,v,z,p);return q}}i(r.plugins,function(s){if(s.execCommand&&s.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);u=1;return false}});if(u){return true}if(r.theme&&r.theme.execCommand&&r.theme.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(r.editorCommands.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}r.getDoc().execCommand(x,v,z);r.onExecCommand.dispatch(r,x,v,z,p)},queryCommandState:function(u){var q=this,v,r;if(q._isHidden()){return}if(v=q.queryStateCommands[u]){r=v.func.call(v.scope);if(r!==true){return r}}v=q.editorCommands.queryCommandState(u);if(v!==-1){return v}try{return this.getDoc().queryCommandState(u)}catch(p){}},queryCommandValue:function(v){var q=this,u,r;if(q._isHidden()){return}if(u=q.queryValueCommands[v]){r=u.func.call(u.scope);if(r!==true){return r}}u=q.editorCommands.queryCommandValue(v);if(d(u)){return u}try{return this.getDoc().queryCommandValue(v)}catch(p){}},show:function(){var p=this;n.show(p.getContainer());n.hide(p.id);p.load()},hide:function(){var p=this,q=p.getDoc();if(b&&q){q.execCommand("SelectAll")}p.save();n.hide(p.getContainer());n.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return !n.isHidden(this.id)},setProgressState:function(p,q,r){this.onSetProgressState.dispatch(this,p,q,r);return p},load:function(s){var p=this,r=p.getElement(),q;if(r){s=s||{};s.load=true;q=p.setContent(d(r.value)?r.value:r.innerHTML,s);s.element=r;if(!s.no_events){p.onLoadContent.dispatch(p,s)}s.element=r=null;return q}},save:function(u){var p=this,s=p.getElement(),q,r;if(!s||!p.initialized){return}u=u||{};u.save=true;if(!u.no_events){p.undoManager.typing=false;p.undoManager.add()}u.element=s;q=u.content=p.getContent(u);if(!u.no_events){p.onSaveContent.dispatch(p,u)}q=u.content;if(!/TEXTAREA|INPUT/i.test(s.nodeName)){s.innerHTML=q;if(r=n.getParent(p.id,"form")){i(r.elements,function(t){if(t.name==p.id){t.value=q;return false}})}}else{s.value=q}u.element=s=null;return q},setContent:function(u,s){var r=this,q,p=r.getBody(),t;s=s||{};s.format=s.format||"html";s.set=true;s.content=u;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}u=s.content;if(!m.isIE&&(u.length===0||/^\s+$/.test(u))){t=r.settings.forced_root_block;if(t){u="<"+t+'>
    "}else{u='
    '}p.innerHTML=u;r.selection.select(p,true);r.selection.collapse(true);return}if(s.format!=="raw"){u=new m.html.Serializer({},r.schema).serialize(r.parser.parse(u))}s.content=m.trim(u);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}r.selection.normalize();return s.content},getContent:function(q){var p=this,r;q=q||{};q.format=q.format||"html";q.get=true;if(!q.no_events){p.onBeforeGetContent.dispatch(p,q)}if(q.format=="raw"){r=p.getBody().innerHTML}else{r=p.serializer.serialize(p.getBody(),q)}q.content=m.trim(r);if(!q.no_events){p.onGetContent.dispatch(p,q)}return q.content},isDirty:function(){var p=this;return m.trim(p.startContent)!=m.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container){p.container=n.get(p.editorContainer||p.id+"_parent")}return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return n.get(this.settings.content_element||this.id)},getWin:function(){var p=this,q;if(!p.contentWindow){q=n.get(p.id+"_ifr");if(q){p.contentWindow=q.contentWindow}}return p.contentWindow},getDoc:function(){var q=this,p;if(!q.contentDocument){p=q.getWin();if(p){q.contentDocument=p.document}}return q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,x,v){var q=this,r=q.settings;if(r.urlconverter_callback){return q.execCallback("urlconverter_callback",p,v,true,x)}if(!r.convert_urls||(v&&v.nodeName=="LINK")||p.indexOf("file:")===0){return p}if(r.relative_urls){return q.documentBaseURI.toRelative(p)}p=q.documentBaseURI.toAbsolute(p,r.remove_script_host);return p},addVisual:function(r){var p=this,q=p.settings;r=r||p.getBody();if(!d(p.hasVisual)){p.hasVisual=q.visual}i(p.dom.select("table,a",r),function(t){var s;switch(t.nodeName){case"TABLE":s=p.dom.getAttrib(t,"border");if(!s||s=="0"){if(p.hasVisual){p.dom.addClass(t,q.visual_table_class)}else{p.dom.removeClass(t,q.visual_table_class)}}return;case"A":s=p.dom.getAttrib(t,"name");if(s){if(p.hasVisual){p.dom.addClass(t,"mceItemAnchor")}else{p.dom.removeClass(t,"mceItemAnchor")}}return}});p.onVisualAid.dispatch(p,r,p.hasVisual)},remove:function(){var p=this,q=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];m.remove(p);n.remove(q)},destroy:function(q){var p=this;if(p.destroyed){return}if(!q){m.removeUnload(p.destroy);tinyMCE.onBeforeUnload.remove(p._beforeUnload);if(p.theme&&p.theme.destroy){p.theme.destroy()}p.controlManager.destroy();p.selection.destroy();p.dom.destroy();if(!p.settings.content_editable){j.clear(p.getWin());j.clear(p.getDoc())}j.clear(p.getBody());j.clear(p.formElement)}if(p.formElement){p.formElement.submit=p.formElement._mceOldSubmit;p.formElement._mceOldSubmit=null}p.contentAreaContainer=p.formElement=p.container=p.settings.content_element=p.bodyElement=p.contentDocument=p.contentWindow=null;if(p.selection){p.selection=p.selection.win=p.selection.dom=p.selection.dom.doc=null}p.destroyed=1},_addEvents:function(){var B=this,r,C=B.settings,q=B.dom,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function p(t,D){var s=t.type;if(B.removed){return}if(B.onEvent.dispatch(B,t,D)!==false){B[x[t.fakeType||t.type]].dispatch(B,t,D)}}i(x,function(t,s){switch(s){case"contextmenu":q.bind(B.getDoc(),s,p);break;case"paste":q.bind(B.getBody(),s,function(D){p(D)});break;case"submit":case"reset":q.bind(B.getElement().form||n.getParent(B.id,"form"),s,p);break;default:q.bind(C.content_editable?B.getBody():B.getDoc(),s,p)}});q.bind(C.content_editable?B.getBody():(a?B.getDoc():B.getWin()),"focus",function(s){B.focus(true)});if(m.isGecko){q.bind(B.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=B.documentBaseURI.toAbsolute(s)}})}if(a){function u(){var E=this,G=E.getDoc(),F=E.settings;if(a&&!F.readonly){E._refreshContentEditable();try{G.execCommand("styleWithCSS",0,false)}catch(D){if(!E._isHidden()){try{G.execCommand("useCSS",0,true)}catch(D){}}}if(!F.table_inline_editing){try{G.execCommand("enableInlineTableEditing",false,false)}catch(D){}}if(!F.object_resizing){try{G.execCommand("enableObjectResizing",false,false)}catch(D){}}}}B.onBeforeExecCommand.add(u);B.onMouseDown.add(u)}B.onMouseUp.add(B.nodeChanged);B.onKeyUp.add(function(s,t){var D=t.keyCode;if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45||D==46||D==8||(m.isMac&&(D==91||D==93))||t.ctrlKey){B.nodeChanged()}});B.onKeyDown.add(function(t,D){if(D.keyCode!=8){return}var F=t.selection.getRng().startContainer;var E=t.selection.getRng().startOffset;while(F&&F.nodeType&&F.nodeType!=1&&F.parentNode){F=F.parentNode}if(F&&F.parentNode&&F.parentNode.tagName==="BLOCKQUOTE"&&F.parentNode.firstChild==F&&E==0){t.formatter.toggle("blockquote",null,F.parentNode);var s=t.selection.getRng();s.setStart(F,0);s.setEnd(F,0);t.selection.setRng(s);t.selection.collapse(false)}});B.onReset.add(function(){B.setContent(B.startContent,{format:"raw"})});if(C.custom_shortcuts){if(C.custom_undo_redo_keyboard_shortcuts){B.addShortcut("ctrl+z",B.getLang("undo_desc"),"Undo");B.addShortcut("ctrl+y",B.getLang("redo_desc"),"Redo")}B.addShortcut("ctrl+b",B.getLang("bold_desc"),"Bold");B.addShortcut("ctrl+i",B.getLang("italic_desc"),"Italic");B.addShortcut("ctrl+u",B.getLang("underline_desc"),"Underline");for(r=1;r<=6;r++){B.addShortcut("ctrl+"+r,"",["FormatBlock",false,"h"+r])}B.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);B.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);B.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);function v(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(B.shortcuts,function(D){if(m.isMac&&D.ctrl!=t.metaKey){return}else{if(!m.isMac&&D.ctrl!=t.ctrlKey){return}}if(D.alt!=t.altKey){return}if(D.shift!=t.shiftKey){return}if(t.keyCode==D.keyCode||(t.charCode&&t.charCode==D.charCode)){s=D;return false}});return s}B.onKeyUp.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyPress.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyDown.add(function(s,t){var D=v(t);if(D){D.func.call(D.scope);return j.cancel(t)}})}if(m.isIE){q.bind(B.getDoc(),"controlselect",function(D){var t=B.resizeInfo,s;D=D.target;if(D.nodeName!=="IMG"){return}if(t){q.unbind(t.node,t.ev,t.cb)}if(!q.hasClass(D,"mceItemNoResize")){ev="resizeend";s=q.bind(D,ev,function(F){var E;F=F.target;if(E=q.getStyle(F,"width")){q.setAttrib(F,"width",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"width","")}if(E=q.getStyle(F,"height")){q.setAttrib(F,"height",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"height","")}})}else{ev="resizestart";s=q.bind(D,"resizestart",j.cancel,j)}t=B.resizeInfo={node:D,ev:ev,cb:s}})}if(m.isOpera){B.onClick.add(function(s,t){j.prevent(t)})}if(C.custom_undo_redo){function y(){B.undoManager.typing=false;B.undoManager.add()}q.bind(B.getDoc(),"focusout",function(s){if(!B.removed&&B.undoManager.typing){y()}});B.dom.bind(B.dom.getRoot(),"dragend",function(s){y()});B.onKeyUp.add(function(s,D){var t=D.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||D.ctrlKey){y()}});B.onKeyDown.add(function(s,E){var D=E.keyCode,t;if(D==8){t=B.getDoc().selection;if(t&&t.createRange&&t.createRange().item){B.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));y();return j.cancel(E)}}if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45){if(m.isIE&&D==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((D<16||D>20)&&D!=224&&D!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();if(t!==B.getBody()){B.dom.setAttrib(t,"style",null);i(s,function(D){t.setAttributeNode(D.cloneNode(true))})}}}function z(){var t=B.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}B.onKeyPress.add(function(s,D){var t;if((D.keyCode==8||D.keyCode==46)&&z()){t=A();B.getDoc().execCommand("delete",false,null);t();return j.cancel(D)}});B.dom.bind(B.getDoc(),"cut",function(t){var s;if(z()){s=A();B.onKeyUp.addToTop(j.cancel,j);setTimeout(function(){s();B.onKeyUp.remove(j.cancel,j)},0)}})}},_refreshContentEditable:function(){var q=this,p,r;if(q._isHidden()){p=q.getBody();r=p.parentNode;r.removeChild(p);r.appendChild(p);p.focus()}},_isHidden:function(){var p;if(!a){return 0}p=this.selection.getSel();return(!p||!p.rangeCount||p.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return b}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return b}function u(v,x){x=x||"exec";d(v,function(z,y){d(y.toLowerCase().split(","),function(A){j[x][A]=z})})}c.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===e){x=b}if(v===e){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:e)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);d("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=c.explode(k.font_size_style_values);v=c.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return b}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new c.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){return t("align"+v.substring(7))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");if(k.custom_undo_redo){u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
    ',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
    ");T=v.dom.add(O,V.element,null,"
    ")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
    ")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}if(!R.body.hasChildNodes()){R.body.appendChild(M.create("br"))}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
    ";return r[0]}else{y.innerHTML=b?"\u00a0":"
    "}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ab==at){return ab}}}var al=U.selection.getRng();var ap=al.startContainer;var ak=al.endContainer;if(ap!=ak&&al.endOffset==0){var ao=am(ap,ak);var an=ao.nodeType==3?ao.length:ao.childNodes.length;al.setEnd(ao,an)}return al}function X(an,at,aq,ap,al){var ak=[],am=-1,ar,av=-1,ao=-1,au;O(an.childNodes,function(ax,aw){if(ax.nodeName==="UL"||ax.nodeName==="OL"){am=aw;ar=ax;return false}});O(an.childNodes,function(ax,aw){if(ax.nodeName==="SPAN"&&c.getAttrib(ax,"data-mce-type")=="bookmark"){if(ax.id==at.id+"_start"){av=aw}else{if(ax.id==at.id+"_end"){ao=aw}}}});if(am<=0||(avam)){O(a.grep(an.childNodes),al);return 0}else{au=aq.cloneNode(R);O(a.grep(an.childNodes),function(ax,aw){if((avam&&aw>am)){ak.push(ax);ax.parentNode.removeChild(ax)}});if(avam){an.insertBefore(au,ar.nextSibling)}}ap.push(au);O(ak,function(aw){au.appendChild(aw)});return au}}function ai(al,an,ap){var ak=[],ao,am;ao=ah.inline||ah.block;am=c.create(ao);V(am);K.walk(al,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ah.block){c.remove(au)}return}if(ah.wrapper&&x(au,Y,ag)){ar=0;return}if(ah.block&&!ah.wrapper&&G(ax)){au=c.rename(au,ao);V(au);ak.push(au);ar=0;return}if(ah.selector){O(ac,function(ay){if("collapsed" in ay&&ay.collapsed!==ad){return}if(c.is(au,ay.selector)&&!b(au)){V(au,ay);av=true}});if(!ah.inline||av){ar=0;return}}if(d(ao,ax)&&d(aw,ao)&&!(!ap&&au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)&&au.id!=="_mce_caret"){if(!ar){ar=am.cloneNode(R);au.parentNode.insertBefore(ar,au);ak.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&an){ar=X(au,an,am,ak,at)}else{ar=0;O(a.grep(au.childNodes),at);ar=0}}}O(aq,at)});if(ah.wrap_links===false){O(ak,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=am.cloneNode(R);ak.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ah.inline||ah.wrapper){if(!ah.exact&&aq===1){at=ar(at)}O(ac,function(av){O(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}T(av,ag,ax,av.exact?ax:null)})});if(x(at.parentNode,Y,ag)){c.remove(at,1);at=0;return B}if(ah.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Y,ag)){c.remove(at,1);at=0;return B}})}if(at&&ah.merge_siblings!==false){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ah){if(ab){if(ab.nodeType){W=c.createRng();W.setStartBefore(ab);W.setEndAfter(ab);ai(o(W,ac),null,true)}else{ai(ab,null,true)}}else{if(!ad||!ah.inline||c.select("td.mceSelected,th.mceSelected").length){var aj=U.selection.getNode();U.selection.setRng(aa());af=q.getBookmark();ai(o(q.getRng(B),ac),af);if(ah.styles&&(ah.styles.color||ah.styles.textDecoration)){a.walk(aj,I,"childNodes");I(aj)}q.moveToBookmark(af);q.setRng(Z(q.getRng(B)));U.nodeChanged()}else{P("apply",Y,ag)}}}}function A(X,ag,aa){var ab=Q(X),ai=ab[0],af,ae,W;function Z(al){var ak=al.startContainer,aq=al.startOffset,ap,ao,am,an;if(ak.nodeType==3&&aq>=ak.nodeValue.length-1){ak=ak.parentNode;aq=s(ak)+1}if(ak.nodeType==1){am=ak.childNodes;ak=am[Math.min(aq,am.length-1)];ap=new t(ak);if(aq>am.length-1){ap.next()}for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType==3&&!f(ao)){an=c.create("a",null,E);ao.parentNode.insertBefore(an,ao);al.setStart(ao,0);q.setRng(al);c.remove(an);return}}}}function Y(an){var am,al,ak;am=a.grep(an.childNodes);for(al=0,ak=ab.length;al=0;W--){V=ab[W].selector;if(!V){return B}for(aa=X.length-1;aa>=0;aa--){if(c.is(X[aa],V)){return B}}}}return R}a.extend(this,{get:Q,register:k,apply:S,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(V,W){if(g(V,W.inline)){return B}if(g(V,W.block)){return B}if(W.selector){return c.is(V,W.selector)}}function g(W,V){W=W||"";V=V||"";W=""+(W.nodeName||W);V=""+(V.nodeName||V);return W.toLowerCase()==V.toLowerCase()}function L(W,V){var X=c.getStyle(W,V);if(V=="color"||V=="backgroundColor"){X=c.toHex(X)}if(V=="fontWeight"&&X==700){X="bold"}return""+X}function r(V,W){if(typeof(V)!="string"){V=V(W)}else{if(W){V=V.replace(/%(\w+)/g,function(Y,X){return W[X]||Y})}}return V}function f(V){return V&&V.nodeType===3&&/^([\t \r\n]+|)$/.test(V.nodeValue)}function N(X,W,V){var Y=c.create(W,V);X.parentNode.insertBefore(Y,X);Y.appendChild(X);return Y}function o(V,ah,Y){var X=V.startContainer,ac=V.startOffset,ak=V.endContainer,ae=V.endOffset,aj,ag,ab,af;function ai(aq){var al,ao,ap,an,am;al=ao=aq?X:ak;am=aq?"previousSibling":"nextSibling";root=c.getRoot();if(al.nodeType==3&&!f(al)){if(aq?ac>0:aeag?ag:ac];if(X.nodeType==3){ac=0}}if(ak.nodeType==1&&ak.hasChildNodes()){ag=ak.childNodes.length-1;ak=ak.childNodes[ae>ag?ag:ae-1];if(ak.nodeType==3){ae=ak.nodeValue.length}}if(H(X.parentNode)||H(X)){X=H(X)?X:X.parentNode;X=X.nextSibling||X;if(X.nodeType==3){ac=0}}if(H(ak.parentNode)||H(ak)){ak=H(ak)?ak:ak.parentNode;ak=ak.previousSibling||ak;if(ak.nodeType==3){ae=ak.length}}if(ah[0].inline){if(V.collapsed){function ad(am,aq,at){var ap,an,ar,al;function ao(av,ax){var ay,au,aw=av.nodeValue;if(typeof(ax)=="undefined"){ax=at?aw.length:0}if(at){ay=aw.lastIndexOf(" ",ax);au=aw.lastIndexOf("\u00a0",ax);ay=ay>au?ay:au;if(ay!==-1&&!Y){ay++}}else{ay=aw.indexOf(" ",ax);au=aw.indexOf("\u00a0",ax);ay=ay!==-1&&(au===-1||ay0&&ab.node.nodeType===3&&ab.node.nodeValue.charAt(ab.offset-1)===" "){if(ab.offset>1){ak=ab.node;ak.splitText(ab.offset-1)}else{if(ab.node.previousSibling){}}}}}if(ah[0].inline||ah[0].block_expand){if(!ah[0].inline||(X.nodeType!=3||ac===0)){X=ai(true)}if(!ah[0].inline||(ak.nodeType!=3||ae===ak.nodeValue.length)){ak=ai()}}if(ah[0].selector&&ah[0].expand!==R&&!ah[0].inline){function Z(am,al){var an,ao,aq,ap;if(am.nodeType==3&&am.nodeValue.length==0&&am[al]){am=am[al]}an=m(am);for(ao=0;aoX?X:Z]}if(V.nodeType===3&&aa&&Z>=V.nodeValue.length){V=new t(V,U.getBody()).next()||V}if(V.nodeType===3&&!aa&&Z==0){V=new t(V,U.getBody()).prev()||V}return V}function P(ae,V,ac){var ah,af="_mce_caret",W=U.settings.caret_debug;ah=a.isGecko?"\u200B":E;function X(aj){var ai=c.create("span",{id:af,"data-mce-bogus":true,style:W?"color:red":""});if(aj){ai.appendChild(U.getDoc().createTextNode(ah))}return ai}function ad(aj,ai){while(aj){if((aj.nodeType===3&&aj.nodeValue!==ah)||aj.childNodes.length>1){return false}if(ai&&aj.nodeType===1){ai.push(aj)}aj=aj.firstChild}return true}function aa(ai){while(ai){if(ai.id===af){return ai}ai=ai.parentNode}}function Z(ai){var aj;if(ai){aj=new t(ai,ai);for(ai=aj.current();ai;ai=aj.next()){if(ai.nodeType===3){return ai}}}}function Y(ak,aj){var al,ai;if(!ak){ak=aa(q.getStart());if(!ak){while(ak=c.get(af)){Y(ak,false)}}}else{ai=q.getRng(true);if(ad(ak)){if(aj!==false){ai.setStartBefore(ak);ai.setEndBefore(ak)}c.remove(ak)}else{al=Z(ak);al=al.deleteData(0,1);c.remove(ak,1)}q.setRng(ai)}}function ab(){var ak,ai,ao,an,al,aj,am;ak=q.getRng(true);an=ak.startOffset;aj=ak.startContainer;am=aj.nodeValue;ai=aa(q.getStart());if(ai){ao=Z(ai)}if(am&&an>0&&an=0;am--){ak.appendChild(aq[am].cloneNode(false));ak=ak.firstChild}ak.appendChild(c.doc.createTextNode(ah));ak=ak.firstChild;c.insertAfter(ap,ar);q.setCursorLocation(ak,1)}}U.onBeforeGetContent.addToTop(function(){var ai=[],aj;if(ad(aa(q.getStart()),ai)){aj=ai.length;while(aj--){c.setAttrib(ai[aj],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ai){U[ai].addToTop(function(){Y()})});U.onKeyDown.addToTop(function(ai,ak){var aj=ak.keyCode;if(aj==8||aj==37||aj==39){Y(aa(q.getStart()))}});if(ae=="apply"){ab()}else{ag()}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_legacy_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); \ No newline at end of file +(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.4.1",releaseDate:"2012-06-24",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey}}})(tinymce);tinymce.util.Quirks=function(d){var m=tinymce.VK,t=m.BACKSPACE,u=m.DELETE,p=d.dom,E=d.selection,s=d.settings;function c(I,H){try{d.getDoc().execCommand(I,false,H)}catch(G){}}function z(){var G=d.getDoc().documentMode;return G?G:6}function j(){function G(J){var H,L,I,K;H=E.getRng();L=p.getParent(H.startContainer,p.isBlock);if(J){L=p.getNext(L,p.isBlock)}if(L){I=L.firstChild;while(I&&I.nodeType==3&&I.nodeValue.length===0){I=I.nextSibling}if(I&&I.nodeName==="SPAN"){K=I.cloneNode(false)}}d.getDoc().execCommand(J?"ForwardDelete":"Delete",false,null);L=p.getParent(H.startContainer,p.isBlock);tinymce.each(p.select("span.Apple-style-span,font.Apple-style-span",L),function(M){var N=E.getBookmark();if(K){p.replace(K.cloneNode(false),M,true)}else{p.remove(M,true)}E.moveToBookmark(N)})}d.onKeyDown.add(function(H,J){var I;I=J.keyCode==u;if(!J.isDefaultPrevented()&&(I||J.keyCode==t)&&!m.modifierPressed(J)){J.preventDefault();G(I)}});d.addCommand("Delete",function(){G()})}function F(){function G(J){var I=p.create("body");var K=J.cloneContents();I.appendChild(K);return E.serializer.serialize(I,{format:"html"})}function H(I){var K=G(I);var L=p.createRng();L.selectNode(d.getBody());var J=G(L);return K===J}d.onKeyDown.add(function(J,L){var K=L.keyCode,I;if(!L.isDefaultPrevented()&&(K==u||K==t)){I=J.selection.isCollapsed();if(I&&!p.isEmpty(J.getBody())){return}if(tinymce.isIE&&!I){return}if(!I&&!H(J.selection.getRng())){return}J.setContent("");J.selection.setCursorLocation(J.getBody(),0);J.nodeChanged()}})}function x(){d.onKeyDown.add(function(G,H){if(H.keyCode==65&&m.metaKeyPressed(H)){H.preventDefault();G.execCommand("SelectAll")}})}function y(){if(!d.settings.content_editable){p.bind(d.getDoc(),"focusin",function(G){E.setRng(E.getRng())});p.bind(d.getDoc(),"mousedown",function(G){if(G.target==d.getDoc().documentElement){d.getWin().focus();E.setRng(E.getRng())}})}}function n(){d.onKeyDown.add(function(G,J){if(!J.isDefaultPrevented()&&J.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var I=E.getNode();var H=I.previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="hr"){p.remove(H);tinymce.dom.Event.cancel(J)}}}})}function b(){if(!Range.prototype.getClientRects){d.onMouseDown.add(function(H,I){if(I.target.nodeName==="HTML"){var G=H.getBody();G.blur();setTimeout(function(){G.focus()},0)}})}}function B(){d.onClick.add(function(G,H){H=H.target;if(/^(IMG|HR)$/.test(H.nodeName)){E.getSel().setBaseAndExtent(H,0,H,1)}if(H.nodeName=="A"&&p.hasClass(H,"mceItemAnchor")){E.select(H)}G.nodeChanged()})}function C(){function H(){var J=p.getAttribs(E.getStart().cloneNode(false));return function(){var K=E.getStart();if(K!==d.getBody()){p.setAttrib(K,"style",null);tinymce.each(J,function(L){K.setAttributeNode(L.cloneNode(true))})}}}function G(){return !E.isCollapsed()&&E.getStart()!=E.getEnd()}function I(J,K){K.preventDefault();return false}d.onKeyPress.add(function(J,L){var K;if((L.keyCode==8||L.keyCode==46)&&G()){K=H();J.getDoc().execCommand("delete",false,null);K();L.preventDefault();return false}});p.bind(d.getDoc(),"cut",function(K){var J;if(G()){J=H();d.onKeyUp.addToTop(I);setTimeout(function(){J();d.onKeyUp.remove(I)},0)}})}function k(){var H,G;p.bind(d.getDoc(),"selectionchange",function(){if(G){clearTimeout(G);G=0}G=window.setTimeout(function(){var I=E.getRng();if(!H||!tinymce.dom.RangeUtils.compareRanges(I,H)){d.nodeChanged();H=I}},50)})}function D(){document.body.setAttribute("role","application")}function A(){d.onKeyDown.add(function(G,I){if(!I.isDefaultPrevented()&&I.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var H=E.getNode().previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(I)}}}})}function h(){if(z()>7){return}c("RespectVisibilityInDesign",true);d.contentStyles.push(".mceHideBrInPre pre br {display: none}");p.addClass(d.getBody(),"mceHideBrInPre");d.parser.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type===3&&K.value.charAt(K.value-1)!="\n"){K.value+="\n"}else{M.parent.insert(new tinymce.html.Node("#text",3),M,true).value="\n"}}}});d.serializer.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type==3){K.value=K.value.replace(/\r?\n$/,"")}}}})}function f(){p.bind(d.getBody(),"mouseup",function(I){var H,G=E.getNode();if(G.nodeName=="IMG"){if(H=p.getStyle(G,"width")){p.setAttrib(G,"width",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"width","")}if(H=p.getStyle(G,"height")){p.setAttrib(G,"height",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"height","")}}})}function r(){d.onKeyDown.add(function(M,N){var L,G,H,J,K,O,I;L=N.keyCode==u;if(!N.isDefaultPrevented()&&(L||N.keyCode==t)&&!m.modifierPressed(N)){G=E.getRng();H=G.startContainer;J=G.startOffset;I=G.collapsed;if(H.nodeType==3&&H.nodeValue.length>0&&((J===0&&!I)||(I&&J===(L?0:1)))){nonEmptyElements=M.schema.getNonEmptyElements();N.preventDefault();K=p.create("br",{id:"__tmp"});H.parentNode.insertBefore(K,H);M.getDoc().execCommand(L?"ForwardDelete":"Delete",false,null);H=E.getRng().startContainer;O=H.previousSibling;if(O&&O.nodeType==1&&!p.isBlock(O)&&p.isEmpty(O)&&!nonEmptyElements[O.nodeName.toLowerCase()]){p.remove(O)}p.remove("__tmp")}}})}function e(){d.onKeyDown.add(function(K,L){var I,H,M,G,J;if(L.isDefaultPrevented()||L.keyCode!=m.BACKSPACE){return}I=E.getRng();H=I.startContainer;M=I.startOffset;G=p.getRoot();J=H;if(!I.collapsed||M!==0){return}while(J&&J.parentNode&&J.parentNode.firstChild==J&&J.parentNode!=G){J=J.parentNode}if(J.tagName==="BLOCKQUOTE"){K.formatter.toggle("blockquote",null,J);I.setStart(H,0);I.setEnd(H,0);E.setRng(I);E.collapse(false)}})}function l(){function G(){d._refreshContentEditable();c("StyleWithCSS",false);c("enableInlineTableEditing",false);if(!s.object_resizing){c("enableObjectResizing",false)}}if(!s.readonly){d.onBeforeExecCommand.add(G);d.onMouseDown.add(G)}}function o(){function G(H,I){tinymce.each(p.select("a"),function(L){var J=L.parentNode,K=p.getRoot();if(J.lastChild===L){while(J&&!p.isBlock(J)){if(J.parentNode.lastChild!==J||J===K){return}J=J.parentNode}p.add(J,"br",{"data-mce-bogus":1})}})}d.onExecCommand.add(function(H,I){if(I==="CreateLink"){G(H)}});d.onSetContent.add(E.onSetContent.add(G))}function v(){if(s.forced_root_block){d.onInit.add(function(){c("DefaultParagraphSeparator",s.forced_root_block)})}}function a(){function G(I,H){if(!I||!H.initial){d.execCommand("mceRepaint")}}d.onUndo.add(G);d.onRedo.add(G);d.onSetContent.add(G)}function q(){d.onKeyDown.add(function(H,I){var G;if(!I.isDefaultPrevented()&&I.keyCode==t){G=H.getDoc().selection.createRange();if(G&&G.item){I.preventDefault();H.undoManager.beforeChange();p.remove(G.item(0));H.undoManager.add()}}})}function i(){var G;if(z()>=10){G="";tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(H,I){G+=(I>0?",":"")+H+":empty"});d.contentStyles.push(G+"{padding-right: 1px !important}")}}function g(){var K,H,G,I,J;if(!s.object_resizing||s.webkit_fake_resize===false){return}d.contentStyles.push(".mceResizeImages img {cursor: se-resize !important}");function L(R){var O,N,Q,P,M;if(K){O=R.screenX-H;N=R.screenY-G;Q=Math.max((I+O)/I,(J+N)/J);if(Math.abs(O)>1||Math.abs(N)>1){P=Math.round(I*Q);M=Math.round(J*Q);if(K.style.width){p.setStyle(K,"width",P)}else{p.setAttrib(K,"width",P)}if(K.style.height){p.setStyle(K,"height",M)}else{p.setAttrib(K,"height",M)}if(!p.hasClass(d.getBody(),"mceResizeImages")){p.addClass(d.getBody(),"mceResizeImages")}}}}d.onMouseDown.add(function(M,O){var N=O.target;if(N.nodeName=="IMG"){K=N;H=O.screenX;G=O.screenY;I=K.clientWidth;J=K.clientHeight;p.bind(M.getDoc(),"mousemove",L);O.preventDefault()}});d.onNodeChange.add(function(){if(K){K=null;p.unbind(d.getDoc(),"mousemove",L)}if(E.getNode().nodeName=="IMG"){p.addClass(d.getBody(),"mceResizeImages")}else{p.removeClass(d.getBody(),"mceResizeImages")}})}A();e();F();if(tinymce.isWebKit){r();j();y();B();v();if(tinymce.isIDevice){k()}else{g();x()}}if(tinymce.isIE){n();D();h();f();q();i()}if(tinymce.isGecko){n();b();C();l();o();a()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);v=m("block_elements","h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot th tr td li ol ul caption blockquote center dl dt dd dir fieldset noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup");function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}S=B.prev;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R}else{S.remove()}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+""}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="
    "+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="
    "+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,t,q,s,r=d.dom.doc,m=r.body;function j(A){var v,z,u,y,x;u=h.create("a");v=A?k:t;z=A?p:q;y=n.duplicate();if(v==r||v==r.documentElement){v=m;z=0}if(v.nodeType==3){v.parentNode.insertBefore(u,v);y.moveToElementText(u);y.moveStart("character",z);h.remove(u);n.setEndPoint(A?"StartToStart":"EndToEnd",y)}else{x=v.childNodes;if(x.length){if(z>=x.length){h.insertAfter(u,x[x.length-1])}else{v.insertBefore(u,x[z])}y.moveToElementText(u)}else{if(v.canHaveHTML){v.innerHTML="\uFEFF";u=v.firstChild;y.moveToElementText(u);y.collapse(f)}}n.setEndPoint(A?"StartToStart":"EndToEnd",y);h.remove(u)}}k=i.startContainer;p=i.startOffset;t=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==t&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){s=k.previousSibling;if(s&&!s.hasChildNodes()&&h.isBlock(s)){s.innerHTML="\uFEFF"}else{s=null}k.innerHTML="\uFEFF\uFEFF";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(s){s.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='_';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('_'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML(''+m+"");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML(''+m+"")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='
    '}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+(c?''+c+"":"")}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='';j+="";j+="";j+="";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);if(j.adapter){j.adapter.patchEditor(m)}return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+=''}if(H.ie7_compat){G.iframeHTML+=''}else{G.iframeHTML+=''}G.iframeHTML+='';for(x=0;x'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='
    ";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return""})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'>
    "}else{r='
    '}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(n){var m=this,o;n=n||{};n.format=n.format||"html";n.get=true;n.getInner=true;if(!n.no_events){m.onBeforeGetContent.dispatch(m,n)}if(n.format=="raw"){o=m.getBody().innerHTML}else{o=m.serializer.serialize(m.getBody(),n)}n.content=k.trim(o);if(!n.no_events){m.onGetContent.dispatch(m,n)}return n.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i0||this.typing},hasRedo:function(){return i0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aAar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aAar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aAar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ad){var ac;if(!P){P={};ac={};aa.onNodeChange.addToTop(function(af,ae,ah){var ag=n(ah),ai={};T(P,function(aj,ak){T(ag,function(al){if(y(al,ak,{},true)){if(!ac[ak]){T(aj,function(am){am(true,{node:al,format:ak,parents:ag})});ac[ak]=aj}ai[ak]=aj;return false}})});T(ac,function(aj,ak){if(!ai[ak]){delete ac[ak];T(aj,function(al){al(false,{node:ah,format:ak,parents:ag})})}})})}T(ab.split(","),function(ae){if(!P[ae]){P[ae]=[]}P[ae].push(ad)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(az){var au,ax,ay,aw,av,at;au=ax=az?ad:ar;av=az?"previousSibling":"nextSibling";at=c.getRoot();if(au.nodeType==3&&!f(au)){if(az?ai>0:akan?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;adad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(A){var v=e.getRng(true),E,j,z,u,p,L,o,k,n,t,I,x,B;function D(M){return M&&i.isBlock(M)&&!/^(TD|TH|CAPTION|FORM)$/.test(M.nodeName)&&!/^(fixed|absolute)/i.test(M.style.position)&&i.getContentEditable(M)!=="true"}function F(N){var M;if(b.isIE&&i.isBlock(N)){M=e.getRng();N.appendChild(i.create("span",null,"\u00a0"));e.select(N);N.lastChild.outerHTML="";e.setRng(M)}}function y(O){var N=O,P=[],M;while(N=N.firstChild){if(i.isBlock(N)){return}if(N.nodeType==1&&!c[N.nodeName.toLowerCase()]){P.push(N)}}M=P.length;while(M--){N=P[M];if(!N.hasChildNodes()||(N.firstChild==N.lastChild&&N.firstChild.nodeValue==="")){i.remove(N)}}}function m(N){var S,Q,M,T,R,P=N,O;M=i.createRng();if(N.hasChildNodes()){S=new a(N,N);while(Q=S.current()){if(Q.nodeType==3){M.setStart(Q,0);M.setEnd(Q,0);break}if(c[Q.nodeName.toLowerCase()]){M.setStartBefore(Q);M.setEndBefore(Q);break}P=Q;Q=S.next()}if(!Q){M.setStart(P,0);M.setEnd(P,0)}}else{if(N.nodeName=="BR"){if(N.nextSibling&&i.isBlock(N.nextSibling)){if(!L||L<9){O=i.create("br");N.parentNode.insertBefore(O,N)}M.setStartBefore(N);M.setEndBefore(N)}else{M.setStartAfter(N);M.setEndAfter(N)}}else{M.setStart(N,0);M.setEnd(N,0)}}e.setRng(M);i.remove(O);R=i.getViewPort(f.getWin());T=i.getPos(N).y;if(TR.y+R.h){f.getWin().scrollTo(0,T"}return Q}function q(P){var O,N,M;if(z.nodeType==3&&(P?u>0:u=z.nodeValue.length){if(!b.isIE&&!C()){N=i.create("br");v.insertNode(N);v.setStartAfter(N);v.setEndAfter(N);M=true}}N=i.create("br");v.insertNode(N);if(b.isIE&&t=="PRE"&&(!L||L<8)){N.parentNode.insertBefore(i.doc.createTextNode("\r"),N)}if(!M){v.setStartAfter(N);v.setEndAfter(N)}else{v.setStartBefore(N);v.setEndBefore(N)}e.setRng(v);h.add()}function s(M){do{if(M.nodeType===3){M.nodeValue=M.nodeValue.replace(/^[\r\n]+/,"")}M=M.firstChild}while(M)}function J(O){var M=i.getRoot(),N,P;N=O;while(N!==M&&i.getContentEditable(N)!=="false"){if(i.getContentEditable(N)==="true"){P=N}N=N.parentNode}return N!==M?P:M}function H(N){var M;if(!b.isIE){N.normalize();M=N.lastChild;if(!M||(/^(left|right)$/gi.test(i.getStyle(M,"float",true)))){i.add(N,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(A.isDefaultPrevented()){return}z=v.startContainer;u=v.startOffset;x=d.forced_root_block;x=x?x.toUpperCase():"";L=i.doc.documentMode;if(z.nodeType==1&&z.hasChildNodes()){B=u>z.childNodes.length-1;z=z.childNodes[Math.min(u,z.childNodes.length-1)]||z;if(B&&z.nodeType==3){u=z.nodeValue.length}else{u=0}}j=J(z);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||A.shiftKey){K()}return}if((x&&!A.shiftKey)||(!x&&A.shiftKey)){z=l(z,u)}p=i.getParent(z,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";I=n?n.nodeName.toUpperCase():"";if(t=="LI"&&i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}G();return}if(t=="PRE"&&d.br_in_pre!==false){if(!A.shiftKey){K();return}}else{if((!x&&!A.shiftKey&&t!="LI")||(x&&A.shiftKey)){K();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&I!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&D(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{E=v.cloneRange();E.setEndAfter(p);k=E.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);y(o);H(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce); \ No newline at end of file diff --git a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce_popup.js b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce_popup.js index f859d24e6a..bb8e58c88a 100644 --- a/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce_popup.js +++ b/src/skins/admin/en/modules/CDev/TinyMCE/js/tinymce/tiny_mce_popup.js @@ -2,4 +2,4 @@ // Uncomment and change this document.domain value if you are loading the script cross subdomains // document.domain = 'moxiecode.com'; -var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write(' diff --git a/src/skins/admin/en/settings/security.tpl b/src/skins/admin/en/settings/security.tpl index d2ddc4b845..c3523855b3 100644 --- a/src/skins/admin/en/settings/security.tpl +++ b/src/skins/admin/en/settings/security.tpl @@ -77,7 +77,7 @@ function enableHTTPS() jQuery('input[name="admin_security"][type="checkbox"]').attr('checked', admin_security_value); document.getElementById("httpserror-message").style.cssText = ""; - document.getElementById("httpserror-message").innerHTML = "Success"; + document.getElementById("httpserror-message").innerHTML = "" + xliteConfig.success_lng + ""; } jQuery('input[name="customer_security"][type="checkbox"]').attr('checked', ''); From d2cf5ed4542e0df0788828b38ea596657958e076 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 6 Jul 2012 13:40:11 +0400 Subject: [PATCH 199/562] [!] Bug: States header were displayed twice. --- src/classes/XLite/View/States.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/classes/XLite/View/States.php b/src/classes/XLite/View/States.php index 9c8af80efe..b4bf60b475 100644 --- a/src/classes/XLite/View/States.php +++ b/src/classes/XLite/View/States.php @@ -82,18 +82,6 @@ public function getJSFiles() return $list; } - /** - * Return title - * - * @return string - * @see ____func_see____ - * @since 1.0.0 - */ - protected function getHead() - { - return 'States'; - } - /** * Return templates directory name * From 88e2663e8f441cc85e4ec7f37e4a20f418ac053c Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 5 Jul 2012 23:37:38 +0400 Subject: [PATCH 200/562] [*] Small logic changes --- src/classes/XLite/View/Model/AModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/XLite/View/Model/AModel.php b/src/classes/XLite/View/Model/AModel.php index f9efd85063..48016db16b 100644 --- a/src/classes/XLite/View/Model/AModel.php +++ b/src/classes/XLite/View/Model/AModel.php @@ -576,7 +576,7 @@ protected function getFieldSchemaArgs($name, array $data) $data[static::SCHEMA_VALUE] = $this->getDefaultFieldValue($name); - $data[static::SCHEMA_ATTRIBUTES] = !empty($data[static::SCHEMA_ATTRIBUTES]) ?: array(); + $data[static::SCHEMA_ATTRIBUTES] = !empty($data[static::SCHEMA_ATTRIBUTES]) ? $data[static::SCHEMA_ATTRIBUTES] : array(); $data[static::SCHEMA_ATTRIBUTES] += isset($data[static::SCHEMA_MODEL_ATTRIBUTES]) ? $this->getModelAttributes($name, $data) : array(); return $data; From c3e91571cf06f9da28ceef71d9a02d8ec823d06d Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Fri, 6 Jul 2012 07:44:18 +0400 Subject: [PATCH 201/562] Auth providers: code style improvements --- .../SocialLogin/Core/FacebookAuthProvider.php | 36 ++++++++++++--- .../SocialLogin/Core/GoogleAuthProvider.php | 45 +++++++++++++++---- 2 files changed, 67 insertions(+), 14 deletions(-) diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php index 270cd0c8f5..923a0be0c8 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php @@ -35,6 +35,32 @@ */ class FacebookAuthProvider extends AAuthProvider { + + /** + * Unique auth provider name + */ + const PROVIDER_NAME = 'facebook'; + + /** + * Url to which user will be redirected + */ + const AUTH_REQUEST_URL = 'https://www.facebook.com/dialog/oauth'; + + /** + * Url to get access token + */ + const TOKEN_REQUEST_URL = 'https://graph.facebook.com/oauth/access_token'; + + /** + * Url to access user profile information + */ + const PROFILE_REQUEST_URL = 'https://graph.facebook.com/me'; + + /** + * Path of the icon to be displayed in site header + */ + const SMALL_ICON_PATH = 'modules/CDev/SocialLogin/icons/facebook_small.png'; + /** * Get unique auth provider name to distinguish it from others @@ -45,7 +71,7 @@ class FacebookAuthProvider extends AAuthProvider */ public function getName() { - return 'facebook'; + return static::PROVIDER_NAME; } /** @@ -57,7 +83,7 @@ public function getName() */ public function getAuthRequestUrl() { - return 'https://www.facebook.com/dialog/oauth' + return static::AUTH_REQUEST_URL . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id . '&redirect_uri=' . urlencode($this->getRedirectUrl()) . '&scope=email' @@ -78,7 +104,7 @@ public function processAuth() $code = \XLite\Core\Request::getInstance()->code; if (!empty($code)) { - $url = 'https://graph.facebook.com/oauth/access_token' + $url = static::TOKEN_REQUEST_URL . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id . '&redirect_uri=' . urlencode($this->getRedirectUrl()) . '&client_secret=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret @@ -90,7 +116,7 @@ public function processAuth() if (200 == $response->code) { parse_str($response->body, $vars); - $url = 'https://graph.facebook.com/me?access_token=' . urlencode($vars['access_token']); + $url = static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($vars['access_token']); $bouncer = new \XLite\Core\HTTP\Request($url); $response = $bouncer->sendRequest(); @@ -126,6 +152,6 @@ public function isConfigured() */ public function getSmallIconPath() { - return 'modules/CDev/SocialLogin/icons/facebook_small.png'; + return static::SMALL_ICON_PATH; } } diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php index 2250e560b1..c0fd0df0dd 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php @@ -35,6 +35,36 @@ */ class GoogleAuthProvider extends AAuthProvider { + + /** + * Unique auth provider name + */ + const PROVIDER_NAME = 'facebook'; + + /** + * Url to which user will be redirected + */ + const AUTH_REQUEST_URL = 'https://accounts.google.com/o/oauth2/auth'; + + /** + * Data to gain access to + */ + const AUTH_REQUEST_SCOPE = 'https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email'; + + /** + * Url to get access token + */ + const TOKEN_REQUEST_URL = 'https://accounts.google.com/o/oauth2/token'; + + /** + * Url to access user profile information + */ + const PROFILE_REQUEST_URL = 'https://www.googleapis.com/oauth2/v1/userinfo'; + + /** + * Path of the icon to be displayed in site header + */ + const SMALL_ICON_PATH = 'modules/CDev/SocialLogin/icons/google_small.png'; /** * Get unique auth provider name to distinguish it from others @@ -45,7 +75,7 @@ class GoogleAuthProvider extends AAuthProvider */ public function getName() { - return 'google'; + return static::PROVIDER_NAME; } /** @@ -57,10 +87,10 @@ public function getName() */ public function getAuthRequestUrl() { - return 'https://accounts.google.com/o/oauth2/auth' + return static::AUTH_REQUEST_URL . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id . '&redirect_uri=' . urlencode($this->getRedirectUrl()) - . '&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email' + . '&scope=' . static::AUTH_REQUEST_SCOPE . '&response_type=code'; } @@ -78,9 +108,7 @@ public function processAuth() $code = \XLite\Core\Request::getInstance()->code; if (!empty($code)) { - $url = 'https://accounts.google.com/o/oauth2/token'; - - $request = new \XLite\Core\HTTP\Request($url); + $request = new \XLite\Core\HTTP\Request(static::TOKEN_REQUEST_URL); $request->body = array( 'code' => $code, 'client_id' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id, @@ -94,8 +122,7 @@ public function processAuth() if (200 == $response->code) { $data = json_decode($response->body, true); - $url = 'https://www.googleapis.com/oauth2/v1/userinfo' - . '?access_token=' . $data['access_token']; + $url = static::PROFILE_REQUEST_URL . '?access_token=' . $data['access_token']; $request = new \XLite\Core\HTTP\Request($url); $response = $request->sendRequest(); @@ -133,6 +160,6 @@ public function isConfigured() */ public function getSmallIconPath() { - return 'modules/CDev/SocialLogin/icons/google_small.png'; + return static::SMALL_ICON_PATH; } } From 6eb3e3fa74d1b5dfdf721a85670a205b223b2ee3 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 6 Jul 2012 15:51:49 +0400 Subject: [PATCH 202/562] E:41701 [*] Fractional part format improvement for "money" type. --- src/classes/XLite/Core/ColumnType/Money.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/Core/ColumnType/Money.php b/src/classes/XLite/Core/ColumnType/Money.php index c550298d62..bde0782cd0 100644 --- a/src/classes/XLite/Core/ColumnType/Money.php +++ b/src/classes/XLite/Core/ColumnType/Money.php @@ -59,18 +59,18 @@ public function getSQLDeclaration(array $fieldDeclaration, \Doctrine\DBAL\Platfo } /** - * Convert to PHP value - * + * Convert to PHP value + * * @param string $value Value * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform Platform - * + * * @return float * @see ____func_see____ * @since 1.0.19 */ public function convertToPHPValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform) { - return (null === $value) ? null : doubleval($value); + return (null === $value) ? null : sprintf('%.4f', $value); } } From 01f59355dd641af48f72e0077007367d835e98c9 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Sat, 7 Jul 2012 09:14:56 +0400 Subject: [PATCH 203/562] [*] Add src/skins/admin/en/order/page/info.tpl --- src/skins/admin/en/order/page/info.tpl | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/skins/admin/en/order/page/info.tpl diff --git a/src/skins/admin/en/order/page/info.tpl b/src/skins/admin/en/order/page/info.tpl new file mode 100644 index 0000000000..5320d3b4e0 --- /dev/null +++ b/src/skins/admin/en/order/page/info.tpl @@ -0,0 +1,72 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order info + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} +
    + +

    {t(#Order X#,_ARRAY_(#id#^order.getOrderId()))}

    + +

    + {if:hasProfilePage()} + {t(#Placed on X by Y link#,_ARRAY_(#date#^getOrderDate(),#url#^getProfileURL(),#name#^getProfileName())):h} + {else:} + {t(#Placed on X by Y#,_ARRAY_(#date#^getOrderDate(),#name#^getProfileName())):h} + {end:} + {if:getMembership()} + ({membership.getName()}) + {end:} +

    + +

    {t(#Order Total X#,_ARRAY_(#total#^getorderTotal())):h}

    + + + +
    + +
    + +
    + +
    + +
    + +
    +
    + +
    + +
    +

    {t(#Payment info#)}

    +
    +
    + +
    +

    {t(#Shipping info#)}

    +
    +
    + +
    +
    + + + + + +
    + + From 4c2fe43334e8a99233a0fa7a0bdf6c00b64d7d39 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Sat, 7 Jul 2012 17:37:12 +0400 Subject: [PATCH 204/562] [*] Change product list (logic and search routine) --- src/classes/XLite/Controller/Admin/ProductList.php | 12 ++++++++++++ src/classes/XLite/Model/Repo/Base/I18n.php | 6 +++--- src/classes/XLite/Model/Repo/Product.php | 12 ++++++++---- src/skins/admin/en/product/product_list_form.tpl | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/classes/XLite/Controller/Admin/ProductList.php b/src/classes/XLite/Controller/Admin/ProductList.php index 7ca36d019e..2b45d2a841 100644 --- a/src/classes/XLite/Controller/Admin/ProductList.php +++ b/src/classes/XLite/Controller/Admin/ProductList.php @@ -83,6 +83,18 @@ public function getTitle() return 'Search for products'; } + /** + * Check - search panel is visible or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public function isSearchVisible() + { + return 0 < \XLite\Core\Database::getRepo('Xlite\Model\Product')->count(); + } + /** * doActionUpdate * diff --git a/src/classes/XLite/Model/Repo/Base/I18n.php b/src/classes/XLite/Model/Repo/Base/I18n.php index 89cf7c7aba..6360d96463 100644 --- a/src/classes/XLite/Model/Repo/Base/I18n.php +++ b/src/classes/XLite/Model/Repo/Base/I18n.php @@ -61,7 +61,7 @@ public function createQueryBuilder($alias = null, $code = null) * @see ____func_see____ * @since 1.0.0 */ - protected function addLanguageQuery(\Doctrine\ORM\QueryBuilder $queryBuilder, $alias = null, $code = null) + protected function addLanguageQuery(\Doctrine\ORM\QueryBuilder $queryBuilder, $alias = null, $code = null, $translationsAlias = 'translations') { if (!isset($alias)) { $alias = $this->getMainAlias($queryBuilder); @@ -76,9 +76,9 @@ protected function addLanguageQuery(\Doctrine\ORM\QueryBuilder $queryBuilder, $a $queryBuilder ->leftJoin( $alias . '.translations', - 'translations', + $translationsAlias, \Doctrine\ORM\Query\Expr\Join::WITH, - 'translations.code = :lng' + $translationsAlias . '.code = :lng' ) ->setParameter('lng', $code); diff --git a/src/classes/XLite/Model/Repo/Product.php b/src/classes/XLite/Model/Repo/Product.php index f4bc7c842c..46e60e1560 100644 --- a/src/classes/XLite/Model/Repo/Product.php +++ b/src/classes/XLite/Model/Repo/Product.php @@ -459,6 +459,10 @@ protected function prepareCndSKU(\Doctrine\ORM\QueryBuilder $queryBuilder, $valu */ protected function prepareCndCategoryId(\Doctrine\ORM\QueryBuilder $queryBuilder, $value) { + if (is_object($value) && $value instanceOf \XLite\Model\Category) { + $value = $value->getCategoryId(); + } + $queryBuilder->linkInner('p.categoryProducts', 'cp') ->linkInner('cp.category', 'c') ->addOrderBy('cp.orderby'); @@ -510,11 +514,11 @@ protected function prepareCndSubstring(\Doctrine\ORM\QueryBuilder $queryBuilder, */ protected function prepareCndPrice(\Doctrine\ORM\QueryBuilder $queryBuilder, $value) { - if (is_array($value) && 2 == count($value)) { - $min = trim(array_shift($value)); - $max = trim(array_shift($value)); - + if (is_array($value)) { + $min = empty($value[0]) ? null : trim($value[0]); $min = (0 == strlen($min) || !is_numeric($min)) ? null : doubleval($min); + + $max = empty($value[1]) ? null : trim($value[1]); $max = (0 == strlen($max) || !is_numeric($max)) ? null : doubleval($max); $this->assignPriceRangeCondition($queryBuilder, $min, $max); diff --git a/src/skins/admin/en/product/product_list_form.tpl b/src/skins/admin/en/product/product_list_form.tpl index 69721a2700..e03152af94 100644 --- a/src/skins/admin/en/product/product_list_form.tpl +++ b/src/skins/admin/en/product/product_list_form.tpl @@ -10,7 +10,7 @@ * @since 1.0.0 *} - + {* Open tag *} From d6115fa8e2cec978b964d937b73b36107b48b837 Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Sat, 7 Jul 2012 22:36:05 +0400 Subject: [PATCH 205/562] Various code style corrections --- .../SocialLogin/Core/FacebookAuthProvider.php | 79 +++++++++++++---- .../SocialLogin/Core/GoogleAuthProvider.php | 86 +++++++++++++++---- .../en/modules/CDev/SocialLogin/button.tpl | 2 +- .../SocialLogin/parts/social_login.widget.tpl | 2 - .../modules/CDev/SocialLogin/small_icons.tpl | 2 +- .../en/modules/CDev/SocialLogin/style.css | 1 - 6 files changed, 132 insertions(+), 40 deletions(-) diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php index 923a0be0c8..e6591354a4 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php @@ -104,22 +104,11 @@ public function processAuth() $code = \XLite\Core\Request::getInstance()->code; if (!empty($code)) { - $url = static::TOKEN_REQUEST_URL - . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id - . '&redirect_uri=' . urlencode($this->getRedirectUrl()) - . '&client_secret=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret - . '&code=' . urlencode($code); - - $bouncer = new \XLite\Core\HTTP\Request($url); - $response = $bouncer->sendRequest(); - - if (200 == $response->code) { - parse_str($response->body, $vars); - - $url = static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($vars['access_token']); - - $bouncer = new \XLite\Core\HTTP\Request($url); - $response = $bouncer->sendRequest(); + $accessToken = $this->getAccessToken($code); + + if ($accessToken) { + $request = new \XLite\Core\HTTP\Request($this->getProfileRequestUrl($accessToken)); + $response = $request->sendRequest(); if (200 == $response->code) { $profile = json_decode($response->body, true); @@ -146,7 +135,7 @@ public function isConfigured() /** * Get path to small icon to display in header * - * @return void + * @return string * @see ____func_see____ * @since 1.0.24 */ @@ -154,4 +143,60 @@ public function getSmallIconPath() { return static::SMALL_ICON_PATH; } + + /** + * Get url to request access token + * + * @param string $code Authorization code + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getTokenRequestUrl($code) + { + return static::TOKEN_REQUEST_URL + . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id + . '&redirect_uri=' . urlencode($this->getRedirectUrl()) + . '&client_secret=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret + . '&code=' . urlencode($code); + } + + /** + * Get url used to access user profile info + * + * @param string $accessToken Access token + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getProfileRequestUrl($accessToken) + { + return static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($accessToken); + } + + /** + * Returns access token based on authorization code + * + * @param string $code Authorization code + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getAccessToken($code) + { + $request = new \XLite\Core\HTTP\Request($this->getTokenRequestUrl($code)); + $response = $request->sendRequest(); + + $accessToken = null; + + if (200 == $response->code) { + parse_str($response->body, $data); + $accessToken = $data['access_token']; + } + + return $accessToken; + } } diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php index c0fd0df0dd..5396cff472 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php @@ -39,7 +39,7 @@ class GoogleAuthProvider extends AAuthProvider /** * Unique auth provider name */ - const PROVIDER_NAME = 'facebook'; + const PROVIDER_NAME = 'google'; /** * Url to which user will be redirected @@ -108,23 +108,10 @@ public function processAuth() $code = \XLite\Core\Request::getInstance()->code; if (!empty($code)) { - $request = new \XLite\Core\HTTP\Request(static::TOKEN_REQUEST_URL); - $request->body = array( - 'code' => $code, - 'client_id' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id, - 'client_secret' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_secret, - 'redirect_uri' => $this->getRedirectUrl(), - 'grant_type' => 'authorization_code', - ); - - $response = $request->sendRequest(); - - if (200 == $response->code) { - $data = json_decode($response->body, true); - - $url = static::PROFILE_REQUEST_URL . '?access_token=' . $data['access_token']; - $request = new \XLite\Core\HTTP\Request($url); + $accessToken = $this->getAccessToken($code); + if ($accessToken) { + $request = new \XLite\Core\HTTP\Request($this->getProfileRequestUrl($accessToken)); $response = $request->sendRequest(); if (200 == $response->code) { @@ -154,7 +141,7 @@ public function isConfigured() /** * Get path to small icon to display in header * - * @return void + * @return string * @see ____func_see____ * @since 1.0.24 */ @@ -162,4 +149,67 @@ public function getSmallIconPath() { return static::SMALL_ICON_PATH; } + + /** + * Get url to request access token + * + * @param string $code Authorization code + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getTokenRequestUrl($code) + { + return static::TOKEN_REQUEST_URL + . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id + . '&redirect_uri=' . urlencode($this->getRedirectUrl()) + . '&client_secret=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret + . '&code=' . urlencode($code); + } + + /** + * Get url used to access user profile info + * + * @param string $accessToken Access token + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getProfileRequestUrl($accessToken) + { + return static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($accessToken); + } + + /** + * Returns access token based on authorization code + * + * @param string $code Authorization code + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getAccessToken($code) + { + $request = new \XLite\Core\HTTP\Request(static::TOKEN_REQUEST_URL); + $request->body = array( + 'code' => $code, + 'client_id' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id, + 'client_secret' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_secret, + 'redirect_uri' => $this->getRedirectUrl(), + 'grant_type' => 'authorization_code', + ); + + $response = $request->sendRequest(); + + $accessToken = null; + if (200 == $response->code) { + $data = json_decode($response->body, true); + $accessToken = $data['access_token']; + } + + return $accessToken; + } } diff --git a/src/skins/default/en/modules/CDev/SocialLogin/button.tpl b/src/skins/default/en/modules/CDev/SocialLogin/button.tpl index 71fc50a520..9a54b536bc 100644 --- a/src/skins/default/en/modules/CDev/SocialLogin/button.tpl +++ b/src/skins/default/en/modules/CDev/SocialLogin/button.tpl @@ -13,6 +13,6 @@
  • {getName()} -
    {getName()}
    + {getName()}
  • diff --git a/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.widget.tpl b/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.widget.tpl index 5a50a1ad1b..2f3cc58bdb 100644 --- a/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.widget.tpl +++ b/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.widget.tpl @@ -14,8 +14,6 @@ diff --git a/src/skins/default/en/modules/CDev/SocialLogin/small_icons.tpl b/src/skins/default/en/modules/CDev/SocialLogin/small_icons.tpl index 6743c9a99b..23a8dc36ff 100644 --- a/src/skins/default/en/modules/CDev/SocialLogin/small_icons.tpl +++ b/src/skins/default/en/modules/CDev/SocialLogin/small_icons.tpl @@ -12,6 +12,6 @@ diff --git a/src/skins/default/en/modules/CDev/SocialLogin/style.css b/src/skins/default/en/modules/CDev/SocialLogin/style.css index 4fefe83529..df24e941ef 100644 --- a/src/skins/default/en/modules/CDev/SocialLogin/style.css +++ b/src/skins/default/en/modules/CDev/SocialLogin/style.css @@ -55,7 +55,6 @@ ul.social-login .provider-name { border: 1px solid #ddd; background-color: white; border-radius: 0 4px 4px 0; - font-family: "Trebuchet MS", Helvetica, Jamrul, sans-serif; font-size: 16px; color: #555; } From bc54ce8ebd48da6fb06b677bdd8d763a43145888 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Sun, 8 Jul 2012 12:45:47 +0400 Subject: [PATCH 206/562] [*] Add Items block into order page; Add admin notes field for order --- src/classes/XLite/Controller/Admin/Order.php | 2 +- src/classes/XLite/Model/Order.php | 11 +++ .../ItemsList/Model/Order/Admin/Search.php | 14 +++ .../XLite/View/Order/Details/Admin/Info.php | 83 ++++++++++++++++ .../model/table/order/cell.total.tpl | 4 +- src/skins/admin/en/order/order.tpl | 51 +--------- src/skins/admin/en/order/page/info.css | 98 ++++++++++++++++++- .../order/page/parts/customerNotes.notes.tpl | 15 +++ .../en/order/page/parts/item.modifiers.tpl | 19 ++++ .../admin/en/order/page/parts/item.name.tpl | 20 ++++ .../en/order/page/parts/item.nettotal.tpl | 13 +++ .../admin/en/order/page/parts/item.price.tpl | 13 +++ .../admin/en/order/page/parts/item.qty.tpl | 13 +++ .../admin/en/order/page/parts/item.sku.tpl | 13 +++ .../admin/en/order/page/parts/item.total.tpl | 13 +++ .../order/page/parts/items.head.modifiers.tpl | 13 +++ .../en/order/page/parts/items.head.name.tpl | 13 +++ .../order/page/parts/items.head.nettotal.tpl | 13 +++ .../en/order/page/parts/items.head.total.tpl | 13 +++ .../order/page/parts/items.subhead.price.tpl | 13 +++ .../en/order/page/parts/items.subhead.qty.tpl | 13 +++ .../en/order/page/parts/items.subhead.sku.tpl | 13 +++ .../en/order/page/parts/items.totals.tpl | 17 ++++ src/skins/admin/en/order/page/parts/items.tpl | 35 +++++++ src/skins/admin/en/order/page/parts/line1.tpl | 26 +++++ src/skins/admin/en/order/page/parts/line2.tpl | 28 ++++++ src/skins/admin/en/order/page/parts/line3.tpl | 18 ++++ src/skins/admin/en/order/page/parts/line4.tpl | 18 ++++ .../admin/en/order/page/parts/note.note.tpl | 4 +- .../admin/en/order/page/parts/operations.tpl | 18 ++++ .../admin/en/order/page/parts/placed.tpl | 24 +++++ src/skins/admin/en/order/page/parts/title.tpl | 15 +++ src/skins/admin/en/order/page/parts/total.tpl | 15 +++ .../en/order/page/parts/totals.modifiers.tpl | 35 +++++++ .../en/order/page/parts/totals.subtotal.tpl | 16 +++ .../en/order/page/parts/totals.total.tpl | 16 +++ .../admin/en/order/page/parts/totals.tpl | 15 +++ 37 files changed, 713 insertions(+), 60 deletions(-) create mode 100644 src/skins/admin/en/order/page/parts/customerNotes.notes.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.modifiers.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.name.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.nettotal.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.price.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.qty.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.sku.tpl create mode 100644 src/skins/admin/en/order/page/parts/item.total.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.head.modifiers.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.head.name.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.head.nettotal.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.head.total.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.subhead.price.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.subhead.qty.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.subhead.sku.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.totals.tpl create mode 100644 src/skins/admin/en/order/page/parts/items.tpl create mode 100644 src/skins/admin/en/order/page/parts/line1.tpl create mode 100644 src/skins/admin/en/order/page/parts/line2.tpl create mode 100644 src/skins/admin/en/order/page/parts/line3.tpl create mode 100644 src/skins/admin/en/order/page/parts/line4.tpl create mode 100644 src/skins/admin/en/order/page/parts/operations.tpl create mode 100644 src/skins/admin/en/order/page/parts/placed.tpl create mode 100644 src/skins/admin/en/order/page/parts/title.tpl create mode 100644 src/skins/admin/en/order/page/parts/total.tpl create mode 100644 src/skins/admin/en/order/page/parts/totals.modifiers.tpl create mode 100644 src/skins/admin/en/order/page/parts/totals.subtotal.tpl create mode 100644 src/skins/admin/en/order/page/parts/totals.total.tpl create mode 100644 src/skins/admin/en/order/page/parts/totals.tpl diff --git a/src/classes/XLite/Controller/Admin/Order.php b/src/classes/XLite/Controller/Admin/Order.php index ace771e09e..bb44b0b90f 100644 --- a/src/classes/XLite/Controller/Admin/Order.php +++ b/src/classes/XLite/Controller/Admin/Order.php @@ -95,7 +95,7 @@ protected function getRequestData() { return \Includes\Utils\ArrayManager::filterByKeys( \XLite\Core\Request::getInstance()->getData(), - array('status', 'notes') + array('status', 'adminNotes') ); } diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index 2df36a740d..ab0143a20b 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -188,6 +188,17 @@ class Order extends \XLite\Model\Base\SurchargeOwner */ protected $notes = ''; + /** + * Admin notes + * + * @var string + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="text") + */ + protected $adminNotes = ''; + /** * Order details * diff --git a/src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php b/src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php index 806f3bca7b..9f8a946ff3 100644 --- a/src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php +++ b/src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php @@ -381,6 +381,20 @@ protected function getHead() return 'Search result'; } + /** + * Get items sum quantity + * + * @param \XLite\Model\Order $order Order + * + * @return integer + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getItemsQuantity(\XLite\Model\Order $order) + { + return $order->countQuantity(); + } + // }}} } diff --git a/src/classes/XLite/View/Order/Details/Admin/Info.php b/src/classes/XLite/View/Order/Details/Admin/Info.php index ae21c85145..5f6240a52c 100644 --- a/src/classes/XLite/View/Order/Details/Admin/Info.php +++ b/src/classes/XLite/View/Order/Details/Admin/Info.php @@ -190,5 +190,88 @@ protected function getMembership() // }}} + // {{{ Items content helpers + + /** + * Get columns span + * + * @return integer + * @see ____func_see____ + * @since 1.0.11 + */ + protected function getColumnsSpan() + { + return 4 + count($this->getOrder()->getItemsExcludeSurcharges()); + } + + /** + * Get item fescription block columns count + * + * @return integer + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getItemDescriptionCount() + { + return 3; + } + + /** + * Get surcharge totals + * + * @return array + * @see ____func_see____ + * @since 1.0.16 + */ + protected function getSurchargeTotals() + { + return $this->getOrder()->getSurchargeTotals(); + } + + /** + * Get surcharge class name + * + * @param string $type Surcharge type + * @param array $surcharge Surcharge + * + * @return string + * @see ____func_see____ + * @since 1.0.16 + */ + protected function getSurchargeClassName($type, array $surcharge) + { + return 'order-modifier ' + . $type . '-modifier ' + . strtolower($surcharge['code']) . '-code-modifier'; + } + + /** + * Format surcharge value + * + * @param array $surcharge Surcharge + * + * @return string + * @see ____func_see____ + * @since 1.0.16 + */ + protected function formatSurcharge(array $surcharge) + { + return $this->formatPrice(abs($surcharge['cost']), $this->getOrder()->getCurrency()); + } + + /** + * Check - customer notes block is visible or not + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + protected function isCustomerNotesVisible() + { + return (bool)$this->getOrder()->getNotes(); + } + + // }}} + } diff --git a/src/skins/admin/en/items_list/model/table/order/cell.total.tpl b/src/skins/admin/en/items_list/model/table/order/cell.total.tpl index 2930cbb516..b919a06b69 100644 --- a/src/skins/admin/en/items_list/model/table/order/cell.total.tpl +++ b/src/skins/admin/en/items_list/model/table/order/cell.total.tpl @@ -10,5 +10,5 @@ * @since 1.0.24 *} -{formatPrice(entity.getTotal(),entity.getCurrency())} -({t(#N it.#,_ARRAY_(#count#^entity.countQuantity()))}) +{formatPrice(getColumnValue(column,entity),entity.getCurrency())} +({t(#N it.#,_ARRAY_(#count#^getItemsQuantity(entity)))}) diff --git a/src/skins/admin/en/order/order.tpl b/src/skins/admin/en/order/order.tpl index 5320d3b4e0..93ac9eaaac 100644 --- a/src/skins/admin/en/order/order.tpl +++ b/src/skins/admin/en/order/order.tpl @@ -10,56 +10,7 @@ * @since 1.0.0 *}
    - -

    {t(#Order X#,_ARRAY_(#id#^order.getOrderId()))}

    - -

    - {if:hasProfilePage()} - {t(#Placed on X by Y link#,_ARRAY_(#date#^getOrderDate(),#url#^getProfileURL(),#name#^getProfileName())):h} - {else:} - {t(#Placed on X by Y#,_ARRAY_(#date#^getOrderDate(),#name#^getProfileName())):h} - {end:} - {if:getMembership()} - ({membership.getName()}) - {end:} -

    - -

    {t(#Order Total X#,_ARRAY_(#total#^getorderTotal())):h}

    - - - -
    - -
    - -
    - -
    - -
    - -
    -
    - -
    - -
    -

    {t(#Payment info#)}

    -
    -
    - -
    -

    {t(#Shipping info#)}

    -
    -
    - -
    -
    - - - - - +
    ', $this->offset+4);$/;" v +pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $pos = strpos($block['body'], $action_text);$/;" v +pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $pos = strpos($str, "%", 1);$/;" v +pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $pos = strpos($str, '#', 1);$/;" v +pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $pos = $i;$/;" v +pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $pos = $offset;$/;" v +pos ../../../src/classes/XLite/Model/Category.php /^ protected $pos = 0;$/;" v +pos ../../../src/classes/XLite/Model/MailImageParser.php /^ $pos = strpos($val, 'url(');$/;" v +pos ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $pos = strpos($str, $substr, $offset);$/;" v +pos ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $pos = strpos($view['text'], ' AS ');$/;" v +pos ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $pos = AbstractPlatform::TRIM_BOTH;$/;" v +pos ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $pos = AbstractPlatform::TRIM_LEADING;$/;" v +pos ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $pos = AbstractPlatform::TRIM_TRAILING;$/;" v +pos ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $pos = AbstractPlatform::TRIM_UNSPECIFIED;$/;" v +pos ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $pos = $token['position'] + $distance;$/;" v +pos ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $pos = strpos($dql, ' ', ($length > $pos) ? $pos : $length);$/;" v +pos ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ $pos = strpos($elements[0], '=');$/;" v +pos ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ $pos = strpos($headervalue, '=');$/;" v +pos ../../../src/lib/PHPMailer/class.smtp.php /^ $pos = $max_line_length - 1;$/;" v +pos ../../../src/lib/PHPMailer/class.smtp.php /^ $pos = strrpos(substr($line,0,$max_line_length)," ");$/;" v +pos1 ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $pos1 = strpos($str, "}", $pos);$/;" v +posStr ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $posStr = 'BOTH '.$trimChar;$/;" v +posStr ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $posStr = 'LEADING '.$trimChar;$/;" v +posStr ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $posStr = 'TRAILING '.$trimChar;$/;" v +posStr ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $posStr = '';$/;" v +position ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $position = ftell($this->filePointer);$/;" v +position ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $position = null,$/;" v +position ../../../src/classes/XLite/Core/DataSource/Ecwid/Categories.php /^ $this->position = $position;$/;" v +position ../../../src/classes/XLite/Core/DataSource/Ecwid/Categories.php /^ $this->position = 0;$/;" v +position ../../../src/classes/XLite/Core/DataSource/Ecwid/Categories.php /^ protected $position;$/;" v +position ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ $this->position = $position;$/;" v +position ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ $this->position = 0;$/;" v +position ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ protected $position;$/;" v +position ../../../src/classes/XLite/Model/MoneyModificator.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Model/Shipping/Method.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order/FulfillmentStatus.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order/PaymentStatus.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->position = $position;$/;" v +position ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $position;$/;" v +position ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ $this->position = $position;$/;" v +position ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ $this->position = 0;$/;" v +position ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ protected $position = 0;$/;" v +position ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $this->position = $position;$/;" v +position ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $this->position = 0;$/;" v +position ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ protected $position = 0;$/;" v +position ../../../src/lib/Doctrine/Common/Lexer.php /^ $this->position = $position;$/;" v +position ../../../src/lib/Doctrine/Common/Lexer.php /^ $this->position = 0;$/;" v +position ../../../src/lib/Doctrine/Common/Lexer.php /^ private $position = 0;$/;" v +post ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->post = $post;$/;" v +post ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $post;$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $postBody = http_build_query($postBody, '', '&');$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $postBody = $request->getPostBody();$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->postBody = $postBody;$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $postBody;$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $postBody = isset($media['postBody']) ? $media['postBody'] : null;$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $postBody = is_array($parameters['postBody']) || is_object($parameters['postBody'])$/;" v +postBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $postBody = null;$/;" v +postConnect ../../../src/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php /^ public function postConnect(ConnectionEventArgs $args)$/;" f +postConnect ../../../src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php /^ public function postConnect(ConnectionEventArgs $args)$/;" f +postData ../../../src/classes/XLite/Controller/Admin/States.php /^ $postData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postData ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $postData = array();$/;" v +postFields ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $postFields = array($/;" v +postInsertIds ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $postInsertIds = array();$/;" v +postInsertIds ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $postInsertIds = array();$/;" v +postInsertIds ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $postInsertIds = $persister->executeInserts();$/;" v +postLogin ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $postLogin = $request->login;$/;" v +postPassword ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $postPassword = \\XLite\\Core\\Auth::getInstance()->encryptPassword($postPassword);$/;" v +postPassword ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $postPassword = $request->password;$/;" v +postPersist ../../../src/classes/XLite/Core/Database.php /^ public function postPersist(\\Doctrine\\ORM\\Event\\LifecycleEventArgs $arg)$/;" f +postRebuildHelpers ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $this->postRebuildHelpers = $this->getHelpers('post_rebuild');$/;" v +postRebuildHelpers ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ protected $postRebuildHelpers;$/;" v +postRemove ../../../src/classes/XLite/Core/Database.php /^ public function postRemove(\\Doctrine\\ORM\\Event\\LifecycleEventArgs $arg)$/;" f +postURL ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $postURL = $this->apiURL . '?' . implode('&', $postData);$/;" v +postURL ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $postURL = $this->getApiURL() . '?API=' . $this->getApiName() . '&XML=' . urlencode($xmlData);$/;" v +postUpdate ../../../src/classes/XLite/Core/Database.php /^ public function postUpdate(\\Doctrine\\ORM\\Event\\LifecycleEventArgs $arg)$/;" f +postage ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $postage = $xml->getArrayByPath($xmlParsed, $this->getApiName() . 'Response\/Package\/Postage');$/;" v +postage ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $postage = $xml->getArrayByPath($xmlParsed, $this->getApiName() . 'Response\/Package\/Service');$/;" v +postedData ../../../src/classes/XLite/Controller/Admin/ShippingMethods.php /^ $postedData = $this->getPostedData('class_ids');$/;" v +postedData ../../../src/classes/XLite/Controller/Admin/ShippingMethods.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postedData ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postedData ../../../src/classes/XLite/Controller/Admin/ShippingSettings.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postedData ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postedData ../../../src/classes/XLite/Module/CDev/AustraliaPost/Controller/Admin/Aupost.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postedData ../../../src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php /^ $postedData = array($/;" v +postedData ../../../src/classes/XLite/Module/CDev/USPS/Controller/Admin/Usps.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postedData ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $postedData = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +postfixLen ../../../src/lib/Doctrine/DBAL/Schema/AbstractAsset.php /^ $postfixLen = strlen($postfix);$/;" v +postprocess ../../../src/classes/XLite/Controller/AController.php /^ public function postprocess()$/;" f +postprocess ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ public function postprocess()$/;" f +postprocess ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function postprocess()$/;" f +postprocess ../../../src/classes/XLite/Model/MailImageParser.php /^ public function postprocess()$/;" f +postprocess ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/Base/AMQP.php /^ protected function postprocess()$/;" f +postprocessActiveByProductId ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Repo/OptionGroup.php /^ protected function postprocessActiveByProductId(array $data, $productId)$/;" f +postprocessAllPatches ../../../src/classes/XLite/Model/Repo/TemplatePatch.php /^ protected function postprocessAllPatches(array $data)$/;" f +postprocessAlterSchemaTable ../../../src/classes/XLite/Core/Database.php /^ protected function postprocessAlterSchemaTable($schema)$/;" f +postprocessCacheCells ../../../src/classes/XLite/Model/Repo/ARepo.php /^ protected function postprocessCacheCells(array $cacheCells)$/;" f +postprocessCountriesStates ../../../src/classes/XLite/Model/Repo/Country.php /^ protected function postprocessCountriesStates(array $data)$/;" f +postprocessCreateSchema ../../../src/classes/XLite/Core/Database.php /^ protected function postprocessCreateSchema($schema)$/;" f +postprocessCreateSchemaTable ../../../src/classes/XLite/Core/Database.php /^ protected function postprocessCreateSchemaTable($schema)$/;" f +postprocessDropSchema ../../../src/classes/XLite/Core/Database.php /^ protected function postprocessDropSchema($schema)$/;" f +postprocessErrorAction ../../../src/classes/XLite/View/Model/AModel.php /^ protected function postprocessErrorAction()$/;" f +postprocessErrorActionValidateInput ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/Main.php /^ protected function postprocessErrorActionValidateInput()$/;" f +postprocessErrorActionValidateInput ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function postprocessErrorActionValidateInput()$/;" f +postprocessErrorActionValidateInput ../../../src/classes/XLite/View/Model/Profile/Main.php /^ protected function postprocessErrorActionValidateInput()$/;" f +postprocessLabelsByCode ../../../src/classes/XLite/Model/Repo/LanguageLabel.php /^ protected function postprocessLabelsByCode(array $data, $code)$/;" f +postprocessMethod ../../../src/classes/XLite/Core/Database.php /^ $postprocessMethod = 'postprocessCreateSchema';$/;" v +postprocessMethod ../../../src/classes/XLite/Core/Database.php /^ $postprocessMethod = 'postprocessDropSchema';$/;" v +postprocessMethod ../../../src/classes/XLite/Core/Database.php /^ $postprocessMethod = 'postprocessUpdateSchema';$/;" v +postprocessMethod ../../../src/classes/XLite/Core/Database.php /^ $postprocessMethod = null;$/;" v +postprocessSuccessAction ../../../src/classes/XLite/View/Model/AModel.php /^ protected function postprocessSuccessAction()$/;" f +postprocessSuccessActionCreate ../../../src/classes/XLite/View/Model/AModel.php /^ protected function postprocessSuccessActionCreate()$/;" f +postprocessSuccessActionCreate ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function postprocessSuccessActionCreate()$/;" f +postprocessSuccessActionDelete ../../../src/classes/XLite/View/Model/AModel.php /^ protected function postprocessSuccessActionDelete()$/;" f +postprocessSuccessActionDelete ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function postprocessSuccessActionDelete()$/;" f +postprocessSuccessActionModify ../../../src/classes/XLite/View/Model/AModel.php /^ protected function postprocessSuccessActionModify()$/;" f +postprocessSuccessActionModify ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function postprocessSuccessActionModify()$/;" f +postprocessSuccessActionUpdate ../../../src/classes/XLite/View/Model/AModel.php /^ protected function postprocessSuccessActionUpdate()$/;" f +postprocessSuccessActionUpdate ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function postprocessSuccessActionUpdate()$/;" f +postprocessSurcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ protected function postprocessSurcharge($surcharge)$/;" f +postprocessSurchargePrice ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OptionSurcharge.php /^ protected function postprocessSurchargePrice($surcharge)$/;" f +postprocessSurchargePrice ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ protected function postprocessSurchargePrice($surcharge)$/;" f +postprocessSurchargeWeight ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ protected function postprocessSurchargeWeight($surcharge)$/;" f +postprocessUpdateSchema ../../../src/classes/XLite/Core/Database.php /^ protected function postprocessUpdateSchema($schema)$/;" f +posts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->posts = $posts;$/;" v +posts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->posts = new PostsServiceResource($this, $this->serviceName, 'posts', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/blogger"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "fetchBodies": {"type": "boolean", "location": "query"}, "blogId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}, "startDate": {"type": "string", "location": "query"}}, "id": "blogger.posts.list", "httpMethod": "GET", "path": "blogs\/{blogId}\/posts", "response": {"$ref": "PostList"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/blogger"], "parameters": {"postId": {"required": true, "type": "string", "location": "path"}, "blogId": {"required": true, "type": "string", "location": "path"}}, "id": "blogger.posts.get", "httpMethod": "GET", "path": "blogs\/{blogId}\/posts\/{postId}", "response": {"$ref": "Post"}}}}', true));$/;" v +posts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $posts;$/;" v +postsLength ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $postsLength = strlen($postBody);$/;" v +potentialAssociationMappingIndexes ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php /^ $potentialAssociationMappingIndexes = array($/;" v +pounds ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $pounds = $weight;$/;" v +pounds ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $pounds = intval($pounds);$/;" v +pounds ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $pounds = $ounces = 0;$/;" v +pragma ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCacheParser.php /^ $pragma = $resp->getResponseHeader('pragma');$/;" v +preParser ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ $this->preParser = new DocParser;$/;" v +preParser ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ private $preParser;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ $precision = 10; \/\/ defaults to 10 when no valid precision is given.$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $precision = $tableColumn['length'];$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $precision = false;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $precision = $match[1];$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $precision = null;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $precision = $tableColumn['data_precision'];$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $precision = 1;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $precision = 20;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $precision = 5;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $precision = $tableColumn['data_precision'];$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $precision = null;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $precision = $match[1];$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $precision = null;$/;" v +precision ../../../src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php /^ $precision = null;$/;" v +precision ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $precision = 0;$/;" v +predicates ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $predicates = new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args());$/;" v +predicates ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $predicates = new Expr\\Andx(func_get_args());$/;" v +predict ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function predict($hostedModelName, Input $postBody, $optParams = array()) {$/;" f +predict ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function predict($id, Input $postBody, $optParams = array()) {$/;" f +pref ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $pref => array($/;" v +pref ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $pref = $this->getPrefixPostedData();$/;" v +preferences ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->preferences = $preferences;$/;" v +preferences ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $preferences;$/;" v +prefersIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function prefersIdentityColumns()$/;" f +prefersIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ public function prefersIdentityColumns()$/;" f +prefersIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function prefersIdentityColumns()$/;" f +prefersIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ public function prefersIdentityColumns()$/;" f +prefersIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ public function prefersIdentityColumns()$/;" f +prefersSequences ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function prefersSequences()$/;" f +prefersSequences ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ public function prefersSequences()$/;" f +prefersSequences ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ public function prefersSequences()$/;" f +prefix ../../../src/classes/XLite/Core/FileCache.php /^ $prefix = $this->_getNamespacedId($prefix);$/;" v +prefix ../../../src/classes/XLite/Model/Currency.php /^ protected $prefix = '';$/;" v +prefix ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $prefix = $this->getCreateDataPrefix();$/;" v +prefix ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $prefix = $this->getRemoveDataPrefix();$/;" v +prefix ../../../src/classes/XLite/View/TopMessage.php /^ $prefix = 'Error';$/;" v +prefix ../../../src/classes/XLite/View/TopMessage.php /^ $prefix = 'Warning';$/;" v +prefix ../../../src/lib/Doctrine/Common/Cache/AbstractCache.php /^ $prefix = $this->_getNamespacedId($prefix);$/;" v +prefix ../../../src/lib/Symfony/Component/Yaml/Dumper.php /^ $prefix = $indent ? str_repeat(' ', $indent) : '';$/;" v +prefixes ../../../src/classes/XLite/View/Header.php /^ $prefixes = implode(' ', $data);$/;" v +prefixes ../../../src/classes/XLite/View/Header.php /^ $prefixes = static::defineHeadPrefixes();$/;" v +preloadClasses ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/XLite.php /^ protected function preloadClasses()$/;" f +preloadClassesList ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/XLite.php /^ protected $preloadClassesList = array($/;" v +prepare ../../../src/classes/XLite/Core/Connection.php /^ public function prepare($statement)$/;" f +prepare ../../../src/classes/XLite/Core/FlexyCompiler.php /^ public function prepare($original, $force = false)$/;" f +prepare ../../../src/classes/XLite/Core/ImageOperator.php /^ protected function prepare()$/;" f +prepare ../../../src/classes/XLite/Core/Request.php /^ protected function prepare($data)$/;" f +prepare ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP.php /^ protected function prepare()$/;" f +prepare ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/Permanent.php /^ protected function prepare()$/;" f +prepare ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function prepare($statement)$/;" f +prepare ../../../src/lib/Doctrine/DBAL/Driver/Connection.php /^ function prepare($prepareString);$/;" f +prepare ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ function prepare($sql)$/;" f +prepare ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ public function prepare($prepareString)$/;" f +prepare ../../../src/lib/Doctrine/DBAL/Portability/Connection.php /^ public function prepare($statement)$/;" f +prepareAddressData ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function prepareAddressData(array $data)$/;" f +prepareArray ../../../src/classes/XLite/Core/Database.php /^ public static function prepareArray(array $data, $prefix = 'arr')$/;" f +prepareAttributes ../../../src/classes/XLite/View/FormField/AFormField.php /^ protected function prepareAttributes(array $attrs)$/;" f +prepareAttributes ../../../src/classes/XLite/View/FormField/Input/Checkbox.php /^ protected function prepareAttributes(array $attrs)$/;" f +prepareAttributes ../../../src/classes/XLite/View/FormField/Select/Base/Rich.php /^ protected function prepareAttributes(array $attrs)$/;" f +prepareAttributes ../../../src/classes/XLite/View/FormField/Select/CheckboxList/ACheckboxList.php /^ protected function prepareAttributes(array $attrs)$/;" f +prepareBackTrace ../../../src/classes/XLite/Core/Operator.php /^ public function prepareBackTrace(array $backTrace, $slice = 0)$/;" f +prepareBackTrace ../../../src/classes/XLite/Logger.php /^ protected function prepareBackTrace(array $trace)$/;" f +prepareBasePath ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/AView.php /^ protected static function prepareBasePath($path)$/;" f +prepareBeforeCreate ../../../src/classes/XLite/Model/Cart.php /^ public function prepareBeforeCreate()$/;" f +prepareBeforeCreate ../../../src/classes/XLite/Model/Product.php /^ public function prepareBeforeCreate()$/;" f +prepareBeforeRemove ../../../src/classes/XLite/Model/Cart.php /^ public function prepareBeforeRemove()$/;" f +prepareBeforeRemove ../../../src/classes/XLite/Model/Order.php /^ public function prepareBeforeRemove()$/;" f +prepareBeforeSave ../../../src/classes/XLite/Model/Base/Catalog.php /^ public function prepareBeforeSave()$/;" f +prepareBeforeSave ../../../src/classes/XLite/Model/Base/Storage.php /^ public function prepareBeforeSave()$/;" f +prepareBeforeSave ../../../src/classes/XLite/Model/Cart.php /^ public function prepareBeforeSave()$/;" f +prepareBeforeSave ../../../src/classes/XLite/Model/Order.php /^ public function prepareBeforeSave()$/;" f +prepareBeforeUpdate ../../../src/classes/XLite/Model/Module.php /^ public function prepareBeforeUpdate()$/;" f +prepareBeforeUpdate ../../../src/classes/XLite/Model/Product.php /^ public function prepareBeforeUpdate()$/;" f +prepareCSSCache ../../../src/classes/XLite/View/AResourcesContainer.php /^ protected function prepareCSSCache($filePath)$/;" f +prepareCategoryId ../../../src/classes/XLite/Model/Repo/Category.php /^ protected function prepareCategoryId($categoryId)$/;" f +prepareClassName ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ protected function prepareClassName($class)$/;" f +prepareClassName ../../../src/Includes/Utils/Converter.php /^ public static function prepareClassName($class, $relative = true)$/;" f +prepareClassRelatedValue ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function prepareClassRelatedValue($value)$/;" f +prepareCnd ../../../src/classes/XLite/View/ItemsList/Product/Customer/Search.php /^ protected function prepareCnd(\\XLite\\Core\\CommonCell $cnd)$/;" f +prepareCndAdded ../../../src/classes/XLite/Module/CDev/Multicurrency/Model/Repo/Currency.php /^ protected function prepareCndAdded(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndAddress ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndAddress(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndAnswered ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndAnswered(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndApproved ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Supplier.php /^ protected function prepareCndApproved(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndCategoryId ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndCategoryId(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndClosed ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndClosed(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndCommon ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndCommon(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $fieldName, $exactCmp = true, $alias = 'p')$/;" f +prepareCndConversation ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ protected function prepareCndConversation(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, \\XLite\\Module\\CDev\\Conversations\\Model\\Conversation $value = null)$/;" f +prepareCndCoreVersion ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndCoreVersion(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndCountry ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndCountry(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndCurrency ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndCurrency(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndCustomState ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndCustomState(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndCustomer ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Order.php /^ protected function prepareCndCustomer(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndDate ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndDate(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value = null)$/;" f +prepareCndDateFrom ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Order.php /^ protected function prepareCndDateFrom(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndDateFrom ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndDateFrom(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndDateTo ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Order.php /^ protected function prepareCndDateTo(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndDateTo ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndDateTo(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndDateType ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndDateType(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndDisplayOnlyLow ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ protected function prepareCndDisplayOnlyLow(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndEmail ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndEmail(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndEmail ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ protected function prepareCndEmail(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndFavoriteFor ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ protected function prepareCndFavoriteFor(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndFromMarketplace ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndFromMarketplace(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndFulfillmentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ protected function prepareCndFulfillmentStatus(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndImportState ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ protected function prepareCndImportState(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndInactive ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndInactive(\\Doctrine\\ORM\\QueryBuilder $queryBuilder)$/;" f +prepareCndInstalled ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndInstalled(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndInventory ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndInventory(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = self::INV_ALL)$/;" f +prepareCndInventory ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ protected function prepareCndInventory(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = self::INV_ALL)$/;" f +prepareCndInventory ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Product.php /^ protected function prepareCndInventory(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = self::INV_ALL)$/;" f +prepareCndLanguage ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndLanguage(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndLastMessageDateFrom ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndLastMessageDateFrom(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndLastMessageDateTo ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndLastMessageDateTo(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndLimit ../../../src/classes/XLite/Model/Repo/Currency.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Repo/Order/Tag.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndLimit ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Repo/WishlistProducts.php /^ protected function prepareCndLimit(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndMembership ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndMembership(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndOnlyTranslated ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Repo/Product.php /^ protected function prepareCndOnlyTranslated(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndOnlyUntranslated ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Repo/Product.php /^ protected function prepareCndOnlyUntranslated(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Model/Repo/Currency.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Product.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value, $countOnly)$/;" f +prepareCndOrderBy ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Repo/WishlistProducts.php /^ protected function prepareCndOrderBy(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndOrderId ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndOrderId(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndOrderId ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndOrderId(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndParticipateSale ../../../src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php /^ protected function prepareCndParticipateSale(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndPattern ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndPattern(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndPaymentMethod ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ protected function prepareCndPaymentMethod(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndPaymentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ protected function prepareCndPaymentStatus(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value)$/;" f +prepareCndPermissions ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndPermissions(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndPhone ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndPhone(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndPrice ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndPrice(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndPriceFilter ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndPriceFilter(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndProduct ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Order.php /^ protected function prepareCndProduct(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndProduct ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ protected function prepareCndProduct(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndProfile ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndProfile(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, \\XLite\\Model\\Profile $value)$/;" f +prepareCndProfile ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndProfile(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, \\XLite\\Model\\Profile $value)$/;" f +prepareCndProfileId ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndProfileId(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndProfileId ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndProfileId(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndPublished ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Supplier.php /^ protected function prepareCndPublished(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndQuantity ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Product.php /^ protected function prepareCndQuantity(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndReferer ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndReferer(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndRoles ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndRoles(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSKU ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndSKU(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSKU ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ protected function prepareCndSKU(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndShippingMethod ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ protected function prepareCndShippingMethod(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndSingleModuleSearch ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndSingleModuleSearch(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, \\XLite\\Model\\Module $module)$/;" f +prepareCndState ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndState(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndStatus ../../../src/classes/XLite/Model/Repo/Order.php /^ protected function prepareCndStatus(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSubstring ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndSubstring(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSubstring ../../../src/classes/XLite/Model/Repo/Product.php /^ protected function prepareCndSubstring(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSubstring ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ protected function prepareCndSubstring(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSubstring ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ protected function prepareCndSubstring(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSubstring ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ protected function prepareCndSubstring(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSubstring ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ protected function prepareCndSubstring(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSupplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Order.php /^ protected function prepareCndSupplier(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareCndSupplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ protected function prepareCndSupplier(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value, $countOnly)$/;" f +prepareCndSupplier ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ protected function prepareCndSupplier(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndSupplierCategory ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Product.php /^ protected function prepareCndSupplierCategory(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndTag ../../../src/classes/XLite/Model/Repo/Module.php /^ protected function prepareCndTag(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndTotal ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ protected function prepareCndTotal(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, array $value = null)$/;" f +prepareCndType ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ protected function prepareCndType(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndUserType ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function prepareCndUserType(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value)$/;" f +prepareCndUserType ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ protected function prepareCndUserType(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, $value = null)$/;" f +prepareContent ../../../src/classes/XLite/View/Controller.php /^ protected function prepareContent()$/;" f +prepareCreate ../../../src/classes/XLite/Model/Profile.php /^ protected function prepareCreate()$/;" f +prepareCreate ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Profile.php /^ protected function prepareCreate()$/;" f +prepareData ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ protected function prepareData($data, $isNew = false)$/;" f +prepareDataForExistingCell ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ protected function prepareDataForExistingCell($value, \\XLite\\Model\\SessionCell $cell = null)$/;" f +prepareDataForMapping ../../../src/classes/XLite/View/Model/AModel.php /^ protected function prepareDataForMapping()$/;" f +prepareDataForMapping ../../../src/classes/XLite/View/Model/Address/Address.php /^ protected function prepareDataForMapping()$/;" f +prepareDataForMapping ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ protected function prepareDataForMapping()$/;" f +prepareDataForMapping ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function prepareDataForMapping()$/;" f +prepareDataForNewCell ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ protected function prepareDataForNewCell($id, $name, $value)$/;" f +prepareDataToValidate ../../../src/classes/XLite/View/Model/Address/Address.php /^ protected function prepareDataToValidate($data)$/;" f +prepareDirectoryMode ../../../src/Includes/Utils/FileManager.php /^ protected static function prepareDirectoryMode($path, $mode)$/;" f +prepareEntityBeforeCommit ../../../src/classes/XLite/Model/AEntity.php /^ public function prepareEntityBeforeCommit($type)$/;" f +prepareEntityBeforeCommit ../../../src/classes/XLite/Model/Order.php /^ public function prepareEntityBeforeCommit($type)$/;" f +prepareErrorMessage ../../../src/Includes/DataStructure/Graph.php /^ protected function prepareErrorMessage($code, self $node = null)$/;" f +prepareErrorMessage ../../../src/classes/XLite/View/Model/AModel.php /^ protected function prepareErrorMessage($message, array $data)$/;" f +prepareFieldParamsAccessLevel ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/Main.php /^ protected function prepareFieldParamsAccessLevel(&$data)$/;" f +prepareFieldParamsDate ../../../src/classes/XLite/View/Order/Details/Admin/Model.php /^ protected function prepareFieldParamsDate(array &$data)$/;" f +prepareFieldParamsStatus ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/Main.php /^ protected function prepareFieldParamsStatus(&$data)$/;" f +prepareFormDataToSave ../../../src/classes/XLite/View/Model/AModel.php /^ protected function prepareFormDataToSave(array $data)$/;" f +prepareFormId ../../../src/classes/XLite/Model/FormId.php /^ public function prepareFormId()$/;" f +prepareHandler ../../../src/classes/XLite/Model/CachingFactory.php /^ protected static function prepareHandler($handler)$/;" f +prepareInlineField ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function prepareInlineField(\\XLite\\View\\FormField\\Inline\\AInline $field, \\XLite\\Model\\AEntity $entity)$/;" f +prepareInlineFields ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function prepareInlineFields()$/;" f +prepareInputData ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ protected function prepareInputData(\\XLite\\Logic\\Order\\Modifier\\Shipping $modifier)$/;" f +prepareJSCache ../../../src/classes/XLite/View/AResourcesContainer.php /^ protected function prepareJSCache($filePath)$/;" f +prepareListChildTagData ../../../src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php /^ protected function prepareListChildTagData(array $data)$/;" f +prepareListChildTemplates ../../../src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php /^ protected function prepareListChildTemplates(array $list)$/;" f +prepareMarkups ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ protected function prepareMarkups($markups)$/;" f +prepareMenus ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ protected function prepareMenus(array $menus)$/;" f +prepareMethodName ../../../src/classes/XLite/Core/Converter.php /^ public static function prepareMethodName($string)$/;" f +prepareModifiers ../../../src/classes/XLite/Logic/Price.php /^ protected function prepareModifiers(array $modifiers, array $behaviors, $purpose)$/;" f +prepareModuleControllerClass ../../../src/Includes/Decorator/Plugin/ModuleControllers/Main.php /^ protected function prepareModuleControllerClass(\\Includes\\Decorator\\DataStructure\\Graph\\Classes $node)$/;" f +prepareNewCategoryData ../../../src/classes/XLite/Model/Repo/Category.php /^ protected function prepareNewCategoryData(\\XLite\\Model\\Category $entity, \\XLite\\Model\\Category $parent = null)$/;" f +prepareNodeData ../../../src/Includes/Decorator/Plugin/Templates/Data/Templates/Collection.php /^ protected function prepareNodeData($fileinfo)$/;" f +prepareNonSynchronizedAccounts ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ protected function prepareNonSynchronizedAccounts()$/;" f +prepareObjectForMapping ../../../src/classes/XLite/View/Model/AModel.php /^ protected function prepareObjectForMapping()$/;" f +prepareOptions ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ public function prepareOptions(array $options)$/;" f +prepareOptionsAvailabilityCondition ../../../src/classes/XLite/Model/Repo/Config.php /^ protected function prepareOptionsAvailabilityCondition(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +prepareOrderItem ../../../src/classes/XLite/Controller/Customer/Cart.php /^ protected function prepareOrderItem(\\XLite\\Model\\Product $product, $amount)$/;" f +preparePagerCSSFiles ../../../src/classes/XLite/View/ItemsList/AItemsList.php /^ protected function preparePagerCSSFiles($list)$/;" f +preparePatterns ../../../src/classes/XLite/Core/Pack/Distr.php /^ protected function preparePatterns()$/;" f +preparePaymentMethodIcon ../../../src/classes/XLite/View/Checkout/Step/Payment.php /^ protected function preparePaymentMethodIcon($icon)$/;" f +preparePreprocessors ../../../src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php /^ protected function preparePreprocessors(array &$data)$/;" f +prepareProfileData ../../../src/classes/XLite/Core/CMSConnector.php /^ public function prepareProfileData($cmsUserId, array $data)$/;" f +prepareQuickFlags ../../../src/classes/XLite/Model/Repo/Category.php /^ protected function prepareQuickFlags($scAll, $scEnabled)$/;" f +prepareRemove ../../../src/classes/XLite/Model/Base/Storage.php /^ public function prepareRemove()$/;" f +prepareRequestData ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ protected function prepareRequestData($inputData)$/;" f +prepareRequestData ../../../src/classes/XLite/View/Model/AModel.php /^ protected function prepareRequestData(array $data)$/;" f +prepareRequestDataDomestic ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ protected function prepareRequestDataDomestic($data, $packKey)$/;" f +prepareRequestDataIntl ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ protected function prepareRequestDataIntl($data, $packKey)$/;" f +prepareResource ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/AView.php /^ protected function prepareResource(array $data, $interface = null)$/;" f +prepareResource ../../../src/classes/XLite/View/AView.php /^ protected function prepareResource(array $data, $interface = null)$/;" f +prepareResourceURL ../../../src/classes/XLite/Core/Layout.php /^ protected function prepareResourceURL($url, $outputType)$/;" f +prepareResponse ../../../src/classes/XLite/Core/Marketplace.php /^ protected function prepareResponse(\\PEAR2\\HTTP\\Request\\Response $response, $action)$/;" f +prepareResponseForGetAddonsAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function prepareResponseForGetAddonsAction(array $data)$/;" f +prepareResponseForGetCoresAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function prepareResponseForGetCoresAction(array $data)$/;" f +prepareService ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function prepareService() {$/;" f +prepareSkinURL ../../../src/classes/XLite/Core/Layout.php /^ public function prepareSkinURL($shortPath, $outputType = self::WEB_PATH_OUTPUT_SHORT)$/;" f +prepareSolrCndCategoryId ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndCategoryId($value)$/;" f +prepareSolrCndLimit ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndLimit(array $value, $countOnly)$/;" f +prepareSolrCndOrderBy ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndOrderBy(array $value, $countOnly)$/;" f +prepareSolrCndPrice ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndPrice($value)$/;" f +prepareSolrCndSKU ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndSKU($value)$/;" f +prepareSolrCndSubstring ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndSubstring($value)$/;" f +prepareSolrCndSubstringAll ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndSubstringAll($value)$/;" f +prepareSolrCndSubstringAny ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndSubstringAny($value)$/;" f +prepareSolrCndSubstringPhrase ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected function prepareSolrCndSubstringPhrase($value)$/;" f +prepareStep ../../../src/classes/XLite/Core/Task/ATask.php /^ protected function prepareStep()$/;" f +prepareSum ../../../src/classes/XLite/Model/Repo/Shipping/Markup.php /^ $prepareSum = array($/;" v +prepareTokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function prepareTokens(array $tokens, $index = null)$/;" f +prepareTopSellersCondition ../../../src/classes/XLite/Model/Repo/OrderItem.php /^ protected function prepareTopSellersCondition(\\Doctrine\\ORM\\QueryBuilder $queryBuilder, \\XLite\\Core\\CommonCell $cnd)$/;" f +prepareURLParams ../../../src/classes/XLite/Module/CDev/Sale/View/SaleSelectedButton.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/Button/AddWishlist.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/APopupButton.php /^ abstract protected function prepareURLParams();$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/AddAddress.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/Addon/EnterLicenseKey.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/Addon/Install.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/Addon/SelectInstallationType.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/Addon/Upload.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/BrowseServer.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/DeleteCategory.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/DeleteUser.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/FileSelector.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Button/ModifyAddress.php /^ protected function prepareURLParams()$/;" f +prepareURLParams ../../../src/classes/XLite/View/Upgrade/SelectCoreVersion/ASelectCoreVersion.php /^ protected function prepareURLParams()$/;" f +prepareUpdateSalePriceCalculatedFields ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ public function prepareUpdateSalePriceCalculatedFields()$/;" f +prepareValueForGet ../../../src/classes/XLite/Model/SessionCell.php /^ public static function prepareValueForGet($value, $type = null)$/;" f +prepareValueForSet ../../../src/classes/XLite/Model/SessionCell.php /^ public static function prepareValueForSet($value, $type = null)$/;" f +prepareWeightAttrs ../../../src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php /^ protected function prepareWeightAttrs(array &$data)$/;" f +prepared ../../../src/classes/XLite/Core/ImageOperator.php /^ $this->prepared = true;$/;" v +prepared ../../../src/classes/XLite/Core/ImageOperator.php /^ protected $prepared = false;$/;" v +prepared ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ $prepared = null;$/;" v +prepared ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ $prepared = null;$/;" v +prepared ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ $prepared = array();$/;" v +prepend ../../../src/lib/Log/display.php /^ $prepend = $conf['error_prepend'];$/;" v +prepend ../../../src/lib/Log/display.php /^ $prepend = ini_get('error_prepend_string');$/;" v +prepend ../../../src/lib/Log/display.php /^ $prepend = null;$/;" v +preprocess ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function preprocess()$/;" f +preprocess ../../../src/classes/XLite/Logic/Order/Modifier/AModifier.php /^ public function preprocess()$/;" f +preprocessCategories ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ protected function preprocessCategories(array $value)$/;" f +preprocessCnd ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected function preprocessCnd(\\XLite\\Core\\CommonCell $cnd)$/;" f +preprocessDate ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Model/Conversations.php /^ protected function preprocessDate($value, array $column, \\XLite\\Module\\CDev\\Conversations\\Model\\Conversation $conversation)$/;" f +preprocessDate ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Model/Messages.php /^ protected function preprocessDate($value, array $column, \\XLite\\Module\\CDev\\Conversations\\Model\\Message $message)$/;" f +preprocessLastMessageDate ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Model/Conversations.php /^ protected function preprocessLastMessageDate($value, array $column, \\XLite\\Module\\CDev\\Conversations\\Model\\Conversation $conversation)$/;" f +preprocessName ../../../src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php /^ protected function preprocessName($value, array $column, \\XLite\\Model\\Role $role)$/;" f +preprocessOpenGraphMetaTags ../../../src/classes/XLite/Module/CDev/GoSocial/Model/Product.php /^ protected function preprocessOpenGraphMetaTags($tags)$/;" f +preprocessOrderId ../../../src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php /^ protected function preprocessOrderId($id, array $column, \\XLite\\Model\\Order $entity)$/;" f +preprocessPageId ../../../src/classes/XLite/View/Pager/Admin/Model/Table.php /^ protected function preprocessPageId($id)$/;" f +preprocessProfile ../../../src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php /^ protected function preprocessProfile(\\XLite\\Model\\Profile $profile, array $column, \\XLite\\Model\\Order $entity)$/;" f +preprocessSavedValue ../../../src/classes/XLite/View/FormField/Inline/Input/Checkbox/Switcher/Enabled.php /^ protected function preprocessSavedValue($value)$/;" f +preprocessStatus ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/SupplierOrders.php /^ protected function preprocessStatus($value, array $column, \\XLite\\Model\\Order $order)$/;" f +preprocessSupplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ protected function preprocessSupplier(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier = null)$/;" f +preprocessType ../../../src/classes/XLite/Module/CDev/Places/View/ItemsList/Model/Places.php /^ protected function preprocessType($value, array $column, \\XLite\\Module\\CDev\\Places\\Model\\Place $place)$/;" f +preprocessValueBeforeSave ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ protected function preprocessValueBeforeSave($value)$/;" f +preprocessValueBeforeSaveFulfillmentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/FormField/Inline/Select/OrderStatuses.php /^ protected function preprocessValueBeforeSaveFulfillmentStatus($value)$/;" f +preprocessValueBeforeSavePaymentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/FormField/Inline/Select/OrderStatuses.php /^ protected function preprocessValueBeforeSavePaymentStatus($value)$/;" f +presenter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->presenter = $presenter;$/;" v +presenter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $presenter;$/;" v +prev ../../../src/classes/XLite/Core/XML.php /^ $prev = $i;$/;" v +prev ../../../src/classes/XLite/Core/XML.php /^ $prev = 0;$/;" v +prev ../../../src/classes/XLite/Model/Collection.php /^ $prev = $current->getPrev();$/;" v +prev ../../../src/classes/XLite/Model/ListNode.php /^ $this->prev = $node;$/;" v +prev ../../../src/classes/XLite/Model/ListNode.php /^ protected $prev = null;$/;" v +prevClass ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $prevClass = $this->em->getClassMetadata(get_class($prevManagedCopy));$/;" v +prevCurrency ../../../src/classes/XLite/Module/CDev/Multicurrency/Controller/Admin/Currencies.php /^ $prevCurrency = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Currency')->find($/;" v +prevObj ../../../src/classes/XLite/Base.php /^ $prevObj = $obj;$/;" v +prevPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->prevPageToken = $prevPageToken;$/;" v +prevPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $prevPageToken;$/;" v +prevPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->prevPageToken = $prevPageToken;$/;" v +prevPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $prevPageToken;$/;" v +prevProp ../../../src/classes/XLite/Base.php /^ $prevProp = $part;$/;" v +prevVal ../../../src/classes/XLite/Base.php /^ $prevVal = $obj;$/;" v +prev_pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $prev_pos = $pos + strlen($search_text);$/;" v +prev_pos ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $prev_pos = 0;$/;" v +previewImageUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->previewImageUrl = $previewImageUrl;$/;" v +previewImageUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $previewImageUrl;$/;" v +previewLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->previewLink = $previewLink;$/;" v +previewLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $previewLink;$/;" v +previous ../../../src/classes/XLite/DataSet/Collection.php /^ $previous = array();$/;" v +previousClasses ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $previousClasses = array();$/;" v +previousIndent ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $previousIndent = $matches['indent'];$/;" v +previousIndent ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $previousIndent = 0;$/;" v +previousItems ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $previousItems = array_merge($previousItems, $items);$/;" v +previousItems ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $previousItems = array();$/;" v +previousLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->previousLink = $previousLink;$/;" v +previousLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $previousLink;$/;" v +previousLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->previousLink = $previousLink;$/;" v +previousLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $previousLink;$/;" v +previousPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->previousPageToken = $previousPageToken;$/;" v +previousPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $previousPageToken;$/;" v +price ../../../src/classes/XLite/Core/Converter.php /^ $price = number_format($/;" v +price ../../../src/classes/XLite/Model/Module.php /^ protected $price = 0.00;$/;" v +price ../../../src/classes/XLite/Model/OrderItem.php /^ $price = $item->getPrice();$/;" v +price ../../../src/classes/XLite/Model/OrderItem.php /^ $this->price = $price;$/;" v +price ../../../src/classes/XLite/Model/OrderItem.php /^ $this->price = 0;$/;" v +price ../../../src/classes/XLite/Model/OrderItem.php /^ protected $price;$/;" v +price ../../../src/classes/XLite/Model/Product.php /^ protected $price = 0.0000;$/;" v +price ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OrderItem.php /^ $price = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +price ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OrderItem.php /^ $price = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +price ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/View/Price.php /^ $price = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +price ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/View/Price.php /^ $price = parent::getListPrice();$/;" v +price ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/View/Surcharge.php /^ $price = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +price ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/View/Surcharge.php /^ $price = parent::getSurcharge();$/;" v +price ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php /^ $price = parent::getPrice();$/;" v +price ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->price = $price;$/;" v +price ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $price;$/;" v +price ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ protected $price;$/;" v +price ../../../src/classes/XLite/Module/CDev/Sale/Model/OrderItem.php /^ $price = $product->getSalePrice();$/;" v +price ../../../src/classes/XLite/Module/CDev/Sale/Model/OrderItem.php /^ $price = parent::getPrice();$/;" v +price ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ $price = $this->getPrice();$/;" v +price ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ $price = $this->getPrice();$/;" v +price ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $price = $rate->getTaxableBasis();$/;" v +priceAbsoluteCnd ../../../src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php /^ $priceAbsoluteCnd = new \\Doctrine\\ORM\\Query\\Expr\\Andx();$/;" v +pricePercentCnd ../../../src/classes/XLite/Module/CDev/Sale/Model/Repo/Product.php /^ $pricePercentCnd = new \\Doctrine\\ORM\\Query\\Expr\\Andx();$/;" v +priceWithMarkup ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Product.php /^ protected $priceWithMarkup = 0;$/;" v +primary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->primary = $primary;$/;" v +primary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $primary;$/;" v +primary ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $primary = ($data['uniquerule'] == "P");$/;" v +primary ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $primary = $this->ArithmeticPrimary();$/;" v +primaryClass ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php /^ $primaryClass = $em->getClassMetadata($AST->deleteClause->abstractSchemaName);$/;" v +primaryClass ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $primaryClass = $sqlWalker->getEntityManager()->getClassMetadata($updateClause->abstractSchemaName);$/;" v +primaryClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $primaryClass = $this->_em->getClassMetadata($/;" v +primaryDqlAlias ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php /^ $primaryDqlAlias = $AST->deleteClause->aliasIdentificationVariable;$/;" v +primaryKey ../../../src/lib/Doctrine/DBAL/Schema/Table.php /^ $primaryKey = $this->_createIndex($columns, $indexName ?: "primary", true, true);$/;" v +primaryKeyColumns ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ $primaryKeyColumns = $this->tables[$tableName]->getPrimaryKey()->getColumns();$/;" v +primaryKeyColumns ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ $primaryKeyColumns = array();$/;" v +primaryKeyColumns ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $primaryKeyColumns = $uniqueConstraints = array(); \/\/ PK is unnecessary for this relation-type$/;" v +primaryKeyColumns ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $primaryKeyColumns = $uniqueConstraints = array();$/;" v +primaryLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->primaryLanguage = $primaryLanguage;$/;" v +primaryLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $primaryLanguage;$/;" v +primaryTable ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ $primaryTable = array($/;" v +printAJAXOuput ../../../src/classes/XLite/Controller/AController.php /^ protected function printAJAXOuput($output)$/;" f +printContent ../../../src/classes/XLite/Controller/Console/AConsole.php /^ protected function printContent($str)$/;" f +printError ../../../src/classes/XLite/Controller/Console/AConsole.php /^ protected function printError($error)$/;" f +printType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->printType = $printType;$/;" v +printType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $printType;$/;" v +println ../../../src/lib/Doctrine/ORM/Query/Printer.php /^ public function println($str)$/;" f +priorities ../../../src/lib/Log/daemon.php /^ static $priorities = array($/;" v +priorities ../../../src/lib/Log/syslog.php /^ static $priorities = array($/;" v +priority ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ $priority = self::DEFAULT_PRIORITY;$/;" v +priority ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ $priority = is_numeric($priority) ? round(doubleval($priority), 1) : self::DEFAULT_PRIORITY;$/;" v +priority ../../../src/lib/Log/composite.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/console.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/daemon.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/display.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/error_log.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/file.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/firebug.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/mail.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/mcal.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/mdb2.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/null.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/sql.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/sqlite.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/syslog.php /^ $priority = $this->_priority;$/;" v +priority ../../../src/lib/Log/syslog.php /^ $priority = $this->_toSyslog($priority);$/;" v +priority ../../../src/lib/Log/win.php /^ $priority = $this->_priority;$/;" v +priorityToString ../../../src/lib/Log.php /^ function priorityToString($priority)$/;" f +privKey ../../../src/lib/PHPMailer/class.phpmailer.php /^ $privKey = $privKeyStr;$/;" v +privKey ../../../src/lib/PHPMailer/class.phpmailer.php /^ $privKey = openssl_pkey_get_private($privKeyStr,$this->DKIM_passphrase);$/;" v +privKeyStr ../../../src/lib/PHPMailer/class.phpmailer.php /^ $privKeyStr = file_get_contents($this->DKIM_private);$/;" v +private ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->private = $private;$/;" v +private ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $private;$/;" v +privateCopy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->privateCopy = $privateCopy;$/;" v +privateCopy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $privateCopy;$/;" v +privateKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $this->privateKey = $privateKey;$/;" v +privateKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ public $privateKey;$/;" v +privateKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiP12Signer.php /^ $this->privateKey = openssl_pkey_get_private($certs["pkey"]);$/;" v +privateKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiP12Signer.php /^ private $privateKey;$/;" v +privateKeyPassword ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $privateKeyPassword = 'notasecret',$/;" v +privateKeyPassword ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $this->privateKeyPassword = $privateKeyPassword;$/;" v +privateKeyPassword ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ public $privateKeyPassword;$/;" v +probeKey ../../../src/classes/XLite/Controller/Admin/Measure.php /^ $probeKey = new \\XLite\\Model\\Config;$/;" v +probeKey ../../../src/classes/XLite/Controller/Admin/Measure.php /^ $probeKey = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config')->findOneBy(array('name' => 'probe_key'));$/;" v +proccessPreUpdate ../../../src/classes/XLite/Model/Inventory.php /^ public function proccessPreUpdate()$/;" f +proceedTime ../../../src/classes/XLite/Module/CDev/AustraliaPost/Controller/Admin/Aupost.php /^ $proceedTime = microtime(true) - $startTime;$/;" v +proceedTime ../../../src/classes/XLite/Module/CDev/USPS/Controller/Admin/Usps.php /^ $proceedTime = microtime(true) - $startTime;$/;" v +process ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ $process = false;$/;" v +process ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ $process = true;$/;" v +process ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ public static function process($meta, &$params) {$/;" f +process ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ public function process()$/;" f +processAddItemError ../../../src/classes/XLite/Controller/Customer/Cart.php /^ protected function processAddItemError()$/;" f +processAddItemSuccess ../../../src/classes/XLite/Controller/Customer/Cart.php /^ protected function processAddItemSuccess()$/;" f +processCallback ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ public function processCallback(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processCallback ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ public function processCallback(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processCallback ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ public function processCallback(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processCallback ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ public function processCallback(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processChangeFulfillmentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ protected function processChangeFulfillmentStatus(\\XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\FulfillmentStatus $previousStatus = null)$/;" f +processChangePaymentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ protected function processChangePaymentStatus(\\XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\PaymentStatus $previousStatus = null)$/;" f +processCheckout ../../../src/classes/XLite/Model/Order.php /^ protected function processCheckout()$/;" f +processCreate ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function processCreate()$/;" f +processCreateErrors ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function processCreateErrors()$/;" f +processCustomPatch ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function processCustomPatch(\\XLite\\Model\\TemplatePatch $patch)$/;" f +processData ../../../src/classes/XLite/Controller/Admin/Autocomplete.php /^ protected function processData(array $data)$/;" f +processData ../../../src/classes/XLite/Controller/Admin/TopSellers.php /^ protected function processData($data)$/;" f +processData ../../../src/classes/XLite/Controller/Customer/Autocomplete.php /^ protected function processData(array $data)$/;" f +processDecline ../../../src/classes/XLite/Model/Order.php /^ protected function processDecline()$/;" f +processDefaultImage ../../../src/classes/XLite/View/Image.php /^ protected function processDefaultImage()$/;" f +processEntityRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ public function processEntityRequest(apiHttpRequest $request) {$/;" f +processFail ../../../src/classes/XLite/Model/Order.php /^ protected function processFail()$/;" f +processFileUpload ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ public static function processFileUpload($file) {$/;" f +processHeader ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ protected function processHeader($header)$/;" f +processImage ../../../src/classes/XLite/View/Image.php /^ protected function processImage()$/;" f +processImportStep ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ protected function processImportStep()$/;" f +processInvalidAmountError ../../../src/classes/XLite/Controller/Customer/Cart.php /^ protected function processInvalidAmountError(\\XLite\\Model\\Product $product, $amount)$/;" f +processItem ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ abstract protected function processItem($item);$/;" f +processItem ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ protected function processItem($item)$/;" f +processItem ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php /^ protected function processItem($item)$/;" f +processItem ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php /^ protected function processItem($item)$/;" f +processItem ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/EventListener/MigrateSolr.php /^ protected function processItem($item)$/;" f +processMessage ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/AMQP.php /^ protected function processMessage($name, array $data)$/;" f +processMessage ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/Base/AMQP.php /^ abstract protected function processMessage($name, array $data);$/;" f +processOptions ../../../src/classes/XLite/Model/Repo/Config.php /^ public function processOptions($data)$/;" f +processOptions ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Repo/Config.php /^ public function processOptions($data)$/;" f +processPriority ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ protected function processPriority($priority)$/;" f +processProcess ../../../src/classes/XLite/Model/Order.php /^ protected function processProcess()$/;" f +processProcess ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Order.php /^ protected function processProcess()$/;" f +processQueryPart ../../../src/lib/Doctrine/ORM/Query/Expr/Composite.php /^ private function processQueryPart($part)$/;" f +processQueue ../../../src/classes/XLite/Model/Order.php /^ protected function processQueue()$/;" f +processQuick ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ public function processQuick(array $parameters = array())$/;" f +processRegexpPatch ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function processRegexpPatch(\\XLite\\Model\\TemplatePatch $patch)$/;" f +processRemove ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function processRemove()$/;" f +processRequest ../../../src/classes/XLite.php /^ public function processRequest()$/;" f +processRequest ../../../src/classes/XLite/Controller/AController.php /^ public function processRequest()$/;" f +processRequest ../../../src/classes/XLite/Controller/Admin/Autocomplete.php /^ public function processRequest()$/;" f +processRequest ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ public function processRequest()$/;" f +processRequest ../../../src/classes/XLite/Controller/Customer/Autocomplete.php /^ public function processRequest()$/;" f +processReturn ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processReturn ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processReturn ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processReturn ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processReturn ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processReturn ../../../src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processReturn ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ public function processReturn(\\XLite\\Model\\Payment\\Transaction $transaction)$/;" f +processSchema ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function processSchema(array $schema, $type)$/;" f +processSchema ../../../src/classes/XLite/Model/Repo/FormId.php /^ public function processSchema(array $schema, $type)$/;" f +processSchema ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ public function processSchema(array $schema, $type)$/;" f +processServiceQueue ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/Base/AMQP.php /^ protected function processServiceQueue(array $data)$/;" f +processSigHup ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ public function processSigHup($signal)$/;" f +processSigTerm ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ public function processSigTerm($signal)$/;" f +processStatsRecord ../../../src/classes/XLite/Controller/Admin/OrdersStats.php /^ protected function processStatsRecord($order)$/;" f +processSubstitute ../../../src/classes/XLite/Core/Translation.php /^ protected function processSubstitute($string, array $args)$/;" f +processSucceed ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function processSucceed()$/;" f +processSucceed ../../../src/classes/XLite/Model/Order.php /^ public function processSucceed()$/;" f +processUncheckout ../../../src/classes/XLite/Model/Order.php /^ protected function processUncheckout()$/;" f +processUpdate ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/Order/Admin/Search.php /^ protected function processUpdate()$/;" f +processUpdate ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function processUpdate()$/;" f +processUpdateErrors ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function processUpdateErrors()$/;" f +processUser ../../../src/Includes/Utils/Operator.php /^ $processUser = @posix_getpwuid(posix_geteuid());$/;" v +processUserSyncFormSubmit ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ public function processUserSyncFormSubmit(array &$form, array &$formState)$/;" f +processWidgetAttrs ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function processWidgetAttrs(array &$attrs)$/;" f +processXpathPatch ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function processXpathPatch(\\XLite\\Model\\TemplatePatch $patch)$/;" f +processedClasses ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $processedClasses = array(); \/\/ Reminder for processed classes, used for hierarchies$/;" v +processedRoles ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Profile.php /^ $processedRoles = array();$/;" v +processedTabs ../../../src/classes/XLite/View/Tabs/ATabs.php /^ $this->processedTabs = array();$/;" v +processedTabs ../../../src/classes/XLite/View/Tabs/ATabs.php /^ protected $processedTabs = null;$/;" v +processingNotRequired ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ private function processingNotRequired($class, array $processedClasses)$/;" f +processor ../../../src/classes/XLite/Model/Payment/Method.php /^ $processor = $this->getProcessor();$/;" v +processor ../../../src/classes/XLite/Model/Shipping.php /^ $processor = $rate->getMethod()->getProcessor();$/;" v +processor ../../../src/classes/XLite/Model/Shipping/Method.php /^ protected $processor = '';$/;" v +processor ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ $processor = $class::getInstance();$/;" v +processor ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ $processor = null;$/;" v +processor ../../../src/classes/XLite/View/Checkout/Step/Review.php /^ $processor = $this->getProcessor();$/;" v +processorId ../../../src/classes/XLite/Model/Shipping/Processor/AProcessor.php /^ protected $processorId = null;$/;" v +processorId ../../../src/classes/XLite/Model/Shipping/Processor/Offline.php /^ protected $processorId = 'offline';$/;" v +processorId ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ protected $processorId = 'aupost';$/;" v +processorId ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ protected $processorId = 'usps';$/;" v +processors ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/FormField/Select/ShippingMethod.php /^ $processors = \\XLite\\Model\\Shipping::getProcessors();$/;" v +prod ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function prod($x, $y)$/;" f +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = null; $/;" v +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = $this->getProduct($list);$/;" v +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->find(intval($list['productId']));$/;" v +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = $product[0];$/;" v +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->findOneBy(array('sku' => $list['sku']));$/;" v +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = new \\XLite\\Model\\Product;$/;" v +product ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $product = null;$/;" v +product ../../../src/classes/XLite/Controller/Admin/Product.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Controller/Admin/Product.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Controller/Admin/Product.php /^ $product = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->insert($this->getPostedData());$/;" v +product ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $product = new \\XLite\\Model\\Product();$/;" v +product ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $product = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->find($productId);$/;" v +product ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->find($this->getCurrentProductId());$/;" v +product ../../../src/classes/XLite/Controller/Customer/Product.php /^ $this->product = $this->defineProduct();$/;" v +product ../../../src/classes/XLite/Controller/Customer/Product.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Core/Converter.php /^ $product = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->find($params['product_id']);$/;" v +product ../../../src/classes/XLite/Core/DataSource/Base/Products.php /^ $product = $this->current();$/;" v +product ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ $product = array($/;" v +product ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $product = $repo->findOneBy(array('sku' => $cell['sku']));$/;" v +product ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $product = $this->createProduct($cell);$/;" v +product ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $product = $this->detectProduct($cell);$/;" v +product ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $product = new \\XLite\\Model\\Product;$/;" v +product ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $product = null;$/;" v +product ../../../src/classes/XLite/Model/Cart.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Model/CategoryProducts.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Model/Image/Product/Image.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Model/Inventory.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Model/OrderItem.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Model/Repo/Product.php /^ $product = $this->find($id);$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Supplier.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $product = null;$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $product = parent::createProduct($cell);$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $product = parent::detectProduct($cell);$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Model/OrderItem.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/Aggregator/Model/OrderItem.php /^ $product = parent::getDeletedProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->findOneByCleanURL($parts[1]);$/;" v +product ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $product = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->find($productId);$/;" v +product ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Model/FeaturedProduct.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->find($productId);$/;" v +product ../../../src/classes/XLite/Module/CDev/FileAttachments/Model/Product/Attachment.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/CheckoutSuccess.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/Header.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OrderItem.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $this->product = $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $product = $this->getOption()$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductOptions/View/Product.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->product = $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductVariants/Controller/Customer/Product.php /^ $product = parent::getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Ecwid/Products.php /^ $product = parent::normalizeProduct($data);$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/OrderItem.php /^ $product = parent::getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Module/CDev/Sale/Model/OrderItem.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/ImportExport.php /^ $product = new \\XLite\\Model\\Product;$/;" v +product ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/ImportExport.php /^ $product = parent::getProduct($list);$/;" v +product ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $product = parent::insertProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $product = $item->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/VAT/Model/OptionSurcharge.php /^ $product = $this->getOption()->getGroup()->getProduct();$/;" v +product ../../../src/classes/XLite/Module/CDev/VAT/View/Price.php /^ $product = $this->getProduct();$/;" v +product ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $product = $pid ? \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->find($pid) : null;$/;" v +product ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ $this->product = $product;$/;" v +product ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ $product = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->find($id);$/;" v +product ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ $this->product = false;$/;" v +product ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/TranslateLinks.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ $product = $this->getCurrentProduct($values['product']);$/;" v +product ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Repo/Wishlist.php /^ $product = $this->createQueryBuilder('w')$/;" v +product ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/WishlistProducts.php /^ protected $product;$/;" v +product ../../../src/classes/XLite/View/Form/Product/AddToCart.php /^ $product = $this->getProduct();$/;" v +productCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->productCategories = $productCategories;$/;" v +productCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $productCategories;$/;" v +productClass ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $productClass = $data['productClass']$/;" v +productClass ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $productClass = $rate->getProductClass() ?: null;$/;" v +productClass ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ $this->productClass = $class;$/;" v +productClass ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ protected $productClass;$/;" v +productClass ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $productClass = $data['productClass']$/;" v +productClass ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ $this->productClass = $class;$/;" v +productClass ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ protected $productClass;$/;" v +productCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->productCode = $productCode;$/;" v +productCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $productCode;$/;" v +productCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->productCode = $productCode;$/;" v +productCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $productCode;$/;" v +productCount ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Category.php /^ $productCount = $repo->getSubtreeProductsCount($this);$/;" v +productFeedsEnabled ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->productFeedsEnabled = $productFeedsEnabled;$/;" v +productFeedsEnabled ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $productFeedsEnabled;$/;" v +productFields ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected $productFields = array($/;" v +productId ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $productId = intval(\\XLite\\Core\\Request::getInstance()->objectId);$/;" v +productId ../../../src/classes/XLite/Core/Validator/SKU.php /^ $this->productId = intval($productId);$/;" v +productId ../../../src/classes/XLite/Core/Validator/SKU.php /^ protected $productId;$/;" v +productId ../../../src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php /^ $productId = intval(\\XLite\\Core\\Request::getInstance()->objectId);$/;" v +productId ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/Form/Product/AddToWishlist.php /^ $productId = $this->getRequestProductId();$/;" v +productMultilangProperties ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected $productMultilangProperties = array('name', 'brief_description', 'description');$/;" v +productOptions ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ $this->productOptions = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductOptions\\Model\\OptionGroup')$/;" v +productOptions ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ protected $productOptions = null;$/;" v +product_id ../../../src/classes/XLite/Model/Product.php /^ protected $product_id;$/;" v +products ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ protected $products = array();$/;" v +products ../../../src/classes/XLite/Model/ProductClass.php /^ $this->products = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +products ../../../src/classes/XLite/Model/ProductClass.php /^ protected $products;$/;" v +products ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Category.php /^ $products = $this->getSubtreeProducts($category);$/;" v +products ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $products = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')$/;" v +products ../../../src/classes/XLite/Module/CDev/FeaturedProducts/View/Customer/FeaturedProducts.php /^ $products = array();$/;" v +products ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->products = $products;$/;" v +products ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $products;$/;" v +products ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->products = new ProductsServiceResource($this, $this->serviceName, 'products', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/shoppingapi"], "parameters": {"facets.include": {"type": "string", "location": "query"}, "plusOne.enabled": {"type": "boolean", "location": "query"}, "plusOne.useGcsConfig": {"type": "boolean", "location": "query"}, "facets.enabled": {"type": "boolean", "location": "query"}, "relatedQueries.useGcsConfig": {"type": "boolean", "location": "query"}, "promotions.enabled": {"type": "boolean", "location": "query"}, "restrictBy": {"type": "string", "location": "query"}, "channels": {"type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "uint32", "type": "integer", "location": "query"}, "facets.discover": {"type": "string", "location": "query"}, "categoryRecommendations.category": {"type": "string", "location": "query"}, "availability": {"type": "string", "location": "query"}, "plusOne.options": {"type": "string", "location": "query"}, "spelling.enabled": {"type": "boolean", "location": "query"}, "taxonomy": {"type": "string", "location": "query"}, "spelling.useGcsConfig": {"type": "boolean", "location": "query"}, "source": {"required": true, "type": "string", "location": "path"}, "useCase": {"type": "string", "location": "query"}, "location": {"type": "string", "location": "query"}, "maxVariants": {"format": "int32", "type": "integer", "location": "query"}, "crowdBy": {"type": "string", "location": "query"}, "categories.include": {"type": "string", "location": "query"}, "boostBy": {"type": "string", "location": "query"}, "safe": {"type": "boolean", "location": "query"}, "categories.useGcsConfig": {"type": "boolean", "location": "query"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}, "facets.useGcsConfig": {"type": "boolean", "location": "query"}, "categories.enabled": {"type": "boolean", "location": "query"}, "attributeFilter": {"type": "string", "location": "query"}, "clickTracking": {"type": "boolean", "location": "query"}, "thumbnails": {"type": "string", "location": "query"}, "language": {"type": "string", "location": "query"}, "categoryRecommendations.include": {"type": "string", "location": "query"}, "country": {"type": "string", "location": "query"}, "rankBy": {"type": "string", "location": "query"}, "categoryRecommendations.enabled": {"type": "boolean", "location": "query"}, "q": {"type": "string", "location": "query"}, "redirects.enabled": {"type": "boolean", "location": "query"}, "redirects.useGcsConfig": {"type": "boolean", "location": "query"}, "relatedQueries.enabled": {"type": "boolean", "location": "query"}, "categoryRecommendations.useGcsConfig": {"type": "boolean", "location": "query"}, "promotions.useGcsConfig": {"type": "boolean", "location": "query"}}, "id": "shopping.products.list", "httpMethod": "GET", "path": "{source}\/products", "response": {"$ref": "Products"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/shoppingapi"], "parameters": {"categories.include": {"type": "string", "location": "query"}, "recommendations.enabled": {"type": "boolean", "location": "query"}, "thumbnails": {"type": "string", "location": "query"}, "plusOne.useGcsConfig": {"type": "boolean", "location": "query"}, "recommendations.include": {"type": "string", "location": "query"}, "taxonomy": {"type": "string", "location": "query"}, "productIdType": {"required": true, "type": "string", "location": "path"}, "categories.useGcsConfig": {"type": "boolean", "location": "query"}, "source": {"required": true, "type": "string", "location": "path"}, "categories.enabled": {"type": "boolean", "location": "query"}, "location": {"type": "string", "location": "query"}, "plusOne.enabled": {"type": "boolean", "location": "query"}, "attributeFilter": {"type": "string", "location": "query"}, "recommendations.useGcsConfig": {"type": "boolean", "location": "query"}, "plusOne.options": {"type": "string", "location": "query"}, "accountId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "productId": {"required": true, "type": "string", "location": "path"}}, "id": "shopping.products.get", "httpMethod": "GET", "path": "{source}\/products\/{accountId}\/{productIdType}\/{productId}", "response": {"$ref": "Product"}}}}', true));$/;" v +products ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $products;$/;" v +products ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Supplier.php /^ $this->products = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +products ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Supplier.php /^ protected $products;$/;" v +products ../../../src/classes/XLite/View/ItemsList/Model/Product/Admin/AAdmin.php /^ * Abstarct admin-interface products list$/;" c +productsImportState ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ protected $productsImportState = self::IMPORT_NONE;$/;" v +productsLength ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ $this->productsLength = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->count();$/;" v +productsLength ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ $this->productsLength = null;$/;" v +productsLength ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ protected $productsLength;$/;" v +productsSearch ../../../src/classes/XLite/Controller/Customer/Search.php /^ $productsSearch = array();$/;" v +productsSearch ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Suppliers.php /^ $productsSearch = $this->getConditions();$/;" v +productsSearch ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/ProductList.php /^ $productsSearch = array();$/;" v +productsSearchParams ../../../src/classes/XLite/Controller/Admin/ProductList.php /^ $productsSearchParams = array();$/;" v +productsSearchParams ../../../src/classes/XLite/Module/CDev/ProductTranslators/Controller/Admin/ProductTranslations.php /^ $productsSearchParams = $this->getConditions();$/;" v +profile ../../../src/Includes/install/install.php /^ $profile = new \\XLite\\Model\\Profile();$/;" v +profile ../../../src/Includes/install/install.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findByLogin($login);$/;" v +profile ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')$/;" v +profile ../../../src/classes/XLite/Controller/Admin/Login.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->loginAdministrator($/;" v +profile ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ $profile = new \\XLite\\Model\\Profile;$/;" v +profile ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ $profile = $this->getCart()->getProfile();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $this->getCartProfile();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $this->getCartProfile();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $this->requestData['create_profile']$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $origProfile->cloneEntity();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $this->getCart()->getOrigProfile();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $this->getCart()->getProfile()->cloneEntity();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $profile = $this->getCartProfile();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Login.php /^ $this->profile = $this->performLogin();$/;" v +profile ../../../src/classes/XLite/Controller/Customer/Login.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Controller/Customer/RecoverPassword.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findByLogin($email);$/;" v +profile ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $profile = $this->getCartProfile();$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $profile = $this->getProfile();$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->find($profileId);$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findByLoginPassword($/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $profile = self::RESULT_ACCESS_DENIED;$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $profile = $this->getProfile();$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $profile = $this->login($login, $password);$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ $this->profile = array('isInitialized' => false, 'object' => null);$/;" v +profile ../../../src/classes/XLite/Core/Auth.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Core/CMSConnector.php /^ $profile = $this->getProfileByCMSId($cmsUserId);$/;" v +profile ../../../src/classes/XLite/Core/CMSConnector.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')$/;" v +profile ../../../src/classes/XLite/Model/Address.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Model/Order.php /^ $profile = $this->getProfile();$/;" v +profile ../../../src/classes/XLite/Model/Order.php /^ $this->profile = $profile;$/;" v +profile ../../../src/classes/XLite/Model/Order.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Product.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Supplier.php /^ $profile = \\XLite\\COre\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ $profile = $profile ?: \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplyStatusSelector.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Conversations/Model/Conversation.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Module/CDev/Conversations/Model/Message.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Module/CDev/Conversations/View/Model/Conversation.php /^ $profile = \\XLite::isAdminZone()$/;" v +profile ../../../src/classes/XLite/Module/CDev/Conversations/View/Model/Conversation.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ $profile = $this->getModelForm()->getModelObject();$/;" v +profile ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ $profile = new \\XLite\\Model\\Profile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/DrupalRole.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Checkout/Profile.php /^ $profile = $this->getCart()->getProfile()->getCMSProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/ImportExport.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/Suppliers/View/FormField/Select/SearchSupplier.php /^ $profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/CDev/VAT/Logic/ATax.php /^ $profile = $controller instanceOf \\XLite\\Controller\\Customer\\ACustomer$/;" v +profile ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $profile = $this->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ $profile = $this->getProfile();$/;" v +profile ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Wishlist.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/View/Checkout/BillingAddress.php /^ $profile = $this->getCart()->getProfile();$/;" v +profile ../../../src/classes/XLite/View/Checkout/ShippingMethodsList.php /^ $profile = $this->getCart()->getProfile();$/;" v +profile ../../../src/classes/XLite/View/Checkout/Step/Payment.php /^ $profile = $this->getCart()->getProfile();$/;" v +profile ../../../src/classes/XLite/View/Checkout/Step/Shipping.php /^ $profile = $this->getCart()->getProfile();$/;" v +profile ../../../src/classes/XLite/View/Model/Address/Address.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->find($profileId);$/;" v +profile ../../../src/classes/XLite/View/Model/Profile/AProfile.php /^ $profile = \\XLite\\Model\\CachingFactory::getObject(__METHOD__, '\\XLite\\Model\\Profile');$/;" v +profile ../../../src/classes/XLite/View/Model/Profile/AProfile.php /^ $profile = parent::getModelObject();$/;" v +profile ../../../src/classes/XLite/View/Model/Profile/Main.php /^ $profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')$/;" v +profile ../../../src/classes/XLite/View/Tabs/Account.php /^ $this->profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/View/Tabs/Account.php /^ $this->profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->find($profileId);$/;" v +profile ../../../src/classes/XLite/View/Tabs/Account.php /^ protected $profile;$/;" v +profile ../../../src/classes/XLite/View/Tabs/AdminProfile.php /^ $this->profile = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +profile ../../../src/classes/XLite/View/Tabs/AdminProfile.php /^ $this->profile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->find($profileId);$/;" v +profile ../../../src/classes/XLite/View/Tabs/AdminProfile.php /^ protected $profile;$/;" v +profileId ../../../src/classes/XLite/Controller/Admin/AddressBook.php /^ $profileId = $this->getAddress()->getProfile()->getProfileId();$/;" v +profileId ../../../src/classes/XLite/Controller/Admin/AddressBook.php /^ $profileId = \\XLite\\Core\\Request::getInstance()->profile_id;$/;" v +profileId ../../../src/classes/XLite/Controller/Admin/Profile.php /^ $profileId = $this->getProfile()->getProfileId();$/;" v +profileId ../../../src/classes/XLite/Controller/Customer/AddressBook.php /^ $profileId = $this->correctProfileIdForURLParams($this->getAddress()->getProfile()->getProfileId());$/;" v +profileId ../../../src/classes/XLite/Controller/Customer/AddressBook.php /^ $profileId = \\XLite\\Core\\Request::getInstance()->profile_id;$/;" v +profileId ../../../src/classes/XLite/Controller/Customer/AddressBook.php /^ $profileId = null;$/;" v +profileId ../../../src/classes/XLite/Core/Auth.php /^ $profileId = $this->getStoredProfileId();$/;" v +profileId ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/AddressBook.php /^ $profileId = parent::correctProfileIdForURLParams($profileId);$/;" v +profileId ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Auth.php /^ $profileId = \\XLite\\Module\\CDev\\DrupalConnector\\Handler::getInstance()$/;" v +profileId ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Auth.php /^ $profileId = parent::getStoredProfileId();$/;" v +profileId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->profileId = $profileId;$/;" v +profileId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $profileId;$/;" v +profileId ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/Form/Product/AddToWishlist.php /^ $profileId = $this->getProfileId();$/;" v +profileId ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/Form/User/AddWishlist.php /^ $profileId = $this->getProfileId();$/;" v +profileId ../../../src/classes/XLite/View/Form/Address/Address.php /^ $profileId = $this->getCurrentForm()->getRequestProfileId();$/;" v +profileId ../../../src/classes/XLite/View/Form/Profile/AProfile.php /^ $profileId = $this->getCurrentForm()->getRequestProfileId();$/;" v +profileId ../../../src/classes/XLite/View/Model/Address/Address.php /^ $profileId = $this->getProfileId();$/;" v +profileId ../../../src/classes/XLite/View/Tabs/Account.php /^ $profileId = \\XLite\\Core\\Request::getInstance()->profile_id;$/;" v +profileId ../../../src/classes/XLite/View/Tabs/Account.php /^ $profileId = \\XLite\\Core\\Request::getInstance()->profile_id;$/;" v +profileId ../../../src/classes/XLite/View/Tabs/AdminProfile.php /^ $profileId = \\XLite\\Core\\Request::getInstance()->profile_id;$/;" v +profileId ../../../src/classes/XLite/View/Tabs/AdminProfile.php /^ $profileId = \\XLite\\Core\\Request::getInstance()->profile_id;$/;" v +profileInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->profileInfo = $profileInfo;$/;" v +profileInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $profileInfo;$/;" v +profileName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->profileName = $profileName;$/;" v +profileName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $profileName;$/;" v +profile_id ../../../src/classes/XLite/Model/Profile.php /^ protected $profile_id;$/;" v +profile_id ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/DrupalRole.php /^ protected $profile_id;$/;" v +profilerInfo ../../../src/classes/XLite/View/AView.php /^ protected static $profilerInfo;$/;" v +profiles ../../../src/classes/XLite/Model/Role.php /^ $this->profiles = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +profiles ../../../src/classes/XLite/Model/Role.php /^ protected $profiles;$/;" v +profiles ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->profiles = new ProfilesServiceResource($this, $this->serviceName, 'profiles', json_decode('{"methods": {"get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "id": "moderator.profiles.get", "httpMethod": "GET", "path": "profiles\/@me", "response": {"$ref": "Profile"}}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "request": {"$ref": "Profile"}, "response": {"$ref": "Profile"}, "httpMethod": "PUT", "path": "profiles\/@me", "id": "moderator.profiles.update"}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "request": {"$ref": "Profile"}, "response": {"$ref": "Profile"}, "httpMethod": "PATCH", "path": "profiles\/@me", "id": "moderator.profiles.patch"}}}', true));$/;" v +profiles ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $profiles;$/;" v +progress ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $this->progress = $range[1] + 1;$/;" v +progress ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $this->progress = 0;$/;" v +progress ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ public $progress;$/;" v +progressCallback ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ function progressCallback($dltotal, $dlnow, $ultotal, $ulnow)$/;" f +prohibitedCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->prohibitedCategories = $prohibitedCategories;$/;" v +prohibitedCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $prohibitedCategories;$/;" v +project ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function project($query, array $params, Closure $function)$/;" f +projectId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->projectId = $projectId;$/;" v +projectId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $projectId;$/;" v +projectReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->projectReference = $projectReference;$/;" v +projectReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $projectReference;$/;" v +projects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->projects = $projects;$/;" v +projects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->projects = new ProjectsServiceResource($this, $this->serviceName, 'projects', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}}, "response": {"$ref": "ProjectList"}, "httpMethod": "GET", "path": "projects", "id": "bigquery.projects.list"}}}', true));$/;" v +projects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $projects;$/;" v +promotions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->promotions = $promotions;$/;" v +promotions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $promotions;$/;" v +promotions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->promotions = $promotions;$/;" v +promotions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $promotions;$/;" v +properties ../../../src/Includes/DataStructure/Cell.php /^ $this->properties = $data + $this->properties;$/;" v +properties ../../../src/Includes/DataStructure/Cell.php /^ protected $properties = array();$/;" v +properties ../../../src/classes/XLite/Core/ImageOperator/AImageOperator.php /^ $properties = array($/;" v +properties ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ $this->properties = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +properties ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ protected $properties;$/;" v +properties ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->properties = $properties;$/;" v +properties ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $properties;$/;" v +properties ../../../src/classes/XLite/Module/CDev/ProductVariants/View/ItemsList/Model/Variants.php /^ $properties = $variant->getImpactProperties();$/;" v +properties ../../../src/classes/XLite/View/Image.php /^ protected $properties = array();$/;" v +property ../../../src/classes/XLite/Logic/Price.php /^ $property = lcfirst(substr($method, 3));$/;" v +property ../../../src/classes/XLite/Model/AEntity.php /^ $property = \\XLite\\Core\\Converter::convertFromCamelCase($matches[2]);$/;" v +property ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->property = $property;$/;" v +property ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $property;$/;" v +propertyChanged ../../../src/lib/Doctrine/Common/PropertyChangedListener.php /^ function propertyChanged($sender, $propertyName, $oldValue, $newValue);$/;" f +propertyChanged ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function propertyChanged($entity, $propertyName, $oldValue, $newValue)$/;" f +propertyName ../../../src/lib/Doctrine/ORM/Query/ResultSetMappingBuilder.php /^ $propertyName = $classMetadata->getFieldName($columnName);$/;" v +propertyTypeIsRequired ../../../src/lib/Doctrine/ORM/Mapping/MappingException.php /^ public static function propertyTypeIsRequired($className, $propertyName)$/;" f +props ../../../src/lib/Doctrine/ORM/Query/AST/Node.php /^ $props = get_object_vars($obj);$/;" v +proto ../../../src/Includes/Utils/URLManager.php /^ $proto = ($isSecure ? 'https' : 'http') . ':\/\/';$/;" v +protocol ../../../src/Includes/install/install.php /^ $protocol = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https' : 'http';$/;" v +protocol ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $protocol = 'http:\/\/';$/;" v +protocol ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $protocol = 'https:\/\/';$/;" v +protocol ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $protocol = 'http:\/\/';$/;" v +providedId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->providedId = $providedId;$/;" v +providedId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $providedId;$/;" v +provider ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->provider = $provider;$/;" v +provider ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $provider;$/;" v +proxy ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $proxy = null;$/;" v +proxy ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $proxy = $this->em->getProxyFactory()->getProxy($assoc2['targetEntity'], $id);$/;" v +proxy ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public $proxy = null;$/;" v +proxyClassName ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $proxyClassName = str_replace('\\\\', '', $class->name) . 'Proxy';$/;" v +proxyClassName ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $proxyClassName = str_replace('\\\\', '', $className) . 'Proxy';$/;" v +proxyClassesAlwaysRegenerating ../../../src/lib/Doctrine/ORM/ORMException.php /^ public static function proxyClassesAlwaysRegenerating()$/;" f +proxyDir ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $proxyDir = $toDir ?: $this->_proxyDir;$/;" v +proxyDir ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $proxyDir = rtrim($proxyDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;$/;" v +proxyDirectoryRequired ../../../src/lib/Doctrine/ORM/Proxy/ProxyException.php /^ public static function proxyDirectoryRequired() {$/;" f +proxyFactory ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $this->proxyFactory = new ProxyFactory($this,$/;" v +proxyFactory ../../../src/lib/Doctrine/ORM/EntityManager.php /^ private $proxyFactory;$/;" v +proxyFileName ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $proxyFileName = $proxyDir . $proxyClassName . '.php';$/;" v +proxyNamespaceRequired ../../../src/lib/Doctrine/ORM/Proxy/ProxyException.php /^ public static function proxyNamespaceRequired() {$/;" f +proxyurl ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpstream.php /^ $proxyurl = $this->proxy->url;$/;" v +proxyurl ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpstream.php /^ $proxyurl = '';$/;" v +publicDomain ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->publicDomain = $publicDomain;$/;" v +publicDomain ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $publicDomain;$/;" v +publicKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiPemVerifier.php /^ $this->publicKey = openssl_x509_read($pem);$/;" v +publicKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiPemVerifier.php /^ private $publicKey;$/;" v +publicMethods ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static $publicMethods = array($/;" v +publicName ../../../src/classes/XLite/Core/Validator/Exception.php /^ $this->publicName = $name;$/;" v +publicName ../../../src/classes/XLite/Core/Validator/Exception.php /^ protected $publicName;$/;" v +publicName ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $publicName = null$/;" v +publicName ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ $this->publicName = $name;$/;" v +publicName ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ protected $publicName;$/;" v +publicTransactionId ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $publicTransactionId = $server->getPublicTransactionId();$/;" v +public_id ../../../src/classes/XLite/Model/Payment/Transaction.php /^ protected $public_id = '';$/;" v +public_key ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $public_key = new apiPemVerifier($pem);$/;" v +published ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->published = $published;$/;" v +published ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $published;$/;" v +published ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->published = $published;$/;" v +published ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $published;$/;" v +published ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->published = $published;$/;" v +published ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $published;$/;" v +published ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ protected $published = false;$/;" v +publishedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->publishedDate = $publishedDate;$/;" v +publishedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $publishedDate;$/;" v +publisher ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->publisher = $publisher;$/;" v +publisher ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $publisher;$/;" v +publisherFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->publisherFee = $publisherFee;$/;" v +publisherFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $publisherFee;$/;" v +publisherId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->publisherId = $publisherId;$/;" v +publisherId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $publisherId;$/;" v +publisherName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->publisherName = $publisherName;$/;" v +publisherName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $publisherName;$/;" v +publishers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->publishers = new PublishersServiceResource($this, $this->serviceName, 'publishers', json_decode('{"methods": {"list": {"parameters": {"publisherCategory": {"type": "string", "location": "query"}, "relationshipStatus": {"enum": ["approved", "available", "deactivated", "declined", "pending"], "type": "string", "location": "query"}, "minSevenDayEpc": {"format": "double", "type": "number", "location": "query"}, "minNinetyDayEpc": {"format": "double", "type": "number", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "role": {"required": true, "enum": ["advertisers", "publishers"], "location": "path", "type": "string"}, "maxResults": {"format": "uint32", "maximum": "100", "minimum": "0", "location": "query", "type": "integer"}, "roleId": {"required": true, "type": "string", "location": "path"}, "minPayoutRank": {"format": "int32", "maximum": "4", "minimum": "1", "location": "query", "type": "integer"}}, "id": "gan.publishers.list", "httpMethod": "GET", "path": "{role}\/{roleId}\/publishers", "response": {"$ref": "Publishers"}}, "get": {"parameters": {"publisherId": {"type": "string", "location": "query"}, "role": {"required": true, "enum": ["advertisers", "publishers"], "location": "path", "type": "string"}, "roleId": {"required": true, "type": "string", "location": "path"}}, "id": "gan.publishers.get", "httpMethod": "GET", "path": "{role}\/{roleId}\/publisher", "response": {"$ref": "Publisher"}}}}', true));$/;" v +publishers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $publishers;$/;" v +purchaseRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->purchaseRateType = $purchaseRateType;$/;" v +purchaseRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $purchaseRateType;$/;" v +pureAction ../../../src/classes/XLite/Controller/AController.php /^ $this->pureAction = (bool) $flag;$/;" v +pureAction ../../../src/classes/XLite/Controller/AController.php /^ protected $pureAction = false;$/;" v +pureOutput ../../../src/classes/XLite/Controller/Console/AConsole.php /^ protected $pureOutput = false;$/;" v +pureOutput ../../../src/classes/XLite/Controller/Console/Db.php /^ $this->pureOutput = true;$/;" v +purpose ../../../src/classes/XLite/Model/MoneyModificator.php /^ protected $purpose = '';$/;" v +purposes ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php /^ $purposes = array($/;" v +putBucket ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function putBucket($bucket, $acl = self::ACL_PRIVATE, $location = false)$/;" f +putObject ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function putObject($input, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $requestHeaders = array(), $storageClass = self::STORAGE_CLASS_STANDARD)$/;" f +putObjectFile ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function putObjectFile($file, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $contentType = null)$/;" f +putObjectString ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function putObjectString($string, $bucket, $uri, $acl = self::ACL_PRIVATE, $metaHeaders = array(), $contentType = 'text\/plain')$/;" f +q ../../../src/lib/Log/sqlite.php /^ $q = 'CREATE TABLE [' . $this->_table . '] (' .$/;" v +q ../../../src/lib/Log/sqlite.php /^ $q = "SELECT name FROM sqlite_master WHERE name='" . $this->_table .$/;" v +q ../../../src/lib/Log/sqlite.php /^ $q = sprintf('INSERT INTO [%s] (logtime, ident, priority, message) ' .$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php /^ $qComp = $sqlWalker->getQueryComponent($dqlAlias);$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $qComp = $this->_queryComponents[$identVariable];$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $qComp = $this->_queryComponents[$pathExpression->identificationVariable];$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $qComp = $this->_queryComponents[$resultVariable];$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $qComp = $this->_queryComponents[$identVariable];$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $qComp = $this->_queryComponents[$dqlAlias];$/;" v +qComp ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $qComp = $this->_queryComponents[$dqlAlias];$/;" v +qExpr ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $qExpr = new AST\\QuantifiedExpression($this->Subselect());$/;" v +qb ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $qb = $this->createQueryBuilder();$/;" v +qb ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $qb = $this->createPureQueryBuilder();$/;" v +qb ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $qb = $this->getQueryBuilder()$/;" v +qb ../../../src/classes/XLite/Model/Repo/Address.php /^ $qb = $this->createQueryBuilder();$/;" v +qb ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $qb = $this->createQueryBuilder('s')$/;" v +qb ../../../src/classes/XLite/Model/Repo/Membership.php /^ $qb = $this->createQueryBuilder()$/;" v +qb ../../../src/classes/XLite/Model/Repo/Payment/Transaction.php /^ $qb = $this->createQueryBuilder()$/;" v +qb ../../../src/classes/XLite/Model/Repo/Shipping/Markup.php /^ $qb = $this->createQueryBuilder('m')$/;" v +qb ../../../src/classes/XLite/Model/Repo/Shipping/Markup.php /^ $qb = $this->createQueryBuilder('m');$/;" v +qb ../../../src/classes/XLite/Model/Repo/Shipping/Method.php /^ $qb = $this->createQueryBuilder('m')$/;" v +qb ../../../src/classes/XLite/Model/Repo/Shipping/Method.php /^ $qb = $this->createQueryBuilder('m');$/;" v +qb ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Repo/Base/Image.php /^ $qb = $this->createQueryBuilder('i')$/;" v +qb ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Repo/Base/Image.php /^ $qb = $this->defineCountQuery();$/;" v +qb ../../../src/classes/XLite/Module/CDev/Bestsellers/Model/Repo/Product.php /^ $qb = $this->createQueryBuilder()$/;" v +qb ../../../src/classes/XLite/Module/CDev/Catalog/Model/Repo/ViewList.php /^ $qb = parent::defineClassListQuery($list, $zone);$/;" v +qb ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Repo/Profile.php /^ $qb = $this->createQueryBuilder();$/;" v +qb ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Repo/Profile.php /^ $qb = $this->getQueryBuilder();$/;" v +qb ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Model/Repo/FeaturedProduct.php /^ $qb = $this->createQueryBuilder('f')$/;" v +qb ../../../src/classes/XLite/Module/CDev/Multicurrency/Model/Repo/Currency.php /^ $qb = $this->createQueryBuilder('c')$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Repo/OptionException.php /^ $qb = $this->createQueryBuilder();$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Option.php /^ $qb = $this->createQueryBuilder('o')$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $qb = $this->createQueryBuilder('v')$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $qb = $this->createQueryBuilder('v');$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $qb = $this->defineFindOneByOptionsExactlyQuery($options);$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $qb = $this->defineFindOneByOptionsQuery($options);$/;" v +qb ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $qb = null;$/;" v +qb ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $qb = $this->createQueryBuilder('p');$/;" v +qiwiPhoneNumber ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $qiwiPhoneNumber = $cell->getValue();$/;" v +qiwiPhoneNumber ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $qiwiPhoneNumber = '';$/;" v +quantities ../../../src/classes/XLite/Module/CDev/Suppliers/View/LowStockReport.php /^ $quantities = \\XLite\\Core\\Session::getInstance()->suppliersOrderQuantities;$/;" v +quantity ../../../src/classes/XLite/Model/Order.php /^ $quantity = 0;$/;" v +quantity ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/SupplierOrders.php /^ $quantity = 0;$/;" v +quantity ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->quantity = $quantity;$/;" v +quantity ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $quantity;$/;" v +quantity ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ $quantity = 0;$/;" v +queries ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $queries = array();$/;" v +queries ../../../src/classes/XLite/Core/Profiler.php /^ protected static $queries = array();$/;" v +queries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->queries = $queries;$/;" v +queries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $queries;$/;" v +queries ../../../src/lib/Doctrine/DBAL/Logging/DebugStack.php /^ public $queries = array();$/;" v +queries ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $queries = $this->_platform->getAlterTableSQL($tableDiff);$/;" v +query ../../../src/Includes/Utils/ModulesManager.php /^ $query = 'UPDATE ' . static::getTableName() . ' SET enabled = ? WHERE moduleID = ?';$/;" v +query ../../../src/Includes/Utils/ModulesManager.php /^ $query = 'REPLACE INTO ' . $table . ' SET ' . implode(' = ?,', array_keys($data)) . ' = ?';$/;" v +query ../../../src/Includes/Utils/ModulesManager.php /^ $query = 'UPDATE ' . $table . ' SET enabled = ?, installed = ? WHERE moduleID = ?';$/;" v +query ../../../src/Includes/Utils/ModulesManager.php /^ $query = 'SELECT moduleID FROM ' . $table . $condition . ' AND majorVersion = ? AND minorVersion = ?';$/;" v +query ../../../src/Includes/Utils/ModulesManager.php /^ $query = 'UPDATE ' . $table . ' SET enabled = ?, installed = ?' . $condition;$/;" v +query ../../../src/classes/XLite/Core/Connection.php /^ $query = 'REPLACE INTO ' . $tableName$/;" v +query ../../../src/classes/XLite/Core/Profiler.php /^ $query = substr($query, 0, 300) . ' ...';$/;" v +query ../../../src/classes/XLite/Model/Base/I18n.php /^ $query = \\XLite\\Core\\Translation::getLanguageQuery($code);$/;" v +query ../../../src/classes/XLite/Model/LanguageLabel.php /^ $query = \\XLite\\Core\\Translation::getLanguageQuery($code);$/;" v +query ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ $query = array($/;" v +query ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $query = substr($query, 0, -1);$/;" v +query ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $query = substr($this->uri, -1) !== '?' ? '?' : '&';$/;" v +query ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $query = '';$/;" v +query ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ $query = '';$/;" v +query ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $query = \\Includes\\Utils\\Converter::parseQuery($parts[1], '-', '\/');$/;" v +query ../../../src/classes/XLite/Module/CDev/GoSocial/View/Button/Pinterest.php /^ $query = array();$/;" v +query ../../../src/classes/XLite/Module/CDev/GoSocial/View/ExternalSDK/Facebook.php /^ $query = parent::getQuery();$/;" v +query ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $query = '?'.implode($retained_params, '&');$/;" v +query ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $query = '';$/;" v +query ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Repo/OptionException.php /^ $query = $this->_em->createNativeQuery($/;" v +query ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->query = $query;$/;" v +query ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $query;$/;" v +query ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->query = $query;$/;" v +query ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function query($projectId, QueryRequest $postBody, $optParams = array()) {$/;" f +query ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $query;$/;" v +query ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function query(FreeBusyRequest $postBody, $optParams = array()) {$/;" f +query ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $query = array();$/;" v +query ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ $query = parent::defineImportQuery();$/;" v +query ../../../src/lib/Doctrine/DBAL/Connection.php /^ $query = 'DELETE FROM ' . $tableName . ' WHERE ' . implode(' AND ', $criteria);$/;" v +query ../../../src/lib/Doctrine/DBAL/Connection.php /^ $query = 'INSERT INTO ' . $tableName$/;" v +query ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function query()$/;" f +query ../../../src/lib/Doctrine/DBAL/Driver/Connection.php /^ function query();$/;" f +query ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ function query()$/;" f +query ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ public function query()$/;" f +query ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $query = $this->getColumnDeclarationSQL($fieldName, $field);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $query = 'CREATE ' . $type . 'INDEX ' . $name . ' ON ' . $table;$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $query = '';$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $query = 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclarationSQL($foreignKey);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $constraint->getQuotedName($this);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql;$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $query = "SELECT ROW_NUMBER() OVER ($over) AS \\"doctrine_rownum\\", * FROM ($query) AS inner_tbl";$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $query = "WITH outer_tbl AS ($query) SELECT * FROM outer_tbl WHERE \\"doctrine_rownum\\" BETWEEN $start AND $end";$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $query = preg_replace('\/\\s+ORDER BY(.*)\/', '', $query);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $query = preg_replace('\/^SELECT\\s\/i', 'SELECT TOP ' . $count . ' ', $query);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql;$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $query = '';$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $query = 'CREATE ';$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $query = 'SELECT * FROM (SELECT a.' . $column . ', rownum AS doctrine_rownum FROM (' .$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $query = 'SELECT a.' . $column . ' FROM (' . $query . ') a WHERE ROWNUM <= ' . $max;$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = "ALTER " . $oldColumnName . " " . "DROP DEFAULT";$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = "ALTER " . $oldColumnName . " SET DEFAULT nextval('" . $seqName . "')";$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = 'ALTER ' . $oldColumnName . ' ' . ($column->getNotNull() ? 'SET' : 'DROP') . ' NOT NULL';$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = 'ALTER ' . $oldColumnName . ' SET ' . $this->getDefaultValueDeclarationSQL($column->toArray());$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = 'ALTER ' . $oldColumnName . ' TYPE ' . $type->getSqlDeclaration($column->toArray(), $this);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray());$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = 'DROP ' . $column->getQuotedName($this);$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = '';$/;" v +query ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')';$/;" v +query ../../../src/lib/Doctrine/DBAL/Portability/Connection.php /^ public function query()$/;" f +query ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $query = 'DELETE FROM ' . $table . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '');$/;" v +query ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $query = 'SELECT ' . implode(', ', $this->sqlParts['select']) . ' FROM ';$/;" v +query ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $query = 'UPDATE ' . $table $/;" v +query ../../../src/lib/Doctrine/DBAL/SQLParserUtils.php /^ $query = substr($query, 0, $needlePos) . $expandStr . substr($query, $needlePos + 1);$/;" v +query ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $query = 'CREATE USER ' . $username . ' IDENTIFIED BY ' . $password;$/;" v +query ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $query = 'GRANT CREATE SESSION, CREATE TABLE, UNLIMITED TABLESPACE, CREATE SEQUENCE, CREATE TRIGGER TO ' . $username;$/;" v +query ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $query = new NativeQuery($this);$/;" v +query ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $query = new Query($this);$/;" v +query ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $query = str_replace('__CLASS__', $this->name, $queryMapping['query']);$/;" v +query ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $query;$/;" v +query ../../../src/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php /^ $query = $em->createQuery($dql);$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Category.php /^ $queryBuilder = $this->createQueryBuilder()$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Category.php /^ $queryBuilder = $this->createQueryBuilder();$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Category.php /^ $queryBuilder = parent::createQueryBuilder($alias, $code);$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Currency.php /^ $queryBuilder = $this->createQueryBuilder();$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Module.php /^ $queryBuilder = $this->createQueryBuilder('m');$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Module.php /^ $queryBuilder = $this->createQueryBuilder();$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Module.php /^ $queryBuilder = $this->getQueryBuilder()->delete($this->_entityName, 'm');$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Order.php /^ $queryBuilder = $this->createQueryBuilder()$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/OrderItem.php /^ $queryBuilder = $this->createQueryBuilder();$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Product.php /^ $queryBuilder = $this->createQueryBuilder();$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Product.php /^ $queryBuilder = parent::createQueryBuilder($alias, $code);$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Profile.php /^ $queryBuilder = $this->createQueryBuilder('p')$/;" v +queryBuilder ../../../src/classes/XLite/Model/Repo/Profile.php /^ $queryBuilder = $this->createQueryBuilder()$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/FulfillmentStatus.php /^ $queryBuilder = $this->createQueryBuilder('f');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/PaymentStatus.php /^ $queryBuilder = $this->createQueryBuilder('p');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ $queryBuilder = parent::createQueryBuilder($alias, $code);$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ $queryBuilder = $this->createQueryBuilder('c');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ $queryBuilder = $this->createQueryBuilder('m');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Repo/Order/Tag.php /^ $queryBuilder = $this->createQueryBuilder('t');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ $queryBuilder = $this->createQueryBuilder('place');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $queryBuilder = $this->createQueryBuilder('v');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ $queryBuilder = $this->createQueryBuilder('s');$/;" v +queryBuilder ../../../src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php /^ $queryBuilder = $this->createQueryBuilder('r');$/;" v +queryBuilder ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Repo/WishlistProducts.php /^ $queryBuilder = $this->createQueryBuilder('wp')$/;" v +queryBuilderClass ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $this->queryBuilderClass = '\\XLite\\Model\\QueryBuilder\\Base\\Common';$/;" v +queryBuilderClass ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $this->queryBuilderClass = str_replace('\\\\Repo\\\\', '\\\\QueryBuilder\\\\', get_called_class());$/;" v +queryBuilderClass ../../../src/classes/XLite/Model/Repo/ARepo.php /^ protected $queryBuilderClass;$/;" v +queryCacheNotConfigured ../../../src/lib/Doctrine/ORM/ORMException.php /^ public static function queryCacheNotConfigured()$/;" f +queryComp ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $queryComp = $this->_queryComponents[$dqlAlias];$/;" v +queryComponent ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $queryComponent = array($/;" v +queryFields ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $queryFields = array();$/;" v +queryFields ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $queryFields = $this->getColumnDeclarationListSQL($columns);$/;" v +queryFields ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $queryFields = $this->getColumnDeclarationListSQL($columns);$/;" v +queryFields ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $queryFields = $this->getColumnDeclarationListSQL($columns);$/;" v +queryMapping ../../../src/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php /^ $queryMapping = array('query' => $queryMapping);$/;" v +queryMatched ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->queryMatched = $queryMatched;$/;" v +queryMatched ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $queryMatched;$/;" v +queryNotFound ../../../src/lib/Doctrine/ORM/Mapping/MappingException.php /^ public static function queryNotFound($className, $queryName)$/;" f +queryOffset ../../../src/lib/Doctrine/DBAL/SQLParserUtils.php /^ $queryOffset = 0;$/;" v +queryParams ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $queryParams = array();$/;" v +queryPart ../../../src/lib/Doctrine/ORM/Query/Expr/Composite.php /^ $queryPart = (string) $part;$/;" v +queryPart ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $queryPart = $this->getDQLPart($queryPartName);$/;" v +queryPartNames ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $queryPartNames = array_keys($this->sqlParts);$/;" v +queryParts ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ $queryParts = array();$/;" v +queryParts ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $queryParts = array();$/;" v +queryParts ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $queryParts = array();$/;" v +queryStr ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $queryStr = substr($this->url, $pos + 1);$/;" v +queryString ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $queryString = $this->_queryDelimiter . implode($this->_queryStringDelimiter, $escapedParams);$/;" v +queryString ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $queryString = '';$/;" v +queryString ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $queryString = http_build_query($params);$/;" v +queryString ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $queryString = http_build_query($params, null, $this->_queryStringDelimiter);$/;" v +queryString ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $queryString = $this->_generateQueryString($params);$/;" v +queryVars ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $queryVars = array();$/;" v +query_upload ../../../src/Includes/functions.php /^function query_upload($filename, $connection = null, $ignoreErrors = false, $is_restore = false)$/;" f +query_upload_error ../../../src/Includes/functions.php /^function query_upload_error($myerr, $ignoreErrors)$/;" f +question ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->question = $question;$/;" v +question ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $question;$/;" v +quickAdd ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function quickAdd($calendarId, $text, $optParams = array()) {$/;" f +quickFlags ../../../src/classes/XLite/Model/Category.php /^ $quickFlags = $this->getQuickFlags();$/;" v +quickFlags ../../../src/classes/XLite/Model/Category.php /^ protected $quickFlags;$/;" v +quickFlags ../../../src/classes/XLite/Model/Repo/Category.php /^ $quickFlags = new \\XLite\\Model\\Category\\QuickFlags();$/;" v +quickFlags ../../../src/classes/XLite/Model/Repo/Category.php /^ $quickFlags = $entity->getQuickFlags();$/;" v +quot ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function quot($x, $y)$/;" f +quote ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function quote($input, $type = null)$/;" f +quote ../../../src/lib/Doctrine/DBAL/Driver/Connection.php /^ function quote($input, $type=\\PDO::PARAM_STR);$/;" f +quote ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ function quote($input, $type=\\PDO::PARAM_STR)$/;" f +quote ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ public function quote($input, $type=\\PDO::PARAM_STR)$/;" f +quote ../../../src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php /^ public function quote($value, $type=\\PDO::PARAM_STR)$/;" f +quoteIdentifier ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function quoteIdentifier($str)$/;" f +quoteIdentifier ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function quoteIdentifier($str)$/;" f +quoteIdentifier ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function quoteIdentifier($str)$/;" f +quotedColumn ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $quotedColumn = $sourceColumn; \/\/ join columns cannot be quoted$/;" v +quotedColumn ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $quotedColumn = $this->_class->getQuotedColumnName($this->_class->fieldNames[$sourceColumn], $this->_platform);$/;" v +quotedJoinTable ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $quotedJoinTable = $sourceClass->getQuotedJoinTableName($assoc, $this->_platform);$/;" v +quotedJoinTable ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $quotedJoinTable = $sourceClass->getQuotedJoinTableName($owningAssoc, $this->_platform);$/;" v +quotedPaths ../../../src/Includes/Utils/ModulesManager.php /^ protected static $quotedPaths;$/;" v +quotedTargetColumn ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $quotedTargetColumn = $sourceClass->getQuotedColumnName($sourceClass->fieldNames[$sourceColumn], $this->_platform);$/;" v +quotedTargetColumn ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $quotedTargetColumn = $sourceClass->getQuotedColumnName($sourceClass->fieldNames[$targetColumn], $this->_platform);$/;" v +quotedTargetColumn ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $quotedTargetColumn = $sourceColumn; \/\/ Join columns cannot be quoted.$/;" v +quotedTargetColumn ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $quotedTargetColumn = $targetClass->getQuotedColumnName($targetClass->fieldNames[$sourceColumn], $this->_platform);$/;" v +quotedTargetColumn ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $quotedTargetColumn = $targetClass->getQuotedColumnName($targetClass->fieldNames[$targetColumn], $this->_platform);$/;" v +quotedTargetColumn ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $quotedTargetColumn = $targetColumn; \/\/ Join columns cannot be quoted.$/;" v +r ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $r = new \\ReflectionCLass(get_called_class());$/;" v +r ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Order/Tag.php /^ $r = hexdec(substr($hexcolor, 0, 2));$/;" v +r ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $r = $tax->getFilteredRate($zones, $membership, $method->getClasses());$/;" v +r2l ../../../src/classes/XLite/Model/Language.php /^ protected $r2l = false;$/;" v +rBlur ../../../src/lib/phpunsharpmask.php /^ $rBlur = (($rgbBlur >> 16) & 0xFF); $/;" v +rNew ../../../src/lib/phpunsharpmask.php /^ $rNew = ($amount * ($rOrig - $rBlur)) + $rOrig; $/;" v +rNew ../../../src/lib/phpunsharpmask.php /^ $rNew = (abs($rOrig - $rBlur) >= $threshold) $/;" v +rOrig ../../../src/lib/phpunsharpmask.php /^ $rOrig = (($rgbOrig >> 16) & 0xFF); $/;" v +radius ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->radius = $radius;$/;" v +radius ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $radius;$/;" v +radius ../../../src/lib/phpunsharpmask.php /^ $radius = $radius * 2; $/;" v +radius ../../../src/lib/phpunsharpmask.php /^ $radius = abs(round($radius)); \/\/ Only integers make sense. $/;" v +rand ../../../src/classes/XLite/View/AView.php /^ protected function rand()$/;" f +randomState ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Drupal.php /^ $randomState = hash('sha256', microtime() . mt_rand() . $randomState);$/;" v +randomState ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Drupal.php /^ $randomState = print_r($_SERVER, true);$/;" v +range ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $range = null;$/;" v +range ../../../src/classes/XLite/Core/Profiler.php /^ $range = microtime(true) - $this->points[$timePoint]['start'];$/;" v +range ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $range = explode('-', $response->getResponseHeader('range'));$/;" v +range ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $range = array_merge($/;" v +rangeDecl ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php /^ $rangeDecl = new AST\\RangeVariableDeclaration($primaryClass->name, $primaryDqlAlias);$/;" v +rangeDecl ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $rangeDecl = new AST\\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable);$/;" v +rangeDecl ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $rangeDecl = $identificationVariableDecl->rangeVariableDeclaration;$/;" v +rangeDecl ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $rangeDecl = $subselectIdVarDecl->rangeVariableDeclaration;$/;" v +rangeVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php /^ $this->rangeVariableDeclaration = $rangeVariableDecl;$/;" v +rangeVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php /^ public $rangeVariableDeclaration = null;$/;" v +rangeVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $rangeVariableDeclaration = $this->RangeVariableDeclaration();$/;" v +rate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $rate = $this->getSelectedRate();$/;" v +rate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $rate = $this->getSelectedRate();$/;" v +rate ../../../src/classes/XLite/Model/Shipping/Processor/Offline.php /^ $rate = new \\XLite\\Model\\Shipping\\Rate();$/;" v +rate ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $rate = new \\XLite\\Model\\Shipping\\Rate();$/;" v +rate ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rate = $rates[$to->getCode()];$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rate = $this->getDriver() ? $this->getDriver()->getRate($from, $to) : null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rate = doubleval($to->getRate());$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rate = $this->getRate($from, $to);$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rate = 1;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/ECB.php /^ $rate = preg_match($pattern, $response->body, $match)$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/ECB.php /^ $rate = doubleval($match[1]);$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/ECB.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/GoogleCalculator.php /^ $rate = doubleval($match[1]);$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/GoogleCalculator.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/OpenExchangeRates.php /^ $rate = isset($body['rates'][$from->getCode()])$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/OpenExchangeRates.php /^ $rate = $body['rates'][$to->getCode()];$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/OpenExchangeRates.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $rate = doubleval($parts[1]);$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/Model/Currency.php /^ protected $rate = 0;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Inline/Input/Text/Currency/Rate.php /^ $rate = -1;$/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Inline/Input/Text/Currency/Rate.php /^ $rate = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +rate ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Inline/Input/Text/Currency/Rate.php /^ $rate = doubleval($this->getEntity()->getRate());$/;" v +rate ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rate = $r;$/;" v +rate ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rate = new \\XLite\\Module\\CDev\\SalesTax\\Model\\Tax\\Rate;$/;" v +rate ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rate = $r;$/;" v +rate ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $rate = new \\XLite\\Model\\Shipping\\Rate();$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rate = $r;$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rate = new \\XLite\\Module\\CDev\\VAT\\Model\\Tax\\Rate;$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rate = $r;$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rate = null;$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $rate = $tax->getFilteredRate($zones, $membership, $product->getClasses());$/;" v +rate ../../../src/classes/XLite/Module/CDev/VAT/Logic/Product/Tax.php /^ $rate = $tax->getFilteredRate($zones, $membership, $product->getClasses());$/;" v +rateId ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rateId = \\XLite\\Core\\Request::getInstance()->id;$/;" v +rateId ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rateId = \\XLite\\Core\\Request::getInstance()->id;$/;" v +rateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rateType = $rateType;$/;" v +rateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $rateType;$/;" v +rates ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $rates = $this->getRates();$/;" v +rates ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $rates = \\XLite\\Model\\Shipping::getInstance()->getRates($this);$/;" v +rates ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Model/Shipping.php /^ $rates = array_merge($rates, $processor->getRates($modifier));$/;" v +rates ../../../src/classes/XLite/Model/Shipping.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Model/Shipping/Processor/Offline.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/AustraliaPost/Controller/Admin/Aupost.php /^ $rates = $aupost->getRates($data, true);$/;" v +rates ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $rates = $this->doQuery($data, $ignoreCache);$/;" v +rates ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rates = $this->getRatesCache($from, $to);$/;" v +rates ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rates = @unserialize($rates);$/;" v +rates ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $rates = \\XLite\\Core\\Database::getCacheDriver()->fetch($key);$/;" v +rates ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Logic/Order/Modifier/Shipping.php /^ $rates = parent::calculateRates();$/;" v +rates ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $rates = \\XLite\\Core\\Request::getInstance()->rates;$/;" v +rates ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php /^ $rates = $this->getFilteredRates($zones, $membership, $productClasses);$/;" v +rates ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php /^ $this->rates = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +rates ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax.php /^ protected $rates;$/;" v +rates ../../../src/classes/XLite/Module/CDev/USPS/Controller/Admin/Usps.php /^ $rates = $usps->getRates($data, true);$/;" v +rates ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $rates = $this->doQuery($data, $ignoreCache);$/;" v +rates ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $rates = \\XLite\\Core\\Request::getInstance()->rates;$/;" v +rates ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ $rates = $this->getFilteredRates($zones, $membership, $productClasses);$/;" v +rates ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ $rates = array();$/;" v +rates ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ $this->rates = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +rates ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ protected $rates;$/;" v +ratesExists ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $ratesExists = true;$/;" v +ratesExists ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $ratesExists = false;$/;" v +rating ../../../src/classes/XLite/Core/Marketplace.php /^ $rating = $this->getField($module, static::FIELD_RATING) ?: array();$/;" v +rating ../../../src/classes/XLite/Model/Module.php /^ protected $rating = 0;$/;" v +rating ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->rating = $rating;$/;" v +rating ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $rating;$/;" v +ratingsCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->ratingsCount = $ratingsCount;$/;" v +ratingsCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $ratingsCount;$/;" v +ratio ../../../src/lib/PHPMailer/class.phpmailer.php /^ $ratio = $mb_length \/ strlen($str);$/;" v +raw ../../../src/lib/Symfony/Component/Yaml/Inline.php /^ $raw = $scalar;$/;" v +rawBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $rawBody = $parameters['postBody'];$/;" v +rawCacheControl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $rawCacheControl = str_replace(', ', '&', $rawCacheControl);$/;" v +rawCacheControl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $rawCacheControl = $this->getResponseHeader('cache-control');$/;" v +rawDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCacheParser.php /^ $rawDate = $resp->getResponseHeader('date');$/;" v +rawExpires ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCacheParser.php /^ $rawExpires = $responseHeaders['expires'];$/;" v +rawPost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawPost = "";$/;" v +rawPost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawPost = '';$/;" v +rawPost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawPost = '';$/;" v +rawPost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawPost = '' . $id . '<\/id><\/delete>';$/;" v +rawPost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawPost = '' . $rawQuery . '<\/query><\/delete>';$/;" v +rawPost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawPost = '';$/;" v +rawQuery ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $rawQuery = htmlspecialchars($rawQuery, ENT_NOQUOTES, 'UTF-8');$/;" v +rawSchemas ../../../src/classes/XLite/Core/Database.php /^ $rawSchemas = $tool->getCreateSchemaSql($this->getAllMetadata());$/;" v +rawSchemas ../../../src/classes/XLite/Core/Database.php /^ $rawSchemas = $tool->getDropSchemaSql($this->getAllMetadata());$/;" v +rawSchemas ../../../src/classes/XLite/Core/Database.php /^ $rawSchemas = $tool->getUpdateSchemaSql($this->getAllMetadata());$/;" v +rawSchemas ../../../src/classes/XLite/Core/Database.php /^ $rawSchemas = null;$/;" v +rc ../../../src/Includes/install/install.php /^ $rc = new ReflectionClass('InstallTestDockblocks');$/;" v +rc ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ $rc = new \\ReflectionClass($className);$/;" v +rc ../../../src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php /^ $rc = new \\ReflectionClass($className);$/;" v +rdcResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->rdcResponse = $rdcResponse;$/;" v +rdcResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $rdcResponse;$/;" v +read ../../../src/Includes/Utils/FileManager.php /^ public static function read($path, $skipCheck = false)$/;" f +read ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ public function read($path)$/;" f +read ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ public function read($size)$/;" f +readConfig ../../../src/classes/XLite/Core/Config.php /^ public function readConfig($force = false)$/;" f +readDirectory ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ public function readDirectory($path)$/;" f +readInputStream ../../../src/classes/XLite/Controller/Console/AConsole.php /^ protected function readInputStream()$/;" f +readLine ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ public function readLine()$/;" f +readOnly ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $readOnly = false;$/;" v +readOutput ../../../src/classes/XLite/Model/Base/Storage.php /^ public function readOutput($start = null, $length = null)$/;" f +readOutput ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ public function readOutput($start = null, $length = null)$/;" f +readStorage ../../../src/classes/XLite/Controller/Admin/Storage.php /^ protected function readStorage(\\XLite\\Model\\Base\\Storage $storage)$/;" f +readStorage ../../../src/classes/XLite/Controller/Customer/Storage.php /^ protected function readStorage(\\XLite\\Model\\Base\\Storage $storage)$/;" f +readableStatuses ../../../src/classes/XLite/Model/Payment/Transaction.php /^ protected $readableStatuses = array($/;" v +reader ../../../src/classes/XLite/Core/Database.php /^ $reader = new \\Doctrine\\Common\\Annotations\\AnnotationReader();$/;" v +reader ../../../src/lib/Doctrine/Common/Annotations/FileCacheReader.php /^ $this->reader = $reader;$/;" v +reader ../../../src/lib/Doctrine/Common/Annotations/FileCacheReader.php /^ private $reader;$/;" v +reader ../../../src/lib/Doctrine/ORM/Configuration.php /^ $reader = new AnnotationReader();$/;" v +reader ../../../src/lib/Doctrine/ORM/Configuration.php /^ $reader = new \\Doctrine\\Common\\Annotations\\CachedReader($/;" v +reader ../../../src/lib/Doctrine/ORM/Configuration.php /^ $reader = new \\Doctrine\\Common\\Annotations\\CachedReader($reader, new ArrayCache());$/;" v +reader ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ $reader = new AnnotationReader();$/;" v +readingPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->readingPosition = $readingPosition;$/;" v +readingPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $readingPosition;$/;" v +ready ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP.php /^ $this->ready = true;$/;" v +ready ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP.php /^ protected $ready = false;$/;" v +realClassName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $realClassName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\\\' . $simpleClassName;$/;" v +realClassName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $realClassName = $className;$/;" v +rearrangeArray ../../../src/Includes/Utils/ArrayManager.php /^ public static function rearrangeArray(array $array, array $filterArray, $moveDirection = false)$/;" f +reason ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->reason = $reason;$/;" v +reason ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $reason;$/;" v +reason ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->reason = $reason;$/;" v +reason ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $reason;$/;" v +reason ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $reason = $bill->status ? $this->billStatuses[$bill->status] : 'Unknown';$/;" v +reason ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $reason = $bill->status ? $this->billStatuses[$bill->status] : 'Unknown';$/;" v +reasonCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->reasonCode = $reasonCode;$/;" v +reasonCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $reasonCode;$/;" v +reassignProducts ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier/Category.php /^ public function reassignProducts()$/;" f +reassignRootProducts ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ public function reassignRootProducts()$/;" f +rebuildCache ../../../src/Includes/Decorator/Utils/CacheManager.php /^ public static function rebuildCache()$/;" f +rec ../../../src/classes/XLite/View/EventTaskProgress.php /^ $rec = $this->getTmpVar();$/;" v +recentAdmins ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $this->recentAdmins = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findRecentAdmins();$/;" v +recentAdmins ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected $recentAdmins = null;$/;" v +recommendationList ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->recommendationList = $recommendationList;$/;" v +recommendationList ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $recommendationList;$/;" v +recommendations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->recommendations = $recommendations;$/;" v +recommendations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $recommendations;$/;" v +recomputeSingleEntityChangeSet ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function recomputeSingleEntityChangeSet($class, $entity)$/;" f +record ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ $this->record = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState($this->getEventName());$/;" v +record ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ protected $record;$/;" v +record ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $record = array_intersect_key($record, $assocs);$/;" v +record ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ $record = $this->getEventState($name);$/;" v +record ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $record = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState($this->eventName);$/;" v +record ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ $this->record = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState($this->getEventName());$/;" v +records ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $records = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\CDev\\FeaturedProducts\\Model\\FeaturedProduct')$/;" v +recurrence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->recurrence = $recurrence;$/;" v +recurrence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $recurrence;$/;" v +recurringEventId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->recurringEventId = $recurringEventId;$/;" v +recurringEventId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $recurringEventId;$/;" v +redeclareQueue ../../../src/classes/XLite/Core/EventDriver/AMQP.php /^ public function redeclareQueue($name)$/;" f +redirect ../../../src/Includes/Utils/Operator.php /^ public static function redirect($location, $code = 302)$/;" f +redirect ../../../src/classes/XLite/Controller/AController.php /^ protected function redirect($url = null)$/;" f +redirect ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ $redirect = 'admin.php?target=shipping_rates';$/;" v +redirect ../../../src/classes/XLite/Controller/Console/AConsole.php /^ protected function redirect($url = null)$/;" f +redirect ../../../src/classes/XLite/Core/Operator.php /^ public static function redirect($location, $force = false, $code = 302)$/;" f +redirectFromLogin ../../../src/classes/XLite/Controller/Customer/Login.php /^ public function redirectFromLogin()$/;" f +redirectToSecure ../../../src/classes/XLite/Controller/AController.php /^ protected function redirectToSecure()$/;" f +redirectUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $this->redirectUri = $apiConfig['oauth2_redirect_uri'];$/;" v +redirectUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public $redirectUri;$/;" v +redirect_uri ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $redirect_uri = $this->getCurrentUrl();$/;" v +redirects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->redirects = $redirects;$/;" v +redirects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $redirects;$/;" v +ref ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->ref = $ref;$/;" v +ref ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $ref;$/;" v +ref ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner/Directory.php /^ $ref = new \\ReflectionClass($class);$/;" v +refProp ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $refProp = $this->reflClass->getProperty($mapping['fieldName']);$/;" v +refProp ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $refProp = $this->reflClass->getProperty($sourceFieldName);$/;" v +referencedColumnName ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $referencedColumnName = 'id';$/;" v +referencedFieldName ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $referencedFieldName = $class->getFieldName($referencedColumnName);$/;" v +referencesClause ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $referencesClause = ' REFERENCES '.$constraint->getForeignTableName(). ' ('.implode(', ', $foreignColumns).')';$/;" v +referencesClause ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $referencesClause = '';$/;" v +referer ../../../src/classes/XLite/Core/Session.php /^ $referer = parse_url($_SERVER['HTTP_REFERER']);$/;" v +referer ../../../src/classes/XLite/Model/Profile.php /^ protected $referer = '';$/;" v +referrers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->referrers = $referrers;$/;" v +referrers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $referrers;$/;" v +refl ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $refl = new \\ReflectionClass($this->_getClassToExtend());$/;" v +refl ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $refl = new \\ReflectionClass($this->_getClassToExtend());$/;" v +reflClass ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ $reflClass = new \\ReflectionClass($name);$/;" v +reflClass ../../../src/lib/Doctrine/Common/Lexer.php /^ $reflClass = new \\ReflectionClass($className);$/;" v +reflClass ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $reflClass = new \\ReflectionClass(get_class($var));$/;" v +reflClass ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $this->reflClass = new ReflectionClass($entityName);$/;" v +reflClass ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $this->reflClass = new ReflectionClass($this->name);$/;" v +reflClass ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $this->reflClass = new ReflectionClass($this->name);$/;" v +reflClass ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $reflClass;$/;" v +reflField ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $reflField = $parentClass->reflFields[$relationField];$/;" v +reflField ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $reflField = $this->reflClass->getProperty($field);$/;" v +reflField ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $reflField = new ReflectionProperty($mapping['declared'], $field);$/;" v +reflField ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $reflField = $class->reflFields[$field];$/;" v +reflFieldValue ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $reflFieldValue = $this->_initRelatedCollection($parentObject, $parentClass, $relationField);$/;" v +reflFieldValue ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $reflFieldValue = $this->_initializedCollections[$collKey];$/;" v +reflFieldValue ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $reflFieldValue = $reflField->getValue($parentObject);$/;" v +reflFields ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ public $reflFields = array();$/;" v +reflProperty ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $reflProperty = $reflClass->getProperty('_identifier');$/;" v +reflection ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ $reflection = new \\ReflectionClass($this->getClass());$/;" v +reflection ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ $this->reflection = new \\StdClass();$/;" v +reflection ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ protected $reflection;$/;" v +reflection ../../../src/classes/XLite/View/Upgrade/Step/Prepare/IncompatibleEntries.php /^ $reflection = new \\ReflectionMethod($classModule, 'getMajorVersion');$/;" v +reflectionClass ../../../src/Includes/Utils/ModulesManager.php /^ $reflectionClass = new \\ReflectionClass($class);$/;" v +reflectionFailure ../../../src/lib/Doctrine/ORM/Mapping/MappingException.php /^ public static function reflectionFailure($entity, \\ReflectionException $previousException)$/;" f +refresh ../../../src/Includes/Utils/Operator.php /^ public static function refresh()$/;" f +refresh ../../../src/Includes/functions.php /^function refresh() {$/;" f +refresh ../../../src/lib/Doctrine/Common/Persistence/ObjectManager.php /^ public function refresh($object);$/;" f +refresh ../../../src/lib/Doctrine/ORM/EntityManager.php /^ public function refresh($entity)$/;" f +refresh ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ public function refresh(array $id, $entity)$/;" f +refresh ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function refresh($entity)$/;" f +refreshEnd ../../../src/classes/XLite/View/Controller.php /^ protected function refreshEnd()$/;" f +refreshItems ../../../src/classes/XLite/Model/Order.php /^ public function refreshItems()$/;" f +refreshToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function refreshToken($refreshToken) {$/;" f +refreshToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuth.php /^ abstract public function refreshToken($refreshToken);$/;" f +refreshToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuthNone.php /^ public function refreshToken($refreshToken) {\/* noop*\/}$/;" f +refreshToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function refreshToken($refreshToken) {$/;" f +refreshTokenRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ private function refreshTokenRequest($params) {$/;" f +refreshTokenWithAssertion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function refreshTokenWithAssertion($assertionCredentials = null) {$/;" f +refs ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ protected $refs = array();$/;" v +refunded ../../../src/classes/XLite/Model/Payment/Base/CreditCard.php /^ $refunded = 0;$/;" v +refunded ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $refunded = $this->getRefundedTotal();$/;" v +regExp ../../../src/classes/XLite/Core/Validator/String/RegExp.php /^ $this->regExp = $regExp;$/;" v +regExp ../../../src/classes/XLite/Core/Validator/String/RegExp.php /^ protected $regExp;$/;" v +regenerateAccessKey ../../../src/Includes/SafeMode.php /^ public static function regenerateAccessKey()$/;" f +regex ../../../src/lib/Doctrine/Common/Lexer.php /^ $regex = '\/(' . implode(')|(', $this->getCatchablePatterns()) . ')|'$/;" v +regex ../../../src/lib/Doctrine/Common/Lexer.php /^ static $regex;$/;" v +regexp ../../../src/classes/XLite/Core/FileCache/Iterator.php /^ $this->regexp = $regexp;$/;" v +regexp ../../../src/classes/XLite/Core/FileCache/Iterator.php /^ protected $regexp;$/;" v +regexp ../../../src/classes/XLite/Model/Repo/Session.php /^ $regexp = '\/^[' . preg_quote(implode('', $this->chars), '\/') . ']'$/;" v +regexp ../../../src/classes/XLite/Model/Repo/Session.php /^ static $regexp = null;$/;" v +regexp_pattern ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $regexp_pattern = '';$/;" v +regexp_replace ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $regexp_replace = '';$/;" v +register ../../../src/classes/XLite/Core/Mailer.php /^ protected static function register($name, $value = '')$/;" f +register ../../../src/lib/Doctrine/Common/ClassLoader.php /^ public function register()$/;" f +register ../../../src/lib/PEAR2/Autoload.php /^ protected static function register()$/;" f +register ../../../src/lib/Symfony/Component/Console/Application.php /^ public function register($name)$/;" f +registerAll ../../../src/Includes/Autoloader.php /^ public static function registerAll()$/;" f +registerAutoloadDirectory ../../../src/lib/Doctrine/ORM/Tools/Setup.php /^ static public function registerAutoloadDirectory($directory)$/;" f +registerAutoloadGit ../../../src/lib/Doctrine/ORM/Tools/Setup.php /^ static public function registerAutoloadGit($gitCheckoutRootPath)$/;" f +registerAutoloadNamespace ../../../src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php /^ static public function registerAutoloadNamespace($namespace, $dirs = null)$/;" f +registerAutoloadNamespaces ../../../src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php /^ static public function registerAutoloadNamespaces(array $namespaces)$/;" f +registerAutoloadPEAR ../../../src/lib/Doctrine/ORM/Tools/Setup.php /^ static public function registerAutoloadPEAR()$/;" f +registerAutoloader ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Loader.php /^ public static function registerAutoloader()$/;" f +registerCallback ../../../src/Includes/Utils/FileFilter/FilterIterator.php /^ public function registerCallback(array $callback)$/;" f +registerConfigFile ../../../src/Includes/Utils/ConfigParser.php /^ public static function registerConfigFile($fileName)$/;" f +registerCustomTypes ../../../src/classes/XLite/Core/Database.php /^ public static function registerCustomTypes(\\Doctrine\\ORM\\EntityManager $em)$/;" f +registerDoctrineAutoloader ../../../src/Includes/Autoloader.php /^ protected static function registerDoctrineAutoloader()$/;" f +registerDoctrineTypeMapping ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function registerDoctrineTypeMapping($dbType, $doctrineType)$/;" f +registerException ../../../src/classes/XLite/Logger.php /^ public function registerException(\\Exception $exception)$/;" f +registerExportDriver ../../../src/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php /^ public static function registerExportDriver($name, $class)$/;" f +registerFile ../../../src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php /^ static public function registerFile($file)$/;" f +registerLCResources ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ protected function registerLCResources()$/;" f +registerLoader ../../../src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php /^ static public function registerLoader($callabale)$/;" f +registerManaged ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function registerManaged($entity, array $id, array $data)$/;" f +registerMetas ../../../src/classes/XLite/View/AView.php /^ protected function registerMetas()$/;" f +registerModulesLibrariesAutoloader ../../../src/Includes/Autoloader.php /^ protected static function registerModulesLibrariesAutoloader()$/;" f +registerNamespaces ../../../src/classes/XLite/View/AView.php /^ protected function registerNamespaces()$/;" f +registerPEARAutolader ../../../src/Includes/Autoloader.php /^ protected static function registerPEARAutolader()$/;" f +registerPHPError ../../../src/classes/XLite/Logger.php /^ public function registerPHPError($errno, $errstr, $errfile, $errline)$/;" f +registerPortal ../../../src/classes/XLite/Module/CDev/Catalog/Drupal/Module.php /^ protected function registerPortal($url, $controller, $title = '', $type = MENU_LOCAL_TASK)$/;" f +registerPortal ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ protected function registerPortal($url, $controller, $title = '', $type = MENU_LOCAL_TASK)$/;" f +registerPortals ../../../src/classes/XLite/Module/CDev/Aggregator/Drupal/Module.php /^ protected function registerPortals()$/;" f +registerPortals ../../../src/classes/XLite/Module/CDev/Conversations/Drupal/Module.php /^ protected function registerPortals()$/;" f +registerPortals ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ protected function registerPortals()$/;" f +registerProcessor ../../../src/classes/XLite/Model/Shipping.php /^ public static function registerProcessor($processorClass)$/;" f +registerResources ../../../src/classes/XLite/View/AView.php /^ protected function registerResources(array $resources, $index, $interface = null)$/;" f +registerResourcesForCurrentWidget ../../../src/classes/XLite/View/AView.php /^ protected function registerResourcesForCurrentWidget()$/;" f +registerWishlist ../../../src/classes/XLite/Module/SpurIT/SpurITDrupal/Drupal/Module.php /^ protected function registerWishlist()$/;" f +registerWorker ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner.php /^ public function registerWorker($class, $arguments = null)$/;" f +registered ../../../src/lib/PEAR2/Autoload.php /^ protected static $registered = false;$/;" v +registeredProcessors ../../../src/classes/XLite/Model/Shipping.php /^ protected static $registeredProcessors = array();$/;" v +regular ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $regular = array();$/;" v +reimportPeriod ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ protected $reimportPeriod = 0;$/;" v +reinitializeCurrency ../../../src/classes/XLite/Model/Order.php /^ protected function reinitializeCurrency()$/;" f +rel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->rel = $rel;$/;" v +rel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $rel;$/;" v +related ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $related = "--$boundary\\r\\n";$/;" v +relatedClass ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $relatedClass = $this->_em->getClassMetadata($mapping['targetEntity']);$/;" v +relatedEntities ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $relatedEntities = $relatedEntities->unwrap();$/;" v +relatedEntities ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $relatedEntities = $class->reflFields[$assoc['fieldName']]->getValue($entity);$/;" v +relatedIdHash ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $relatedIdHash = implode(' ', $associatedId);$/;" v +relatedQueries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->relatedQueries = $relatedQueries;$/;" v +relatedQueries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $relatedQueries;$/;" v +relatedSite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->relatedSite = $relatedSite;$/;" v +relatedSite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $relatedSite;$/;" v +relatedTargets ../../../src/classes/XLite/View/TopMenu.php /^ protected $relatedTargets = array($/;" v +relation ../../../src/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php /^ $relation = $node1 . ' -> ' . $node2 . ' [';$/;" v +relation ../../../src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php /^ $relation = $this->_getClassMetadata($this->_rsm->aliasMap[$parent])->associationMappings[$relationAlias];$/;" v +relation ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $relation = $parentClass->associationMappings[$relationField];$/;" v +relation ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $relation = $class->associationMappings[$fieldName];$/;" v +relation ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $relation = $this->_queryComponents[$joinedDqlAlias]['relation'];$/;" v +relationAlias ../../../src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php /^ $relationAlias = $this->_rsm->relationMap[$dqlAlias];$/;" v +relationField ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $relationField = $this->_rsm->relationMap[$dqlAlias];$/;" v +relationMap ../../../src/lib/Doctrine/ORM/Query/ResultSetMapping.php /^ public $relationMap = array();$/;" v +relations ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $relations = array();$/;" v +relationshipStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->relationshipStatus = $relationshipStatus;$/;" v +relationshipStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $relationshipStatus;$/;" v +relative ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $relative = $this->defineFindByFullPathQuery($path, false, $id)->getResult();$/;" v +relative ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $relative = array();$/;" v +relativePath ../../../src/classes/XLite/Upgrade/Entry/Module/Uploaded.php /^ $relativePath = \\Includes\\Utils\\FileManager::getRelativePath($file->getPathname(), LC_DIR_ROOT);$/;" v +releaseDownloadAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function releaseDownloadAccess($volumeIds, $cpksver, $optParams = array()) {$/;" f +releaseSavePoint ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function releaseSavePoint($savepoint)$/;" f +releaseSavePoint ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function releaseSavePoint($savepoint)$/;" f +releaseSavePoint ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ public function releaseSavePoint($savepoint)$/;" f +releaseSavepoint ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function releaseSavepoint($savepoint)$/;" f +reload ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $this->reload = false;$/;" v +reload ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $this->reload = true;$/;" v +reload ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ protected $reload = false;$/;" v +rememberLogin ../../../src/classes/XLite/Core/Auth.php /^ protected function rememberLogin($login)$/;" f +remindLogin ../../../src/classes/XLite/Core/Auth.php /^ public function remindLogin()$/;" f +reminders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->reminders = $reminders;$/;" v +reminders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $reminders;$/;" v +remove ../../../src/lib/Doctrine/Common/Collections/ArrayCollection.php /^ public function remove($key)$/;" f +remove ../../../src/lib/Doctrine/Common/Collections/Collection.php /^ function remove($key);$/;" f +remove ../../../src/lib/Doctrine/Common/Persistence/ObjectManager.php /^ public function remove($object);$/;" f +remove ../../../src/lib/Doctrine/ORM/EntityManager.php /^ public function remove($entity)$/;" f +remove ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function remove($key)$/;" f +remove ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function remove($entity)$/;" f +removeBraces ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function removeBraces($str)$/;" f +removeByMarkAndSupplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Product.php /^ public function removeByMarkAndSupplier(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier)$/;" f +removeCRLF ../../../src/Includes/Utils/Converter.php /^ public static function removeCRLF($value)$/;" f +removeCell ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ public function removeCell(\\XLite\\Model\\SessionCell $cell)$/;" f +removeChild ../../../src/Includes/DataStructure/Graph.php /^ public function removeChild(self $node)$/;" f +removeChild ../../../src/lib/Log/composite.php /^ function removeChild($child)$/;" f +removeDoctrineTypeFromComment ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ public function removeDoctrineTypeFromComment($comment, $type)$/;" f +removeElement ../../../src/lib/Doctrine/Common/Collections/ArrayCollection.php /^ public function removeElement($element)$/;" f +removeElement ../../../src/lib/Doctrine/Common/Collections/Collection.php /^ function removeElement($element);$/;" f +removeElement ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function removeElement($element)$/;" f +removeEntity ../../../src/classes/XLite/Module/CDev/Multicurrency/View/ItemsList/Model/Currency/Admin.php /^ protected function removeEntity(\\XLite\\Model\\AEntity $entity)$/;" f +removeEntity ../../../src/classes/XLite/Module/CDev/UserPermissions/View/ItemsList/Model/Roles.php /^ protected function removeEntity(\\XLite\\Model\\AEntity $entity)$/;" f +removeEntity ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function removeEntity(\\XLite\\Model\\AEntity $entity)$/;" f +removeEntity ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ protected function removeEntity(\\XLite\\Model\\AEntity $entity)$/;" f +removeEventListener ../../../src/lib/Doctrine/Common/EventManager.php /^ public function removeEventListener($events, $listener)$/;" f +removeEventState ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ public function removeEventState($name)$/;" f +removeExpired ../../../src/classes/XLite/Model/Repo/FormId.php /^ public function removeExpired($sessionId = null)$/;" f +removeExpired ../../../src/classes/XLite/Model/Repo/Session.php /^ public function removeExpired()$/;" f +removeFile ../../../src/Includes/Utils/ModulesManager.php /^ public static function removeFile()$/;" f +removeFile ../../../src/classes/XLite/Model/Base/Storage.php /^ public function removeFile($path = null)$/;" f +removeFile ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ public function removeFile($path = null)$/;" f +removeFixtures ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/FixturesManager.php /^ public static function removeFixtures()$/;" f +removeFromIdentityMap ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function removeFromIdentityMap($entity)$/;" f +removeLock ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiApcCache.php /^ private function removeLock($key) {$/;" f +removeLock ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ private function removeLock($storageFile) {$/;" f +removeLock ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiMemcacheCache.php /^ private function removeLock($key) {$/;" f +removeObserver ../../../src/lib/PEAR2/Exception.php /^ public static function removeObserver($label = 'default')$/;" f +removeProduct ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ public function removeProduct(\\XLite\\Model\\Product $product)$/;" f +removeProductFlag ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ public function removeProductFlag()$/;" f +removeReadService ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function removeReadService($service)$/;" f +removeSolrDocument ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Product.php /^ public function removeSolrDocument()$/;" f +removeSubstutionalSkin ../../../src/classes/XLite/Core/Layout.php /^ public function removeSubstutionalSkin($name, $interface = null)$/;" f +removeVolume ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function removeVolume($shelf, $volumeId, $optParams = array()) {$/;" f +removeWidgetFromList ../../../src/classes/XLite/View/AView.php /^ public static function removeWidgetFromList($name, $isTemplate = true, $list = null, $zone = null)$/;" f +removeWriteService ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function removeWriteService($service)$/;" f +removed ../../../src/lib/Doctrine/Common/Collections/ArrayCollection.php /^ $removed = $this->_elements[$key];$/;" v +removed ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ $removed = $this->coll->remove($key);$/;" v +removed ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ $removed = $this->coll->removeElement($element);$/;" v +removedColumnName ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $removedColumnName = strtolower($removedColumn->getName());$/;" v +removedColumns ../../../src/lib/Doctrine/DBAL/Schema/TableDiff.php /^ $this->removedColumns = $removedColumns;$/;" v +removedColumns ../../../src/lib/Doctrine/DBAL/Schema/TableDiff.php /^ public $removedColumns = array();$/;" v +removedForeignKeys ../../../src/lib/Doctrine/DBAL/Schema/TableDiff.php /^ public $removedForeignKeys = array();$/;" v +removedIndexes ../../../src/lib/Doctrine/DBAL/Schema/TableDiff.php /^ $this->removedIndexes = $removedIndexes;$/;" v +removedIndexes ../../../src/lib/Doctrine/DBAL/Schema/TableDiff.php /^ public $removedIndexes = array();$/;" v +removedSequences ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ public $removedSequences = array();$/;" v +removedTables ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ $this->removedTables = $removedTables;$/;" v +removedTables ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ public $removedTables = array();$/;" v +renameCandidates ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $renameCandidates = array();$/;" v +renameColumn ../../../src/lib/Doctrine/DBAL/Schema/Table.php /^ public function renameColumn($oldColumnName, $newColumnName)$/;" f +renameTable ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ public function renameTable($name, $newName)$/;" f +renameTable ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ public function renameTable($oldTableName, $newTableName)$/;" f +rename_install_script ../../../src/Includes/install/install.php /^function rename_install_script()$/;" f +renamedColumns ../../../src/lib/Doctrine/DBAL/Schema/TableDiff.php /^ public $renamedColumns = array();$/;" v +renderException ../../../src/lib/Symfony/Component/Console/Application.php /^ public function renderException($e, $output)$/;" f +renew ../../../src/classes/XLite/Model/Base/Storage.php /^ protected function renew()$/;" f +renew ../../../src/classes/XLite/Model/Order.php /^ public function renew()$/;" f +renew ../../../src/classes/XLite/Model/OrderItem.php /^ public function renew()$/;" f +renew ../../../src/classes/XLite/Module/CDev/Aggregator/Model/OrderItem.php /^ public function renew()$/;" f +renew ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OrderItem.php /^ public function renew()$/;" f +renewAnswered ../../../src/classes/XLite/Module/CDev/Conversations/Model/Conversation.php /^ public function renewAnswered()$/;" f +renewByPath ../../../src/classes/XLite/Model/Base/Image.php /^ protected function renewByPath($path)$/;" f +renewByPath ../../../src/classes/XLite/Model/Base/Storage.php /^ protected function renewByPath($path)$/;" f +renewDependentStorage ../../../src/classes/XLite/Model/Base/Storage.php /^ public function renewDependentStorage()$/;" f +renewDualStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ protected function renewDualStatus()$/;" f +renewFulfillmentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ protected function renewFulfillmentStatus()$/;" f +renewPaymentMethod ../../../src/classes/XLite/Model/Order.php /^ public function renewPaymentMethod()$/;" f +renewPaymentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ protected function renewPaymentStatus()$/;" f +renewProcessName ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ public function renewProcessName()$/;" f +renewSoft ../../../src/classes/XLite/Model/Order.php /^ public function renewSoft()$/;" f +renewStorage ../../../src/classes/XLite/Model/Base/Storage.php /^ public function renewStorage()$/;" f +renewTranslatedStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Product.php /^ public function renewTranslatedStatus()$/;" f +replace ../../../src/Includes/Utils/FileManager.php /^ public static function replace($path, $data, $pattern, $flags = 0, $mode = 0644)$/;" f +replace ../../../src/classes/XLite/Core/Connection.php /^ public function replace($tableName, array $data)$/;" f +replace ../../../src/classes/XLite/Core/Database.php /^ $replace = array('\\0', '\\n', '\\r', '\\Z');$/;" v +replace ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $replace = array("\\'", '"');$/;" v +replace ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $replace = '$1 ON DELETE ' . (isset($cell['delete']) ? strtoupper($cell['delete']) : 'CASCADE');$/;" v +replace ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ protected $replace = array('\\\\\\\\', '\\\\+', '\\\\-', '\\\\&', '\\\\|', '\\\\!', '\\\\(', '\\\\)', '\\\\{', '\\\\}', '\\\\[', '\\\\]', '\\\\^', '\\\\~', '\\\\*', '\\\\?', '\\\\:', '\\\\"', '\\\\;');$/;" v +replace ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $replace = '\\\\\\$1';$/;" v +replace ../../../src/classes/XLite/View/PoweredBy.php /^ $replace = $this->isLink()$/;" v +replaceClassName ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function replaceClassName($token)$/;" f +replaceClassRelatedToken ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function replaceClassRelatedToken($type, $token)$/;" f +replaceDockblock ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function replaceDockblock($token)$/;" f +replaceEndStyle ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ protected function replaceEndStyle($match)$/;" f +replaceNamespace ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function replaceNamespace($token)$/;" f +replaceParentClassName ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function replaceParentClassName($token)$/;" f +replaceStartStyle ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ protected function replaceStartStyle($match)$/;" f +replaceTokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function replaceTokens($start, $end, array $tokens)$/;" f +replacements ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php /^ protected $replacements = array();$/;" v +replacements ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php /^ protected $replacements = array();$/;" v +replacements ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $replacements = array($/;" v +replacements ../../../src/Includes/install/install.php /^ $replacements = array($/;" v +replacements ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $replacements = array($/;" v +replacements ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $replacements = array($/;" v +replacements ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ $replacements = array($/;" v +replant ../../../src/Includes/DataStructure/Graph.php /^ public function replant(self $oldParent, self $newParent)$/;" f +replies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->replies = $replies;$/;" v +replies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $replies;$/;" v +replies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->replies = $replies;$/;" v +replies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $replies;$/;" v +replies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->replies = $replies;$/;" v +replies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $replies;$/;" v +replyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->replyTo = $replyTo;$/;" v +replyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $replyTo;$/;" v +repo ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $repo = \\XLite\\Core\\Database::getRepo(get_class($entity));$/;" v +repo ../../../src/classes/XLite/Controller/Admin/ModuleKey.php /^ $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ModuleKey');$/;" v +repo ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $repo = $class;$/;" v +repo ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $repo = \\XLite\\Core\\Database::getRepo($class);$/;" v +repo ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $repo = null;$/;" v +repo ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $repo = null;$/;" v +repo ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $repo = isset($list[$name]) ? $list[$name] : null;$/;" v +repo ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $repo = $class;$/;" v +repo ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $repo = \\XLite\\Core\\Database::getRepo($class);$/;" v +repo ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $repo = null;$/;" v +repo ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $repo = null;$/;" v +repo ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $repo = isset($list[$name]) ? $list[$name] : null;$/;" v +repo ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Product');$/;" v +repo ../../../src/classes/XLite/Core/Database.php /^ $repo = static::getRepo($entityName);$/;" v +repo ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar');$/;" v +repo ../../../src/classes/XLite/Core/QuickAccess.php /^ public function repo($name)$/;" f +repo ../../../src/classes/XLite/Model/AEntity.php /^ $repo = $this->getRepository();$/;" v +repo ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $repo = \\XLite\\Core\\Database::getRepo($model);$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Order.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\OrderItem');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SupplierOrder.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\OrderItem');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Aggregator\\Model\\Supplier\\Category');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Aggregator\\Model\\Supplier\\Category');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/ProductsMarkupUpdate.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Category');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Category.php /^ $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Category');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/Order/Admin/Search.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\OrderItem');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Bestsellers/upgrade/1.0/5/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config');$/;" v +repo ../../../src/classes/XLite/Module/CDev/DrupalConnector/upgrade/1.0/8/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config');$/;" v +repo ../../../src/classes/XLite/Module/CDev/FeaturedProducts/upgrade/1.0/17/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config');$/;" v +repo ../../../src/classes/XLite/Module/CDev/FeaturedProducts/upgrade/1.0/7/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config');$/;" v +repo ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/upgrade/1.0/3/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config');$/;" v +repo ../../../src/classes/XLite/Module/CDev/Moneybookers/upgrade/1.0/3/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config');$/;" v +repo ../../../src/classes/XLite/Module/CDev/ProductOptions/upgrade/1.0/13/post_rebuild.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\MoneyModificator');$/;" v +repo ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductVariants\\Model\\Variant');$/;" v +repo ../../../src/classes/XLite/View/AView.php /^ $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');$/;" v +repo ../../../src/classes/XLite/View/BenchmarkSummary.php /^ $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Measure');$/;" v +repo ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $repo = $this->getRepository();$/;" v +repoModule ../../../src/classes/XLite/Core/Marketplace.php /^ $repoModule = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Module');$/;" v +repoModuleKey ../../../src/classes/XLite/Core/Marketplace.php /^ $repoModuleKey = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ModuleKey');$/;" v +report ../../../src/Includes/install/install.php /^ $report = array();$/;" v +report ../../../src/Includes/install/install.php /^ $report = strip_tags(implode("\\n", $report));$/;" v +report ../../../src/Includes/install/templates/step1_report.tpl.php /^ $report = make_check_report($requirements);$/;" v +report_uid ../../../src/Includes/install/install.php /^ $report_uid = '';$/;" v +reports ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->reports = new ReportsServiceResource($this, $this->serviceName, 'reports', json_decode('{"methods": {"generate": {"scopes": ["https:\/\/www.googleapis.com\/auth\/adsense", "https:\/\/www.googleapis.com\/auth\/adsense.readonly"], "parameters": {"sort": {"repeated": true, "type": "string", "location": "query"}, "startDate": {"required": true, "type": "string", "location": "query"}, "endDate": {"required": true, "type": "string", "location": "query"}, "locale": {"type": "string", "location": "query"}, "metric": {"repeated": true, "type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "50000", "minimum": "0", "location": "query", "type": "integer"}, "filter": {"repeated": true, "type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "int32", "maximum": "5000", "minimum": "0", "location": "query", "type": "integer"}, "dimension": {"repeated": true, "type": "string", "location": "query"}, "accountId": {"repeated": true, "type": "string", "location": "query"}}, "id": "adsense.reports.generate", "httpMethod": "GET", "path": "reports", "response": {"$ref": "AdsenseReportsGenerateResponse"}}}}', true));$/;" v +reports ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $reports;$/;" v +reports ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->reports = new ReportsServiceResource($this, $this->serviceName, 'reports', json_decode('{"methods": {"generate": {"parameters": {"sort": {"repeated": true, "type": "string", "location": "query"}, "startDate": {"required": true, "type": "string", "location": "query"}, "endDate": {"required": true, "type": "string", "location": "query"}, "locale": {"type": "string", "location": "query"}, "metric": {"repeated": true, "type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "50000", "minimum": "0", "location": "query", "type": "integer"}, "filter": {"repeated": true, "type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "int32", "maximum": "5000", "minimum": "0", "location": "query", "type": "integer"}, "dimension": {"repeated": true, "type": "string", "location": "query"}}, "id": "adsensehost.reports.generate", "httpMethod": "GET", "path": "reports", "response": {"$ref": "AdsensehostReportsGenerateResponse"}}}}', true));$/;" v +reports ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $reports;$/;" v +repositories ../../../src/lib/Doctrine/ORM/EntityManager.php /^ private $repositories = array();$/;" v +repository ../../../src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php /^ $repository = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\FileAttachments\\Model\\Product\\Attachment');$/;" v +repository ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php /^ $repository = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductOptions\\Model\\OptionException');$/;" v +repository ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ $repository = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductVariants\\Model\\Variant');$/;" v +repository ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $repository = new $customRepositoryClassName($this, $metadata);$/;" v +repository ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $repository = new EntityRepository($this, $metadata);$/;" v +repositoryClass ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $repositoryClass;$/;" v +repositoryPath ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $this->repositoryPath = $path;$/;" v +repositoryPath ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ protected $repositoryPath;$/;" v +reqData ../../../src/Includes/install/templates/step1_chkconfig.tpl.php /^ $reqData = $requirements[$reqName];$/;" v +reqNameComponents ../../../src/Includes/install/install.php /^ $reqNameComponents = explode('_', $reqName);$/;" v +reqsNotes ../../../src/Includes/install/templates/step1_chkconfig.tpl.php /^$reqsNotes = array();$/;" v +request ../../../src/classes/XLite/Controller/AController.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/Admin/GetWidget.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/Admin/Measure.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/classes/XLite/Controller/Admin/Order.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/Customer/GetWidget.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Controller/GetWidget.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ $request = new \\XLite\\Core\\HTTP\\Request($image['url']);$/;" v +request ../../../src/classes/XLite/Core/Marketplace.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/classes/XLite/Core/Request.php /^ $request = $this->doUnescape($request);$/;" v +request ../../../src/classes/XLite/Model/Base/Storage.php /^ $request = new \\XLite\\Core\\HTTP\\Request($path ?: $this->getPath());$/;" v +request ../../../src/classes/XLite/Model/Payment/Base/Processor.php /^ $this->request = $request;$/;" v +request ../../../src/classes/XLite/Model/Payment/Base/Processor.php /^ protected $request;$/;" v +request ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php /^ $request = new \\XLite\\Core\\HTTP\\Request($/;" v +request ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $request = new \\XLite\\Core\\HTTP\\Request($this->getPostURL());$/;" v +request ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/ECB.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/GoogleCalculator.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/OpenExchangeRates.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $request = new \\XLite\\Core\\HTTP\\Request($response->headers->Location);$/;" v +request ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Customer/Cart.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $request = apiClient::$io->makeRequest(new apiHttpRequest(self::OAUTH2_TOKEN_URI, 'POST', array(), array($/;" v +request ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $request = apiClient::$io->makeRequest($http);$/;" v +request ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $request = apiClient::$io->makeRequest(new apiHttpRequest($/;" v +request ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $request = new apiHttpRequest(self::OAUTH2_REVOKE_URI, 'POST', array(), "token=$token");$/;" v +request ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $request = $this->processEntityRequest($request);$/;" v +request ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $request = apiClient::$auth->sign($request);$/;" v +request ../../../src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $request = \\XLite\\Core\\Request::getInstance();$/;" v +request ../../../src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php /^ $request = new \\XLite\\Core\\HTTP\\Request($url);$/;" v +request ../../../src/lib/PEAR2/HTTP/Request/Adapter/Http.php /^ $this->request = $request = new \\HttpRequest($this->uri->url, $method, $options);$/;" v +request ../../../src/lib/PEAR2/HTTP/Request/Adapter/Http.php /^ protected $request;$/;" v +requestAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function requestAccess($source, $volumeId, $nonce, $cpksver, $optParams = array()) {$/;" f +requestData ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $this->requestData = $form->getRequestData();$/;" v +requestData ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected $requestData;$/;" v +requestData ../../../src/classes/XLite/Module/CDev/Sale/Controller/Admin/SaleSelected.php /^ $requestData = $form->getRequestData();$/;" v +requestData ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $this->requestData = $this->defineRequestData();$/;" v +requestData ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected $requestData;$/;" v +requestData ../../../src/classes/XLite/View/Model/AModel.php /^ $requestData = $this->prepareDataForMapping();$/;" v +requestData ../../../src/classes/XLite/View/Model/AModel.php /^ $this->requestData = $this->prepareRequestData($data);$/;" v +requestData ../../../src/classes/XLite/View/Model/AModel.php /^ $this->requestData = \\Includes\\Utils\\ArrayManager::filterByKeys($/;" v +requestData ../../../src/classes/XLite/View/Model/AModel.php /^ protected $requestData = null;$/;" v +requestHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $requestHeaders = $request->getRequestHeaders();$/;" v +requestHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->requestHeaders = $headers;$/;" v +requestHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $requestHeaders;$/;" v +requestId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->requestId = $requestId;$/;" v +requestId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $requestId;$/;" v +requestMap ../../../src/lib/PEAR2/HTTP/Request/Adapter/Filesystem.php /^ public static $requestMap;$/;" v +requestMethod ../../../src/classes/XLite/Core/Request.php /^ $this->requestMethod = $method;$/;" v +requestMethod ../../../src/classes/XLite/Core/Request.php /^ $this->requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : self::METHOD_CLI;$/;" v +requestMethod ../../../src/classes/XLite/Core/Request.php /^ protected $requestMethod = null;$/;" v +requestMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->requestMethod = strtoupper($method);$/;" v +requestMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $requestMethod;$/;" v +requestParams ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/Favorites.php /^ $this->requestParams = array_merge($/;" v +requestParams ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/Search.php /^ $this->requestParams = array_merge($/;" v +requestParams ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Customer/Conversation.php /^ $this->requestParams = array_merge($/;" v +requestParams ../../../src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProducts.php /^ $this->requestParams = array_merge($/;" v +requestParams ../../../src/classes/XLite/View/ItemsList/AItemsList.php /^ $this->requestParams = array_merge($this->requestParams, $this->getPager()->getRequestParams());$/;" v +requestParams ../../../src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php /^ $this->requestParams = array_merge($this->requestParams, static::getSearchParams());$/;" v +requestParams ../../../src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php /^ $this->requestParams = array_merge($this->requestParams, static::getSearchParams());$/;" v +requestParams ../../../src/classes/XLite/View/ItemsList/Product/Customer/Search.php /^ $this->requestParams = array_merge($/;" v +requestParams ../../../src/classes/XLite/View/ItemsList/Profile/Admin/Search.php /^ $this->requestParams = array_merge($this->requestParams, array_keys($this->getSearchParams()));$/;" v +requestParams ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ $this->requestParams = array();$/;" v +requestParams ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ protected $requestParams;$/;" v +requestProbe ../../../src/classes/XLite/Controller/Admin/Measure.php /^ protected function requestProbe()$/;" f +requestRecoverPassword ../../../src/classes/XLite/Controller/Customer/RecoverPassword.php /^ protected function requestRecoverPassword($email)$/;" f +requestTimeout ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public $requestTimeout = 100;$/;" v +requestToFile ../../../src/classes/XLite/Core/HTTP/Request.php /^ public function requestToFile($file)$/;" f +requestToFile ../../../src/lib/PEAR2/HTTP/Request.php /^ public function requestToFile($file)$/;" f +requestToFile ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public function requestToFile($file) $/;" f +requestToFile ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ public function requestToFile($file)$/;" f +requestUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $requestUrl = $request->getUrl();$/;" v +requestUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $requestUrl = $uriTemplateParser->expand($uriTemplateVars);$/;" v +requestUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $requestUrl = $basePath . $restPath;$/;" v +requestUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $requestUrl = str_replace('%40', '@', $requestUrl);$/;" v +requests ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ private $requests = array();$/;" v +required ../../../src/Includes/functions.php /^ $required = func_convert_to_byte($required_limit);$/;" v +required ../../../src/Includes/install/install.php /^ $required = convert_ini_str_to_int($required_limit);$/;" v +requiredCount ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ $this->requiredCount = 0;$/;" v +requiredCount ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ protected $requiredCount;$/;" v +requirements ../../../src/Includes/install/install.php /^ $requirements = doCheckRequirements();$/;" v +requirementsOk ../../../src/Includes/install/install.php /^ $requirementsOk = $requirementsOk && $checkRequirements[$reqName]['status'];$/;" v +requirementsOk ../../../src/Includes/install/install.php /^ $requirementsOk = true;$/;" v +res ../../../src/Includes/functions.php /^ $res = dbFetchColumn('SELECT profile_id from xlite_profiles LIMIT 1', $errorMsg);$/;" v +res ../../../src/Includes/install/install.php /^ $res = dbFetchAll('SHOW TABLES LIKE \\'xlite_%\\'');$/;" v +res ../../../src/Includes/install/install.php /^ $res = @mkdir(constant('LC_DIR_ROOT') . $val, $dir_permission);$/;" v +res ../../../src/Includes/install/install.php /^ $res = dbFetchAll('SHOW TABLES LIKE \\'xlite_%\\'');$/;" v +res ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $res = array($/;" v +res ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $res = array('file' => $file, 'error' => '');$/;" v +res ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $res = (string) @ini_get('open_basedir');$/;" v +res ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $res = "$this->condition && $res";$/;" v +res ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $res = $this->flexyExpression($str);$/;" v +res ../../../src/lib/Log/mail.php /^ $res = $mailer->send($this->_recipients, $headers,$/;" v +res ../../../src/lib/Log/sqlite.php /^ $res = sqlite_query($this->_db, $q);$/;" v +reserved ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ public static $reserved;$/;" v +reserved_operators ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ public static $reserved_operators = array('|', '!', '@');$/;" v +reserved_pct ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ public static $reserved_pct;$/;" v +reset ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static function reset($path, $prepare = true)$/;" f +reset ../../../src/classes/XLite/Core/Translation.php /^ public function reset()$/;" f +reset ../../../src/classes/XLite/Core/TranslationDriver/ATranslationDriver.php /^ abstract public function reset();$/;" f +reset ../../../src/classes/XLite/Core/TranslationDriver/Db.php /^ public function reset()$/;" f +reset ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ public function reset()$/;" f +reset ../../../src/lib/Doctrine/Common/Annotations/AnnotationRegistry.php /^ static public function reset()$/;" f +reset ../../../src/lib/Doctrine/Common/Lexer.php /^ public function reset()$/;" f +resetDQLPart ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function resetDQLPart($part)$/;" f +resetDQLParts ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function resetDQLParts($parts = null)$/;" f +resetDbOptions ../../../src/Includes/Utils/Database.php /^ public static function resetDbOptions()$/;" f +resetDirectives ../../../src/classes/XLite/Core/Database.php /^ protected function resetDirectives()$/;" f +resetInstance ../../../src/classes/XLite/Base/Singleton.php /^ public static function resetInstance()$/;" f +resetItemState ../../../src/classes/XLite/Model/OrderItem.php /^ protected function resetItemState()$/;" f +resetPeek ../../../src/lib/Doctrine/Common/Lexer.php /^ public function resetPeek()$/;" f +resetPosition ../../../src/lib/Doctrine/Common/Lexer.php /^ public function resetPosition($position = 0)$/;" f +resetProfileCache ../../../src/classes/XLite/Core/Auth.php /^ protected function resetProfileCache()$/;" f +resetQueries ../../../src/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php /^ public function resetQueries()$/;" f +resetQueryPart ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function resetQueryPart($queryPartName)$/;" f +resetQueryParts ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function resetQueryParts($queryPartNames = null)$/;" f +resetSurcharges ../../../src/classes/XLite/Model/Order.php /^ protected function resetSurcharges()$/;" f +resetSurcharges ../../../src/classes/XLite/Model/OrderItem.php /^ public function resetSurcharges()$/;" f +resharers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->resharers = $resharers;$/;" v +resharers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $resharers;$/;" v +resize ../../../src/classes/XLite/Core/ImageOperator/AImageOperator.php /^ abstract public function resize($width, $height);$/;" f +resize ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ public function resize($width, $height)$/;" f +resize ../../../src/classes/XLite/Core/ImageOperator/ImageMagic.php /^ public function resize($width, $height)$/;" f +resizeDown ../../../src/classes/XLite/Core/ImageOperator/AImageOperator.php /^ public function resizeDown($width = null, $height = null)$/;" f +resizeIcon ../../../src/classes/XLite/Model/Base/Image.php /^ protected function resizeIcon($width, $height, $path)$/;" f +resizeIcon ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ protected function resizeIcon($width, $height, $path)$/;" f +resizedURL ../../../src/classes/XLite/View/Image.php /^ protected $resizedURL = null;$/;" v +resolution ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->resolution = $resolution;$/;" v +resolution ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $resolution;$/;" v +resource ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $this->resource = $this->uri;$/;" v +resource ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $this->resource = '\/'.$this->bucket.$this->uri;$/;" v +resource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->resource = $resource;$/;" v +resource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $resource;$/;" v +resource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiService.php /^ public $resource;$/;" v +resourceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $this->resourceName = $resourceName;$/;" v +resourceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ private $resourceName;$/;" v +resources ../../../src/classes/XLite/View/AView.php /^ protected static $resources = array();$/;" v +resourcesCache ../../../src/classes/XLite/Core/Layout.php /^ $this->resourcesCache = $data;$/;" v +resourcesCache ../../../src/classes/XLite/Core/Layout.php /^ protected $resourcesCache = array();$/;" v +resourcesCounter ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ protected $resourcesCounter = 0;$/;" v +respData ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $respData = curl_exec($ch);$/;" v +respData ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $respData = str_ireplace(self::CONNECTION_ESTABLISHED, '', $respData);$/;" v +respData ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $respData = curl_exec($ch);$/;" v +respHeaderSize ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $respHeaderSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);$/;" v +respHttpCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $respHttpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);$/;" v +response ../../../src/Includes/install/install.php /^ $response = $result->body;$/;" v +response ../../../src/Includes/install/install.php /^ $response = null;$/;" v +response ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $response = $bouncer->sendRequest();$/;" v +response ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Core/Marketplace.php /^ $response = $this->getRequest($action, $data)->sendRequest();$/;" v +response ../../../src/classes/XLite/Core/Operator.php /^ $response = $bouncer->sendRequest();$/;" v +response ../../../src/classes/XLite/Model/Base/Storage.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $response = $rest->getResponse();$/;" v +response ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $this->response = new STDClass;$/;" v +response ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $response = $bouncer->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $response = $this->parseResponse($result);$/;" v +response ../../../src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/ECB.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/GoogleCalculator.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/OpenExchangeRates.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/GeoIP/FreeGeoIP.php /^ $response = $bouncer->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $response = $decodedResponse['error'];$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $response = $request->getResponseBody();$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $response = apiClient::$io->makeRequest($request);$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $response = apiREST::decodeHttpResponse($response);$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $response = new apiHttpRequest("");$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $response = $this->parseResponse($response);$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $response = apiClient::$io->makeRequest($httpRequest);$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $response = apiClient::$io->authenticatedRequest($httpRequest);$/;" v +response ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $response = apiClient::$io->makeRequest($httpRequest);$/;" v +response ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $response = $this->getClient()->commit(false, true, false);$/;" v +response ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $response = $this->getClient()->search($/;" v +response ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $response = $this->getClient()->addDocument($document);$/;" v +response ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $response = $this->getClient()->deleteById($product->getId());$/;" v +response ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $response = $this->getClient()->optimize();$/;" v +response ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $response = $this->getClient()->search($query, 0, 1, $params, \\Apache_Solr_Service::METHOD_POST);$/;" v +response ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $response = $bouncer->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $response = $this->parseResponse($result);$/;" v +response ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $response = array();$/;" v +response ../../../src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php /^ $response = $request->sendRequest();$/;" v +response ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $response = $bouncer->sendRequest();$/;" v +response ../../../src/lib/PEAR2/HTTP/Request.php /^ $response = $this->adapter->requestToFile($file);$/;" v +response ../../../src/lib/PEAR2/HTTP/Request.php /^ $response = $this->adapter->sendRequest();$/;" v +response ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ $response = $this->sendRequest();$/;" v +response ../../../src/lib/PEAR2/HTTP/Request/Adapter/Http.php /^ $response = $request->getResponseMessage();$/;" v +response ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ $response = new Request\\Response($/;" v +responseBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $responseBody = substr($respData, $headerSize);$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->responseBody = $responseBody;$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $responseBody;$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Curl.php /^ $responseBody = curl_exec($this->_curl);$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/CurlNoReuse.php /^ $responseBody = curl_exec($curl);$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/FileGetContents.php /^ $responseBody = @file_get_contents($url, false, $this->_getContext);$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/FileGetContents.php /^ $responseBody = @file_get_contents($url, false, $this->_headContext);$/;" v +responseBody ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/FileGetContents.php /^ $responseBody = @file_get_contents($url, false, $this->_postContext);$/;" v +responseCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->responseCode = $responseCode;$/;" v +responseCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $responseCode;$/;" v +responseHeaderLines ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $responseHeaderLines = explode("\\r\\n", $rawHeaders);$/;" v +responseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCacheParser.php /^ $responseHeaders = $resp->getResponseHeaders();$/;" v +responseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $responseHeaders = substr($respData, 0, $headerSize);$/;" v +responseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $responseHeaders = array();$/;" v +responseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ $responseHeaders = self::parseResponseHeaders($responseHeaders);$/;" v +responseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->responseHeaders = $headers;$/;" v +responseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $responseHeaders;$/;" v +responseHttpCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->responseHttpCode = $responseHttpCode;$/;" v +responseHttpCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $responseHttpCode;$/;" v +responseStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->responseStatus = $responseStatus;$/;" v +responseStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $responseStatus;$/;" v +response_params ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $response_params = array();$/;" v +responses ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->responses = new ResponsesServiceResource($this, $this->serviceName, 'responses', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "parentSubmissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "unauthToken": {"type": "string", "location": "query"}, "anonymous": {"type": "boolean", "location": "query"}, "topicId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Submission"}, "id": "moderator.responses.insert", "httpMethod": "POST", "path": "series\/{seriesId}\/topics\/{topicId}\/submissions\/{parentSubmissionId}\/responses", "response": {"$ref": "Submission"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"max-results": {"format": "uint32", "type": "integer", "location": "query"}, "sort": {"type": "string", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "author": {"type": "string", "location": "query"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "q": {"type": "string", "location": "query"}, "hasAttachedVideo": {"type": "boolean", "location": "query"}}, "id": "moderator.responses.list", "httpMethod": "GET", "path": "series\/{seriesId}\/submissions\/{submissionId}\/responses", "response": {"$ref": "SubmissionList"}}}}', true));$/;" v +responses ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $responses;$/;" v +responses ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $responses = array();$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('GET', $bucket, '', self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = $rest->getResponse();$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('DELETE', $bucket, $uri, self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('DELETE', $bucket, '', self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('DELETE', '', '2008-06-30\/distribution\/'.$dist['id'], 'cloudfront.amazonaws.com');$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('GET', $bucket, $uri, self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('GET', $bucket, '', self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('GET', '', '', self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('GET', '', '2008-06-30\/distribution', 'cloudfront.amazonaws.com');$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('GET', '', '2008-06-30\/distribution\/'.$distributionId, 'cloudfront.amazonaws.com');$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('HEAD', $bucket, $uri, self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('POST', '', '2008-06-30\/distribution', 'cloudfront.amazonaws.com');$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('POST', '', '2010-08-01\/distribution\/'.$distributionId.'\/invalidation', 'cloudfront.amazonaws.com');$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('PUT', $bucket, $uri, self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('PUT', $bucket, '', self::$endpoint);$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = new S3Request('PUT', '', '2008-06-30\/distribution\/'.$dist['id'].'\/config', 'cloudfront.amazonaws.com');$/;" v +rest ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $rest = self::__getCloudFrontResponse($rest);$/;" v +rest ../../../src/classes/XLite/View/VoteBar.php /^ $rest = $this->getParam(self::PARAM_RATE);$/;" v +restActions ../../../src/classes/XLite/Controller/Admin/Rest.php /^ protected $restActions = array('get', 'post', 'put', 'delete');$/;" v +restActions ../../../src/classes/XLite/Controller/Customer/Rest.php /^ protected $restActions = array('get', 'post', 'put', 'delete');$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->restBasePath = '\/adexchangebuyer\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->restBasePath = '\/adsense\/v1.1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->restBasePath = '\/adsensehost\/v4\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->restBasePath = '\/analytics\/v3\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->restBasePath = '\/bigquery\/v2\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->restBasePath = '\/blogger\/v2\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->restBasePath = '\/books\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->restBasePath = '\/calendar\/v3\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->restBasePath = '\/customsearch\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->restBasePath = '\/drive\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ $this->restBasePath = '\/freebase\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->restBasePath = '\/gan\/v1beta1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->restBasePath = '\/groups\/v1\/groups\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ $this->restBasePath = '\/latitude\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->restBasePath = '\/moderator\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->restBasePath = '\/\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->restBasePath = '\/orkut\/v2\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->restBasePath = '\/pagespeedonline\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->restBasePath = '\/plus\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->restBasePath = '\/prediction\/v1.4\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->restBasePath = '\/shopping\/search\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->restBasePath = '\/siteVerification\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->restBasePath = '\/tasks\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ $this->restBasePath = '\/language\/translate\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->restBasePath = '\/urlshortener\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ $this->restBasePath = '\/webfonts\/v1\/';$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiService.php /^ public $restBasePath;$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $restBasePath = $method['mediaUpload']['protocols']['simple']['path'];$/;" v +restBasePath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $restBasePath = $this->service->restBasePath;$/;" v +restClasses ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $this->restClasses = array();$/;" v +restClasses ../../../src/classes/XLite/Controller/Admin/Rest.php /^ protected $restClasses;$/;" v +restClasses ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $this->restClasses = array();$/;" v +restClasses ../../../src/classes/XLite/Controller/Customer/Rest.php /^ protected $restClasses;$/;" v +restElements ../../../src/Includes/Utils/ArrayManager.php /^ $restElements = array();$/;" v +restart ../../../src/classes/XLite/Core/Session.php /^ public function restart()$/;" f +restoreCacheCells ../../../src/classes/XLite/Model/Repo/ARepo.php /^ protected function restoreCacheCells()$/;" f +restoreDatabase ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ protected function restoreDatabase($sqlFile)$/;" f +restoreProductPrice ../../../src/classes/XLite/Logic/Tax/Processor/AProcessor.php /^ public function restoreProductPrice(\\XLite\\Model\\Product $product, $amount)$/;" f +restoreSession ../../../src/classes/XLite/Core/Session.php /^ protected function restoreSession()$/;" f +restoreSubstitutonalSkins ../../../src/classes/XLite/Core/Layout.php /^ protected function restoreSubstitutonalSkins()$/;" f +restricted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->restricted = $restricted;$/;" v +restricted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $restricted;$/;" v +result ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ $result = parent::drawAdditional($node);$/;" v +result ../../../src/Includes/Decorator/DataStructure/Graph/Modules.php /^ $result = array();$/;" v +result ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php /^ $result = array();$/;" v +result ../../../src/Includes/Decorator/Utils/CacheManager.php /^ $result = true;$/;" v +result ../../../src/Includes/Decorator/Utils/CacheManager.php /^ $result = false;$/;" v +result ../../../src/Includes/Decorator/Utils/Operator.php /^ $result = array();$/;" v +result ../../../src/Includes/Decorator/Utils/Operator.php /^ $result = array(array(), array());$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = $start;$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = true;$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = $namespace . '\\\\' . $result;$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = '';$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = false;$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = null;$/;" v +result ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $result = static::getClassName() ?: static::getInterfaceName();$/;" v +result ../../../src/Includes/Utils/ArrayManager.php /^ $result = false;$/;" v +result ../../../src/Includes/Utils/ArrayManager.php /^ $result = $movingElements + $restElements;$/;" v +result ../../../src/Includes/Utils/ArrayManager.php /^ $result = $restElements + $movingElements;$/;" v +result ../../../src/Includes/Utils/ArrayManager.php /^ $result = array();$/;" v +result ../../../src/Includes/Utils/ArrayManager.php /^ $result = true;$/;" v +result ../../../src/Includes/Utils/Converter.php /^ $result = $interface;$/;" v +result ../../../src/Includes/Utils/Converter.php /^ $result = array();$/;" v +result ../../../src/Includes/Utils/Converter.php /^ $result = array(number_format($size, $multiplier > 1 ? 1 : 0), static::$byteMultipliers[$multiplier]);$/;" v +result ../../../src/Includes/Utils/Database.php /^ $result = (false !== static::exec($sql));$/;" v +result ../../../src/Includes/Utils/Database.php /^ $result = false;$/;" v +result ../../../src/Includes/Utils/Database.php /^ $result = true;$/;" v +result ../../../src/Includes/Utils/Database.php /^ $result = false;$/;" v +result ../../../src/Includes/Utils/Database.php /^ $result = static::getHandler()->query('SHOW ENGINES');$/;" v +result ../../../src/Includes/Utils/FileFilter/FilterIterator.php /^ $result = call_user_func_array($callback, array($this));$/;" v +result ../../../src/Includes/Utils/FileFilter/FilterIterator.php /^ $result = preg_match($this->pattern, $this->getPathname());$/;" v +result ../../../src/Includes/Utils/FileManager.php /^ $result = $file;$/;" v +result ../../../src/Includes/Utils/FileManager.php /^ $result = null;$/;" v +result ../../../src/Includes/Utils/ModulesManager.php /^ $result = call_user_func_array(array(static::getClassNameByModuleName($module), $method), $args);$/;" v +result ../../../src/Includes/Utils/ModulesManager.php /^ $result = array($/;" v +result ../../../src/Includes/Utils/ModulesManager.php /^ $result = null;$/;" v +result ../../../src/Includes/Utils/Operator.php /^ $result = \\Includes\\Utils\\FileManager::isFileReadable($/;" v +result ../../../src/Includes/Utils/Operator.php /^ $result = call_user_func_array($callback, $args);$/;" v +result ../../../src/Includes/Utils/Operator.php /^ $result = class_exists($name, false);$/;" v +result ../../../src/Includes/Utils/PHARManager.php /^ $result = $phar->extractTo($dir, null, true);$/;" v +result ../../../src/Includes/Utils/PHARManager.php /^ $result = false;$/;" v +result ../../../src/Includes/functions.php /^ $result = @copy($from, $to);$/;" v +result ../../../src/Includes/functions.php /^ $result = @realpath($file);$/;" v +result ../../../src/Includes/functions.php /^ $result = $result && @chmod($to, $mode);$/;" v +result ../../../src/Includes/functions.php /^ $result = @copy($from, $to);$/;" v +result ../../../src/Includes/functions.php /^ $result = \\Includes\\Utils\\Database::fetchAll($sql);$/;" v +result ../../../src/Includes/functions.php /^ $result = \\Includes\\Utils\\Database::fetchColumn($sql);$/;" v +result ../../../src/Includes/functions.php /^ $result = isset($connect);$/;" v +result ../../../src/Includes/functions.php /^ $result = false;$/;" v +result ../../../src/Includes/functions.php /^ $result = null;$/;" v +result ../../../src/Includes/functions.php /^ $result = true;$/;" v +result ../../../src/Includes/install/install.php /^ $result = array_merge($result, checkPermissionsRecursive($fileRealPath));$/;" v +result ../../../src/Includes/install/install.php /^ $result = false;$/;" v +result ../../../src/Includes/install/install.php /^ $result = false;$/;" v +result ../../../src/Includes/install/install.php /^ $result = true;$/;" v +result ../../../src/Includes/install/install.php /^ $result = array_replace_recursive($result, $data);$/;" v +result ../../../src/Includes/install/install.php /^ $result = false;$/;" v +result ../../../src/Includes/install/install.php /^ $result = $step;$/;" v +result ../../../src/Includes/install/install.php /^ $result = @chmod(constant('LC_DIR_ROOT') . $dir, $dir_permission);$/;" v +result ../../../src/Includes/install/install.php /^ $result = false;$/;" v +result ../../../src/Includes/install/install.php /^ $result = true;$/;" v +result ../../../src/Includes/install/install.php /^ $result = $bouncer->sendRequest();$/;" v +result ../../../src/Includes/install/install.php /^ $result = $host;$/;" v +result ../../../src/Includes/install/install.php /^ $result = $translation[$label];$/;" v +result ../../../src/Includes/install/install.php /^ $result = (strcasecmp($limit, $required_limit) == 0);$/;" v +result ../../../src/Includes/install/install.php /^ $result = check_memory_limit($value, constant('LC_PHP_MEMORY_LIMIT_MIN'));$/;" v +result ../../../src/Includes/install/install.php /^ $result = create_dirs($lcSettings['directories_to_create']);$/;" v +result ../../../src/Includes/install/install.php /^ $result = create_htaccess_files($lcSettings['files_to_create']);$/;" v +result ../../../src/Includes/install/install.php /^ $result = false;$/;" v +result ../../../src/Includes/install/install.php /^ $result = preg_match('\/[^0-9]*2\\.\/',$gdConfig['GD Version']);$/;" v +result ../../../src/Includes/install/install.php /^ $result = !empty($docblock) && preg_match('\/@(param|return)\/', $docblock);$/;" v +result ../../../src/Includes/install/install.php /^ $result = $label;$/;" v +result ../../../src/Includes/install/install.php /^ $result = (!file_exists(LC_DIR_ROOT . 'install.php') && file_exists(LC_DIR_ROOT . $install_name) ? $install_name : false);$/;" v +result ../../../src/Includes/install/install.php /^ $result = (($info['no_mem_limit'] &&$/;" v +result ../../../src/Includes/install/install.php /^ $result = ((isset($_SERVER['HTTPS']) &&$/;" v +result ../../../src/Includes/install/install.php /^ $result = (in_array(strtolower($value), array('off', '0', '', false)));$/;" v +result ../../../src/Includes/install/install.php /^ $result = 0;$/;" v +result ../../../src/Includes/install/install.php /^ $result = @file_exists(LC_DIR_CONFIG . constant('LC_CONFIG_FILE'));$/;" v +result ../../../src/Includes/install/install.php /^ $result = @file_exists(LC_DIR_ROOT . 'install.php');$/;" v +result ../../../src/Includes/install/install.php /^ $result = array();$/;" v +result ../../../src/Includes/install/install.php /^ $result = doPrepareFixtures($params);$/;" v +result ../../../src/Includes/install/install.php /^ $result = doUpdateConfig($params, true) && doUpdateMainHtaccess($params);$/;" v +result ../../../src/Includes/install/install.php /^ $result = false;$/;" v +result ../../../src/Includes/install/install.php /^ $result = null;$/;" v +result ../../../src/Includes/install/install.php /^ $result = true;$/;" v +result ../../../src/classes/XLite.php /^ $result = static::getTargetByCleanURL();$/;" v +result ../../../src/classes/XLite.php /^ $result = static::TARGET_DEFAULT;$/;" v +result ../../../src/classes/XLite/Base.php /^ $result = $this->$func();$/;" v +result ../../../src/classes/XLite/Base.php /^ $result = $this->$name;$/;" v +result ../../../src/classes/XLite/Base.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Controller/AController.php /^ $result = \\XLite\\Model\\CachingFactory::getObject($/;" v +result ../../../src/classes/XLite/Controller/AController.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Controller/AController.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $result = isset($form);$/;" v +result ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Admin/AddonInstall.php /^ $result = $info[\\XLite\\Core\\Marketplace::FIELD_LICENSE];$/;" v +result ../../../src/classes/XLite/Controller/Admin/AddonInstall.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Controller/Admin/Base/BackupRestore.php /^ $result = is_dir(LC_DIR_BACKUP) && is_writable(LC_DIR_BACKUP);$/;" v +result ../../../src/classes/XLite/Controller/Admin/Base/BackupRestore.php /^ $result = is_dir(LC_DIR_BACKUP);$/;" v +result ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $result = $value;$/;" v +result ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $result = parent::getPostedData($field);$/;" v +result ../../../src/classes/XLite/Controller/Admin/Category.php /^ $result = $membership;$/;" v +result ../../../src/classes/XLite/Controller/Admin/Category.php /^ $result = $this->getRootCategoryId();$/;" v +result ../../../src/classes/XLite/Controller/Admin/Category.php /^ $result = intval(\\XLite\\Core\\Request::getInstance()->parent_id);$/;" v +result ../../../src/classes/XLite/Controller/Admin/Category.php /^ $result = parent::getPostedData($field);$/;" v +result ../../../src/classes/XLite/Controller/Admin/DbBackup.php /^ $result = \\XLite\\Core\\Database::getInstance()->exportSQLToFile($destFile, $verbose);$/;" v +result ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $result = \\Includes\\Utils\\Database::uploadSQLFromFile($sqlFile, $verbose);$/;" v +result ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $result = \\XLite\\Core\\Database::getInstance()->exportSQLToFile($backupSQLFile, $verbose);$/;" v +result ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $result = preg_match('\/^(https?|ftp):\\\/\\\/\/Ss', $url)$/;" v +result ../../../src/classes/XLite/Controller/Admin/Order.php /^ $result = 'common\/print_invoice.tpl';$/;" v +result ../../../src/classes/XLite/Controller/Admin/Order.php /^ $result = parent::getViewerTemplate();$/;" v +result ../../../src/classes/XLite/Controller/Admin/Product.php /^ $result = intval(\\XLite\\Core\\Request::getInstance()->id);$/;" v +result ../../../src/classes/XLite/Controller/Admin/Product.php /^ $result = new \\XLite\\Model\\Product();$/;" v +result ../../../src/classes/XLite/Controller/Admin/Product.php /^ $result = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Product')->find($this->getProductId());$/;" v +result ../../../src/classes/XLite/Controller/Admin/Product.php /^ $result = intval(\\XLite\\Core\\Request::getInstance()->product_id);$/;" v +result ../../../src/classes/XLite/Controller/Admin/Profile.php /^ $result = $this->getModelForm()->performAction('delete');$/;" v +result ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $result = $path;$/;" v +result ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $result = $path;$/;" v +result ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $result = $tmpPath;$/;" v +result ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ $result = $data;$/;" v +result ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $result = 'Updates for your version ({{version}})';$/;" v +result ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $result = 'Upgrade to version {{version}}';$/;" v +result ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $result = 'Downloading updates';$/;" v +result ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $result = 'Upgrade core';$/;" v +result ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $result = static::t($result, array('version' => $version));$/;" v +result ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $result = \\XLite\\Upgrade\\Cell::getInstance()->getCoreVersions();$/;" v +result ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $result = 0 < $stat['size'];$/;" v +result ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Console/AMQPListener.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Console/AMQPListener.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Console/AMQPService.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Console/AMQPService.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $result = $transaction->handleCheckoutAction();$/;" v +result ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $result = \\XLite\\Model\\Payment\\Transaction::COMPLETED;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Profile.php /^ $result = $this->getModelForm()->performAction('create');$/;" v +result ../../../src/classes/XLite/Controller/Customer/Profile.php /^ $result = $this->getModelForm()->performAction('delete');$/;" v +result ../../../src/classes/XLite/Controller/Customer/Profile.php /^ $result = $this->getModelForm()->performAction('update');$/;" v +result ../../../src/classes/XLite/Controller/Customer/RecoverPassword.php /^ $result = $profile->update();$/;" v +result ../../../src/classes/XLite/Controller/Customer/RecoverPassword.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Controller/Customer/RecoverPassword.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Controller/Customer/Version.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Controller/Customer/Version.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/Auth.php /^ $result = $profile;$/;" v +result ../../../src/classes/XLite/Core/Auth.php /^ $result = \\XLite\\Core\\Session::getInstance()->$cell === $hashString;$/;" v +result ../../../src/classes/XLite/Core/Auth.php /^ $result = $profile->isPersistent();$/;" v +result ../../../src/classes/XLite/Core/Auth.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/Auth.php /^ $result = self::RESULT_ACCESS_DENIED;$/;" v +result ../../../src/classes/XLite/Core/Connection.php /^ $result = parent::executeQuery($query, $params, $types);$/;" v +result ../../../src/classes/XLite/Core/Connection.php /^ $result = parent::executeUpdate($query, $params, $types);$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = \\Includes\\Utils\\ConfigParser::getOptions(array('host_details', 'web_dir_wo_slash'));$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = \\Includes\\Utils\\Converter::buildURL($target, $action, $params, $interface);$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = static::CLEAN_URL_DEFAULT_SEPARATOR;$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = static::buildCleanURL($target, $action, $params);$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = \\Includes\\Utils\\ConfigParser::getOptions(array('clean_urls', 'default_separator'));$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/Converter.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $result = (bool)$this->callApi('profile');$/;" v +result ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $result = json_decode($response->body, true);$/;" v +result ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/Database.php /^ $result = $value;$/;" v +result ../../../src/classes/XLite/Core/Database.php /^ $result = 'NULL';$/;" v +result ../../../src/classes/XLite/Core/Database.php /^ $result = '\\'' . str_replace($search, $replace, addslashes($value)) . '\\'';$/;" v +result ../../../src/classes/XLite/Core/Database.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Core/Database.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/Database.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/EventDriver/AMQP.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/EventDriver/AMQP.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/EventListener.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/EventListener.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/EventTask.php /^ $result = $driver ? $driver->fire($name, $args) : false;$/;" v +result ../../../src/classes/XLite/Core/EventTask.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/FileCache.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/FileCache.php /^ $result = @unlink($path);$/;" v +result ../../../src/classes/XLite/Core/FileCache.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/FileCache.php /^ $result = unserialize(file_get_contents($path, false, null, $this->headerLength + $this->ttlLength));$/;" v +result ../../../src/classes/XLite/Core/FileCache.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = array(0, $len, $replace);$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = call_user_func($replace, $url, $len);$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = $s;$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = $this->patches[$zone][$lang][$tpl];$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = '$this->' . ((false === $dotPos) ? '' : 'get' . (strrpos($field, '.') ? 'Complex' : '') . '(\\'' . $field . '\\')->') . $method;$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = 'array';$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = 'if (' . implode(' && ', $conditions) . '):' . "\\n" . ' ' . $result . "\\n" . 'endif;';$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = '$this->get' . (strpos($field, '.') ? 'Complex' : '') . '(\\'' . $field . '\\')';$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = '\\'' . str_replace('\\"', '"', addslashes(substr($str, 1, $pos - 1))) . '\\'';$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = substr($str, 0, $len);$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = substr($str, 1, $pos-1);$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = "";$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = $this->flexySimpleExpression($str);$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/HTTP/Request.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/HTTP/Request.php /^ $result = parent::sendRequest();$/;" v +result ../../../src/classes/XLite/Core/Handler.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/ImageOperator.php /^ $result = static::getEngine()->setImage($this->model);$/;" v +result ../../../src/classes/XLite/Core/ImageOperator.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $result = (bool)$this->image;$/;" v +result ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $result = $func($this->image);$/;" v +result ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $result = imagecopyresampled($/;" v +result ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $result = parent::setImage($image);$/;" v +result ../../../src/classes/XLite/Core/ImageOperator/ImageMagic.php /^ $result = $this->execResize($new, $width, $height);$/;" v +result ../../../src/classes/XLite/Core/ImageOperator/ImageMagic.php /^ $result = $this->execFilmStripLook($new);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = $fullPath;$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = $this->getResourceFullPath($shortPath);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = $this->getResourceParentFullPath($currentTemplate, $currentSkin);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = $this->getResourceParentFullPath($parts[1], $currentSkin);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = $this->getResourceSkinFullPath($parts[1], $parts[0]);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = array($/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = array(false);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = array_unique($result);$/;" v +result ../../../src/classes/XLite/Core/Layout.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->{'prepare' . $method}($result);$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $result$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->prepareResponse($response, $action);$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->{'parse' . $method}($response);$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $result && $this->validateAgainstSchema($core, $this->getSchemaResponseForGetCoresAction());$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $result$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->sendRequestToMarketplace($action, $data);$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = 'Error code ('$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->performActionWithTTL($/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->performActionWithTTL($ttl, static::ACTION_GET_ADDONS_LIST, array(), false);$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = $this->performActionWithTTL($ttl, static::ACTION_GET_CORES);$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = static::TTL_NOT_EXPIRED;$/;" v +result ../../../src/classes/XLite/Core/Marketplace.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/Operator.php /^ $result = $response->body;$/;" v +result ../../../src/classes/XLite/Core/Operator.php /^ $result = file_get_contents($url);$/;" v +result ../../../src/classes/XLite/Core/Operator.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/Pack/Distr.php /^ $result = $result->getIterator();$/;" v +result ../../../src/classes/XLite/Core/Pack/Distr.php /^ $result = new \\Includes\\Utils\\FileFilter(LC_DIR_ROOT);$/;" v +result ../../../src/classes/XLite/Core/Pack/Module.php /^ $result = array_merge($result, \\XLite\\Core\\Layout::getInstance()->getSkinPaths($interface));$/;" v +result ../../../src/classes/XLite/Core/Pack/Module.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Core/Pack/Module.php /^ $result = new \\AppendIterator();$/;" v +result ../../../src/classes/XLite/Core/Probe.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/Probe.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/Profiler.php /^ $result = $a['size'] < $b['size'] ? 1 : -1;$/;" v +result ../../../src/classes/XLite/Core/Profiler.php /^ $result = $this->enabled;$/;" v +result ../../../src/classes/XLite/Core/Profiler.php /^ $result = isset($this->points[$name]['end'])$/;" v +result ../../../src/classes/XLite/Core/Profiler.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/Profiler.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Core/Request.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/Request.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/Session.php /^ $result = \\Includes\\Utils\\ArrayManager::searchInObjectsArray($/;" v +result ../../../src/classes/XLite/Core/Session.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/Session.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/Statement.php /^ $result = parent::execute($params);$/;" v +result ../../../src/classes/XLite/Core/Task/ATask.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Core/TopMessage.php /^ $result = $result && $this->add($message, array(), null, $type);$/;" v +result ../../../src/classes/XLite/Core/TopMessage.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/TopMessage.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/TopMessage.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/Translation.php /^ $result = $name;$/;" v +result ../../../src/classes/XLite/Core/Translation.php /^ $result = $this->processSubstitute($result, $arguments);$/;" v +result ../../../src/classes/XLite/Core/Translation.php /^ $result = $this->getDriver()->translate($name, $code);$/;" v +result ../../../src/classes/XLite/Core/Translation.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = $this->createIndexFile($path, $code);$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = $this->createIndexFileBin($path, $code);$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = self::SERVICE_VALUE == $label;$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = file_exists($path);$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = file_exists(LC_DIR_LOCALE)$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = function_exists('dgettext');$/;" v +result ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $result = $pair->getValidator();$/;" v +result ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $result = $result->getValidator();$/;" v +result ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $result = $name;$/;" v +result ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $result = new \\XLite\\Core\\Validator\\Pair\\Simple($mode);$/;" v +result ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/DataSet/Transport/ATransport.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/DataSet/Transport/ATransport.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Logger.php /^ $result = $dir . LC_DS . implode('.', $parts);$/;" v +result ../../../src/classes/XLite/Logger.php /^ $result = $this->options['name'];$/;" v +result ../../../src/classes/XLite/Logic/Math.php /^ $result = $this->isRoundEven($value, $precision)$/;" v +result ../../../src/classes/XLite/Logic/Math.php /^ $result = $this->roundMath($value, $precision);$/;" v +result ../../../src/classes/XLite/Logic/Math.php /^ $result = (bool)preg_match('\/^50*$\/Ss', substr($value, $precision + 2));$/;" v +result ../../../src/classes/XLite/Logic/Math.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = -1;$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = 1;$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = $rate->getMethod();$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/AEntity.php /^ $result = property_exists($this, $property);$/;" v +result ../../../src/classes/XLite/Model/AEntity.php /^ $result = preg_match('\/^(get|set)(\\w+)$\/Si', $method, $matches) && !empty($matches[2]);$/;" v +result ../../../src/classes/XLite/Model/Address.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Address.php /^ $result = parent::checkAddress();$/;" v +result ../../../src/classes/XLite/Model/Base/Address.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Base/I18n.php /^ $result = $this->getTranslation($code, true);$/;" v +result ../../../src/classes/XLite/Model/Base/I18n.php /^ $result = $this->getTranslation(array_shift($query));$/;" v +result ../../../src/classes/XLite/Model/Base/I18n.php /^ $result = $this->getTranslations()->first() ?: null;$/;" v +result ../../../src/classes/XLite/Model/Base/I18n.php /^ $result = new $class();$/;" v +result ../../../src/classes/XLite/Model/Base/I18n.php /^ $result = $this->getHardTranslation($code);$/;" v +result ../../../src/classes/XLite/Model/Base/I18n.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = $this->getHash() === $hash;$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = $this->resizeIcon($width, $height, $path);$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = rename($path, $newPath);$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = parent::renewByPath($path);$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = parent::updatePathByMIME();$/;" v +result ../../../src/classes/XLite/Model/Base/Image.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->loadFromLocalFile($tmp);$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = \\Includes\\Utils\\FileManager::write($tmp, $file);$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = !empty($file);$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->renew();$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $result && $storage->renewDependentStorage();$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->getFileSystemRoot() . ($path ?: $this->getPath());$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = ($path ?: $this->getPath());$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = (bool)@readfile($this->getStoragePath());$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = static::$types[$this->getMime()];$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $result && $this->checkSecurity();$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->isFileExists($path, $isTempFile) && $this->renewByPath($path);$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->isURL($url);$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->renew() && $this->updatePathByMIME();$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = $this->renew();$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Base/Storage.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Cart.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Cart.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Category.php /^ $result = $enabledCondition$/;" v +result ../../../src/classes/XLite/Model/Category.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/DataSource.php /^ $result = '\\XLite\\View\\Model\\DataSource\\Ecwid';$/;" v +result ../../../src/classes/XLite/Model/DataSource.php /^ $result = new \\XLite\\Core\\DataSource\\Ecwid($this);$/;" v +result ../../../src/classes/XLite/Model/DataSource.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/LanguageLabel.php /^ $result = $this->getTranslation($code, true);$/;" v +result ../../../src/classes/XLite/Model/LanguageLabel.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/MailImageParser.php /^ $this->result = $this->substitute();$/;" v +result ../../../src/classes/XLite/Model/Module.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = $modifier;$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = md5(serialize($result));$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = $pmethod->getMethodId() == $lastPaymentId;$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Order.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/OrderItem.php /^ $result = !$product->getInventory()->getEnabled()$/;" v +result ../../../src/classes/XLite/Model/OrderItem.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ $result = $_SERVER['REMOTE_ADDR'];$/;" v +result ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Payment/Method.php /^ $result = $setting;$/;" v +result ../../../src/classes/XLite/Model/Payment/Method.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Payment/Method.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Payment/Method.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Payment/Transaction.php /^ $result = $this->getPaymentMethod()->getProcessor()->pay($this, $data);$/;" v +result ../../../src/classes/XLite/Model/Product.php /^ $result = $cp;$/;" v +result ../../../src/classes/XLite/Model/Product.php /^ $result = new \\XLite\\Model\\Category();$/;" v +result ../../../src/classes/XLite/Model/Product.php /^ $result = new \\XLite\\Model\\CategoryProducts();$/;" v +result ../../../src/classes/XLite/Model/Product.php /^ $result = $this->getLink($categoryId)->getCategory();$/;" v +result ../../../src/classes/XLite/Model/Product.php /^ $result = empty($categoryId)$/;" v +result ../../../src/classes/XLite/Model/Product.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = $address;$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = parent::delete();$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = parent::update();$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Profile.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = $qb->getResult();$/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = $this->getClassMetadata()->getAssociationMapping($field);$/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = $this->getClassMetadata()->getFieldMapping($field);$/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = \\XLite\\Core\\Database::getCacheDriver()->fetch($/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Repo/Address.php /^ $result = $this->defineFindAllCities()->getResult();$/;" v +result ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Repo/Category.php /^ $result = $this->defineSubcategoriesQuery($category->getParentId());$/;" v +result ../../../src/classes/XLite/Model/Repo/Country.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/LanguageLabel.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/Measure.php /^ $result = $this->createQueryBuilder('m')$/;" v +result ../../../src/classes/XLite/Model/Repo/Measure.php /^ $result = reset($result);$/;" v +result ../../../src/classes/XLite/Model/Repo/Module.php /^ $result = $match[1];$/;" v +result ../../../src/classes/XLite/Model/Repo/Module.php /^ $result = array_merge($result, $this->getDependencyModulesCommon($classes, true));$/;" v +result ../../../src/classes/XLite/Model/Repo/Module.php /^ $result = $queryBuilder->getResult();$/;" v +result ../../../src/classes/XLite/Model/Repo/Module.php /^ $result = $this->getDependencyModulesCommon($classes, false);$/;" v +result ../../../src/classes/XLite/Model/Repo/Module.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/Order.php /^ $result = $queryBuilder->getResult();$/;" v +result ../../../src/classes/XLite/Model/Repo/Order.php /^ $result = intval($queryBuilder->getSingleScalarResult());$/;" v +result ../../../src/classes/XLite/Model/Repo/Order.php /^ $result = parent::createQueryBuilder($alias);$/;" v +result ../../../src/classes/XLite/Model/Repo/Product.php /^ $result = $match[1];$/;" v +result ../../../src/classes/XLite/Model/Repo/Product.php /^ $result = array_merge($result, $conditionFields);$/;" v +result ../../../src/classes/XLite/Model/Repo/Product.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/Profile.php /^ $result = new \\XLite\\Core\\CommonCell();$/;" v +result ../../../src/classes/XLite/Model/Repo/Profile.php /^ $result = $queryBuilder->getResult();$/;" v +result ../../../src/classes/XLite/Model/Repo/Profile.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Model/Repo/Shipping/Markup.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/State.php /^ $result = $entity ? $entity->getCode() : '';$/;" v +result ../../../src/classes/XLite/Model/Repo/State.php /^ $result = $this->findOneByCountryAndCode($data['country_code'], $data['code']);$/;" v +result ../../../src/classes/XLite/Model/Repo/State.php /^ $result = $this->findOneByCountryAndCode($parent->getCode(), $data['code']);$/;" v +result ../../../src/classes/XLite/Model/Repo/State.php /^ $result = parent::findOneByRecord($data, $parent);$/;" v +result ../../../src/classes/XLite/Model/Repo/State.php /^ $result = $this->getFromCache('codes', array('state_id' => $stateId));$/;" v +result ../../../src/classes/XLite/Model/Repo/TemplatePatch.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Model/Repo/Zone.php /^ $result = $this->findOneBy(array('is_default' => 1));$/;" v +result ../../../src/classes/XLite/Model/Repo/Zone.php /^ $result = $this->getFromCache('default');$/;" v +result ../../../src/classes/XLite/Model/Role.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Model/Role.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Model/Shipping.php /^ $result = -1;$/;" v +result ../../../src/classes/XLite/Model/Shipping.php /^ $result = 1;$/;" v +result ../../../src/classes/XLite/Model/Shipping.php /^ $result = strcasecmp($a1, $b1);$/;" v +result ../../../src/classes/XLite/Model/Shipping.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ $result = $this->checkConditions($this->getValidaionSchema($value));$/;" v +result ../../../src/classes/XLite/Model/WidgetParam/ObjectId/Category.php /^ $result = array($/;" v +result ../../../src/classes/XLite/Model/WidgetParam/ObjectId/Category.php /^ $result = parent::getIdValidCondition($value);$/;" v +result ../../../src/classes/XLite/Model/Zone.php /^ $result = ($aCountry > $bCountry) ? 1 : -1;$/;" v +result ../../../src/classes/XLite/Model/Zone.php /^ $result = ($aState > $bState) ? 1 : -1;$/;" v +result ../../../src/classes/XLite/Model/Zone.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Model/Zone.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/Order/Admin/Search.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/Order/FulfillmentStatus.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/Order/PaymentStatus.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/Model/Order/FulfillmentStatus.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/Model/Order/PaymentStatus.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/Order/Details/Admin/Info.php /^ $result = parent::getViewListChildren($list);$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/FavoriteSuppliers.php /^ $result = parent::getPortalLCArgs($path, $args, $pageArgs);$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ $result = parent::isStepValid()$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Order.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Profile.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Profile.php /^ $result = parent::checkLowStockReportAccess($supplier);$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ $result = $this->getEnabled();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/Order/Admin/Search.php /^ $result = parent::processUpdate();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/Products.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/SupplierOrders.php /^ $result = parent::getViewListChildren($list);$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Product/Admin/LowInventory.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/ASupplier.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/Favorites.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/Favorites.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/Search.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/Search.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $result = $this->translateSchema('address');$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplyStatusSelector.php /^ $result = !in_array($item->getSupplyStatus(), $this->forbidFromStatusesSupplier)$/;" v +result ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplyStatusSelector.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php /^ $result = $item->loadFromLocalFile($path, $item->getFileName() ?: basename($item->getPath()));$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateFromS3.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php /^ $result = $item->loadFromLocalFile($path, $item->getFileName() ?: basename($item->getPath()));$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/EventListener/MigrateToS3.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $result['type'] == 'binary\/octet-stream';$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $this->client->putObjectFile($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = (bool)$this->client->getBucket($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $this->client->deleteObject($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $this->client->getObject($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $this->client->getObjectInfo($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $this->client->putObject($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = $this->delete($path);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = (bool)$result;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = array($newWidth, $newHeight);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = $this->loadFromLocalFile($path, $_FILES[$key]['name']);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = $this->generateS3Path($path);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = \\Includes\\Utils\\FileManager::write($/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = array($path, true);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = parent::getLocalPath();$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = parent::getStoragePath($path);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = parent::loadFromLocalFile($path, $basename);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = parent::loadFromRequest($key);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = parent::readOutput($start, $length);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = parent::resizeIcon($width, $height, $path);$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = 'migrateToS3';$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = 'migrateFromS3';$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $result = $response->body;$/;" v +result ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $result = $cachedRate;$/;" v +result ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/AustraliaPost/Model/Shipping/Processor/AustraliaPost.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $result = hash_hmac('md5', $data, $key);$/;" v +result ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $result = md5($kOpad . pack('H*', md5($kIpad . $data)));$/;" v +result ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $result = $result && 'center.bottom' == $this->viewListName;$/;" v +result ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $result = $result && 'sidebar.first' == $this->viewListName;$/;" v +result ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $result = parent::isVisible();$/;" v +result ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $result = true === $countOnly$/;" v +result ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Customer/Conversations.php /^ $result = parent::getPortalLCArgs($path, $args, $pageArgs);$/;" v +result ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Customer/Conversation.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Customer/Conversation.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Model/Conversations.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Conversations/View/Model/Conversation.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/AddressBook.php /^ $result = parent::getPortalLCArgs($path, $args, $pageArgs);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Base/Order.php /^ $result = parent::getPortalLCArgs($path, $args, $pageArgs);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/OrderList.php /^ $result = parent::getPortalLCArgs($path, $args, $pageArgs);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ $result = $this->getModelFormPart(self::SECTIONS_MAIN)->performAction('create');$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ $result = $this->getModelFormPart(self::SECTIONS_MAIN)->performAction('update');$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Converter.php /^ $result = parent::buildURL($target, $action, $params, $interface);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Converter.php /^ $result = static::buildDrupalURL($target, $action, $params);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Converter.php /^ $result = static::normalizeDrupalURL($path, $args);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Session.php /^ $result = $object->getCode();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ $result = $this->userAccountsPerStepCounter > 0;$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $result = $product->getCleanURL();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $result = array(null, null, array());$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/AView.php /^ $result = parent::getJSFiles();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/CheckLocation.php /^ $result = preg_match('\/modules\\\/lc_connector\/', __DIR__);$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/CheckLocation.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/CheckLocation.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AProfile.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AProfile.php /^ $result = parent::getProfileId();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/Main.php /^ $result = \\XLite\\Core\\Auth::getInstance()->isAdmin();$/;" v +result ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/Main.php /^ $result = parent::performActionValidateInput();$/;" v +result ../../../src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProducts.php /^ $result = parent::defineViewList($list);$/;" v +result ../../../src/classes/XLite/Module/CDev/FeaturedProducts/View/Admin/FeaturedProducts.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/MarketPrice/Main.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $result = in_array($/;" v +result ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $result = isset($this->paymentTypeCountries[$type])$/;" v +result ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/GeoIP.php /^ $result = new $class;$/;" v +result ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/GeoIP.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/GeoIP/FreeGeoIP.php /^ $result = json_decode($response->body, true);$/;" v +result ../../../src/classes/XLite/Module/CDev/Multicurrency/View/ItemsList/Model/Currency/Admin.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/OrderTags/View/Model/Order/Tag.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $result = array($/;" v +result ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $result = (0 < preg_match('\/VERIFIED\/i', $ipnResult->body))$/;" v +result ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $result = self::IPN_REQUEST_ERROR;$/;" v +result ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ $result = $property;$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/View/ItemsList/Model/Places.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/View/Model/PlaceProcessor/APlaceProcessor.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $result = curl_exec($ch);$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $result = curl_exec($ch);$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $result = json_decode($this->_oauthRequest($/;" v +result ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->result = $result;$/;" v +result ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ protected $result;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ $result = $surcharge;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $result = $option ? $option->getOptionId() : null;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ChangeOptions.php /^ $result = $this->getParam(self::PARAM_ITEM)->hasOptions();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ChangeOptions.php /^ $result = parent::isVisible() && \\XLite::getController()->getItem();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ModifyOptionGroup.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/View/Product.php /^ $result = 0 < $product->getComplex('inventory.amount');$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductsList.php /^ $result = 0 < $product->getComplex('inventory.amount');$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductsList.php /^ $result = parent::isShowAdd2Cart($product);$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator.php /^ $result = new $driver;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator/Google.php /^ $result = $data['translations'][0]['translatedText'];$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator/Google.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Option.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Option.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/OptionGroup.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/OptionGroup.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Product.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Product.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/ItemsList/Model/Products.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/Product.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $result = $this->getFormFieldsForSectionByOption($option, $match[2]);$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $result = $this->getFormFieldsForSectionByField($section);$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $result = parent::getFormFieldsForSection($section);$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ $this->result = $result;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ public $result;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->result = $result;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $result;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/OrderItem.php /^ $result = parent::setProductOptions($options);$/;" v +result ../../../src/classes/XLite/Module/CDev/ProductVariants/View/ItemsList/Model/Variants.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/ItemsList.php /^ $result = $data;$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/ItemsList.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/SaleBlock.php /^ $result = ('center.bottom' == $this->viewListName);$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/SaleBlock.php /^ $result = ('sidebar.first' == $this->viewListName);$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/SaleBlock.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/SaleBlock.php /^ $result = parent::isVisible()$/;" v +result ../../../src/classes/XLite/Module/CDev/Sale/View/SalePage.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = $response->getHttpStatus() == 200;$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = intval($response->response->numFound);$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = $response->getHttpStatus() == 200;$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = 0;$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = array(0, array());$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = $this->findBySolrIds($result);$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = (bool)$this->convertSolrSortField($sort);$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = call_user_func_array(array($client, 'count'), $arguments);$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = !\\XLite::isAdminZone()$/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = array($/;" v +result ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Order.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Order.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ $result = $this->defineCountLowStockBySupplierQuery($supplier)$/;" v +result ../../../src/classes/XLite/Module/CDev/Suppliers/View/ItemsList/Model/LowStockProducts.php /^ $result = parent::getData($cnd, $countOnly);$/;" v +result ../../../src/classes/XLite/Module/CDev/Suppliers/View/ItemsList/Model/LowStockProducts.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Suppliers/View/ItemsList/Model/Suppliers.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $result = $this->startWorker($info);$/;" v +result ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $result = array('pid' => $pid) + $info;$/;" v +result ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = $response->body;$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = $cachedRate;$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = $method;$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Shipping\\Method')->findOneByCode($code);$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = array($/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ $result = !$this->getProductClass()$/;" v +result ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ $result = $membership && $this->getMembership()->getMembershipId() == $membership->getMembershipId();$/;" v +result ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ $result = !$this->getZone() || in_array($this->getZone()->getZoneId(), $zones);$/;" v +result ../../../src/classes/XLite/Module/CDev/VAT/View/Price.php /^ $result = !empty($taxes);$/;" v +result ../../../src/classes/XLite/Module/CDev/VAT/View/Price.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/CDev/XMLSitemap/View/Admin/Sitemap.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = $this->updateOptionInfo($group) && $result;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = $translator->translate($string, $source, $destination);$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Supplier.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Supplier.php /^ $result = parent::checkACL();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Customer/Profile.php /^ $result = parent::doActionRegisterBasic();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Customer/Profile.php /^ $result = parent::doActionUpdateBasic();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Product.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Product.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Product.php /^ $result = $this->getSupplier()->getApproved()$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Product.php /^ $result = parent::isPublicAvailable();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ $result = $this->getApproved() && $this->getPublished();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ $result = parent::isAvailable();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/AdminPanel.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/AdminPanel.php /^ $result = parent::checkItemACL($item);$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ $result = $inventory->getAmount();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ $result = static::t('Inventory tracking disabled');$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ $result = static::t('Low limit reached');$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ $result = static::t('Out of stock');$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ItemsList/Model/Product/Admin/Search.php /^ $result = static::t('n\/a');$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/RegisterStore.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/XLite.php /^ $result = parent::run($adminZone);$/;" v +result ../../../src/classes/XLite/Module/SpurIT/SpurITDrupal/Controller/Customer/UserWishlist.php /^ $result = parent::getPortalLCArgs($path, $args, $pageArgs);$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $result = array('tabs' => $tabs, 'template' => $template);$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Repo/WishlistProducts.php /^ $result = $queryBuilder->getResult();$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Repo/WishlistProducts.php /^ $result = intval($queryBuilder->getSingleScalarResult());$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/Form/Product/AddToWishlist.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/Form/User/AddWishlist.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/ItemsList/Admin/WishlistSearch.php /^ $result = parent::defineViewList($list);$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/ItemsList/Admin/WishlistSearch.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/ItemsList/Customer/Modify/Batch.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/SelectCategory.php /^ $result = true === $countOnly$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/UserWishlist.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/WishlistProducts.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/Upgrade/Cell.php /^ $result = $this->isValid();$/;" v +result ../../../src/classes/XLite/Upgrade/Cell.php /^ $result = $this->manageEntryPackages(true);$/;" v +result ../../../src/classes/XLite/Upgrade/Cell.php /^ $result = count(array_filter(array_map($callback, $list))) === $count;$/;" v +result ../../../src/classes/XLite/Upgrade/Cell.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Upgrade/Cell.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ $result = parent::download();$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/Module/Marketplace.php /^ $result = parent::download();$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/Module/Marketplace.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/Upgrade/Entry/Module/Uploaded.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $d->documentElement->childNodes->item(0)->childNodes;$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $this->t('X GB', array('value' => round($size \/ 1073741824, 1)));$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $this->t('X MB', array('value' => round($size \/ 1048576, 1)));$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $this->t('X bytes', array('value' => $size));$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $this->t('X kB', array('value' => round($size \/ 1024, 1)));$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $val1 == $val2;$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = $val1->$method() == $val3;$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = array_chunk($array, $count);$/;" v +result ../../../src/classes/XLite/View/AView.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/View/Address.php /^ $result = $address->getCountry()->getCountry();$/;" v +result ../../../src/classes/XLite/View/Address.php /^ $result = $address->getState()->getState();$/;" v +result ../../../src/classes/XLite/View/Address.php /^ $result = $address->$methodName();$/;" v +result ../../../src/classes/XLite/View/Address.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/View/AdminPanel.php /^ $result = (in_array($item[self::ITEM_TARGET], $orders) && $auth->isPermissionAllowed('manage orders'))$/;" v +result ../../../src/classes/XLite/View/AdminPanel.php /^ $result = $auth->isPermissionAllowed(\\XLite\\Model\\Role\\Permission::ROOT_ACCESS);$/;" v +result ../../../src/classes/XLite/View/Button/Regular.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Cart.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Category.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/CategorySelect.php /^ $result = $category['depth'];$/;" v +result ../../../src/classes/XLite/View/Checkout.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Checkout/Steps.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/Checkout/Steps.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/Console/Db.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Console/Error.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Console/Main.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Currency.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/CurrencyViewInfo.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Form/Address/Address.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/View/Form/Currency/Currency.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/View/Form/Login/ALogin.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/View/Form/Product/AddToCart.php /^ $result = array($/;" v +result ../../../src/classes/XLite/View/Form/Product/AddToCart.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Form/Profile/AProfile.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/View/Form/Profile/Main.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/View/FormField/AFormField.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/AFormField.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/View/FormField/AFormField.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $result = $this->$method($field);$/;" v +result ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $result = $this->validateField($field);$/;" v +result ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $result = 0 == strlen(strval($value)) ? ' ' : $value;$/;" v +result ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $result = array(true, null);$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Base/String.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Base/String.php /^ $result = parent::checkFieldValidity();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Password.php /^ $result = parent::setCommonAttributes($attrs);$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Base/Numeric.php /^ $result = $this->checkRange();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Base/Numeric.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Base/Numeric.php /^ $result = parent::checkFieldValidity();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Base/Numeric.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Date.php /^ $result = $this->checkRange();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Date.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Date.php /^ $result = parent::checkFieldValidity();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Date.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Email.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Email.php /^ $result = parent::checkFieldValidity();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Phone.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/Phone.php /^ $result = parent::checkFieldValidity();$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/URL.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/FormField/Input/Text/URL.php /^ $result = parent::checkFieldValidity();$/;" v +result ../../../src/classes/XLite/View/Image.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/Image.php /^ $result = parent::isVisible();$/;" v +result ../../../src/classes/XLite/View/ImageUpload.php /^ $result = $object->$method();$/;" v +result ../../../src/classes/XLite/View/ImageUpload.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/InvoicePage.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $result = $this->update();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $result = $this->validateUpdate();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/Product/Admin/Search.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $result = $i;$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $result = array('status' => 'disabled', 'class' => 'none');$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $result = array('status' => 'enabled', 'class' => 'good');$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $result = ! (bool) array_diff($dependencies, $modules);$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $result = array('href' => $url, 'status' => 'not installed', 'class' => 'none');$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $result = array('status' => 'unknown', 'class' => 'poor');$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $result = $this->isModuleCompatible($module);$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/Install.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/Manage.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Module/Manage.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Order/AOrder.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/AProduct.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/Admin/LowInventory.php /^ $result = parent::defineViewList($list);$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/Admin/LowInventory.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/Customer/Category.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/Customer/Search.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Product/Customer/Search.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Profile/AProfile.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Profile/Admin/Search.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ItemsList/Profile/Admin/Search.php /^ $result = parent::getSearchCondition();$/;" v +result ../../../src/classes/XLite/View/LanguagesModify/Dialog.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Login.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Memberships.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = $fields[$section][self::SECTION_PARAM_FIELDS][$name];$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = $this->callActionHandler('create');$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = $this->callActionHandler('update');$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = $this->getFormFields();$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = $this->isValid() && $this->callActionHandler();$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Model/AModel.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/View/Model/Address/Address.php /^ $result = $this->getFieldsBySchema($this->getAddressSchema());$/;" v +result ../../../src/classes/XLite/View/Model/Address/Address.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Model/Address/Address.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/View/Model/Base/Simple.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Model/DataSource/ADataSource.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/View/Model/Profile/AProfile.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $result = $this->checkPassword();$/;" v +result ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $result = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findUserWithSameLogin($this->getModelObject());$/;" v +result ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/Model/Profile/Main.php /^ $result = false;$/;" v +result ../../../src/classes/XLite/View/Model/Profile/Main.php /^ $result = $profile->getProfileId() === $this->getModelObject()->getProfileId();$/;" v +result ../../../src/classes/XLite/View/Model/Profile/Main.php /^ $result = true;$/;" v +result ../../../src/classes/XLite/View/Model/Settings.php /^ $result = parent::getFormButtons();$/;" v +result ../../../src/classes/XLite/View/ModulesManager/AddonKey.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ModulesManager/Install.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ModulesManager/InstallationType.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ModulesManager/Manage.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ModulesManager/ModuleLicense.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ModulesManager/UploadAddons.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Order.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Order/Details/Base/AForm.php /^ $result = parent::getDefaultParams();$/;" v +result ../../../src/classes/XLite/View/Order/Details/Base/AModel.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Order/Search/Recent.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Order/Search/Search.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/OrderList/AOrderList.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/OrderSearch.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/View/OrderSearch.php /^ $result = \\XLite\\Core\\Auth::getInstance()->getProfile();$/;" v +result ../../../src/classes/XLite/View/OrderSearch.php /^ $result = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')$/;" v +result ../../../src/classes/XLite/View/OrderSearch.php /^ $result = \\XLite\\Core\\Auth::getInstance()->getProfile(\\XLite\\Core\\Request::getInstance()->profile_id);$/;" v +result ../../../src/classes/XLite/View/OrderSearch.php /^ $result = null;$/;" v +result ../../../src/classes/XLite/View/OrderSearch.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/PageNotFound.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/PagerOrig/Common.php /^ $result = array($/;" v +result ../../../src/classes/XLite/View/PagerOrig/ProductsList.php /^ $result = array($/;" v +result ../../../src/classes/XLite/View/Payment/Method.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Payment/Methods.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Product/Details/Customer/Gallery.php /^ $result = $image->getResizedURL($width, $height);$/;" v +result ../../../src/classes/XLite/View/ProductBox.php /^ $result = parent::getCSSFiles();$/;" v +result ../../../src/classes/XLite/View/ProductBox.php /^ $result = parent::getJSFiles();$/;" v +result ../../../src/classes/XLite/View/ProductClass/MainInput.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ProductClass/ProductClassesList.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/SelectAddress.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/ShippingEstimate.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/States.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Subcategories.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Terms.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Tooltip.php /^ $result = '';$/;" v +result ../../../src/classes/XLite/View/TopLinks.php /^ $result = $this->buildURL($/;" v +result ../../../src/classes/XLite/View/TopLinks.php /^ $result = '#';$/;" v +result ../../../src/classes/XLite/View/Upgrade/AUpgrade.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Upgrade/AUpgrade.php /^ $result = parent::getListName();$/;" v +result ../../../src/classes/XLite/View/Upgrade/SelectCoreVersion/Button.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/classes/XLite/View/Upgrade/Step/Prepare/IncompatibleEntries.php /^ $result = array();$/;" v +result ../../../src/classes/XLite/View/Welcome.php /^ $result = parent::getAllowedTargets();$/;" v +result ../../../src/lib/Doctrine/DBAL/Connection.php /^ $result = $stmt->rowCount();$/;" v +result ../../../src/lib/Doctrine/DBAL/Connection.php /^ $result = $this->_conn->exec($query);$/;" v +result ../../../src/lib/Doctrine/DBAL/Connection.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $result = $this->_conn->executeUpdate($query);$/;" v +result ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $result = $this->_em->getHydrator($this->_hydrationMode)->hydrateAll($/;" v +result ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $result = $this->execute(array(), $hydrationMode);$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php /^ $result = $this->_hydrateAll();$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php /^ $result = $this->_gatherScalarRowData($result[key($result)], $cache);$/;" v +result ../../../src/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php /^ $result = $this->_stmt->fetchAll(\\PDO::FETCH_ASSOC);$/;" v +result ../../../src/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php /^ $result = $this->_loadMappingFile($this->_findMappingFile($className));$/;" v +result ../../../src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $result = $this->_conn->executeUpdate($sql, $params, $types);$/;" v +result ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $result = array();$/;" v +result ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php /^ $result = $dom->saveXML();$/;" v +result ../../../src/lib/Log/mdb2.php /^ $result = $this->_statement->execute($values);$/;" v +result ../../../src/lib/Log/mdb2.php /^ $result = $this->_db->manager->createIndex($/;" v +result ../../../src/lib/Log/mdb2.php /^ $result = $this->_db->manager->createTable($/;" v +result ../../../src/lib/Log/mdb2.php /^ $result = &$this->_statement->execute($values);$/;" v +result ../../../src/lib/Log/sql.php /^ $result =& $this->_db->execute($this->_statement, $values);$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = pclose($mail);$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = $_SERVER['SERVER_NAME'];$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = $this->Hostname;$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = 'localhost.localdomain';$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = pclose($mail);$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = '';$/;" v +result ../../../src/lib/PHPMailer/class.phpmailer.php /^ $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);$/;" v +result ../../../src/lib/PHPMailer/class.pop3.php /^ $result = $this->Connect($this->host, $this->port, $this->tval);$/;" v +resultAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $resultAlias = $fieldName;$/;" v +resultAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $resultAlias = $selectExpression->fieldIdentificationVariable;$/;" v +resultAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $resultAlias = $selectExpression->fieldIdentificationVariable;$/;" v +resultAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $resultAlias = $this->_scalarResultCounter++;$/;" v +resultColumnName ../../../src/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php /^ $resultColumnName = $this->_platform->getSQLResultCasing($columnAlias);$/;" v +resultColumnName ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $resultColumnName = $this->_platform->getSQLResultCasing($columnAlias);$/;" v +resultColumnName ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $resultColumnName = $this->_platform->getSQLResultCasing($discrColumn);$/;" v +resultColumnName ../../../src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php /^ $resultColumnName = $this->_platform->getSQLResultCasing($discrColumn);$/;" v +resultMethod ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $resultMethod = array($/;" v +resultSet ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php /^ $resultSet = $conn->executeUpdate($sql);$/;" v +resultSet ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php /^ $resultSet = $conn->fetchAll($sql);$/;" v +resultSet ../../../src/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php /^ $resultSet = $query->execute(array(), constant($hydrationMode));$/;" v +resultVariable ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $resultVariable = $deferredItem['expression'];$/;" v +resultVariable ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $resultVariable = $this->AliasResultVariable();$/;" v +resultVariable ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $resultVariable = $this->_lexer->token['value'];$/;" v +resultZone ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $resultZone = array($/;" v +results ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $results = array();$/;" v +resumable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $this->resumable = $resumable;$/;" v +resumable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ public $resumable;$/;" v +resumeUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $this->resumeUri = $this->getResumeUri($req);$/;" v +resumeUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ public $resumeUri;$/;" v +ret ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $ret = isset($decodedResponse['data']) ? $decodedResponse['data'] : $decodedResponse;$/;" v +ret ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $ret = db2_free_stmt($this->_stmt);$/;" v +ret ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ $ret = @oci_execute($this->_sth, $this->_executeMode);$/;" v +ret ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $ret = array();$/;" v +ret ../../../src/lib/Doctrine/DBAL/Portability/Connection.php /^ $ret = parent::connect();$/;" v +ret ../../../src/lib/Symfony/Component/Console/Helper/DialogHelper.php /^ $ret = trim(fgets(STDIN));$/;" v +ret ../../../src/lib/Symfony/Component/Console/Tester/ApplicationTester.php /^ $ret = $this->application->run($this->input, $this->output);$/;" v +ret ../../../src/lib/Symfony/Component/Console/Tester/CommandTester.php /^ $ret = $this->command->run($this->input, $this->output);$/;" v +ret ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $ret = true;$/;" v +ret ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $ret = false;$/;" v +ret ../../../src/lib/Symfony/Component/Yaml/Yaml.php /^ $ret = $yaml->parse($input);$/;" v +retailPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->retailPrice = $retailPrice;$/;" v +retailPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $retailPrice;$/;" v +retained_params ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $retained_params = array();$/;" v +return ../../../src/Includes/install/install.php /^ $return = '' . xtr('Failed') . '<\/a>';$/;" v +return ../../../src/Includes/install/install.php /^ $return = 'OK<\/span>';$/;" v +return ../../../src/Includes/install/install.php /^ $return = $status$/;" v +return ../../../src/classes/XLite/Controller/Admin/ProductList.php /^ $return = $searchParams[$paramName];$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = $_SERVER['SERVER_SOFTWARE'];$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = $m[1];$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = '';$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = 'found (' . $gdVersion . ')';$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = function_exists('xml_parser_create') ? 'found' : '';$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = $libcurlVersion;$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = $osType;$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = $result;$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = PHP_VERSION;$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = \\Includes\\Utils\\Database::getDbVersion();$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = \\Includes\\Utils\\Database::isInnoDBSupported();$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = \\XLite::getInstance()->getVersion();$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = getcwd();$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = parent::get($name);$/;" v +return ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $return = '';$/;" v +return ../../../src/classes/XLite/Controller/Customer/Search.php /^ $return = $searchParams[$paramName];$/;" v +return ../../../src/classes/XLite/Model/AEntity.php /^ $return = $this->$property;$/;" v +return ../../../src/classes/XLite/Model/AEntity.php /^ $return = null;$/;" v +return ../../../src/classes/XLite/Model/Payment/Transaction.php /^ $return = self::PROLONGATION;$/;" v +return ../../../src/classes/XLite/Model/Payment/Transaction.php /^ $return = self::SEPARATE;$/;" v +return ../../../src/classes/XLite/Model/Payment/Transaction.php /^ $return = self::SILENT;$/;" v +return ../../../src/classes/XLite/Model/Payment/Transaction.php /^ $return = self::COMPLETED;$/;" v +return ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $return = $searchParams[$paramName];$/;" v +return ../../../src/classes/XLite/Module/CDev/ProductTranslators/Controller/Admin/ProductTranslations.php /^ $return = $searchParams[$paramName];$/;" v +return ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $return = $var->format('c');$/;" v +return ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $return = new \\stdclass();$/;" v +return ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $return = $var;$/;" v +return ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $return = array();$/;" v +return ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $return = is_object($var) ? get_class($var) $/;" v +return ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $return = null;$/;" v +return ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $return = $func($this);$/;" v +returnURL ../../../src/classes/XLite/Controller/AController.php /^ $this->returnURL = \\XLite\\Core\\Request::getInstance()->{static::RETURN_URL};$/;" v +returnURL ../../../src/classes/XLite/Controller/AController.php /^ $this->returnURL = $url;$/;" v +returnURL ../../../src/classes/XLite/Controller/AController.php /^ protected $returnURL;$/;" v +returnURL ../../../src/classes/XLite/Controller/Admin/Login.php /^ $returnURL = $this->buildURL('login');$/;" v +returnURL ../../../src/classes/XLite/Controller/Admin/Login.php /^ $returnURL = $this->buildURL();$/;" v +returnURL ../../../src/classes/XLite/Controller/Admin/Login.php /^ $returnURL = \\XLite\\Core\\Session::getInstance()->get('lastWorkingURL');$/;" v +returnedPaymentFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->returnedPaymentFee = $returnedPaymentFee;$/;" v +returnedPaymentFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $returnedPaymentFee;$/;" v +retval ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $retval = @db2_execute($this->_stmt);$/;" v +retval ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $retval = @db2_execute($this->_stmt, $params);$/;" v +retval ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $retval = @db2_execute($this->_stmt, $params);$/;" v +retval ../../../src/lib/Symfony/Component/Yaml/Yaml.php /^ $retval = include($input);$/;" v +reverseEngineerMappingFromDatabase ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ private function reverseEngineerMappingFromDatabase()$/;" f +reverseProductPrice ../../../src/classes/XLite/Logic/Tax/Processor/AProcessor.php /^ public function reverseProductPrice(\\XLite\\Model\\Product $product, $amount = null)$/;" f +review ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->review = $review;$/;" v +review ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $review;$/;" v +revisionDate ../../../src/classes/XLite/Model/Module.php /^ protected $revisionDate = 0;$/;" v +revisionDate ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ $this->revisionDate = $revisionDate;$/;" v +revisionDate ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ protected $revisionDate;$/;" v +revokeToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function revokeToken($token = null) {$/;" f +revokeToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuth.php /^ abstract public function revokeToken();$/;" f +revokeToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuthNone.php /^ public function revokeToken() {\/* noop*\/}$/;" f +revokeToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function revokeToken($token = null) {$/;" f +rewardPartner ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rewardPartner = $rewardPartner;$/;" v +rewardPartner ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $rewardPartner;$/;" v +rewardUnit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rewardUnit = $rewardUnit;$/;" v +rewardUnit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $rewardUnit;$/;" v +rewards ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rewards = $rewards;$/;" v +rewards ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $rewards;$/;" v +rewardsExpire ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rewardsExpire = $rewardsExpire;$/;" v +rewardsExpire ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $rewardsExpire;$/;" v +rewardsHaveBlackoutDates ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rewardsHaveBlackoutDates = $rewardsHaveBlackoutDates;$/;" v +rewardsHaveBlackoutDates ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $rewardsHaveBlackoutDates;$/;" v +rewind ../../../src/classes/XLite/Core/CommonCell.php /^ public function rewind()$/;" f +rewind ../../../src/classes/XLite/Core/DataSource/Ecwid/Categories.php /^ public function rewind()$/;" f +rewind ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ public function rewind()$/;" f +rewind ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ public function rewind()$/;" f +rewind ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ public function rewind()$/;" f +rewind ../../../src/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php /^ public function rewind()$/;" f +rewind ../../../src/lib/PEAR2/HTTP/Request/Headers.php /^ public function rewind()$/;" f +rewind ../../../src/lib/PEAR2/MultiErrors.php /^ public function rewind()$/;" f +rewriteData ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $rewriteData = $this->rewriteURL($this->getTokenText($i + 1));$/;" v +rewriteImageURL ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function rewriteImageURL($url, $length)$/;" f +rewriteURL ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function rewriteURL($url)$/;" f +rgbBlur ../../../src/lib/phpunsharpmask.php /^ $rgbBlur = ImageColorAt($imgBlur, $x, $y); $/;" v +rgbNew ../../../src/lib/phpunsharpmask.php /^ $rgbNew = ($rNew << 16) + ($gNew <<8) + $bNew; $/;" v +rgbOrig ../../../src/lib/phpunsharpmask.php /^ $rgbOrig = ImageColorAt($img, $x, $y); $/;" v +rid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Profile.php /^ $rid = $connection->executeQuery($/;" v +rid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Profile.php /^ $rid = isset($rid[0]) ? $rid[0] : null;$/;" v +right ../../../src/classes/XLite/Model/Repo/Category.php /^ $right = $entity->getRpos() - ($onlySubtree ? 1 : 0);$/;" v +right ../../../src/classes/XLite/View/Image.php /^ $right = max(0, floor($horizontal));$/;" v +rightBetweenExpression ../../../src/lib/Doctrine/ORM/Query/AST/BetweenExpression.php /^ $this->rightBetweenExpression = $rightExpr;$/;" v +rightBetweenExpression ../../../src/lib/Doctrine/ORM/Query/AST/BetweenExpression.php /^ public $rightBetweenExpression;$/;" v +rightExpr ../../../src/lib/Doctrine/ORM/Query/Expr/Math.php /^ $rightExpr = '(' . $rightExpr . ')';$/;" v +rightExpr ../../../src/lib/Doctrine/ORM/Query/Expr/Math.php /^ $rightExpr = (string) $this->_rightExpr;$/;" v +rightExpr ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $rightExpr = $this->ArithmeticExpression();$/;" v +rightExpr ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $rightExpr = $this->QuantifiedExpression();$/;" v +rightExpr ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $rightExpr = $compExpr->rightExpression;$/;" v +rightExpression ../../../src/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php /^ $this->rightExpression = $rightExpr;$/;" v +rightExpression ../../../src/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php /^ public $rightExpression;$/;" v +rightJoin ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function rightJoin($fromAlias, $join, $alias, $condition = null)$/;" f +rights ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->rights = $rights;$/;" v +rights ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $rights;$/;" v +role ../../../src/Includes/install/install.php /^ $role = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role')->findOneByName('Administrator');$/;" v +role ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->role = $role;$/;" v +role ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $role;$/;" v +role ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->role = $role;$/;" v +role ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $role;$/;" v +role ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->role = $role;$/;" v +role ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $role;$/;" v +role ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Customer/Profile.php /^ $role = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role')->findOneByName($roleName);$/;" v +role ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Profile.php /^ $role = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role')->findOneByName('Shopkeeper');$/;" v +role ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $role = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role')->find($rid);$/;" v +rolePermissions ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Profile.php /^ $rolePermissions = user_role_permissions($roles);$/;" v +role_id ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/DrupalRole.php /^ protected $role_id;$/;" v +roles ../../../src/classes/XLite/Model/Profile.php /^ $this->roles = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +roles ../../../src/classes/XLite/Model/Profile.php /^ protected $roles;$/;" v +roles ../../../src/classes/XLite/Model/Role/Permission.php /^ $this->roles = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +roles ../../../src/classes/XLite/Model/Role/Permission.php /^ protected $roles;$/;" v +roles ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ $roles = \\XLite\\Core\\Request::getInstance()->roles;$/;" v +roles ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ $roles = user_roles();$/;" v +roles ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Profile.php /^ $roles = (isset($edit['roles']) ? $edit['roles'] : (isset($user->roles) ? $user->roles : null));$/;" v +roles ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Customer/Profile.php /^ $roles = array_map('intval', $roles);$/;" v +rolesToAdd ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Profile.php /^ $rolesToAdd = array_diff($newDrupalRoles, $processedRoles);$/;" v +rolesTranslations ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Customer/Profile.php /^ protected $rolesTranslations = array($/;" v +rollBack ../../../src/lib/Doctrine/DBAL/Driver/Connection.php /^ function rollBack();$/;" f +rollBack ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ function rollBack()$/;" f +rollBack ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ public function rollBack()$/;" f +rollback ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function rollback()$/;" f +rollback ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function rollback()$/;" f +rollback ../../../src/lib/Doctrine/ORM/EntityManager.php /^ public function rollback()$/;" f +rollbackModel ../../../src/classes/XLite/View/Model/AModel.php /^ protected function rollbackModel()$/;" f +rollbackSavePoint ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function rollbackSavePoint($savepoint)$/;" f +rollbackSavePoint ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function rollbackSavePoint($savepoint)$/;" f +rollbackSavepoint ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function rollbackSavepoint($savepoint)$/;" f +root ../../../src/Includes/DataStructure/Graph.php /^ $root = $this;$/;" v +root ../../../src/Includes/Decorator/Utils/Operator.php /^ $root = new \\Includes\\Decorator\\DataStructure\\Graph\\Classes();$/;" v +root ../../../src/Includes/Decorator/Utils/Operator.php /^ $root = new \\Includes\\Decorator\\DataStructure\\Graph\\Modules();$/;" v +root ../../../src/Includes/Utils/ModulesManager.php /^ $root = preg_quote(\\Includes\\Decorator\\ADecorator::getClassesDir(), '\/') . 'XLite';$/;" v +root ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $root = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Category')->find($/;" v +root ../../../src/classes/XLite/Model/Base/Storage.php /^ $root = $this->getFileSystemRoot();$/;" v +root ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $root = $this->getFileSystemRoot();$/;" v +root ../../../src/classes/XLite/Model/Repo/Base/Storage.php /^ $root = $this->getFileSystemRoot();$/;" v +root ../../../src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php /^ $this->root = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role\\Permission')$/;" v +root ../../../src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php /^ protected $root;$/;" v +root ../../../src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php /^ $root = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role\\Permission')->findOneBy($/;" v +root ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php /^ $root = $xml->addChild('entity');$/;" v +root ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php /^ $root = $xml->addChild('mapped-superclass');$/;" v +rootAlias ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $rootAlias = $this->getRootAlias();$/;" v +rootAlias ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $rootAlias => new Expr\\Join(Expr\\Join::INNER_JOIN, $join, $alias, $conditionType, $condition, $indexBy)$/;" v +rootAlias ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $rootAlias => new Expr\\Join(Expr\\Join::LEFT_JOIN, $join, $alias, $conditionType, $condition, $indexBy)$/;" v +rootAlias ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $rootAlias = substr($join, 0, strpos($join, '.'));$/;" v +rootCategoryId ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $this->rootCategoryId = $this->getParam(self::PARAM_USE_NODE)$/;" v +rootCategoryId ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ protected $rootCategoryId = null;$/;" v +rootClass ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $rootClass = $this->_class->name == $this->_class->rootEntityName ?$/;" v +rootClass ../../../src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php /^ $rootClass = $this->_em->getClassMetadata($this->_class->rootEntityName);$/;" v +rootClass ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php /^ $rootClass = $em->getClassMetadata($primaryClass->rootEntityName);$/;" v +rootClass ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $rootClass = $em->getClassMetadata($primaryClass->rootEntityName);$/;" v +rootClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $rootClass = $this->_em->getClassMetadata($class->rootEntityName);$/;" v +rootClassName ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $rootClassName = $this->em->getClassMetadata(get_class($entity))->rootEntityName;$/;" v +rootDirLength ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->rootDirLength = strlen(LC_DIR_ROOT);$/;" v +rootDirLength ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected $rootDirLength;$/;" v +rootEntityFound ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $rootEntityFound = true;$/;" v +rootEntityFound ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $rootEntityFound = true;$/;" v +rootEntityFound ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $rootEntityFound = false;$/;" v +rootEntityName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $this->rootEntityName = array_pop($classNames);$/;" v +rootEntityName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $this->rootEntityName = $entityName;$/;" v +rootEntityName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $rootEntityName;$/;" v +rootEntityName ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $rootEntityName = $this->em->getClassMetadata(get_class($entity))->rootEntityName;$/;" v +rootId ../../../src/classes/XLite/Model/Repo/Category.php /^ $rootId = $rootId ?: $this->getRootCategoryId();$/;" v +rootId ../../../src/classes/XLite/View/TopCategories.php /^ $rootId = $this->getDefaultCategoryId();$/;" v +rootIsAllowed ../../../src/classes/XLite/Model/WidgetParam/ObjectId/Category.php /^ $this->rootIsAllowed = $rootIsAllowed;$/;" v +rootIsAllowed ../../../src/classes/XLite/Model/WidgetParam/ObjectId/Category.php /^ protected $rootIsAllowed = false;$/;" v +rootLinkedCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ $this->rootLinkedCategories = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +rootLinkedCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ protected $rootLinkedCategories;$/;" v +rootPersister ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $rootPersister = $this->_em->getUnitOfWork()->getEntityPersister($rootClass->name);$/;" v +rootRole ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ $rootRole = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role')->findOneRoot();$/;" v +rootRole ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $rootRole = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Role')->findOneRoot();$/;" v +rootTableName ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $rootTableName = $rootClass->table['name'];$/;" v +rootTableStmt ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $rootTableStmt = $this->_conn->prepare($rootPersister->_getInsertSQL());$/;" v +round ../../../src/classes/XLite/Logic/Math.php /^ public function round($value, $precision = 0)$/;" f +roundByCurrency ../../../src/classes/XLite/Logic/Math.php /^ public function roundByCurrency($value, \\XLite\\Model\\Currency $currency)$/;" f +roundCeil ../../../src/classes/XLite/Logic/Math.php /^ public function roundCeil($value, $precision = 0)$/;" f +roundDown ../../../src/classes/XLite/Logic/Math.php /^ public function roundDown($value, $precision = 0)$/;" f +roundFloor ../../../src/classes/XLite/Logic/Math.php /^ public function roundFloor($value, $precision = 0)$/;" f +roundHalfDown ../../../src/classes/XLite/Logic/Math.php /^ public function roundHalfDown($value, $precision = 0)$/;" f +roundHalfEven ../../../src/classes/XLite/Logic/Math.php /^ public function roundHalfEven($value, $precision = 0)$/;" f +roundHalfUp ../../../src/classes/XLite/Logic/Math.php /^ public function roundHalfUp($value, $precision = 0)$/;" f +roundMath ../../../src/classes/XLite/Logic/Math.php /^ public function roundMath($value, $precision = 0)$/;" f +roundUp ../../../src/classes/XLite/Logic/Math.php /^ public function roundUp($value, $precision = 0)$/;" f +roundValue ../../../src/classes/XLite/Model/Currency.php /^ public function roundValue($value)$/;" f +roundValueAsInteger ../../../src/classes/XLite/Model/Currency.php /^ public function roundValueAsInteger($value)$/;" f +row ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $row = fgetcsv($this->filePointer, 0, static::DELIMIER);$/;" v +row ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $row = is_array($row) ? array_map('trim', $row) : array();$/;" v +row ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $row = array();$/;" v +row ../../../src/classes/XLite/Core/Database.php /^ $row = trim($row);$/;" v +row ../../../src/classes/XLite/Core/Probe.php /^ $row = file_get_contents(__FILE__);$/;" v +row ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $row = $this->fetch(\\PDO::FETCH_NUM);$/;" v +row ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ $row = oci_fetch_array($this->_sth, OCI_NUM | OCI_RETURN_NULLS | OCI_RETURN_LOBS);$/;" v +row ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $row = array_change_key_case($row, $this->case);$/;" v +row ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $row = $this->fixRow($row,$/;" v +row ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $row = $this->stmt->fetch($fetchStyle);$/;" v +row ../../../src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php /^ $row = $this->_stmt->fetch(PDO::FETCH_ASSOC);$/;" v +rowCount ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ function rowCount()$/;" f +rowCount ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ public function rowCount()$/;" f +rowCount ../../../src/lib/Doctrine/DBAL/Driver/Statement.php /^ function rowCount();$/;" f +rowCount ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ public function rowCount()$/;" f +rowCount ../../../src/lib/Doctrine/DBAL/Statement.php /^ public function rowCount()$/;" f +rowData ../../../src/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php /^ $rowData = array();$/;" v +rowData ../../../src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php /^ $rowData = $this->_gatherRowData($data, $cache, $id, $nonemptyComponents);$/;" v +rowData ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $rowData = $this->_gatherRowData($data, $cache, $id, $nonemptyComponents);$/;" v +rows ../../../src/classes/XLite/Core/Database.php /^ $rows = $this->detectDirectives($rows);$/;" v +rows ../../../src/classes/XLite/Core/Database.php /^ $rows = $statement->fetchAll(\\PDO::FETCH_NUM);$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ protected $rows = 0;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->rows = $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->rows = $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->rows = $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->rows = $rows;$/;" v +rows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $rows;$/;" v +rows ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $rows = array_chunk($data, $this->getParam(static::PARAM_GRID_COLUMNS));$/;" v +rows ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $rows = array();$/;" v +rows ../../../src/classes/XLite/View/Subcategories.php /^ $rows = array_chunk($this->getSubcategories(), $this->getColumnsCount());$/;" v +rows ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $rows = array();$/;" v +rows ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $rows = $this->stmt->fetchAll($fetchStyle);$/;" v +rows ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $rows = $this->stmt->fetchAll($fetchStyle, $columnIndex);$/;" v +rpcPath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->rpcPath = '\/rpc';$/;" v +rpcPath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->rpcPath = '\/rpc';$/;" v +rpcPath ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->rpcPath = '\/rpc';$/;" v +rply ../../../src/lib/PHPMailer/class.smtp.php /^ $rply = $this->get_lines();$/;" v +rpos ../../../src/classes/XLite/Model/Category.php /^ protected $rpos;$/;" v +rpos ../../../src/classes/XLite/Model/Repo/Category.php /^ $rpos = $this->getMaxRightPos();$/;" v +rpos ../../../src/classes/XLite/Model/Repo/Category.php /^ $rpos = $rpos ?: $category->getRpos();$/;" v +rpos ../../../src/classes/XLite/Model/Repo/Category.php /^ $rpos = null$/;" v +rs ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php /^ $rs = $stmt->execute();$/;" v +rsm ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Repo/OptionException.php /^ $rsm = new \\Doctrine\\ORM\\Query\\ResultSetMapping();$/;" v +rsm ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $rsm = $this->_rsm;$/;" v +rsm ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $rsm = clone ($this->_rsm); \/\/ this is necessary because the "default rsm" should be changed.$/;" v +rt ../../../src/lib/PHPMailer/class.phpmailer.php /^ $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);$/;" v +rt ../../../src/lib/PHPMailer/class.phpmailer.php /^ $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);$/;" v +rt ../../../src/lib/PHPMailer/class.phpmailer.php /^ $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);$/;" v +ruleImpact ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->ruleImpact = $ruleImpact;$/;" v +ruleImpact ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $ruleImpact;$/;" v +ruleResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->ruleResults = $ruleResults;$/;" v +ruleResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $ruleResults;$/;" v +ruleScore ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->ruleScore = $ruleScore;$/;" v +ruleScore ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $ruleScore;$/;" v +rules ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->rules = $rules;$/;" v +rules ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $rules;$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Base/String.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/Base/Numeric.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/Email.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/Float.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/Integer.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/Phone.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/TCPIPPort.php /^ $rules = parent::assembleValidationRules();$/;" v +rules ../../../src/classes/XLite/View/FormField/Input/Text/URL.php /^ $rules = parent::assembleValidationRules();$/;" v +run ../../../src/classes/XLite.php /^ public function run($adminZone = false)$/;" f +run ../../../src/classes/XLite/Controller/AController.php /^ protected function run()$/;" f +run ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ protected function run()$/;" f +run ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ protected function run()$/;" f +run ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ public function run()$/;" f +run ../../../src/classes/XLite/Core/Task/ATask.php /^ public function run()$/;" f +run ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Category.php /^ public function run()$/;" f +run ../../../src/classes/XLite/Module/CDev/Places/XLite.php /^ public function run($adminZone = false)$/;" f +run ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ public function run()$/;" f +run ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker.php /^ abstract public function run($arguments = null);$/;" f +run ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/Permanent.php /^ public function run($arguments = null)$/;" f +run ../../../src/classes/XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php /^ protected function run()$/;" f +run ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ protected function run()$/;" f +run ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/XLite.php /^ public function run($adminZone = false)$/;" f +run ../../../src/lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php /^ static public function run(HelperSet $helperSet)$/;" f +run ../../../src/lib/Symfony/Component/Console/Application.php /^ public function run(InputInterface $input = null, OutputInterface $output = null)$/;" f +run ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function run(InputInterface $input, OutputInterface $output)$/;" f +run ../../../src/lib/Symfony/Component/Console/Shell.php /^ public function run()$/;" f +run ../../../src/lib/Symfony/Component/Console/Tester/ApplicationTester.php /^ public function run(array $input, $options = array())$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/AModule.php /^ public static function runBuildCacheHandler()$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/CDev/DeTranslation/Main.php /^ public static function runBuildCacheHandler()$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/CDev/FrTranslation/Main.php /^ public static function runBuildCacheHandler()$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/CDev/Multicurrency/Main.php /^ public static function runBuildCacheHandler()$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/CDev/RuTranslation/Main.php /^ public static function runBuildCacheHandler()$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/CDev/XMLSitemapDrupal/Main.php /^ public static function runBuildCacheHandler()$/;" f +runBuildCacheHandler ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Main.php /^ public static function runBuildCacheHandler()$/;" f +runController ../../../src/classes/XLite.php /^ public function runController()$/;" f +runController ../../../src/classes/XLite/Core/CMSConnector.php /^ public function runController($applicationId = null)$/;" f +runController ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/ADrupal.php /^ protected function runController($target, $action = null, array $data = array())$/;" f +runCronTasks ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ public function runCronTasks()$/;" f +runCurrentStep ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ protected function runCurrentStep()$/;" f +runCurrentStep ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ protected function runCurrentStep()$/;" f +runHelpers ../../../src/classes/XLite/Upgrade/Cell.php /^ public function runHelpers($type, $isTestMode = false)$/;" f +runHelpers ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ public function runHelpers($type)$/;" f +runImport ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected function runImport()$/;" f +runImport ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Category.php /^ protected function runImport()$/;" f +runRunner ../../../src/classes/XLite/Controller/Console/Cron.php /^ protected function runRunner(\\XLite\\Core\\Task\\ATask $runner)$/;" f +runStep ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static function runStep($step)$/;" f +runStep ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ protected function runStep($method, array $params = array())$/;" f +runStep ../../../src/classes/XLite/Core/Task/ATask.php /^ abstract protected function runStep();$/;" f +runStep ../../../src/classes/XLite/Core/Task/EventListener.php /^ protected function runStep()$/;" f +runStep ../../../src/classes/XLite/Core/Task/Probe.php /^ protected function runStep()$/;" f +runStep ../../../src/classes/XLite/Module/CDev/Aggregator/Core/Task/ReinitializeImport.php /^ protected function runStep()$/;" f +runStepConditionally ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static function runStepConditionally($step)$/;" f +runTasksDirect ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Console/Cron.php /^ public function runTasksDirect()$/;" f +runWorker ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ protected function runWorker(array $info)$/;" f +runner ../../../src/classes/XLite/Controller/Console/Cron.php /^ $runner = $task->getOwnerInstance();$/;" v +runningCommand ../../../src/lib/Symfony/Component/Console/Application.php /^ $this->runningCommand = $command;$/;" v +runningCommand ../../../src/lib/Symfony/Component/Console/Application.php /^ $this->runningCommand = null;$/;" v +runningCommand ../../../src/lib/Symfony/Component/Console/Application.php /^ protected $runningCommand;$/;" v +runpagespeed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function runpagespeed($url, $optParams = array()) {$/;" f +runtimeId ../../../src/classes/XLite/Logger.php /^ $this->runtimeId = hash('md4', uniqid('runtime', true), false);$/;" v +runtimeId ../../../src/classes/XLite/Logger.php /^ protected $runtimeId;$/;" v +rval ../../../src/lib/PHPMailer/class.smtp.php /^ $rval = false;$/;" v +rval ../../../src/lib/PHPMailer/class.smtp.php /^ $rval = true;$/;" v +s ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $s = '\\'' . $s . '\\'';$/;" v +s ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $s = $this->flexyExpression($tmp);$/;" v +s ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $s = str_replace($find, $replace, substr($str, 0, $pos));$/;" v +s ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $s = 0;$/;" v +s ../../../src/lib/PHPMailer/class.phpmailer.php /^ $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params);$/;" v +s ../../../src/lib/PHPMailer/class.phpmailer.php /^ $s=implode("\\r\\n",$lines);$/;" v +s ../../../src/lib/PHPMailer/class.phpmailer.php /^ $s=preg_replace("\/\\r\\n\\s+\/"," ",$s);$/;" v +s3 ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $this->s3 = false;$/;" v +s3 ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $this->s3 = \\XLite\\Module\\CDev\\AmazonS3Images\\Core\\S3::getInstance();$/;" v +s3 ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ protected $s3;$/;" v +s3Forbid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $this->s3Forbid = $flag;$/;" v +s3Forbid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ protected $s3Forbid = false;$/;" v +s3Path ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $s3Path = $this->generateS3Path($basename);$/;" v +s3Path ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $s3Path = $this->getS3()->generateUniquePath($s3Path);$/;" v +s3icons ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ protected $s3icons = array();$/;" v +sa ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $sa = $a->getMethod();$/;" v +safe ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->safe = $safe;$/;" v +safe ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $safe;$/;" v +saleInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->saleInfo = $saleInfo;$/;" v +saleInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $saleInfo;$/;" v +salePrice ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ $salePrice = $price * (1 - $this->getSalePriceValue() \/ 100);$/;" v +salePrice ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ $salePrice = $this->getSalePriceValue();$/;" v +salePrice ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ $salePrice = $price = isset($value) ? $value : $this->getPrice();$/;" v +salePriceValue ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ protected $salePriceValue = 0;$/;" v +salePriceValueCalculated ../../../src/classes/XLite/Module/CDev/Sale/Model/Product.php /^ protected $salePriceValueCalculated = 0;$/;" v +saleability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->saleability = $saleability;$/;" v +saleability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $saleability;$/;" v +salt ../../../src/Includes/functions.php /^ $salt = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789';$/;" v +salt ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Drupal.php /^ $salt = substr($setting, 4, 8);$/;" v +sameAddress ../../../src/classes/XLite/Model/Address.php /^ $sameAddress = $this->getRepository()->findSameAddress($this);$/;" v +sameColumns ../../../src/lib/Doctrine/DBAL/Schema/Index.php /^ $sameColumns = false;$/;" v +sameColumns ../../../src/lib/Doctrine/DBAL/Schema/Index.php /^ $sameColumns = $this->spansColumns($other->getColumns());$/;" v +sameColumns ../../../src/lib/Doctrine/DBAL/Schema/Index.php /^ $sameColumns = true;$/;" v +sameProfile ../../../src/classes/XLite/Model/Profile.php /^ $sameProfile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->findUserWithSameLogin($this);$/;" v +sameProfile ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $sameProfile = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')$/;" v +sanitize ../../../src/classes/XLite/Core/Validator/AValidator.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/Float.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/HashArray.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/Integer.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/PlainArray.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/SKU.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/String/CleanURL.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/String/ObjectId/Country.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/String/ObjectId/State.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/Core/Validator/String/Switcher.php /^ public function sanitize($data)$/;" f +sanitize ../../../src/classes/XLite/View/FormField/AFormField.php /^ protected function sanitize()$/;" f +sanitize ../../../src/classes/XLite/View/FormField/Input/Base/String.php /^ protected function sanitize()$/;" f +sanitize ../../../src/classes/XLite/View/FormField/Input/Text/Date.php /^ protected function sanitize()$/;" f +sanitize ../../../src/classes/XLite/View/FormField/Input/Text/Float.php /^ protected function sanitize()$/;" f +sanitize ../../../src/classes/XLite/View/FormField/Input/Text/Integer.php /^ protected function sanitize()$/;" f +sanitizeCleanURL ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected function sanitizeCleanURL($cleanURL)$/;" f +sanitizeSelectableOptions ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Option.php /^ public function sanitizeSelectableOptions(array $options)$/;" f +sanitizeZipcode ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ protected function sanitizeZipcode($zipcode)$/;" f +sanitizedData ../../../src/classes/XLite/Core/Validator/HashArray.php /^ $sanitizedData = array();$/;" v +save ../../../src/lib/Doctrine/Common/Cache/AbstractCache.php /^ public function save($id, $data, $lifeTime = 0)$/;" f +save ../../../src/lib/Doctrine/Common/Cache/Cache.php /^ function save($id, $data, $lifeTime = 0);$/;" f +saveAddonsList ../../../src/classes/XLite/Core/Marketplace.php /^ public function saveAddonsList($ttl = self::TTL_LONG)$/;" f +saveAnonymousProfile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function saveAnonymousProfile()$/;" f +saveAnonymousProfile ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Checkout.php /^ protected function saveAnonymousProfile()$/;" f +saveCacheFile ../../../src/lib/Doctrine/Common/Annotations/FileCacheReader.php /^ private function saveCacheFile($path, $data)$/;" f +saveCell ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function saveCell(\\XLite\\View\\FormField\\Inline\\AInline $inline)$/;" f +saveDataFromRequest ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ protected function saveDataFromRequest()$/;" f +saveDataInCache ../../../src/classes/XLite/Model/Shipping/Processor/AProcessor.php /^ protected function saveDataInCache($key, $data)$/;" f +saveException ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ protected function saveException($eid, array $data)$/;" f +saveFile ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/FixturesManager.php /^ protected static function saveFile()$/;" f +saveFormData ../../../src/classes/XLite/View/Model/AModel.php /^ protected function saveFormData($data)$/;" f +saveHashesForInstalledFiles ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ protected function saveHashesForInstalledFiles()$/;" f +saveInputData ../../../src/classes/XLite/Model/Payment/Base/Processor.php /^ protected function saveInputData()$/;" f +saveInputStream ../../../src/classes/XLite/Controller/Console/AConsole.php /^ protected function saveInputStream()$/;" f +saveItemState ../../../src/classes/XLite/Model/OrderItem.php /^ protected function saveItemState(\\XLite\\Model\\Base\\IOrderItem $item)$/;" f +saveItemState ../../../src/classes/XLite/Module/CDev/Aggregator/Model/OrderItem.php /^ protected function saveItemState(\\XLite\\Model\\Base\\IOrderItem $item)$/;" f +saveItemState ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OrderItem.php /^ protected function saveItemState(\\XLite\\Model\\Base\\IOrderItem $item)$/;" f +saveLabels ../../../src/classes/XLite/Controller/Admin/Languages.php /^ protected function saveLabels(array $values, $code)$/;" f +saveMode ../../../src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php /^ $saveMode = ($input->getOption('complete') !== true);$/;" v +saveModulesToFile ../../../src/Includes/Utils/ModulesManager.php /^ public static function saveModulesToFile(array $modules)$/;" f +saveOption ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ protected function saveOption(\\XLite\\Module\\CDev\\ProductOptions\\Model\\Option $option, array $data)$/;" f +savePath ../../../src/classes/XLite/Model/Base/Storage.php /^ $savePath = static::STORAGE_ABSOLUTE == $this->getStorageType() ? $path : $this->assembleSavePath($path);$/;" v +savePath ../../../src/classes/XLite/Model/Base/Storage.php /^ protected function savePath($path)$/;" f +savePosition ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function savePosition($offs = 0)$/;" f +saveServiceYAML ../../../src/classes/XLite/Core/Operator.php /^ public function saveServiceYAML($path, array $data)$/;" f +saveSubstitutonalSkins ../../../src/classes/XLite/Core/Layout.php /^ public function saveSubstitutonalSkins()$/;" f +saveSupplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ protected function saveSupplier(\\XLite\\Model\\Product $product)$/;" f +saveToCache ../../../src/classes/XLite/Model/Repo/ARepo.php /^ protected function saveToCache($data, $name, array $params = array())$/;" f +saveUnsafeModulesToFile ../../../src/Includes/SafeMode.php /^ protected static function saveUnsafeModulesToFile(array $modules)$/;" f +saveValue ../../../src/classes/XLite/Module/CDev/Suppliers/View/FormField/Inline/OrderQuantity.php /^ public function saveValue()$/;" f +saveValue ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ public function saveValue()$/;" f +saveValue ../../../src/classes/XLite/View/FormField/Inline/Input/Text/Integer/ProductQuantity.php /^ public function saveValue()$/;" f +saveValueFormat ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Inline/Format.php /^ protected function saveValueFormat(array $field)$/;" f +save_authcode ../../../src/Includes/install/install.php /^function save_authcode(&$params) {$/;" f +save_config ../../../src/Includes/install/install.php /^function save_config($content)$/;" f +saved ../../../src/classes/XLite/Module/CDev/ProductOptions/View/Product.php /^ $saved = \\XLite\\Core\\Session::getInstance()->saved_invalid_options;$/;" v +savedData ../../../src/classes/XLite/View/Model/AModel.php /^ $this->savedData = $this->getSavedForm(self::SAVED_FORM_DATA);$/;" v +savedData ../../../src/classes/XLite/View/Model/AModel.php /^ $savedData = $this->getSavedForms();$/;" v +savedData ../../../src/classes/XLite/View/Model/AModel.php /^ protected $savedData = null;$/;" v +savedPath ../../../src/classes/XLite/Model/Base/Storage.php /^ $savedPath = $this->getPath();$/;" v +savedRequestParams ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ $this->savedRequestParams = array();$/;" v +savedRequestParams ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ $this->savedRequestParams = \\XLite\\Core\\Session::getInstance()->get($/;" v +savedRequestParams ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ protected $savedRequestParams;$/;" v +savedValue ../../../src/Includes/Utils/Operator.php /^ $savedValue = @ini_get('max_execution_time');$/;" v +savepointsNotSupported ../../../src/lib/Doctrine/DBAL/ConnectionException.php /^ public static function savepointsNotSupported()$/;" f +sb ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $sb = $b->getMethod();$/;" v +scalar ../../../src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php /^ $scalar = $this->getQuery()->getSingleScalarResult();$/;" v +scalar ../../../src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php /^ $scalar = null;$/;" v +scalar ../../../src/lib/Symfony/Component/Yaml/Inline.php /^ $scalar = trim($scalar);$/;" v +scalarExpressions ../../../src/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php /^ $this->scalarExpressions = $scalarExpressions;$/;" v +scalarExpressions ../../../src/lib/Doctrine/ORM/Query/AST/CoalesceExpression.php /^ public $scalarExpressions = array();$/;" v +scalarExpressions ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $scalarExpressions = array();$/;" v +scalarExpressions ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $scalarExpressions = array();$/;" v +scalarMappings ../../../src/lib/Doctrine/ORM/Query/ResultSetMapping.php /^ public $scalarMappings = array();$/;" v +scalars ../../../src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php /^ $scalars = $rowData['scalars'];$/;" v +scalars ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $scalars = $rowData['scalars'];$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ $scale = 0;$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $scale = $tableColumn['scale'];$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $scale = false;$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $scale = $match[2];$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $scale = null;$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $scale = $tableColumn['data_scale'];$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $scale = 0;$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $scale = $tableColumn['data_scale'];$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $scale = null;$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $scale = $match[2];$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $scale = null;$/;" v +scale ../../../src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php /^ $scale = null;$/;" v +scale ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $scale = 0;$/;" v +scan ../../../src/lib/Doctrine/Common/Lexer.php /^ protected function scan($input)$/;" f +scheduleCollectionDeletion ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleCollectionDeletion(PersistentCollection $coll)$/;" f +scheduleExtraUpdate ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleExtraUpdate($entity, array $changeset)$/;" f +scheduleForDelete ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleForDelete($entity)$/;" f +scheduleForDirtyCheck ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleForDirtyCheck($entity)$/;" f +scheduleForInsert ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleForInsert($entity)$/;" f +scheduleForUpdate ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleForUpdate($entity)$/;" f +scheduleOrphanRemoval ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function scheduleOrphanRemoval($entity)$/;" f +scheduledForDirtyCheck ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $this->scheduledForDirtyCheck =$/;" v +scheduledForDirtyCheck ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ private $scheduledForDirtyCheck = array();$/;" v +schema ../../../src/Includes/Utils/ModulesManager.php /^ $schema = $tool->getCreateSchemaSql(array($metadata));$/;" v +schema ../../../src/classes/XLite/Controller/Console/Db.php /^ $schema = \\XLite\\Core\\Database::getInstance()->getDBSchema($type);$/;" v +schema ../../../src/classes/XLite/Controller/Console/Db.php /^ $schema = \\XLite\\Core\\Database::getInstance()->getDBSchema(\\XLite\\Core\\Database::SCHEMA_CREATE);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = $this->$postprocessMethod($schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = null;$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^DROP TABLE (\\S+)\/Ss', 'DROP TABLE IF EXISTS `$1`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = $this->postprocessAlterSchemaTable($schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = $this->postprocessCreateSchemaTable($schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = array($/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^(CREATE (?:UNIQUE )?INDEX [^(]+ \\()([^,)]+)\/Ss', '$1`$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^(CREATE (?:UNIQUE )?INDEX [^(]+ \\(.+, *)([^`,)]+)\/Ss', '$1`$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^(CREATE (?:UNIQUE )?INDEX) (\\S+) ON ([^\\s(]+)\/Ss', '$1 `$2` ON `$3`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^DROP INDEX (\\S+) ON (\\S+)\/Ss', 'DROP INDEX `$1` ON `$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = $this->getDBSchema();$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = explode(PHP_EOL, $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace($/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/ (DROP(?: FOREIGN KEY)?) ([a-z][^\\s,`]+)(,)? \/Ss', ' $1 `$2`$3 ', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/ ADD ([a-z]\\S+) \/Ss', ' ADD `$1` ', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/ CHANGE ([a-z]\\S+) (\\S+) \/Ss', ' CHANGE `$1` `$2` ', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/ REFERENCES (\\S+) *\\(([^,)]+)\/Ss', ' REFERENCES `$1` (`$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/( FOREIGN KEY \\()([^,)]+)\/Ss', '$1`$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/( FOREIGN KEY \\(.+,)([^`,)]+)\/Ss', '$1`$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/( REFERENCES \\S+ \\(.+,)([^`,)]+)\/Ss', '$1`$2`', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/ALTER TABLE (\\S+) \/USs', 'ALTER TABLE `$1` ', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^ALTER TABLE `\\S+` ADD PRIMARY KEY \\(\\S+\\)$\/Ss', '', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Database.php /^ $schema = preg_replace('\/^ALTER TABLE `\\S+` DROP PRIMARY KEY$\/Ss', '', $schema);$/;" v +schema ../../../src/classes/XLite/Core/Marketplace.php /^ $schema = $this->getSchemaResponseForCheckAddonKeyAction();$/;" v +schema ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $schema = preg_replace($/;" v +schema ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $schema = preg_replace($pattern, $replace, $schema);$/;" v +schema ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $schema = preg_grep($/;" v +schema ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $schema = preg_replace($/;" v +schema ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $schema = preg_replace($/;" v +schema ../../../src/classes/XLite/Model/Repo/FormId.php /^ $schema = preg_grep('\/DROP FOREIGN KEY `?formid_to_session`?\/Ss', $schema, PREG_GREP_INVERT);$/;" v +schema ../../../src/classes/XLite/Model/Repo/FormId.php /^ $schema = parent::processSchema($schema, $type);$/;" v +schema ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ $schema = preg_grep('\/DROP FOREIGN KEY `?session_cell_to_session`?\/Ss', $schema, PREG_GREP_INVERT);$/;" v +schema ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ $schema = parent::processSchema($schema, $type);$/;" v +schema ../../../src/classes/XLite/Model/WidgetParam/ObjectId.php /^ $schema = parent::getValidaionSchema($value);$/;" v +schema ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $schema = $this->accessSchema;$/;" v +schema ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $schema = $this->mainSchema;$/;" v +schema ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $schema = \\Includes\\Utils\\ArrayManager::filterByKeys($schema, static::$mainSchemaRemovedFields, true);$/;" v +schema ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->schema = $schema;$/;" v +schema ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $schema;$/;" v +schema ../../../src/classes/XLite/View/Address.php /^ protected $schema = array($/;" v +schema ../../../src/classes/XLite/View/Model/AModel.php /^ $schema = 'schema' . ucfirst($name);$/;" v +schema ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php /^ $schema = $conn->getSchemaManager()->createSchema();$/;" v +schema ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $schema;$/;" v +schema ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $schema = array_merge($schema, (array) \\Symfony\\Component\\Yaml\\Yaml::parse($file));$/;" v +schema ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $schema = array_merge($schema, (array) \\Symfony\\Component\\Yaml\\Yaml::parse($path));$/;" v +schema ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $schema = array();$/;" v +schema ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $schema = $sm->createSchema();$/;" v +schema ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $schema = $this->getSchemaFromMetadata($classes);$/;" v +schema ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $schema = new \\Doctrine\\DBAL\\Schema\\Schema(array(), array(), $metadataSchemaConfig);$/;" v +schemaAddress ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ protected $schemaAddress = array($/;" v +schemaConfig ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $schemaConfig = new SchemaConfig();$/;" v +schemaConfig ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $schemaConfig = new SchemaConfig();$/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/Model/Order/FulfillmentStatus.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/Model/Order/PaymentStatus.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/Conversations/View/Model/Conversation.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/OrderTags/View/Model/Order/Tag.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/Places/View/Model/Place.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/Places/View/Model/PlaceProcessor/Facebook.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/Suppliers/View/Model/Supplier.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php /^ protected $schemaDefault = array($/;" v +schemaDefault ../../../src/classes/XLite/View/Model/DataSource/Ecwid.php /^ protected $schemaDefault = array($/;" v +schemaDiff ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $schemaDiff = $comparator->compare($fromSchema, $this);$/;" v +schemaDiff ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $schemaDiff = $comparator->compare($this, $toSchema);$/;" v +schemaDiff ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $schemaDiff = $comparator->compare($fromSchema, $toSchema);$/;" v +schemaFileName ../../../src/classes/XLite/Core/Database.php /^ $schemaFileName = is_dir($path)$/;" v +schemaHidden ../../../src/classes/XLite/View/Model/AModel.php /^ protected $schemaHidden = array();$/;" v +schemaInSyncWithMetadata ../../../src/lib/Doctrine/ORM/Tools/SchemaValidator.php /^ public function schemaInSyncWithMetadata()$/;" f +schemaMain ../../../src/classes/XLite/View/Order/Details/Admin/Model.php /^ protected $schemaMain = array($/;" v +schemaName ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $schemaName = $this->_em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\\\' . $simpleClassName;$/;" v +schemaName ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $schemaName = ltrim($this->_lexer->token['value'], '\\\\');$/;" v +schemaTool ../../../src/lib/Doctrine/ORM/Tools/SchemaValidator.php /^ $schemaTool = new SchemaTool($this->em);$/;" v +schemas ../../../src/classes/XLite/Core/Database.php /^ $schemas = array_merge($schemas, $schema);$/;" v +schemas ../../../src/classes/XLite/Core/Database.php /^ $schemas = static::getRepo($cmd->name)->processSchema($schemas, $mode);$/;" v +schemas ../../../src/classes/XLite/Core/Database.php /^ $schemas = array_map('trim', $schemas);$/;" v +schemas ../../../src/classes/XLite/Core/Database.php /^ $schemas = preg_grep('\/^.+$\/Ss', $schemas);$/;" v +schemas ../../../src/classes/XLite/Core/Database.php /^ $schemas = array();$/;" v +schemes ../../../src/lib/PEAR2/HTTP/Request/Uri.php /^ protected $schemes = array($/;" v +scid ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Supplier.php /^ $scid = intval(\\XLite\\Core\\Request::getInstance()->scid);$/;" v +scope ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $scope = $this->getJSScope($file['file']);$/;" v +scope ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->scope = $scope;$/;" v +scope ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $scope;$/;" v +scope ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->scope = $scope;$/;" v +scope ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public $scope;$/;" v +scopeParams ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $scopeParams = isset($params['scope']) ? $params['scope'] : null;$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $scopes = array_merge($val['scope'], $scopes);$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $scopes = $this->scopes;$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $scopes = array();$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $this->scopes = is_string($scopes) ? explode(" ", $scopes) : $scopes;$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ protected $scopes = array();$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes);$/;" v +scopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ public $scopes;$/;" v +score ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->score = $score;$/;" v +score ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $score;$/;" v +score ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->score = $score;$/;" v +score ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $score;$/;" v +scraps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->scraps = new ScrapsServiceResource($this, $this->serviceName, 'scraps', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/orkut"], "request": {"$ref": "Activity"}, "response": {"$ref": "Activity"}, "httpMethod": "POST", "path": "activities\/scraps", "id": "orkut.scraps.insert"}}}', true));$/;" v +scraps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $scraps;$/;" v +script_body ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $script_body = substr($this->source, $script_start, $script_end-$script_start);$/;" v +script_end ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $script_end = $token['start'];$/;" v +script_start ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $script_start = $token['end'];$/;" v +script_start ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $script_start = null;$/;" v +script_start ../../../src/classes/XLite/Core/FlexyCompiler.php /^ static $script_start = null;$/;" v +scriptsToReview ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ $scriptsToReview = array();$/;" v +search ../../../src/classes/XLite/Core/Database.php /^ $search = array("\\x00", "\\x0a", "\\x0d", "\\x1a");$/;" v +search ../../../src/classes/XLite/Model/Repo/Currency.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Model/Repo/Module.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Model/Repo/Order.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Model/Repo/Product.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Model/Repo/Profile.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/FulfillmentStatus.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/PaymentStatus.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Repo/Order/Tag.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function search($query, $optParams = array()) {$/;" f +search ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ public function search($query, $offset = 0, $limit = 1000000, array $params = array())$/;" f +search ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function search($query, $offset = 0, $limit = 10, $params = array(), $method = self::METHOD_GET)$/;" f +search ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function search($query, $offset = 0, $limit = 10, $params = array(), $method = Apache_Solr_Service::METHOD_GET)$/;" f +search ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +search ../../../src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php /^ public function search(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +searchAllInArraysArray ../../../src/Includes/Utils/ArrayManager.php /^ public static function searchAllInArraysArray(array $array, $field, $value)$/;" f +searchAllInObjectsArray ../../../src/Includes/Utils/ArrayManager.php /^ public static function searchAllInObjectsArray(array $array, $field, $value, $isGetter = true)$/;" f +searchBySolr ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ public function searchBySolr(\\XLite\\Core\\CommonCell $cnd, $countOnly = false)$/;" f +searchCount ../../../src/classes/XLite/Model/Repo/Currency.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Model/Repo/Product.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/FulfillmentStatus.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/PaymentStatus.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Repo/Order/Tag.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchCount ../../../src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php /^ public function searchCount(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchInArraysArray ../../../src/Includes/Utils/ArrayManager.php /^ public static function searchInArraysArray(array $array, $field, $value)$/;" f +searchInObjectsArray ../../../src/Includes/Utils/ArrayManager.php /^ public static function searchInObjectsArray(array $array, $field, $value, $isGetter = true)$/;" f +searchInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->searchInfo = $searchInfo;$/;" v +searchInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $searchInfo;$/;" v +searchInformation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->searchInformation = $searchInformation;$/;" v +searchInformation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $searchInformation;$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/OrderList.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/OrderList.php /^ $searchParams = \\XLite\\View\\ItemsList\\Model\\Order\\Admin\\Search::getSearchParams();$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/OrderList.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/OrderList.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->{\\XLite\\View\\ItemsList\\Model\\Order\\Admin\\Search::getSessionCellName()};$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/ProductList.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/ProductList.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Controller/Admin/ProductList.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()$/;" v +searchParams ../../../src/classes/XLite/Controller/Customer/Search.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Controller/Customer/Search.php /^ $searchParams = \\XLite\\View\\ItemsList\\Product\\Customer\\Search::getSearchParams();$/;" v +searchParams ../../../src/classes/XLite/Controller/Customer/Search.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Controller/Customer/Search.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/OrderFulfillmentStatuses.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/OrderFulfillmentStatuses.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/OrderFulfillmentStatuses.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/OrderPaymentStatuses.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/OrderPaymentStatuses.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/OrderPaymentStatuses.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SupplierOrders.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SupplierOrders.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SupplierOrders.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SupplierOrders.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Suppliers.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Suppliers.php /^ $searchParams = \\XLite\\Module\\CDev\\Aggregator\\View\\ItemsList\\Supplier\\Customer\\Search::getSearchParams();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Suppliers.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Suppliers.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Admin/Conversations.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Admin/Conversations.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Admin/Conversations.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Customer/Conversations.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Customer/Conversations.php /^ $searchParams = \\XLite\\Module\\CDev\\Conversations\\View\\ItemsList\\Customer\\Conversation::getSearchParams();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Customer/Conversations.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Customer/Conversations.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/ProductList.php /^ $searchParams = \\XLite\\View\\ItemsList\\Model\\Product\\Admin\\Search::getSearchParams();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/OrderTags/Controller/Admin/OrderTags.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/OrderTags/Controller/Admin/OrderTags.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/OrderTags/Controller/Admin/OrderTags.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Places/Controller/Admin/Places.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Places/Controller/Admin/Places.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Places/Controller/Admin/Places.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/ProductTranslators/Controller/Admin/ProductTranslations.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/ProductTranslators/Controller/Admin/ProductTranslations.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Suppliers.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Suppliers.php /^ $searchParams = $this->getConditions();$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Suppliers.php /^ $searchParams = \\XLite\\Core\\Session::getInstance()->$cellName;$/;" v +searchParams ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Suppliers.php /^ $searchParams = array();$/;" v +searchParams ../../../src/classes/XLite/View/ItemsList/Profile/Admin/Search.php /^ $this->searchParams = array($/;" v +searchParams ../../../src/classes/XLite/View/ItemsList/Profile/Admin/Search.php /^ protected $searchParams;$/;" v +searchRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->searchRequest = $searchRequest;$/;" v +searchRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $searchRequest;$/;" v +searchResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->searchResponse = $searchResponse;$/;" v +searchResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $searchResponse;$/;" v +searchResult ../../../src/Includes/DataStructure/Graph.php /^ $searchResult = array();$/;" v +searchResult ../../../src/classes/XLite/Model/Repo/Currency.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Model/Repo/Product.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/FulfillmentStatus.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order/PaymentStatus.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Conversation.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/Conversations/Model/Repo/Message.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Repo/Order/Tag.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/Places/Model/Repo/Place.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Supplier.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchResult ../../../src/classes/XLite/Module/CDev/UserPermissions/Model/Repo/Role.php /^ public function searchResult(\\Doctrine\\ORM\\QueryBuilder $qb)$/;" f +searchTerms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->searchTerms = $searchTerms;$/;" v +searchTerms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $searchTerms;$/;" v +searchTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->searchTime = $searchTime;$/;" v +searchTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $searchTime;$/;" v +searchType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->searchType = $searchType;$/;" v +searchType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $searchType;$/;" v +searchWords ../../../src/classes/XLite/Model/Repo/Module.php /^ $searchWords = $this->getSearchWords($value);$/;" v +searchWords ../../../src/classes/XLite/Model/Repo/Product.php /^ $searchWords = $this->getSearchWords($value);$/;" v +searchWords ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $searchWords = $this->getSearchWords($value);$/;" v +search_text ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $search_text = 'action=';$/;" v +searcherValue ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $searcherValue = $waitSearcher ? 'true' : 'false';$/;" v +second ../../../src/classes/XLite/View/Controller.php /^ $second = $this->isSidebarSecondVisible();$/;" v +secondExpression ../../../src/lib/Doctrine/ORM/Query/AST/NullIfExpression.php /^ $this->secondExpression = $secondExpression;$/;" v +secondExpression ../../../src/lib/Doctrine/ORM/Query/AST/NullIfExpression.php /^ public $secondExpression;$/;" v +secondExpression ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $secondExpression = $this->ScalarExpression();$/;" v +secondExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $secondExpression = is_string($nullIfExpression->secondExpression) $/;" v +secondSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php /^ $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();$/;" v +secondSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/ModFunction.php /^ public $secondSimpleArithmeticExpression;$/;" v +secondSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php /^ $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();$/;" v +secondSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php /^ public $secondSimpleArithmeticExpression = null;$/;" v +secondStringPriamry ../../../src/lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php /^ public $secondStringPriamry;$/;" v +secondStringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php /^ $this->secondStringPrimary = $parser->StringPrimary();$/;" v +secondStringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php /^ $this->secondStringPrimary = $parser->StringPrimary();$/;" v +secondStringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php /^ public $secondStringPrimary;$/;" v +secret ../../../src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php /^ $secret = md5($/;" v +secretWord ../../../src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php /^ $secretWord = \\XLite\\Core\\Request::getInstance()->secret_word;$/;" v +section ../../../src/classes/XLite/Model/Role/Permission.php /^ protected $section;$/;" v +section ../../../src/classes/XLite/Module/CDev/UserPermissions/View/FormField/Permissions.php /^ $section = $perm->getSection();$/;" v +sectionTitle ../../../src/classes/XLite/View/Model/AModel.php /^ $sectionTitle = $data[self::SECTION_PARAM_WIDGET]->getLabel();$/;" v +sections ../../../src/Includes/install/install.php /^ $sections = array($/;" v +sections ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ protected $sections = array($/;" v +sections ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/Product.php /^ $this->sections = array_merge($this->sections, $sections, static::$fields);$/;" v +sections ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $this->sections = array_merge($this->sections, $sections, $additional);$/;" v +sections ../../../src/classes/XLite/View/Model/AModel.php /^ $this->sections = \\Includes\\Utils\\ArrayManager::filterByKeys($this->sections, $sections);$/;" v +sections ../../../src/classes/XLite/View/Model/AModel.php /^ protected $sections = array($/;" v +sections ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $this->sections = $this->getProfileMainSections() + $this->sections;$/;" v +sections ../../../src/classes/XLite/View/Model/Profile/Main.php /^ $this->sections = $this->getProfileMainSections() + $this->sections;$/;" v +sections ../../../src/classes/XLite/View/SectionDialog.php /^ $sections = $this->defineSections();$/;" v +secure ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ $secure = true;$/;" v +securityHeader ../../../src/Includes/install/install.php /^ $securityHeader = "\\n";$/;" v +securityHeader ../../../src/classes/XLite/Logger.php /^ protected $securityHeader = '';$/;" v +seek ../../../src/classes/XLite/Core/DataSource/Ecwid/Categories.php /^ public function seek($position)$/;" f +seek ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ public function seek($position)$/;" f +seek ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ public function seek($position)$/;" f +seek ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ public function seek($position)$/;" f +segment ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->segment = $segment;$/;" v +segment ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $segment;$/;" v +segmentId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->segmentId = $segmentId;$/;" v +segmentId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $segmentId;$/;" v +segments ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $segments = array($/;" v +segments ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $segments = explode(".", $jwt);$/;" v +select ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function select($select = null)$/;" f +select ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function select($select = null)$/;" f +selectClause ../../../src/lib/Doctrine/ORM/Query/AST/SelectStatement.php /^ $this->selectClause = $selectClause;$/;" v +selectClause ../../../src/lib/Doctrine/ORM/Query/AST/SelectStatement.php /^ public $selectClause;$/;" v +selectExpressions ../../../src/lib/Doctrine/ORM/Query/AST/SelectClause.php /^ $this->selectExpressions = $selectExpressions;$/;" v +selectExpressions ../../../src/lib/Doctrine/ORM/Query/AST/SelectClause.php /^ public $selectExpressions = array();$/;" v +selectExpressions ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $selectExpressions = array();$/;" v +selectNone ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ $selectNone = true;$/;" v +selectNone ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ $selectNone = false;$/;" v +selectStatement ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $selectStatement = new AST\\SelectStatement($this->SelectClause(), $this->FromClause());$/;" v +selected ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $selected = $class;$/;" v +selected ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $selected = null;$/;" v +selected ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductOptions.php /^ $selected = $this->getParam(self::PARAM_SELECTED_OPTIONS);$/;" v +selected ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->selected = $selected;$/;" v +selected ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $selected;$/;" v +selectedRate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $selectedRate = $rate;$/;" v +selectedRate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $selectedRate = null;$/;" v +selectedRate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $this->selectedRate = $rate;$/;" v +selectedRate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ protected $selectedRate;$/;" v +selectedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->selectedText = $selectedText;$/;" v +selectedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $selectedText;$/;" v +selects ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $selects = is_array($select) ? $select : func_get_args();$/;" v +selects ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $selects = is_array($select) ? $select : func_get_args();$/;" v +self ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->self = $self;$/;" v +self ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $self;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->selfLink = $selfLink;$/;" v +selfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $selfLink;$/;" v +selfReferential ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $selfReferential = ($mapping['targetEntity'] == $mapping['sourceEntity']);$/;" v +sellerNetwork ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->sellerNetwork = $sellerNetwork;$/;" v +sellerNetwork ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $sellerNetwork;$/;" v +semanticalError ../../../src/lib/Doctrine/Common/Annotations/AnnotationException.php /^ public static function semanticalError($message)$/;" f +semanticalError ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $semanticalError = 'Invalid PathExpression. ';$/;" v +semanticalError ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ public function semanticalError($message = '', $token = null)$/;" f +semanticalError ../../../src/lib/Doctrine/ORM/Query/QueryException.php /^ public static function semanticalError($message)$/;" f +send ../../../src/classes/XLite/Model/Order.php /^ $send = \\XLite\\Core\\Config::getInstance()->Email->enable_init_order_notif$/;" v +send ../../../src/classes/XLite/Module/CDev/Demo/View/Mailer.php /^ public function send()$/;" f +send ../../../src/classes/XLite/View/Mailer.php /^ public function send()$/;" f +sendAck ../../../src/classes/XLite/Core/EventDriver/AMQP.php /^ public function sendAck(\\AMQPMessage $message)$/;" f +sendAck ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP/Handler.php /^ protected function sendAck(\\AMQPMessage $msg)$/;" f +sendApproveMessage ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ public function sendApproveMessage()$/;" f +sendByEmail ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ protected function sendByEmail()$/;" f +sendByPrint ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ protected function sendByPrint()$/;" f +sendCreateProfileNotifications ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function sendCreateProfileNotifications($password)$/;" f +sendCreateProfileNotifications ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Checkout.php /^ protected function sendCreateProfileNotifications($password)$/;" f +sendCreateSupplierAdmin ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Mailer.php /^ public static function sendCreateSupplierAdmin(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier)$/;" f +sendFailMail ../../../src/classes/XLite/Model/Order.php /^ protected function sendFailMail()$/;" f +sendFailedAdminLoginNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendFailedAdminLoginNotification($postedLogin)$/;" f +sendFailedOrder ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendFailedOrder(\\XLite\\Model\\Order $order)$/;" f +sendFailedOrderAdmin ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendFailedOrderAdmin()$/;" f +sendFailedOrderCustomer ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendFailedOrderCustomer(\\XLite\\Model\\Order $order)$/;" f +sendHeaders ../../../src/classes/XLite/View/Controller.php /^ public static function sendHeaders()$/;" f +sendLowLimitNotification ../../../src/classes/XLite/Model/Inventory.php /^ protected function sendLowLimitNotification()$/;" f +sendMessageDenyNotification ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->sendMessageDenyNotification = $sendMessageDenyNotification;$/;" v +sendMessageDenyNotification ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $sendMessageDenyNotification;$/;" v +sendMessageNotification ../../../src/classes/XLite/Module/CDev/Conversations/Core/Mailer.php /^ public static function sendMessageNotification(\\XLite\\Module\\CDev\\Conversations\\Model\\Message $message, $email)$/;" f +sendMoneybookersActivation ../../../src/classes/XLite/Module/CDev/Moneybookers/Core/Mailer.php /^ public static function sendMoneybookersActivation()$/;" f +sendNotifacations ../../../src/classes/XLite/Module/CDev/Conversations/Model/Message.php /^ public function sendNotifacations()$/;" f +sendNotification ../../../src/Includes/SafeMode.php /^ protected static function sendNotification()$/;" f +sendOrderCreated ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendOrderCreated(\\XLite\\Model\\Order $order)$/;" f +sendOrderCreatedAdmin ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendOrderCreatedAdmin()$/;" f +sendOrderCreatedCustomer ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendOrderCreatedCustomer($login)$/;" f +sendOrderCreatedSupplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Mailer.php /^ public static function sendOrderCreatedSupplier(\\XLite\\Model\\Order $order)$/;" f +sendProcessMail ../../../src/classes/XLite/Model/Order.php /^ protected function sendProcessMail()$/;" f +sendProcessOrder ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProcessOrder(\\XLite\\Model\\Order $order)$/;" f +sendProcessOrderAdmin ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProcessOrderAdmin()$/;" f +sendProcessOrderCustomer ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProcessOrderCustomer(\\XLite\\Model\\Order $order)$/;" f +sendProfileCreatedAdminNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProfileCreatedAdminNotification(\\XLite\\Model\\Profile $profile)$/;" f +sendProfileCreatedUserNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProfileCreatedUserNotification(\\XLite\\Model\\Profile $profile, $password = null)$/;" f +sendProfileDeletedAdminNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProfileDeletedAdminNotification($userLogin)$/;" f +sendProfileUpdatedAdminNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProfileUpdatedAdminNotification(\\XLite\\Model\\Profile $profile)$/;" f +sendProfileUpdatedUserNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendProfileUpdatedUserNotification(\\XLite\\Model\\Profile $profile)$/;" f +sendRecoverPasswordConfirmation ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendRecoverPasswordConfirmation($userLogin, $userPassword)$/;" f +sendRecoverPasswordRequest ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendRecoverPasswordRequest($userLogin, $userPassword)$/;" f +sendRequest ../../../src/classes/XLite/Core/HTTP/Request.php /^ public function sendRequest()$/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request.php /^ public function sendRequest() $/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public function sendRequest() $/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ public function sendRequest() $/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request/Adapter/Filesystem.php /^ public function sendRequest() $/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request/Adapter/Http.php /^ public function sendRequest() $/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ public function sendRequest()$/;" f +sendRequest ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpstream.php /^ public function sendRequest()$/;" f +sendRequestToMarketplace ../../../src/classes/XLite/Core/Marketplace.php /^ protected function sendRequestToMarketplace($action, array $data = array())$/;" f +sendRequestToMarketplace ../../../src/classes/XLite/Module/CDev/Demo/Core/Marketplace.php /^ protected function sendRequestToMarketplace($action, array $data = array())$/;" f +sendSafeModeAccessKeyNotification ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendSafeModeAccessKeyNotification($key)$/;" f +sendString ../../../src/lib/PHPMailer/class.pop3.php /^ private function sendString ($string) {$/;" f +sendSupplierApprove ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Mailer.php /^ public static function sendSupplierApprove(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier, $password)$/;" f +sendSupplierOrder ../../../src/classes/XLite/Module/CDev/Suppliers/Core/Mailer.php /^ public static function sendSupplierOrder(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier, array $quantities, $email)$/;" f +sendTestEmail ../../../src/classes/XLite/Core/Mailer.php /^ public static function sendTestEmail($from, $to, $body = '')$/;" f +sendmail ../../../src/lib/PHPMailer/class.phpmailer.php /^ $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));$/;" v +sendmail ../../../src/lib/PHPMailer/class.phpmailer.php /^ $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));$/;" v +sensitiveCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->sensitiveCategories = $sensitiveCategories;$/;" v +sensitiveCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $sensitiveCategories;$/;" v +sentFilesize ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ $this->sentFilesize = true;$/;" v +sentFilesize ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ $this->sentFilesize = false;$/;" v +sentFilesize ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ protected $sentFilesize = false;$/;" v +sentFilesize ../../../src/lib/PEAR2/HTTP/Request/Adapter/Http.php /^ protected $sentFilesize = false;$/;" v +separator ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $separator = \\XLite\\Core\\Converter::getCleanURLSeparator();$/;" v +separator ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $separator = '|' == $separator ? "\\n" : ' ';$/;" v +seq ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $seq = new Sequence($sequenceName, $allocationSize, $initialValue);$/;" v +seqDef ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $seqDef = $class->sequenceGeneratorDefinition;$/;" v +seqGenerator ../../../src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php /^ $seqGenerator = $idElement->{'sequence-generator'};$/;" v +seqName ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $seqName = $diff->name . '_' . $oldColumnName . '_seq';$/;" v +seqName ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $seqName = strtolower($sequence->getName());$/;" v +seqName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $seqName = $this->targetPlatform instanceof Platforms\\PostgreSQLPlatform ?$/;" v +sequence ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $sequence = mt_rand(1, 1000);$/;" v +sequence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->sequence = $sequence;$/;" v +sequence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $sequence;$/;" v +sequence ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sequence = $sequence->getQuotedName($this);$/;" v +sequence ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sequence = new \\Doctrine\\DBAL\\Schema\\Sequence($sequenceName, $start);$/;" v +sequence ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $sequence = $sequence->getQuotedName($this);$/;" v +sequence ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $sequence = \\array_change_key_case($sequence, CASE_LOWER);$/;" v +sequenceAlreadyExists ../../../src/lib/Doctrine/DBAL/Schema/SchemaException.php /^ static public function sequenceAlreadyExists($sequenceName)$/;" f +sequenceDoesNotExist ../../../src/lib/Doctrine/DBAL/Schema/SchemaException.php /^ static public function sequenceDoesNotExist($sequenceName)$/;" f +sequenceGenerator ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $sequenceGenerator = array();$/;" v +sequenceGenerator ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $sequenceGenerator = new \\Doctrine\\ORM\\Id\\SequenceGenerator($/;" v +sequenceGenerator ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $sequenceGenerator = array();$/;" v +sequenceGeneratorDefinition ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $this->sequenceGeneratorDefinition = $definition;$/;" v +sequenceGeneratorDefinition ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $sequenceGeneratorDefinition;$/;" v +sequenceName ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sequenceName = $table . '_SEQ';$/;" v +sequenceName ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $sequenceName = $sequence['relname'];$/;" v +sequenceName ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $sequenceName = $sequence['schemaname'] . "." . $sequence['relname'];$/;" v +sequenceName ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $sequenceName = strtolower($sequenceName);$/;" v +sequenceName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $sequenceName = $class->getTableName() . '_' . $class->getSingleIdentifierColumnName() . '_seq';$/;" v +sequenceName ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $sequenceName;$/;" v +sequences ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sequences = $this->listSequences();$/;" v +sequences ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sequences = $this->_conn->fetchAll($sql);$/;" v +sequences ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sequences = array();$/;" v +serialize ../../../src/lib/Doctrine/ORM/Id/SequenceGenerator.php /^ public function serialize()$/;" f +serialized ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $serialized = array($/;" v +series ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->series = new SeriesServiceResource($this, $this->serviceName, 'series', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "request": {"$ref": "Series"}, "response": {"$ref": "Series"}, "httpMethod": "POST", "path": "series", "id": "moderator.series.insert"}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "id": "moderator.series.get", "httpMethod": "GET", "path": "series\/{seriesId}", "response": {"$ref": "Series"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"max-results": {"format": "uint32", "type": "integer", "location": "query"}, "q": {"type": "string", "location": "query"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}}, "response": {"$ref": "SeriesList"}, "httpMethod": "GET", "path": "series", "id": "moderator.series.list"}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Series"}, "id": "moderator.series.update", "httpMethod": "PUT", "path": "series\/{seriesId}", "response": {"$ref": "Series"}}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Series"}, "id": "moderator.series.patch", "httpMethod": "PATCH", "path": "series\/{seriesId}", "response": {"$ref": "Series"}}}}', true));$/;" v +series ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $series;$/;" v +seriesId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->seriesId = $seriesId;$/;" v +seriesId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $seriesId;$/;" v +series_responses ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->series_responses = new SeriesResponsesServiceResource($this, $this->serviceName, 'responses', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"max-results": {"format": "uint32", "type": "integer", "location": "query"}, "sort": {"type": "string", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "author": {"type": "string", "location": "query"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}, "q": {"type": "string", "location": "query"}, "hasAttachedVideo": {"type": "boolean", "location": "query"}}, "id": "moderator.series.responses.list", "httpMethod": "GET", "path": "series\/{seriesId}\/responses", "response": {"$ref": "SeriesList"}}}}', true));$/;" v +series_responses ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $series_responses;$/;" v +series_submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->series_submissions = new SeriesSubmissionsServiceResource($this, $this->serviceName, 'submissions', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"lang": {"type": "string", "location": "query"}, "max-results": {"format": "uint32", "type": "integer", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "author": {"type": "string", "location": "query"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}, "includeVotes": {"type": "boolean", "location": "query"}, "sort": {"type": "string", "location": "query"}, "q": {"type": "string", "location": "query"}, "hasAttachedVideo": {"type": "boolean", "location": "query"}}, "id": "moderator.series.submissions.list", "httpMethod": "GET", "path": "series\/{seriesId}\/submissions", "response": {"$ref": "SubmissionList"}}}}', true));$/;" v +series_submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $series_submissions;$/;" v +server ../../../src/classes/XLite/Core/Converter.php /^ $server = $server->getTimezone()->getOffset($server);$/;" v +server ../../../src/classes/XLite/Core/Converter.php /^ $server = new \\DateTime();$/;" v +server ../../../src/classes/XLite/Module/CDev/Qiwi/Core/QiwiSoapServer.php /^ $this->server = new \\SoapServer(LC_DIR_CLASSES . static::CLIENT_WSDL_PATH);$/;" v +server ../../../src/classes/XLite/Module/CDev/Qiwi/Core/QiwiSoapServer.php /^ protected $server;$/;" v +server ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $server = new \\XLite\\Module\\CDev\\Qiwi\\Core\\QiwiSoapServer();$/;" v +serverMillis ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->serverMillis = $serverMillis;$/;" v +serverMillis ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $serverMillis;$/;" v +servers ../../../src/classes/XLite/Core/Database.php /^ $servers = explode(';', $options['servers']);$/;" v +service ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator/Google.php /^ protected static $service;$/;" v +service ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $service = array_merge($service, $val);$/;" v +service ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $service = $this->prepareService();$/;" v +service ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $service = array();$/;" v +service ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $this->service = $service;$/;" v +service ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ private $service;$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_writeableServices[$id];$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_readableServices[$id];$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_writeableServices[$id];$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_selectReadService();$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_selectReadService(true);$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_selectWriteService(true);$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_selectReadService();$/;" v +service ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ $service = $this->_selectWriteService();$/;" v +serviceAccountName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $this->serviceAccountName = $serviceAccountName;$/;" v +serviceAccountName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ public $serviceAccountName;$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->serviceName = 'adexchangebuyer';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->serviceName = 'adsense';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->serviceName = 'adsensehost';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->serviceName = 'analytics';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->serviceName = 'bigquery';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->serviceName = 'blogger';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->serviceName = 'books';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->serviceName = 'calendar';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->serviceName = 'customsearch';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->serviceName = 'drive';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ $this->serviceName = 'freebase';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->serviceName = 'gan';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->serviceName = 'groupssettings';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ $this->serviceName = 'latitude';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->serviceName = 'moderator';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->serviceName = 'oauth2';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->serviceName = 'orkut';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->serviceName = 'pagespeedonline';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->serviceName = 'plus';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->serviceName = 'prediction';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->serviceName = 'shopping';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->serviceName = 'siteVerification';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->serviceName = 'tasks';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ $this->serviceName = 'translate';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->serviceName = 'urlshortener';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ $this->serviceName = 'webfonts';$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $this->serviceName = $serviceName;$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ private $serviceName;$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $serviceName = $xml->getArrayByPath($v, '#\/MailService\/0\/#');$/;" v +serviceName ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $serviceName = $xml->getArrayByPath($v, '#\/SvcDescription\/0\/#');$/;" v +service_name ../../../src/classes/XLite/Model/Payment/Method.php /^ protected $service_name;$/;" v +services ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ protected $services = array();$/;" v +session ../../../src/Includes/Utils/URLManager.php /^ $session = \\XLite\\Core\\Session::getInstance();$/;" v +session ../../../src/classes/XLite/Core/Auth.php /^ $session = \\XLite\\Core\\Session::getInstance();$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $this->session = \\XLite\\Core\\Database::getEM()->merge($this->session);$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $this->session = null;$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $this->session = $session;$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $this->session = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Session')->findOneBySid($sid);$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $session = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Session')->findOneBy($/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $this->session = new \\XLite\\Model\\Session();$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ $this->session = null;$/;" v +session ../../../src/classes/XLite/Core/Session.php /^ protected $session;$/;" v +sessionCell ../../../src/classes/XLite/Controller/Customer/Search.php /^ $sessionCell = \\XLite\\View\\ItemsList\\Product\\Customer\\Search::getSessionCellName();$/;" v +sessionCell ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Suppliers.php /^ $sessionCell = \\XLite\\Module\\CDev\\Aggregator\\View\\ItemsList\\Supplier\\Customer\\Search::getSessionCellName();$/;" v +sessionCell ../../../src/classes/XLite/Module/CDev/Conversations/Controller/Customer/Conversations.php /^ $sessionCell = \\XLite\\Module\\CDev\\Conversations\\View\\ItemsList\\Customer\\Conversation::getSessionCellName();$/;" v +sessionCell ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ $sessionCell = $class::getSessionCellName();$/;" v +sessionCell ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/ProductList.php /^ $sessionCell = \\XLite\\Module\\CDev\\FeaturedProducts\\View\\Admin\\FeaturedProducts::getSessionCellName();$/;" v +sessionId ../../../src/classes/XLite/Model/Repo/FormId.php /^ $sessionId = \\XLite\\Core\\Session::getInstance()->getModel()->getId();$/;" v +sessionVarsToClear ../../../src/classes/XLite/Core/Auth.php /^ protected $sessionVarsToClear = array($/;" v +session_id ../../../src/classes/XLite/Model/FormId.php /^ protected $session_id;$/;" v +session_var_name ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/facebook.php /^ $session_var_name = $this->constructSessionVariableName($key);$/;" v +set ../../../src/classes/XLite/Base.php /^ public function set($name, $value)$/;" f +set ../../../src/classes/XLite/Controller/Customer/OrderList.php /^ public function set($name, $value)$/;" f +set ../../../src/classes/XLite/Core/Session.php /^ public function set($name, $value)$/;" f +set ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiApcCache.php /^ public function set($key, $value) {$/;" f +set ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiCache.php /^ abstract function set($key, $value);$/;" f +set ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ public function set($key, $value) {$/;" f +set ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiMemcacheCache.php /^ public function set($key, $value) {$/;" f +set ../../../src/classes/XLite/View/Mailer.php /^ public function set($name, $value)$/;" f +set ../../../src/lib/Doctrine/Common/Collections/ArrayCollection.php /^ public function set($key, $value)$/;" f +set ../../../src/lib/Doctrine/Common/Collections/Collection.php /^ function set($key, $value);$/;" f +set ../../../src/lib/Doctrine/DBAL/Connection.php /^ $set = array();$/;" v +set ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function set($key, $value)$/;" f +set ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function set($key, $value)$/;" f +set ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $set = $params = $types = array();$/;" v +set ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function set($key, $value)$/;" f +set ../../../src/lib/PHPMailer/class.phpmailer.php /^ public function set($name, $value = '') {$/;" f +set ../../../src/lib/Symfony/Component/Console/Helper/HelperSet.php /^ public function set(HelperInterface $helper, $alias = null)$/;" f +setAbout ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setAbout($about) {$/;" f +setAboutMe ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setAboutMe($aboutMe) {$/;" f +setAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setAccess(\/* array(DatasetAccess) *\/ $access) {$/;" f +setAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAccess($access) {$/;" f +setAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setAccess(Acl $access) {$/;" f +setAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setAccess(Acl $access) {$/;" f +setAccessControlPolicy ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setAccessControlPolicy($bucket, $uri = '', $acp = array())$/;" f +setAccessInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAccessInfo(VolumeAccessInfo $accessInfo) {$/;" f +setAccessRole ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setAccessRole($accessRole) {$/;" f +setAccessToken ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ public function setAccessToken($access_token) {$/;" f +setAccessToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setAccessToken($accessToken) {$/;" f +setAccessToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuth.php /^ abstract public function setAccessToken($accessToken);$/;" f +setAccessToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuthNone.php /^ public function setAccessToken($accessToken) {\/* noop*\/}$/;" f +setAccessToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function setAccessToken($accessToken) {$/;" f +setAccessType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setAccessType($accessType) {$/;" f +setAccessType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function setAccessType($accessType) {$/;" f +setAccessViewStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAccessViewStatus($accessViewStatus) {$/;" f +setAccess_type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setAccess_type($access_type) {$/;" f +setAccountId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setAccountId($accountId) {$/;" f +setAccountId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setAccountId($accountId) {$/;" f +setAccountId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setAccountId($accountId) {$/;" f +setAccuracy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setAccuracy($accuracy) {$/;" f +setAcsTokenLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAcsTokenLink($acsTokenLink) {$/;" f +setActionError ../../../src/classes/XLite/Controller/AController.php /^ public function setActionError($message = '', $code = 0)$/;" f +setActionStatus ../../../src/classes/XLite/Controller/AController.php /^ public function setActionStatus($status, $message = '', $code = 0)$/;" f +setActionSuccess ../../../src/classes/XLite/Controller/AController.php /^ public function setActionSuccess($message = '', $code = 0)$/;" f +setActive ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setActive($active) {$/;" f +setActivityId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setActivityId($activityId) {$/;" f +setActor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setActor(OrkutAuthorResource $actor) {$/;" f +setActor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setActor(ActivityActor $actor) {$/;" f +setActor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setActor(ActivityObjectActor $actor) {$/;" f +setActor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setActor(CommentActor $actor) {$/;" f +setAdded ../../../src/classes/XLite/Model/Language.php /^ public function setAdded($status)$/;" f +setAddedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setAddedDate($addedDate) {$/;" f +setAdditionalCardBenefits ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAdditionalCardBenefits(\/* array(string) *\/ $additionalCardBenefits) {$/;" f +setAdditionalCardHolderFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAdditionalCardHolderFee($additionalCardHolderFee) {$/;" f +setAdditionalDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAdditionalDetails($additionalDetails) {$/;" f +setAdditionalGuests ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setAdditionalGuests($additionalGuests) {$/;" f +setAdditionalRoles ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setAdditionalRoles(\/* array(string) *\/ $additionalRoles) {$/;" f +setAddress ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setAddress($address) {$/;" f +setAddress ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setAddress($address) {$/;" f +setAdgroupId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setAdgroupId($adgroupId) {$/;" f +setAdminSkin ../../../src/classes/XLite/Core/Layout.php /^ public function setAdminSkin()$/;" f +setAdsAppearOn ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setAdsAppearOn($adsAppearOn) {$/;" f +setAdvertiser ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setAdvertiser($advertiser) {$/;" f +setAdvertiserId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setAdvertiserId(\/* array(string) *\/ $advertiserId) {$/;" f +setAdvertiserId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAdvertiserId($advertiserId) {$/;" f +setAdvertiserName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setAdvertiserName($advertiserName) {$/;" f +setAdvertiserName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAdvertiserName($advertiserName) {$/;" f +setAfterSelectedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAfterSelectedText($afterSelectedText) {$/;" f +setAgeMinimum ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAgeMinimum($ageMinimum) {$/;" f +setAgeMinimumDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAgeMinimumDetails($ageMinimumDetails) {$/;" f +setAliases ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setAliases($aliases)$/;" f +setAllTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setAllTime(AnalyticsSnapshot $allTime) {$/;" f +setAllocationSize ../../../src/lib/Doctrine/DBAL/Schema/Sequence.php /^ public function setAllocationSize($allocationSize)$/;" f +setAllowExternalMembers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setAllowExternalMembers($allowExternalMembers) {$/;" f +setAllowGoogleCommunication ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setAllowGoogleCommunication($allowGoogleCommunication) {$/;" f +setAllowWebPosting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setAllowWebPosting($allowWebPosting) {$/;" f +setAlternativeCurrency ../../../src/classes/XLite/Module/CDev/Multicurrency/Controller/Customer/ACustomer.php /^ protected function setAlternativeCurrency(\\XLite\\Model\\Currency $currency)$/;" f +setAlternativeCurrency ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Controller/Customer/ACustomer.php /^ protected function setAlternativeCurrency(\\XLite\\Model\\Currency $currency)$/;" f +setAltitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setAltitude($altitude) {$/;" f +setAltitudeAccuracy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setAltitudeAccuracy($altitudeAccuracy) {$/;" f +setAmount ../../../src/classes/XLite/Model/Inventory.php /^ public function setAmount($amount)$/;" f +setAmount ../../../src/classes/XLite/Model/OrderItem.php /^ public function setAmount($amount)$/;" f +setAmount ../../../src/classes/XLite/Model/Product.php /^ public function setAmount($value)$/;" f +setAmount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAmount($amount) {$/;" f +setAmount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAmount($amount) {$/;" f +setAmzHeader ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public function setAmzHeader($key, $value)$/;" f +setAnalytics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setAnalytics(AnalyticsSummary $analytics) {$/;" f +setAnchor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setAnchor($anchor) {$/;" f +setAnnotation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setAnnotation($annotation) {$/;" f +setAnnotationCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationCount($annotationCount) {$/;" f +setAnnotationCreationFunction ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ public function setAnnotationCreationFunction(Closure $func)$/;" f +setAnnotationCreationFunction ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ public function setAnnotationCreationFunction(\\Closure $func)$/;" f +setAnnotationDataId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationDataId($annotationDataId) {$/;" f +setAnnotationDataLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationDataLink($annotationDataLink) {$/;" f +setAnnotationNamespaceAlias ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ public function setAnnotationNamespaceAlias($namespace, $alias)$/;" f +setAnnotationNamespaceAlias ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ public function setAnnotationNamespaceAlias($namespace, $alias)$/;" f +setAnnotationPrefix ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setAnnotationPrefix($prefix)$/;" f +setAnnotationType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationType($annotationType) {$/;" f +setAnnotationTypes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationTypes(\/* array(string) *\/ $annotationTypes) {$/;" f +setAnnotationsDataLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationsDataLink($annotationsDataLink) {$/;" f +setAnnotationsLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAnnotationsLink($annotationsLink) {$/;" f +setAnnualFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAnnualFee($annualFee) {$/;" f +setAnnualFeeDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAnnualFeeDisplay($annualFeeDisplay) {$/;" f +setAnnualRewardMaximum ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAnnualRewardMaximum($annualRewardMaximum) {$/;" f +setAnonymousSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAnonymousSubmissionAllowed($anonymousSubmissionAllowed) {$/;" f +setAnonymousSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAnonymousSubmissions($anonymousSubmissions) {$/;" f +setAnyoneCanAddSelf ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setAnyoneCanAddSelf($anyoneCanAddSelf) {$/;" f +setApiSecret ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ public function setApiSecret($apiSecret) {$/;" f +setApiType ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ protected function setApiType($address)$/;" f +setAppId ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ public function setAppId($appId) {$/;" f +setAppSecret ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ public function setAppSecret($appSecret) {$/;" f +setApplication ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setApplication(Application $application = null)$/;" f +setApplicationName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setApplicationName($applicationName) {$/;" f +setApprovalPrompt ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setApprovalPrompt($approvalPrompt) {$/;" f +setApprovalPrompt ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function setApprovalPrompt($approvalPrompt) {$/;" f +setApproved ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ public function setApproved($approved)$/;" f +setApprovedCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setApprovedCategories(\/* array(string) *\/ $approvedCategories) {$/;" f +setAprDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setAprDisplay($aprDisplay) {$/;" f +setArchiveOnly ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setArchiveOnly($archiveOnly) {$/;" f +setArgs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setArgs(\/* array(ResultFormattedResultsRuleResultsUrlBlocksHeaderArgs) *\/ $args) {$/;" f +setArgs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setArgs(\/* array(ResultFormattedResultsRuleResultsUrlBlocksUrlsDetailsArgs) *\/ $args) {$/;" f +setArgs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setArgs(\/* array(ResultFormattedResultsRuleResultsUrlBlocksUrlsResultArgs) *\/ $args) {$/;" f +setArgument ../../../src/lib/Symfony/Component/Console/Input/Input.php /^ public function setArgument($name, $value)$/;" f +setArguments ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ public function setArguments($arguments = array())$/;" f +setArrivalDate ../../../src/classes/XLite/Model/Product.php /^ public function setArrivalDate($date)$/;" f +setAssertionCredentials ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setAssertionCredentials(apiAssertionCredentials $creds) {$/;" f +setAssertionCredentials ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function setAssertionCredentials(apiAssertionCredentials $creds) {$/;" f +setAttachmentUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAttachmentUrl($attachmentUrl) {$/;" f +setAttachments ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setAttachments(\/* array(ActivityObjectAttachments) *\/ $attachments) {$/;" f +setAttendees ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setAttendees(\/* array(EventAttendee) *\/ $attendees) {$/;" f +setAttendeesOmitted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setAttendeesOmitted($attendeesOmitted) {$/;" f +setAttribute ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setAttribute(\/* array(int) *\/ $attribute) {$/;" f +setAttributes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setAttributes(\/* array(ShoppingModelProductJsonV1Attributes) *\/ $attributes) {$/;" f +setAttribution ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAttribution(ProfileAttribution $attribution) {$/;" f +setAttribution ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAttribution(SubmissionAttribution $attribution) {$/;" f +setAudience ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setAudience($audience) {$/;" f +setAuth ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setAuth($accessKey, $secretKey)$/;" f +setAuthClass ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setAuthClass($authClassName) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setAuthor(CommentAuthor $author) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setAuthor(PageAuthor $author) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setAuthor(PostAuthor $author) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAuthor(ReviewAuthor $author) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAuthor($author) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setAuthor(OrkutAuthorResource $author) {$/;" f +setAuthor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setAuthor(ShoppingModelProductJsonV1Author $author) {$/;" f +setAuthors ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAuthors(\/* array(string) *\/ $authors) {$/;" f +setAutoExit ../../../src/lib/Symfony/Component/Console/Application.php /^ public function setAutoExit($boolean)$/;" f +setAutoGenerateProxyClasses ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setAutoGenerateProxyClasses($bool)$/;" f +setAutoincrement ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setAutoincrement($flag)$/;" f +setAvailability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setAvailability($availability) {$/;" f +setAvatarUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setAvatarUrl($avatarUrl) {$/;" f +setAverageRating ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setAverageRating($averageRating) {$/;" f +setAverages ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setAverages(\/* array(string) *\/ $averages) {$/;" f +setAverages ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setAverages(\/* array(string) *\/ $averages) {$/;" f +setBackendTimes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setBackendTimes(\/* array(ShoppingModelDebugJsonV1BackendTimes) *\/ $backendTimes) {$/;" f +setBackground ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setBackground($background) {$/;" f +setBackupExisting ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setBackupExisting($bool)$/;" f +setBadgeLargeLogo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setBadgeLargeLogo($badgeLargeLogo) {$/;" f +setBadgeSmallLogo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setBadgeSmallLogo($badgeSmallLogo) {$/;" f +setBalanceTransferAprDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBalanceTransferAprDisplay($balanceTransferAprDisplay) {$/;" f +setBalanceTransferFeeAmount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBalanceTransferFeeAmount($balanceTransferFeeAmount) {$/;" f +setBalanceTransferFeeDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBalanceTransferFeeDisplay($balanceTransferFeeDisplay) {$/;" f +setBalanceTransferFeeRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBalanceTransferFeeRate($balanceTransferFeeRate) {$/;" f +setBalanceTransferLimit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBalanceTransferLimit($balanceTransferLimit) {$/;" f +setBalanceTransferRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBalanceTransferRateType($balanceTransferRateType) {$/;" f +setBaseRate ../../../src/classes/XLite/Model/Shipping/Rate.php /^ public function setBaseRate($baseRate)$/;" f +setBeforeSelectedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setBeforeSelectedText($beforeSelectedText) {$/;" f +setBidderLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setBidderLocation(\/* array(AccountBidderLocation) *\/ $bidderLocation) {$/;" f +setBirthday ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setBirthday($birthday) {$/;" f +setBirthday ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setBirthday($birthday) {$/;" f +setBirthday ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setBirthday($birthday) {$/;" f +setBlockContent ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Block.php /^ public function setBlockContent(array &$data, \\stdClass $block)$/;" f +setBlog ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setBlog(CommentBlog $blog) {$/;" f +setBlog ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setBlog(PageBlog $blog) {$/;" f +setBlog ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setBlog(PostBlog $blog) {$/;" f +setBlogs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setBlogs(UserBlogs $blogs) {$/;" f +setBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setBody($body) {$/;" f +setBodyLines ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setBodyLines(\/* array(PromotionBodyLines) *\/ $bodyLines) {$/;" f +setBonusRewards ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setBonusRewards(\/* array(CcOfferBonusRewards) *\/ $bonusRewards) {$/;" f +setBoost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Document.php /^ public function setBoost($boost)$/;" f +setBoundary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setBoundary(\/* array(BooksLayerGeoDataGeoBoundary) *\/ $boundary) {$/;" f +setBoxVisible ../../../src/Includes/install/templates/common_js_code.js.php /^function setBoxVisible(id)$/;" f +setBrand ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setBrand($brand) {$/;" f +setBreadcrumbs ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ protected function setBreadcrumbs()$/;" f +setBrowsers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setBrowsers(\/* array(StringCount) *\/ $browsers) {$/;" f +setBucketLogging ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setBucketLogging($bucket, $targetBucket, $targetPrefix = null)$/;" f +setBuckets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setBuckets(\/* array(ProductsFacetsBuckets) *\/ $buckets) {$/;" f +setBusy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setBusy(\/* array(TimePeriod) *\/ $busy) {$/;" f +setBuyLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setBuyLink($buyLink) {$/;" f +setBuyerCreativeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setBuyerCreativeId($buyerCreativeId) {$/;" f +setByteSize ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setByteSize($byteSize) {$/;" f +setCacheDriver ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ public function setCacheDriver($cacheDriver)$/;" f +setCacheId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setCacheId($cacheId) {$/;" f +setCachePolicy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCachePolicy($cachePolicy) {$/;" f +setCachedRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCurlIO.php /^ public function setCachedRequest(apiHttpRequest $request) {$/;" f +setCalendar ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setCalendar(ColorDefinition $calendar) {$/;" f +setCalendarExpansionMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setCalendarExpansionMax($calendarExpansionMax) {$/;" f +setCalendars ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setCalendars(FreeBusyCalendar $calendars) {$/;" f +setCalendars ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setCalendars(\/* array(string) *\/ $calendars) {$/;" f +setCanCreatePoll ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCanCreatePoll($canCreatePoll) {$/;" f +setCanCreateTopic ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCanCreateTopic($canCreateTopic) {$/;" f +setCanShout ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCanShout($canShout) {$/;" f +setCanonicalVolumeLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCanonicalVolumeLink($canonicalVolumeLink) {$/;" f +setCaption ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCaption($caption) {$/;" f +setCarRentalInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCarRentalInsurance($carRentalInsurance) {$/;" f +setCardBenefits ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCardBenefits(\/* array(string) *\/ $cardBenefits) {$/;" f +setCardName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCardName($cardName) {$/;" f +setCardType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCardType($cardType) {$/;" f +setCaseSensitive ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setCaseSensitive($caseSensitive) {$/;" f +setCashAdvanceAdditionalDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceAdditionalDetails($cashAdvanceAdditionalDetails) {$/;" f +setCashAdvanceAprDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceAprDisplay($cashAdvanceAprDisplay) {$/;" f +setCashAdvanceFeeAmount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceFeeAmount($cashAdvanceFeeAmount) {$/;" f +setCashAdvanceFeeDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceFeeDisplay($cashAdvanceFeeDisplay) {$/;" f +setCashAdvanceFeeRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceFeeRate($cashAdvanceFeeRate) {$/;" f +setCashAdvanceLimit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceLimit($cashAdvanceLimit) {$/;" f +setCashAdvanceRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCashAdvanceRateType($cashAdvanceRateType) {$/;" f +setCatchExceptions ../../../src/lib/Symfony/Component/Console/Application.php /^ public function setCatchExceptions($boolean)$/;" f +setCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCategories(\/* array(string) *\/ $categories) {$/;" f +setCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCategories(\/* array(ShoppingModelCategoryJsonV1) *\/ $categories) {$/;" f +setCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCategories(\/* array(string) *\/ $categories) {$/;" f +setCategory ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCategory($category) {$/;" f +setCategory ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCategory($category) {$/;" f +setCategoryId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCategoryId($categoryId) {$/;" f +setCategoryName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCategoryName($categoryName) {$/;" f +setCategoryRecommendations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCategoryRecommendations(\/* array(ShoppingModelRecommendationsJsonV1) *\/ $categoryRecommendations) {$/;" f +setCellValue ../../../src/classes/XLite/Model/Session.php /^ protected function setCellValue($name, $value)$/;" f +setCfiRange ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCfiRange(BooksAnnotationsRange $cfiRange) {$/;" f +setChangeTrackingPolicy ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setChangeTrackingPolicy($policy)$/;" f +setChannel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setChannel($channel) {$/;" f +setChargeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setChargeId($chargeId) {$/;" f +setChargeType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setChargeType($chargeType) {$/;" f +setCharset ../../../src/classes/XLite/Core/Database.php /^ protected function setCharset()$/;" f +setCharset ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function setCharset($charset)$/;" f +setChildLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setChildLink(AccountChildLink $childLink) {$/;" f +setChildLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setChildLink(ProfileChildLink $childLink) {$/;" f +setChildLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setChildLink(WebpropertyChildLink $childLink) {$/;" f +setClass ../../../src/classes/XLite/Model/Payment/Method.php /^ public function setClass($class)$/;" f +setClassMetadataFactoryName ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setClassMetadataFactoryName($cmfName)$/;" f +setClassNameForTable ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ public function setClassNameForTable($tableName, $className)$/;" f +setClassToExtend ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setClassToExtend($classToExtend)$/;" f +setClassToExtend ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setClassToExtend($classToExtend)$/;" f +setClassWeightedAccuracy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setClassWeightedAccuracy($classWeightedAccuracy) {$/;" f +setClassification ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setClassification($classification) {$/;" f +setClassificationAccuracy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setClassificationAccuracy($classificationAccuracy) {$/;" f +setClause ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $setClause = '';$/;" v +setCleanURLWarning ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ protected function setCleanURLWarning($cleanURL, $suffix)$/;" f +setCleanUpCacheFlag ../../../src/classes/XLite.php /^ public static function setCleanUpCacheFlag($flag)$/;" f +setClickThroughUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setClickThroughUrl(\/* array(string) *\/ $clickThroughUrl) {$/;" f +setClientId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setClientId($clientId) {$/;" f +setClientSecret ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setClientSecret($clientSecret) {$/;" f +setClientVersionRanges ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setClientVersionRanges(AnnotationClientVersionRanges $clientVersionRanges) {$/;" f +setClose ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setClose($close) {$/;" f +setCo_owners ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCo_owners(\/* array(OrkutAuthorResource) *\/ $co_owners) {$/;" f +setCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setCode($code) {$/;" f +setCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setCode($code) {$/;" f +setCode ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setCode(\\Closure $code)$/;" f +setCollapseSingleValueArrays ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setCollapseSingleValueArrays($collapseSingleValueArrays)$/;" f +setColorId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setColorId($colorId) {$/;" f +setColumnDefinition ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setColumnDefinition($value)$/;" f +setColumnHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setColumnHeaders(\/* array(GaDataColumnHeaders) *\/ $columnHeaders) {$/;" f +setColumnType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setColumnType($columnType) {$/;" f +setCommand ../../../src/lib/Symfony/Component/Console/Command/HelpCommand.php /^ public function setCommand(Command $command)$/;" f +setCommand ../../../src/lib/Symfony/Component/Console/Helper/HelperSet.php /^ public function setCommand(Command $command = null)$/;" f +setComment ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setComment($comment) {$/;" f +setComment ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setComment($comment)$/;" f +setCommissionDuration ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCommissionDuration($commissionDuration) {$/;" f +setCommissionableSales ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCommissionableSales(Money $commissionableSales) {$/;" f +setCommon ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCommon(BooksLayerGeoDataCommon $common) {$/;" f +setCommonAttributes ../../../src/classes/XLite/View/FormField/AFormField.php /^ protected function setCommonAttributes(array $attrs)$/;" f +setCommonAttributes ../../../src/classes/XLite/View/FormField/Input/Password.php /^ protected function setCommonAttributes(array $attrs)$/;" f +setCommonAttributes ../../../src/classes/XLite/View/FormField/Input/Text/Base/Autocomplete.php /^ protected function setCommonAttributes(array $attrs)$/;" f +setCommunity ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCommunity(Community $community) {$/;" f +setCommunityId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCommunityId($communityId) {$/;" f +setCommunityMembershipStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCommunityMembershipStatus(CommunityMembershipStatus $communityMembershipStatus) {$/;" f +setComparisonType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setComparisonType($comparisonType) {$/;" f +setComparisonValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setComparisonValue($comparisonValue) {$/;" f +setCompleted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setCompleted($completed) {$/;" f +setComplex ../../../src/classes/XLite/Base.php /^ public function setComplex($name, $value)$/;" f +setConcurrentAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setConcurrentAccess(ConcurrentAccessRestriction $concurrentAccess) {$/;" f +setCondition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCondition($condition) {$/;" f +setConfidence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setConfidence($confidence) {$/;" f +setConfidence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setConfidence($confidence) {$/;" f +setConfiguration ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setConfiguration(JobConfiguration $configuration) {$/;" f +setConfusionMatrix ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setConfusionMatrix($confusionMatrix) {$/;" f +setConfusionMatrixRowTotals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setConfusionMatrixRowTotals($confusionMatrixRowTotals) {$/;" f +setConsoleSkin ../../../src/classes/XLite/Core/Layout.php /^ public function setConsoleSkin()$/;" f +setContactEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setContactEmail($contactEmail) {$/;" f +setContactPhone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setContactPhone($contactPhone) {$/;" f +setContainsSampledData ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setContainsSampledData($containsSampledData) {$/;" f +setContent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setContent($content) {$/;" f +setContent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setContent($content) {$/;" f +setContent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setContent($content) {$/;" f +setContent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setContent($content) {$/;" f +setContent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setContent($content) {$/;" f +setContentRanges ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setContentRanges(VolumeannotationContentRanges $contentRanges) {$/;" f +setContentVersion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setContentVersion($contentVersion) {$/;" f +setContext ../../../src/classes/XLite/Logic/Tax/Processor/AProcessor.php /^ public function setContext(\\XLite\\Model\\Order $order)$/;" f +setContext ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setContext(Context $context) {$/;" f +setContextLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setContextLink($contextLink) {$/;" f +setController ../../../src/classes/XLite.php /^ public static function setController($controller = null)$/;" f +setCookie ../../../src/classes/XLite/Core/Session.php /^ protected function setCookie()$/;" f +setCookieMatchingNid ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setCookieMatchingNid($cookieMatchingNid) {$/;" f +setCookieMatchingUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setCookieMatchingUrl($cookieMatchingUrl) {$/;" f +setCopy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setCopy(JobConfigurationTableCopy $copy) {$/;" f +setCoreVersion ../../../src/classes/XLite/Upgrade/Cell.php /^ public function setCoreVersion($version)$/;" f +setCorrectedQuery ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setCorrectedQuery($correctedQuery) {$/;" f +setCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setCount($count) {$/;" f +setCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCount($count) {$/;" f +setCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setCount($count) {$/;" f +setCounters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setCounters(SeriesCounters $counters) {$/;" f +setCounters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setCounters(SubmissionCounters $counters) {$/;" f +setCounters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setCounters(TopicCounters $counters) {$/;" f +setCountries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setCountries(\/* array(StringCount) *\/ $countries) {$/;" f +setCountry ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setCountry($country) {$/;" f +setCountry ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCountry($country) {$/;" f +setCountry ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCountry($country) {$/;" f +setCountryCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCountryCode($countryCode) {$/;" f +setCr ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setCr($cr) {$/;" f +setCreateDisposition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setCreateDisposition($createDisposition) {$/;" f +setCreateDocuments ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setCreateDocuments($createDocuments)$/;" f +setCreateDocuments ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function setCreateDocuments($createDocuments)$/;" f +setCreated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setCreated($created) {$/;" f +setCreated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setCreated($created) {$/;" f +setCreated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCreated($created) {$/;" f +setCreated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setCreated($created) {$/;" f +setCreated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setCreated($created) {$/;" f +setCreated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setCreated($created) {$/;" f +setCreatedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setCreatedDate($createdDate) {$/;" f +setCreationTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setCreationTime($creationTime) {$/;" f +setCreationTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCreationTime($creationTime) {$/;" f +setCreationTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCreationTime($creationTime) {$/;" f +setCreation_date ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setCreation_date($creation_date) {$/;" f +setCreator ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setCreator(EventCreator $creator) {$/;" f +setCreditLimitMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCreditLimitMax($creditLimitMax) {$/;" f +setCreditLimitMin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCreditLimitMin($creditLimitMin) {$/;" f +setCreditRatingDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCreditRatingDisplay($creditRatingDisplay) {$/;" f +setCref ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setCref($cref) {$/;" f +setCrosspostSource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setCrosspostSource($crosspostSource) {$/;" f +setCssResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setCssResponseBytes($cssResponseBytes) {$/;" f +setCsvInstance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setCsvInstance(\/* array(object) *\/ $csvInstance) {$/;" f +setCurrency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setCurrency($currency) {$/;" f +setCurrency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setCurrency($currency) {$/;" f +setCurrency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setCurrency($currency) {$/;" f +setCurrency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCurrency($currency) {$/;" f +setCurrencyCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setCurrencyCode($currencyCode) {$/;" f +setCurrencyCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCurrencyCode($currencyCode) {$/;" f +setCurrencyCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setCurrencyCode($currencyCode) {$/;" f +setCurrencyId ../../../src/classes/XLite/Model/Currency.php /^ public function setCurrencyId($value)$/;" f +setCurrentItemCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCurrentItemCount($currentItemCount) {$/;" f +setCurrentLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setCurrentLocation($currentLocation) {$/;" f +setCurrentVersionRanges ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setCurrentVersionRanges(AnnotationCurrentVersionRanges $currentVersionRanges) {$/;" f +setCustomDatetimeFunctions ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setCustomDatetimeFunctions(array $functions)$/;" f +setCustomFields ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCustomFields(\/* array(ProductsPromotionsCustomFields) *\/ $customFields) {$/;" f +setCustomHtml ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setCustomHtml($customHtml) {$/;" f +setCustomNumericFunctions ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setCustomNumericFunctions(array $functions)$/;" f +setCustomOutputTreeWalker ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ public function setCustomOutputTreeWalker($className)$/;" f +setCustomReplyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setCustomReplyTo($customReplyTo) {$/;" f +setCustomRepositoryClass ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setCustomRepositoryClass($repositoryClassName)$/;" f +setCustomStringFunctions ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setCustomStringFunctions(array $functions)$/;" f +setCustomerSkin ../../../src/classes/XLite/Core/Layout.php /^ public function setCustomerSkin()$/;" f +setCx ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setCx($cx) {$/;" f +setDQL ../../../src/lib/Doctrine/ORM/Query.php /^ public function setDQL($dqlQuery)$/;" f +setData ../../../src/Includes/DataStructure/Cell.php /^ public function setData(array $data)$/;" f +setData ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setData($data) {$/;" f +setData ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setData(BooksLayerGeoData $data) {$/;" f +setDataAnalysis ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setDataAnalysis(TrainingDataAnalysis $dataAnalysis) {$/;" f +setDataCell ../../../src/classes/XLite/Model/Payment/Transaction.php /^ public function setDataCell($name, $value, $label = null)$/;" f +setDataCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDataCount($dataCount) {$/;" f +setDataType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setDataType($dataType) {$/;" f +setDataValidators ../../../src/classes/XLite/Module/CDev/Sale/View/Form/Product/Modify/Single.php /^ protected function setDataValidators(&$data)$/;" f +setDataValidators ../../../src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php /^ protected function setDataValidators(&$data)$/;" f +setDataValidators ../../../src/classes/XLite/Module/CDev/Suppliers/View/Form/Product/Modify/Single.php /^ protected function setDataValidators(&$data)$/;" f +setDataValidators ../../../src/classes/XLite/View/Form/Category/Modify/Single.php /^ protected function setDataValidators($data)$/;" f +setDataValidators ../../../src/classes/XLite/View/Form/Product/Modify/Single.php /^ protected function setDataValidators(&$data)$/;" f +setDatasetId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDatasetId($datasetId) {$/;" f +setDatasetReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDatasetReference(DatasetReference $datasetReference) {$/;" f +setDatasets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDatasets(\/* array(DatasetListDatasets) *\/ $datasets) {$/;" f +setDate ../../../src/classes/XLite/Model/FormId.php /^ public function setDate($value)$/;" f +setDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDate($date) {$/;" f +setDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDate($date) {$/;" f +setDateRestrict ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setDateRestrict($dateRestrict) {$/;" f +setDateTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDateTime($dateTime) {$/;" f +setDay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setDay(AnalyticsSnapshot $day) {$/;" f +setDbOptions ../../../src/Includes/Utils/Database.php /^ public static function setDbOptions($options)$/;" f +setDebug ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setDebug(ShoppingModelDebugJsonV1 $debug) {$/;" f +setDebugInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDebugInfo($debugInfo) {$/;" f +setDecorated ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ public function setDecorated($decorated)$/;" f +setDecorated ../../../src/lib/Symfony/Component/Console/Output/OutputInterface.php /^ function setDecorated($decorated);$/;" f +setDefault ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setDefault($default)$/;" f +setDefault ../../../src/lib/Symfony/Component/Console/Input/InputArgument.php /^ public function setDefault($default = null)$/;" f +setDefault ../../../src/lib/Symfony/Component/Console/Input/InputOption.php /^ public function setDefault($default = null)$/;" f +setDefaultAnnotationNamespace ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ public function setDefaultAnnotationNamespace($defaultNamespace)$/;" f +setDefaultDataset ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDefaultDataset(DatasetReference $defaultDataset) {$/;" f +setDefaultFees ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setDefaultFees(\/* array(CcOfferDefaultFees) *\/ $defaultFees) {$/;" f +setDefaultMessageDenyNotificationText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setDefaultMessageDenyNotificationText($defaultMessageDenyNotificationText) {$/;" f +setDefaultPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setDefaultPage($defaultPage) {$/;" f +setDefaultReminders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDefaultReminders(\/* array(EventReminder) *\/ $defaultReminders) {$/;" f +setDefaultTimeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Abstract.php /^ public function setDefaultTimeout($timeout)$/;" f +setDefaultTimeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Interface.php /^ public function setDefaultTimeout($timeout);$/;" f +setDefaultTimeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setDefaultTimeout($timeout)$/;" f +setDefaultValue ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ public function setDefaultValue($value)$/;" f +setDefaultVariant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ public function setDefaultVariant(\\XLite\\Module\\CDev\\ProductVariants\\Model\\Variant $variant = null)$/;" f +setDefinition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setDefinition($definition) {$/;" f +setDefinition ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setDefinition($definition)$/;" f +setDefinition ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ public function setDefinition(array $definition)$/;" f +setDeleted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDeleted($deleted) {$/;" f +setDeleted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setDeleted($deleted) {$/;" f +setDepartment ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setDepartment($department) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setDescription($description) {$/;" f +setDescription ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setDescription($description)$/;" f +setDestLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setDestLink($destLink) {$/;" f +setDestinationTable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDestinationTable(TableReference $destinationTable) {$/;" f +setDestinationUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDestinationUri($destinationUri) {$/;" f +setDetail ../../../src/classes/XLite/Model/Order.php /^ public function setDetail($name, $value, $label = null)$/;" f +setDetail ../../../src/classes/XLite/Model/Payment/Base/Processor.php /^ protected function setDetail($name, $value, $label = null)$/;" f +setDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setDetails($details) {$/;" f +setDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setDetails(\/* array(ResultFormattedResultsRuleResultsUrlBlocksUrlsDetails) *\/ $details) {$/;" f +setDetectedSourceLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setDetectedSourceLanguage($detectedSourceLanguage) {$/;" f +setDetections ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setDetections(\/* array(DetectionsResourceItems) *\/ $detections) {$/;" f +setDeveloperKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setDeveloperKey($developerKey) {$/;" f +setDeveloperKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuth.php /^ abstract public function setDeveloperKey($developerKey);$/;" f +setDeveloperKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuthNone.php /^ public function setDeveloperKey($key) {$this->key = $key;}$/;" f +setDeveloperKey ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function setDeveloperKey($developerKey) {$/;" f +setDeviceAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDeviceAllowed($deviceAllowed) {$/;" f +setDimensions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setDimensions($dimensions) {$/;" f +setDimensions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDimensions(VolumeVolumeInfoDimensions $dimensions) {$/;" f +setDirectDeals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setDirectDeals(\/* array(DirectDeal) *\/ $directDeals) {$/;" f +setDirty ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function setDirty($dirty)$/;" f +setDisableCnTwTranslation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setDisableCnTwTranslation($disableCnTwTranslation) {$/;" f +setDisabledStructures ../../../src/classes/XLite/Core/Database.php /^ public function setDisabledStructures($module, array $structures = array())$/;" f +setDisapprovalReasons ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setDisapprovalReasons(\/* array(string) *\/ $disapprovalReasons) {$/;" f +setDisclaimer ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setDisclaimer($disclaimer) {$/;" f +setDiscriminatorColumn ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setDiscriminatorColumn($columnDef)$/;" f +setDiscriminatorColumn ../../../src/lib/Doctrine/ORM/Query/ResultSetMapping.php /^ public function setDiscriminatorColumn($alias, $discrColumn)$/;" f +setDiscriminatorMap ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setDiscriminatorMap(array $map)$/;" f +setDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDisplay($display) {$/;" f +setDisplayLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setDisplayLink($displayLink) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setDisplayName($displayName) {$/;" f +setDisplayName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setDisplayName($displayName) {$/;" f +setDistance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setDistance($distance) {$/;" f +setDistanceUnit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setDistanceUnit($distanceUnit) {$/;" f +setDoctrineCache ../../../src/classes/XLite/Core/Database.php /^ protected function setDoctrineCache()$/;" f +setDomain ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setDomain($domain) {$/;" f +setDomain ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setDomain($domain) {$/;" f +setDownloadAccess ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDownloadAccess(DownloadAccessRestriction $downloadAccess) {$/;" f +setDownloadAccessList ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDownloadAccessList(\/* array(DownloadAccessRestriction) *\/ $downloadAccessList) {$/;" f +setDownloadLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDownloadLink($downloadLink) {$/;" f +setDownloadUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setDownloadUrl($downloadUrl) {$/;" f +setDownloadsAcquired ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setDownloadsAcquired($downloadsAcquired) {$/;" f +setDrupalRootURL ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ public function setDrupalRootURL($url)$/;" f +setDue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setDue($due) {$/;" f +setEarnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setEarnings(Money $earnings) {$/;" f +setEditLanguage ../../../src/classes/XLite/Model/Base/I18n.php /^ public function setEditLanguage($code)$/;" f +setElapsedMillis ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setElapsedMillis($elapsedMillis) {$/;" f +setEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setEmail($email) {$/;" f +setEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setEmail($email) {$/;" f +setEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setEmail($email) {$/;" f +setEmails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setEmails(\/* array(PersonEmails) *\/ $emails) {$/;" f +setEmbed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setEmbed(ActivityObjectAttachmentsEmbed $embed) {$/;" f +setEmbeddable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEmbeddable($embeddable) {$/;" f +setEmergencyInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setEmergencyInsurance($emergencyInsurance) {$/;" f +setEnableParsePhpImports ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ public function setEnableParsePhpImports($flag)$/;" f +setEnabled ../../../src/classes/XLite/Model/Language.php /^ public function setEnabled($status)$/;" f +setEncoded_data ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEncoded_data($encoded_data) {$/;" f +setEncoding ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setEncoding($encoding) {$/;" f +setEnd ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setEnd($end) {$/;" f +setEnd ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setEnd(EventDateTime $end) {$/;" f +setEndDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setEndDate($endDate) {$/;" f +setEndOffset ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEndOffset($endOffset) {$/;" f +setEndPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEndPosition($endPosition) {$/;" f +setEndTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setEndTime($endTime) {$/;" f +setEndTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setEndTime($endTime) {$/;" f +setEnd_date ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setEnd_date($end_date) {$/;" f +setEndingTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setEndingTime($endingTime) {$/;" f +setEndpoint ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public function setEndpoint($host)$/;" f +setEntityGenerator ../../../src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php /^ public function setEntityGenerator(EntityGenerator $entityGenerator)$/;" f +setEntityGenerator ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php /^ public function setEntityGenerator(EntityGenerator $entityGenerator)$/;" f +setEntityManager ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ public function setEntityManager(EntityManager $em)$/;" f +setEntityNamespaces ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setEntityNamespaces(array $entityNamespaces)$/;" f +setEpcNinetyDayAverage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setEpcNinetyDayAverage(Money $epcNinetyDayAverage) {$/;" f +setEpcSevenDayAverage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setEpcSevenDayAverage(Money $epcSevenDayAverage) {$/;" f +setEpub ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEpub(VolumeAccessInfoEpub $epub) {$/;" f +setEpubCfiPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEpubCfiPosition($epubCfiPosition) {$/;" f +setErrorResult ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setErrorResult(ErrorProto $errorResult) {$/;" f +setErrors ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setErrors(\/* array(ErrorProto) *\/ $errors) {$/;" f +setErrors ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setErrors(\/* array(Error) *\/ $errors) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setEtag($etag) {$/;" f +setEtag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setEtag($etag) {$/;" f +setEvent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setEvent(ColorDefinition $event) {$/;" f +setEventConditions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setEventConditions(\/* array(GoalEventDetailsEventConditions) *\/ $eventConditions) {$/;" f +setEventDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setEventDate($eventDate) {$/;" f +setEventDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setEventDetails(GoalEventDetails $eventDetails) {$/;" f +setEventName ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ public function setEventName($eventName)$/;" f +setEventState ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ public function setEventState($name, array $rec)$/;" f +setExactTerms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setExactTerms($exactTerms) {$/;" f +setExceptions ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setExceptions($enabled = true)$/;" f +setExcludeQueryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setExcludeQueryParameters($excludeQueryParameters) {$/;" f +setExcludeTerms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setExcludeTerms($excludeTerms) {$/;" f +setExistingCustomerOnly ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setExistingCustomerOnly($existingCustomerOnly) {$/;" f +setExpirationMonths ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setExpirationMonths($expirationMonths) {$/;" f +setExpires_in ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setExpires_in($expires_in) {$/;" f +setExplicitForeignKeyIndexes ../../../src/lib/Doctrine/DBAL/Schema/SchemaConfig.php /^ public function setExplicitForeignKeyIndexes($flag)$/;" f +setExpression ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setExpression($expression) {$/;" f +setExtendedProperties ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setExtendedProperties(EventExtendedProperties $extendedProperties) {$/;" f +setExtendedWarranty ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setExtendedWarranty($extendedWarranty) {$/;" f +setExtension ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setExtension($extension)$/;" f +setExtension ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setExtension($extension)$/;" f +setExtension ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php /^ public function setExtension($extension)$/;" f +setExtraData ../../../src/classes/XLite/Model/Shipping/Rate.php /^ public function setExtraData(\\XLite\\Core\\CommonCell $extraData)$/;" f +setExtraDescription ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setExtraDescription($extraDescription) {$/;" f +setExtraLarge ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setExtraLarge($extraLarge) {$/;" f +setExtract ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setExtract(JobConfigurationExtract $extract) {$/;" f +setF ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setF(\/* array(TableRowF) *\/ $f) {$/;" f +setFacets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFacets(\/* array(ContextFacets) *\/ $facets) {$/;" f +setFacets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setFacets(\/* array(ProductsFacets) *\/ $facets) {$/;" f +setFacetsRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setFacetsRequest($facetsRequest) {$/;" f +setFacetsResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setFacetsResponse($facetsResponse) {$/;" f +setFamily ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public function setFamily($family) {$/;" f +setFamilyName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setFamilyName($familyName) {$/;" f +setFamilyName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setFamilyName($familyName) {$/;" f +setFamily_name ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setFamily_name($family_name) {$/;" f +setFastCGITimeoutEcho ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static function setFastCGITimeoutEcho()$/;" f +setFeaturedSubmission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setFeaturedSubmission(Submission $featuredSubmission) {$/;" f +setFetchMode ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setFetchMode($class, $assocName, $fetchMode)$/;" f +setField ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Document.php /^ public function setField($key, $value, $boost = false)$/;" f +setFieldBoost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Document.php /^ public function setFieldBoost($key, $boost)$/;" f +setFieldDelimiter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setFieldDelimiter($fieldDelimiter) {$/;" f +setFieldNameForColumn ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ public function setFieldNameForColumn($tableName, $columnName, $fieldName)$/;" f +setFieldValue ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ protected function setFieldValue(array $field, array $data, $key = null)$/;" f +setFieldValue ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ public function setFieldValue($entity, $field, $value)$/;" f +setFields ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setFields(\/* array(TableFieldSchema) *\/ $fields) {$/;" f +setFileExtension ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setFileExtension($fileExtension) {$/;" f +setFileExtension ../../../src/lib/Doctrine/Common/ClassLoader.php /^ public function setFileExtension($fileExtension)$/;" f +setFileExtension ../../../src/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php /^ public function setFileExtension($fileExtension)$/;" f +setFileExtension ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ public function setFileExtension($fileExtension)$/;" f +setFileFormat ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFileFormat($fileFormat) {$/;" f +setFileSize ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setFileSize($fileSize) {$/;" f +setFileType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFileType($fileType) {$/;" f +setFileUploadSupport ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ public function setFileUploadSupport($fileUploadSupport) {$/;" f +setFilter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFilter($filter) {$/;" f +setFilters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setFilters($filters) {$/;" f +setFirstPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setFirstPageToken($firstPageToken) {$/;" f +setFirstResult ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function setFirstResult($firstResult)$/;" f +setFirstResult ../../../src/lib/Doctrine/ORM/Query.php /^ public function setFirstResult($firstResult)$/;" f +setFirstResult ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function setFirstResult($firstResult)$/;" f +setFirstStepRequired ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setFirstStepRequired($firstStepRequired) {$/;" f +setFirstYearAnnualFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setFirstYearAnnualFee($firstYearAnnualFee) {$/;" f +setFixed ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setFixed($fixed)$/;" f +setFixedCpm ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setFixedCpm($fixedCpm) {$/;" f +setFixturesLoadingOption ../../../src/classes/XLite/Core/Database.php /^ public function setFixturesLoadingOption($name, $value = null)$/;" f +setFlag ../../../src/classes/XLite/Model/QueryBuilder/AQueryBuilder.php /^ public function setFlag($name, $value = true)$/;" f +setFlag ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setFlag($flag) {$/;" f +setFlashResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setFlashResponseBytes($flashResponseBytes) {$/;" f +setFlightAccidentInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setFlightAccidentInsurance($flightAccidentInsurance) {$/;" f +setForeground ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setForeground($foreground) {$/;" f +setForeignCurrencyTransactionFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setForeignCurrencyTransactionFee($foreignCurrencyTransactionFee) {$/;" f +setFormId ../../../src/classes/XLite/Model/FormId.php /^ public function setFormId($value)$/;" f +setFormat ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setFormat($format) {$/;" f +setFormatted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setFormatted($formatted) {$/;" f +setFormattedResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setFormattedResults(ResultFormattedResults $formattedResults) {$/;" f +setFormattedSearchTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFormattedSearchTime($formattedSearchTime) {$/;" f +setFormattedTotalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFormattedTotalResults($formattedTotalResults) {$/;" f +setFormattedUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setFormattedUrl($formattedUrl) {$/;" f +setFraudLiability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setFraudLiability($fraudLiability) {$/;" f +setFriendlyName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setFriendlyName($friendlyName) {$/;" f +setFulfillmentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ public function setFulfillmentStatus(\\XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\FulfillmentStatus $status)$/;" f +setFullImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setFullImage(ActivityObjectAttachmentsFullImage $fullImage) {$/;" f +setFullTextUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setFullTextUrl($fullTextUrl) {$/;" f +setGadget ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setGadget(EventGadget $gadget) {$/;" f +setGbImagePosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setGbImagePosition($gbImagePosition) {$/;" f +setGbImageRange ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setGbImageRange(BooksAnnotationsRange $gbImageRange) {$/;" f +setGbTextPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setGbTextPosition($gbTextPosition) {$/;" f +setGbTextRange ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setGbTextRange(BooksAnnotationsRange $gbTextRange) {$/;" f +setGender ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setGender($gender) {$/;" f +setGender ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setGender($gender) {$/;" f +setGender ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setGender($gender) {$/;" f +setGenerateAnnotations ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setGenerateAnnotations($bool)$/;" f +setGenerateAnnotations ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setGenerateAnnotations($bool)$/;" f +setGenerateStubMethods ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setGenerateStubMethods($bool)$/;" f +setGenerateStubMethods ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setGenerateStubMethods($bool)$/;" f +setGeo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setGeo(BooksLayerGeoDataGeo $geo) {$/;" f +setGeo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setGeo(ProfileAttributionGeo $geo) {$/;" f +setGeo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setGeo(SubmissionGeo $geo) {$/;" f +setGeocode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setGeocode($geocode) {$/;" f +setGivenName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setGivenName($givenName) {$/;" f +setGivenName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setGivenName($givenName) {$/;" f +setGiven_name ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setGiven_name($given_name) {$/;" f +setGl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setGl($gl) {$/;" f +setGoogleHost ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setGoogleHost($googleHost) {$/;" f +setGoogleId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setGoogleId($googleId) {$/;" f +setGracePeriodDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setGracePeriodDisplay($gracePeriodDisplay) {$/;" f +setGroupByEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setGroupByEmail($groupByEmail) {$/;" f +setGroupExpansionMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setGroupExpansionMax($groupExpansionMax) {$/;" f +setGroups ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setGroups(FreeBusyGroup $groups) {$/;" f +setGtin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setGtin($gtin) {$/;" f +setGtins ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setGtins(\/* array(string) *\/ $gtins) {$/;" f +setGuestsCanInviteOthers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setGuestsCanInviteOthers($guestsCanInviteOthers) {$/;" f +setGuestsCanModify ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setGuestsCanModify($guestsCanModify) {$/;" f +setGuestsCanSeeOtherGuests ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setGuestsCanSeeOtherGuests($guestsCanSeeOtherGuests) {$/;" f +setHTMLSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setHTMLSnippet($HTMLSnippet) {$/;" f +setHardRedirect ../../../src/classes/XLite/Controller/AController.php /^ protected function setHardRedirect($flag = true)$/;" f +setHasApp ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setHasApp($hasApp) {$/;" f +setHasVoted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setHasVoted($hasVoted) {$/;" f +setHeader ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public function setHeader($key, $value)$/;" f +setHeader ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setHeader(ResultFormattedResultsRuleResultsUrlBlocksHeader $header) {$/;" f +setHeader ../../../src/lib/PEAR2/HTTP/Request.php /^ public function setHeader($header, $value) $/;" f +setHeaderLocation ../../../src/classes/XLite/Core/Operator.php /^ protected static function setHeaderLocation($location, $code = 302)$/;" f +setHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setHeaders(\/* array(AdsenseReportsGenerateResponseHeaders) *\/ $headers) {$/;" f +setHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setHeaders(\/* array(AdsensehostReportsGenerateResponseHeaders) *\/ $headers) {$/;" f +setHeading ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setHeading($heading) {$/;" f +setHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setHeight($height) {$/;" f +setHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setHeight($height) {$/;" f +setHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setHeight($height) {$/;" f +setHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHeight($height) {$/;" f +setHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setHeight($height) {$/;" f +setHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setHeight($height) {$/;" f +setHelp ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setHelp($help)$/;" f +setHelperSet ../../../src/lib/Symfony/Component/Console/Application.php /^ public function setHelperSet(HelperSet $helperSet)$/;" f +setHelperSet ../../../src/lib/Symfony/Component/Console/Helper/Helper.php /^ public function setHelperSet(HelperSet $helperSet = null)$/;" f +setHelperSet ../../../src/lib/Symfony/Component/Console/Helper/HelperInterface.php /^ function setHelperSet(HelperSet $helperSet = null);$/;" f +setHi ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setHi(BooksLayerGeoDataGeoViewportHi $hi) {$/;" f +setHidden ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setHidden($hidden) {$/;" f +setHidden ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setHidden($hidden) {$/;" f +setHidden ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setHidden($hidden) {$/;" f +setHighRange ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHighRange($highRange) {$/;" f +setHighlightStyle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setHighlightStyle($highlightStyle) {$/;" f +setHint ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setHint($name, $value)$/;" f +setHint ../../../src/lib/Doctrine/ORM/Query.php /^ public function setHint($name, $value)$/;" f +setHl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHl($hl) {$/;" f +setHonorificPrefix ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setHonorificPrefix($honorificPrefix) {$/;" f +setHonorificSuffix ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setHonorificSuffix($honorificSuffix) {$/;" f +setHost ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setHost($host)$/;" f +setHostName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setHostName($hostName) {$/;" f +setHq ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHq($hq) {$/;" f +setHref ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setHref($href) {$/;" f +setHref ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setHref($href) {$/;" f +setHtmlCorrectedQuery ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHtmlCorrectedQuery($htmlCorrectedQuery) {$/;" f +setHtmlFormattedUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHtmlFormattedUrl($htmlFormattedUrl) {$/;" f +setHtmlLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setHtmlLink($htmlLink) {$/;" f +setHtmlResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setHtmlResponseBytes($htmlResponseBytes) {$/;" f +setHtmlSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHtmlSnippet($htmlSnippet) {$/;" f +setHtmlTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setHtmlTitle($htmlTitle) {$/;" f +setHttpTransport ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setHttpTransport(Apache_Solr_HttpTransport_Interface $httpTransport)$/;" f +setHydrationMode ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setHydrationMode($hydrationMode)$/;" f +setHydrationMode ../../../src/lib/Doctrine/ORM/Query.php /^ public function setHydrationMode($hydrationMode)$/;" f +setICalUID ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setICalUID($iCalUID) {$/;" f +setIconLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setIconLink($iconLink) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(ModeratorTopicsResourcePartialId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(ProfileId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(SeriesId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(SubmissionId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(TagId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(TopicId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setId(VoteId $id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setId($id) {$/;" f +setId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setId($id) {$/;" f +setIdGenerator ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setIdGenerator($generator)$/;" f +setIdGeneratorType ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setIdGeneratorType($generatorType)$/;" f +setIdent ../../../src/lib/Log.php /^ function setIdent($ident)$/;" f +setIdent ../../../src/lib/Log/composite.php /^ function setIdent($ident)$/;" f +setIdent ../../../src/lib/Log/mdb2.php /^ function setIdent($ident)$/;" f +setIdent ../../../src/lib/Log/sql.php /^ function setIdent($ident)$/;" f +setIdentifier ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIdentifier($identifier) {$/;" f +setIdentifier ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setIdentifier($identifier) {$/;" f +setIdentifier ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setIdentifier(array $identifier)$/;" f +setIdentifierValues ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ public function setIdentifierValues($entity, array $id)$/;" f +setIds ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setIds($ids) {$/;" f +setIgnoreNotImportedAnnotations ../../../src/lib/Doctrine/Common/Annotations/AnnotationReader.php /^ public function setIgnoreNotImportedAnnotations($bool)$/;" f +setIgnoreNotImportedAnnotations ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ public function setIgnoreNotImportedAnnotations($bool)$/;" f +setIgnoredAnnotationNames ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ public function setIgnoredAnnotationNames(array $names)$/;" f +setImage ../../../src/classes/XLite/Core/ImageOperator/AImageOperator.php /^ public function setImage(\\XLite\\Model\\Base\\Image $image)$/;" f +setImage ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ public function setImage(\\XLite\\Model\\Base\\Image $image)$/;" f +setImage ../../../src/classes/XLite/Core/ImageOperator/ImageMagic.php /^ public function setImage(\\XLite\\Model\\Base\\Image $image)$/;" f +setImage ../../../src/classes/XLite/Model/Category.php /^ public function setImage(\\XLite\\Model\\Image\\Category\\Image $image = null)$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setImage(CommentAuthorImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setImage(PageAuthorImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setImage(PostAuthorImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setImage(PromotionImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setImage(ResultImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setImage(CommunityPollImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setImage(OrkutActivitypersonResourceImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setImage(OrkutAuthorResourceImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setImage(OrkutCommunitypolloptionResourceImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setImage(ActivityActorImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setImage(ActivityObjectActorImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setImage(ActivityObjectAttachmentsImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setImage(CommentActorImage $image) {$/;" f +setImage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setImage(PersonImage $image) {$/;" f +setImageLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setImageLink($imageLink) {$/;" f +setImageLinks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setImageLinks(VolumeVolumeInfoImageLinks $imageLinks) {$/;" f +setImagePaddings ../../../src/classes/XLite/View/Image.php /^ protected function setImagePaddings()$/;" f +setImageResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setImageResponseBytes($imageResponseBytes) {$/;" f +setImageUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setImageUrl($imageUrl) {$/;" f +setImages ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setImages(\/* array(ShoppingModelProductJsonV1Images) *\/ $images) {$/;" f +setImgColorType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setImgColorType($imgColorType) {$/;" f +setImgDominantColor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setImgDominantColor($imgDominantColor) {$/;" f +setImgSize ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setImgSize($imgSize) {$/;" f +setImgType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setImgType($imgType) {$/;" f +setImports ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ public function setImports(array $imports)$/;" f +setInReplyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setInReplyTo(CommentInReplyTo $inReplyTo) {$/;" f +setInReplyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setInReplyTo(CommentInReplyTo $inReplyTo) {$/;" f +setInReplyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setInReplyTo(\/* array(CommentInReplyTo) *\/ $inReplyTo) {$/;" f +setIncludePath ../../../src/lib/Doctrine/Common/ClassLoader.php /^ public function setIncludePath($includePath)$/;" f +setIncompatibleModuleStatuses ../../../src/classes/XLite/Upgrade/Cell.php /^ public function setIncompatibleModuleStatuses(array $statuses)$/;" f +setIndexableText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setIndexableText(DriveFileIndexableText $indexableText) {$/;" f +setIndustryIdentifiers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIndustryIdentifiers(\/* array(VolumeVolumeInfoIndustryIdentifiers) *\/ $industryIdentifiers) {$/;" f +setInfoLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setInfoLink($infoLink) {$/;" f +setInheritanceType ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setInheritanceType($type)$/;" f +setInitialSetupAndProcessingFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setInitialSetupAndProcessingFee($initialSetupAndProcessingFee) {$/;" f +setInitialValue ../../../src/lib/Doctrine/DBAL/Schema/Sequence.php /^ public function setInitialValue($initialValue)$/;" f +setInitialized ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function setInitialized($bool)$/;" f +setInput ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setInput(InputInput $input) {$/;" f +setInput ../../../src/lib/Doctrine/Common/Lexer.php /^ public function setInput($input)$/;" f +setInputEncoding ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setInputEncoding($inputEncoding) {$/;" f +setInteractive ../../../src/lib/Symfony/Component/Console/Input/Input.php /^ public function setInteractive($interactive)$/;" f +setInternal1 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal1(\/* array(string) *\/ $internal1) {$/;" f +setInternal10 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal10(\/* array(string) *\/ $internal10) {$/;" f +setInternal12 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal12($internal12) {$/;" f +setInternal13 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal13($internal13) {$/;" f +setInternal14 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal14($internal14) {$/;" f +setInternal15 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal15($internal15) {$/;" f +setInternal3 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal3($internal3) {$/;" f +setInternal4 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal4(\/* array(ShoppingModelProductJsonV1Internal4) *\/ $internal4) {$/;" f +setInternal6 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal6($internal6) {$/;" f +setInternal7 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal7($internal7) {$/;" f +setInternal8 ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInternal8(\/* array(string) *\/ $internal8) {$/;" f +setInternalFulfillmentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ public function setInternalFulfillmentStatus($code)$/;" f +setInternalPaymentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ public function setInternalPaymentStatus($code)$/;" f +setInternalRedirect ../../../src/classes/XLite/Controller/AController.php /^ protected function setInternalRedirect($flag = true)$/;" f +setInternalWebPropertyId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setInternalWebPropertyId($internalWebPropertyId) {$/;" f +setIntroAprDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroAprDisplay($introAprDisplay) {$/;" f +setIntroBalanceTransferAprDisplay ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferAprDisplay($introBalanceTransferAprDisplay) {$/;" f +setIntroBalanceTransferFeeAmount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferFeeAmount($introBalanceTransferFeeAmount) {$/;" f +setIntroBalanceTransferFeeRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferFeeRate($introBalanceTransferFeeRate) {$/;" f +setIntroBalanceTransferPeriodEndDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferPeriodEndDate($introBalanceTransferPeriodEndDate) {$/;" f +setIntroBalanceTransferPeriodLength ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferPeriodLength($introBalanceTransferPeriodLength) {$/;" f +setIntroBalanceTransferPeriodUnits ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferPeriodUnits($introBalanceTransferPeriodUnits) {$/;" f +setIntroBalanceTransferRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferRate($introBalanceTransferRate) {$/;" f +setIntroBalanceTransferRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroBalanceTransferRateType($introBalanceTransferRateType) {$/;" f +setIntroPurchasePeriodEndDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroPurchasePeriodEndDate($introPurchasePeriodEndDate) {$/;" f +setIntroPurchasePeriodLength ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroPurchasePeriodLength($introPurchasePeriodLength) {$/;" f +setIntroPurchasePeriodUnits ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroPurchasePeriodUnits($introPurchasePeriodUnits) {$/;" f +setIntroPurchaseRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroPurchaseRate($introPurchaseRate) {$/;" f +setIntroPurchaseRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIntroPurchaseRateType($introPurchaseRateType) {$/;" f +setInvalidRules ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setInvalidRules(\/* array(string) *\/ $invalidRules) {$/;" f +setInventories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setInventories(\/* array(ShoppingModelProductJsonV1Inventories) *\/ $inventories) {$/;" f +setIsArchived ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setIsArchived($isArchived) {$/;" f +setIsAvailable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIsAvailable($isAvailable) {$/;" f +setIsClosed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsClosed($isClosed) {$/;" f +setIsCoOwner ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsCoOwner($isCoOwner) {$/;" f +setIsEbook ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIsEbook($isEbook) {$/;" f +setIsFollowing ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsFollowing($isFollowing) {$/;" f +setIsInMyBooks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIsInMyBooks($isInMyBooks) {$/;" f +setIsModerator ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsModerator($isModerator) {$/;" f +setIsMultipleAnswers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsMultipleAnswers($isMultipleAnswers) {$/;" f +setIsOpenForVoting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsOpenForVoting($isOpenForVoting) {$/;" f +setIsOwner ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsOwner($isOwner) {$/;" f +setIsPreordered ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIsPreordered($isPreordered) {$/;" f +setIsPurchased ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setIsPurchased($isPurchased) {$/;" f +setIsReliable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setIsReliable($isReliable) {$/;" f +setIsRestoreAvailable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsRestoreAvailable($isRestoreAvailable) {$/;" f +setIsRestricted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsRestricted($isRestricted) {$/;" f +setIsSpam ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsSpam($isSpam) {$/;" f +setIsTakebackAvailable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsTakebackAvailable($isTakebackAvailable) {$/;" f +setIsUsersVotePublic ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsUsersVotePublic($isUsersVotePublic) {$/;" f +setIsVotevisible ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsVotevisible($isVotevisible) {$/;" f +setIsVotingAllowedForNonMembers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setIsVotingAllowedForNonMembers($isVotingAllowedForNonMembers) {$/;" f +setIssued_to ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setIssued_to($issued_to) {$/;" f +setIssuer ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIssuer($issuer) {$/;" f +setIssuerId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIssuerId($issuerId) {$/;" f +setIssuerWebsite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setIssuerWebsite($issuerWebsite) {$/;" f +setItem ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setItem(Advertiser $item) {$/;" f +setItem ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setItem(Publisher2 $item) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setItems(\/* array(Account) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setItems(\/* array(Account) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setItems(\/* array(AdClient) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setItems(\/* array(AdUnit) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setItems(\/* array(CustomChannel) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setItems(\/* array(UrlChannel) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setItems(\/* array(AdClient) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setItems(\/* array(CustomChannel) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setItems(\/* array(UrlChannel) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setItems(\/* array(Account) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setItems(\/* array(Goal) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setItems(\/* array(Profile) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setItems(\/* array(Segment) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setItems(\/* array(Webproperty) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setItems(\/* array(Blog) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setItems(\/* array(Comment) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setItems(\/* array(Page) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setItems(\/* array(Post) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setItems(\/* array(Annotation) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setItems(\/* array(Annotationdata) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setItems(\/* array(Bookshelf) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setItems(\/* array(Layersummary) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setItems(\/* array(Volume) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setItems(\/* array(Volumeannotation) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setItems(\/* array(AclRule) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setItems(\/* array(CalendarListEntry) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setItems(\/* array(Event) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setItems(\/* array(FreeBusyRequestItem) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setItems(\/* array(Setting) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setItems(\/* array(Result) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setItems(\/* array(Advertiser) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setItems(\/* array(CcOffer) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setItems(\/* array(Event) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setItems(\/* array(Publisher) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setItems(\/* array(Location) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setItems(\/* array(Series) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setItems(\/* array(Submission) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setItems(\/* array(Tag) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setItems(\/* array(Topic) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setItems(\/* array(Vote) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(AclItems) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(Activity) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(Badge) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(Comment) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(Community) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(CommunityMembers) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(CommunityMessage) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(CommunityPoll) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(CommunityPollComment) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(CommunityTopic) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(OrkutActivityobjectsResource) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setItems(\/* array(OrkutCounterResource) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setItems(\/* array(Activity) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setItems(\/* array(Comment) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setItems(\/* array(Person) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setItems(\/* array(PlusAclentryResource) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setItems(\/* array(Product) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setItems(\/* array(SiteVerificationWebResourceResource) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setItems(\/* array(Task) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setItems(\/* array(TaskList) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setItems(\/* array(Url) *\/ $items) {$/;" f +setItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public function setItems(\/* array(Webfont) *\/ $items) {$/;" f +setItemsPerPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setItemsPerPage($itemsPerPage) {$/;" f +setItemsPerPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setItemsPerPage($itemsPerPage) {$/;" f +setItemsPerPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setItemsPerPage($itemsPerPage) {$/;" f +setJavascriptResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setJavascriptResponseBytes($javascriptResponseBytes) {$/;" f +setJobComplete ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setJobComplete($jobComplete) {$/;" f +setJobId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setJobId($jobId) {$/;" f +setJobReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setJobReference(JobReference $jobReference) {$/;" f +setJobs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setJobs(\/* array(JobListJobs) *\/ $jobs) {$/;" f +setJoinDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setJoinDate($joinDate) {$/;" f +setJustAcquired ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setJustAcquired($justAcquired) {$/;" f +setKey ../../../src/Includes/DataStructure/Graph.php /^ public function setKey($key)$/;" f +setKey ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ public function setKey($key)$/;" f +setKeywordListClass ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php /^ public function setKeywordListClass($name, $class)$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setKind($kind) {$/;" f +setKind ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public function setKind($kind) {$/;" f +setLCRefererCookie ../../../src/classes/XLite/Core/Session.php /^ protected function setLCRefererCookie()$/;" f +setLabel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setLabel($label) {$/;" f +setLabel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setLabel($label) {$/;" f +setLabelArguments ../../../src/classes/XLite/Core/Validator/Exception.php /^ public function setLabelArguments(array $arguments)$/;" f +setLabels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setLabels(\/* array(string) *\/ $labels) {$/;" f +setLabels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setLabels(\/* array(ResultLabels) *\/ $labels) {$/;" f +setLabels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setLabels(DriveFileLabels $labels) {$/;" f +setLandingPageUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setLandingPageUrl($landingPageUrl) {$/;" f +setLang ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLang($lang) {$/;" f +setLang ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setLang($lang) {$/;" f +setLanguage ../../../src/classes/XLite/Core/Session.php /^ public function setLanguage($language, $zone = null)$/;" f +setLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setLanguage($language) {$/;" f +setLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLanguage($language) {$/;" f +setLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setLanguage($language) {$/;" f +setLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLanguage($language) {$/;" f +setLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setLanguage($language) {$/;" f +setLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setLanguage($language) {$/;" f +setLanguages ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setLanguages(\/* array(LanguagesResource) *\/ $languages) {$/;" f +setLanguagesSpoken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setLanguagesSpoken(\/* array(string) *\/ $languagesSpoken) {$/;" f +setLarge ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLarge($large) {$/;" f +setLastModifiedTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setLastModifiedTime($lastModifiedTime) {$/;" f +setLastPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLastPageToken($lastPageToken) {$/;" f +setLastUpdate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLastUpdate($lastUpdate) {$/;" f +setLastViewedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setLastViewedDate($lastViewedDate) {$/;" f +setLatePaymentFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setLatePaymentFee($latePaymentFee) {$/;" f +setLatestMessageSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLatestMessageSnippet($latestMessageSnippet) {$/;" f +setLatitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLatitude($latitude) {$/;" f +setLatitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setLatitude($latitude) {$/;" f +setLatitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setLatitude($latitude) {$/;" f +setLayerId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLayerId($layerId) {$/;" f +setLeft ../../../src/Includes/install/templates/common_js_code.js.php /^function setLeft(elm, x)$/;" f +setLength ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setLength($length)$/;" f +setLifecycleCallbacks ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setLifecycleCallbacks(array $callbacks)$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setLink(JobConfigurationLink $link) {$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setLink($link) {$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setLink($link) {$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setLink($link) {$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLink(OrkutLinkResource $link) {$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setLink($link) {$/;" f +setLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setLink($link) {$/;" f +setLinkSite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setLinkSite($linkSite) {$/;" f +setLinks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLinks(\/* array(OrkutLinkResource) *\/ $links) {$/;" f +setLinks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setLinks(\/* array(TaskLinks) *\/ $links) {$/;" f +setListPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setListPrice(VolumeSaleInfoListPrice $listPrice) {$/;" f +setListeners ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public function setListeners($listeners)$/;" f +setLo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLo(BooksLayerGeoDataGeoViewportLo $lo) {$/;" f +setLoad ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setLoad(JobConfigurationLoad $load) {$/;" f +setLocalTable ../../../src/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php /^ public function setLocalTable(Table $table)$/;" f +setLocale ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ protected function setLocale($code)$/;" f +setLocale ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setLocale(BlogLocale $locale) {$/;" f +setLocale ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setLocale(UserLocale $locale) {$/;" f +setLocale ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setLocale($locale) {$/;" f +setLocale ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setLocale($locale) {$/;" f +setLocaleToUTF8 ../../../src/classes/XLite/Core/Converter.php /^ protected static function setLocaleToUTF8()$/;" f +setLocalizedRuleName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setLocalizedRuleName($localizedRuleName) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setLocation($location) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setLocation($location) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setLocation($location) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setLocation($location) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setLocation($location) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setLocation($location) {$/;" f +setLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setLocation($location) {$/;" f +setLockMode ../../../src/lib/Doctrine/ORM/Query.php /^ public function setLockMode($lockMode)$/;" f +setLogoUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setLogoUrl($logoUrl) {$/;" f +setLongUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setLongUrl($longUrl) {$/;" f +setLongUrlClicks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setLongUrlClicks($longUrlClicks) {$/;" f +setLongitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setLongitude($longitude) {$/;" f +setLongitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setLongitude($longitude) {$/;" f +setLongitude ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setLongitude($longitude) {$/;" f +setLowLevelNodeFlag ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ public function setLowLevelNodeFlag()$/;" f +setLowLimitAmount ../../../src/classes/XLite/Model/Inventory.php /^ public function setLowLimitAmount($amount)$/;" f +setLowRange ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setLowRange($lowRange) {$/;" f +setLuggageInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setLuggageInsurance($luggageInsurance) {$/;" f +setMailInterface ../../../src/classes/XLite/Core/Mailer.php /^ protected static function setMailInterface($interface = \\XLite::CUSTOMER_INTERFACE)$/;" f +setMailSkin ../../../src/classes/XLite/Core/Layout.php /^ public function setMailSkin($interface = \\XLite::CUSTOMER_INTERFACE)$/;" f +setMainCategory ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setMainCategory($mainCategory) {$/;" f +setMajor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setMajor($major) {$/;" f +setMapType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setMapType($mapType) {$/;" f +setMappedSuperClassTag ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/DocBlockCorrector/Main.php /^ public function setMappedSuperClassTag(\\Includes\\Decorator\\DataStructure\\Graph\\Classes $node)$/;" f +setMarkup ../../../src/classes/XLite/Model/Shipping/Rate.php /^ public function setMarkup($markup)$/;" f +setMarkupRate ../../../src/classes/XLite/Model/Shipping/Rate.php /^ public function setMarkupRate($markupRate)$/;" f +setMarkupValue ../../../src/classes/XLite/Model/Shipping/Markup.php /^ public function setMarkupValue($value)$/;" f +setMask ../../../src/lib/Log.php /^ function setMask($mask)$/;" f +setMatchType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setMatchType($matchType) {$/;" f +setMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setMax($max) {$/;" f +setMaxBadRecords ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setMaxBadRecords($maxBadRecords) {$/;" f +setMaxBalanceTransferRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMaxBalanceTransferRate($maxBalanceTransferRate) {$/;" f +setMaxCashAdvanceRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMaxCashAdvanceRate($maxCashAdvanceRate) {$/;" f +setMaxConcurrentDevices ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setMaxConcurrentDevices($maxConcurrentDevices) {$/;" f +setMaxDownloadDevices ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setMaxDownloadDevices($maxDownloadDevices) {$/;" f +setMaxExclusive ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setMaxExclusive($maxExclusive) {$/;" f +setMaxIdentifierLength ../../../src/lib/Doctrine/DBAL/Schema/SchemaConfig.php /^ public function setMaxIdentifierLength($length)$/;" f +setMaxMessageBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setMaxMessageBytes($maxMessageBytes) {$/;" f +setMaxPurchaseRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMaxPurchaseRate($maxPurchaseRate) {$/;" f +setMaxRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMaxRate($maxRate) {$/;" f +setMaxResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setMaxResults($maxResults) {$/;" f +setMaxResults ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function setMaxResults($maxResults)$/;" f +setMaxResults ../../../src/lib/Doctrine/ORM/Query.php /^ public function setMaxResults($maxResults)$/;" f +setMaxResults ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function setMaxResults($maxResults)$/;" f +setMaxRewardTier ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMaxRewardTier($maxRewardTier) {$/;" f +setMax_results ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setMax_results($max_results) {$/;" f +setMaximumQps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setMaximumQps($maximumQps) {$/;" f +setMaximumTotalQps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setMaximumTotalQps($maximumTotalQps) {$/;" f +setMd5Checksum ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setMd5Checksum($md5Checksum) {$/;" f +setMeanSquaredError ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setMeanSquaredError($meanSquaredError) {$/;" f +setMedium ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setMedium($medium) {$/;" f +setMemberId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMemberId($memberId) {$/;" f +setMember_count ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setMember_count($member_count) {$/;" f +setMembersCanPostAsTheGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setMembersCanPostAsTheGroup($membersCanPostAsTheGroup) {$/;" f +setMembership ../../../src/classes/XLite/Model/Profile.php /^ public function setMembership(\\XLite\\Model\\Membership $membership = null)$/;" f +setMembership ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ public function setMembership(\\XLite\\Model\\Membership $membership = null)$/;" f +setMembership ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ public function setMembership(\\XLite\\Model\\Membership $membership = null)$/;" f +setMemcache ../../../src/lib/Doctrine/Common/Cache/MemcacheCache.php /^ public function setMemcache(Memcache $memcache)$/;" f +setMessage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setMessage($message) {$/;" f +setMessage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setMessage($message) {$/;" f +setMessageDisplayFont ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setMessageDisplayFont($messageDisplayFont) {$/;" f +setMessageModerationLevel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setMessageModerationLevel($messageModerationLevel) {$/;" f +setMessages ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setMessages(\/* array(CommunityMessage) *\/ $messages) {$/;" f +setMetadata ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php /^ public function setMetadata(array $metadata)$/;" f +setMetadataCacheImpl ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setMetadataCacheImpl(Cache $cacheImpl)$/;" f +setMetadataDriver ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/EntityManager.php /^ protected static function setMetadataDriver(\\Doctrine\\ORM\\Configuration $config)$/;" f +setMetadataDriverImpl ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setMetadataDriverImpl(Driver $driverImpl)$/;" f +setMetadataExporter ../../../src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php /^ public function setMetadataExporter(ClassMetadataExporter $metadataExporter)$/;" f +setMetadataFor ../../../src/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php /^ public function setMetadataFor($className, $class);$/;" f +setMetadataFor ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ public function setMetadataFor($className, $class)$/;" f +setMethod ../../../src/classes/XLite/Model/Shipping/Rate.php /^ public function setMethod($method)$/;" f +setMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setMethod($method) {$/;" f +setMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setMethod($method) {$/;" f +setMetrics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setMetrics(\/* array(string) *\/ $metrics) {$/;" f +setMiddleName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setMiddleName($middleName) {$/;" f +setMime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setMime($mime) {$/;" f +setMimeType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setMimeType($mimeType) {$/;" f +setMin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setMin($min) {$/;" f +setMinBalanceTransferRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMinBalanceTransferRate($minBalanceTransferRate) {$/;" f +setMinCashAdvanceRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMinCashAdvanceRate($minCashAdvanceRate) {$/;" f +setMinExclusive ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setMinExclusive($minExclusive) {$/;" f +setMinPurchaseRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMinPurchaseRate($minPurchaseRate) {$/;" f +setMinRate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMinRate($minRate) {$/;" f +setMinRewardTier ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMinRewardTier($minRewardTier) {$/;" f +setMinimumFinanceCharge ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setMinimumFinanceCharge($minimumFinanceCharge) {$/;" f +setMinor ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setMinor($minor) {$/;" f +setMinusVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setMinusVotes($minusVotes) {$/;" f +setMinutes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setMinutes($minutes) {$/;" f +setMode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setMode($mode) {$/;" f +setModelInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setModelInfo(TrainingModelInfo $modelInfo) {$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/Conversations/View/Model/Conversation.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/Main.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/Places/View/Model/PlaceProcessor/APlaceProcessor.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/Product.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/Settings.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/Suppliers/View/Model/Profile/AdminMain.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/CDev/UserPermissions/View/Model/Role.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/Model/Supplier.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/View/Model/AModel.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/View/Model/DataSource/ADataSource.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/View/Model/Profile/Main.php /^ protected function setModelProperties(array $data)$/;" f +setModelProperties ../../../src/classes/XLite/View/Model/Settings.php /^ protected function setModelProperties(array $data)$/;" f +setModelType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setModelType($modelType) {$/;" f +setModerators ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setModerators(\/* array(OrkutAuthorResource) *\/ $moderators) {$/;" f +setModificationTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setModificationTime($modificationTime) {$/;" f +setModifiedByMeDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setModifiedByMeDate($modifiedByMeDate) {$/;" f +setModifiedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setModifiedDate($modifiedDate) {$/;" f +setModifierType ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ public function setModifierType($type)$/;" f +setModifyDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setModifyDate($modifyDate) {$/;" f +setMonth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setMonth(AnalyticsSnapshot $month) {$/;" f +setMpns ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setMpns(\/* array(string) *\/ $mpns) {$/;" f +setMultiValue ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Document.php /^ public function setMultiValue($key, $value, $boost = false)$/;" f +setName ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ public function setName($name)$/;" f +setName ../../../src/classes/XLite/Model/Base/PersonalAddress.php /^ public function setName($value)$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setName(OrkutActivitypersonResourceName $name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setName(ActivityActorName $name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setName(PersonName $name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setName($name) {$/;" f +setName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setName($name) {$/;" f +setName ../../../src/lib/Symfony/Component/Console/Application.php /^ public function setName($name)$/;" f +setName ../../../src/lib/Symfony/Component/Console/Command/Command.php /^ public function setName($name)$/;" f +setNamedListTreatment ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setNamedListTreatment($namedListTreatment)$/;" f +setNamespace ../../../src/lib/Doctrine/Common/Cache/AbstractCache.php /^ public function setNamespace($namespace)$/;" f +setNamespace ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ public function setNamespace($namespace)$/;" f +setNamespaceSeparator ../../../src/lib/Doctrine/Common/ClassLoader.php /^ public function setNamespaceSeparator($sep)$/;" f +setNestTransactionsWithSavepoints ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints)$/;" f +setNetwork ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setNetwork($network) {$/;" f +setNetworkFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setNetworkFee(Money $networkFee) {$/;" f +setNewValue ../../../src/lib/Doctrine/ORM/Event/PreUpdateEventArgs.php /^ public function setNewValue($field, $value)$/;" f +setNext ../../../src/classes/XLite/Model/ListNode.php /^ public function setNext(\\XLite\\Model\\ListNode $node = null)$/;" f +setNextLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setNextLink($nextLink) {$/;" f +setNextLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setNextLink($nextLink) {$/;" f +setNextLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setNextLink($nextLink) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNextPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setNextPageToken($nextPageToken) {$/;" f +setNickname ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setNickname($nickname) {$/;" f +setNocacheHeaders ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ protected function setNocacheHeaders()$/;" f +setNode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setNode($node) {$/;" f +setNonce ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setNonce($nonce) {$/;" f +setNoneVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setNoneVotes($noneVotes) {$/;" f +setNotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setNotes($notes) {$/;" f +setNotnull ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setNotnull($notnull)$/;" f +setNumBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setNumBytes($numBytes) {$/;" f +setNumRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setNumRows($numRows) {$/;" f +setNumSpaces ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setNumSpaces($numSpaces)$/;" f +setNumSpaces ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setNumSpaces($numSpaces)$/;" f +setNumTopics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setNumTopics($numTopics) {$/;" f +setNumber ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setNumber($number) {$/;" f +setNumberCssResources ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setNumberCssResources($numberCssResources) {$/;" f +setNumberHosts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setNumberHosts($numberHosts) {$/;" f +setNumberInstances ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setNumberInstances($numberInstances) {$/;" f +setNumberJsResources ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setNumberJsResources($numberJsResources) {$/;" f +setNumberLabels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setNumberLabels($numberLabels) {$/;" f +setNumberOfReplies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setNumberOfReplies($numberOfReplies) {$/;" f +setNumberOfVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setNumberOfVotes($numberOfVotes) {$/;" f +setNumberResources ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setNumberResources($numberResources) {$/;" f +setNumberStaticResources ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setNumberStaticResources($numberStaticResources) {$/;" f +setObject ../../../src/classes/XLite/Model/Cart.php /^ public static function setObject(\\XLite\\Model\\Order $object)$/;" f +setObject ../../../src/classes/XLite/Model/OrderItem.php /^ public function setObject(\\XLite\\Model\\Base\\IOrderItem $item = null)$/;" f +setObject ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setObject(ActivityObject $object) {$/;" f +setObject ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setObject(ActivityObject $object) {$/;" f +setObject ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setObject(CommentObject $object) {$/;" f +setObject ../../../src/classes/XLite/Module/CDev/Suppliers/Model/OrderItem.php /^ public function setObject(\\XLite\\Model\\Base\\IOrderItem $item = null)$/;" f +setObjectType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setObjectType($objectType) {$/;" f +setObjectType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setObjectType($objectType) {$/;" f +setOfferId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setOfferId($offerId) {$/;" f +setOffersImmediateCashReward ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setOffersImmediateCashReward($offersImmediateCashReward) {$/;" f +setOnSaleDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setOnSaleDate($onSaleDate) {$/;" f +setOpen ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setOpen($open) {$/;" f +setOption ../../../src/lib/Symfony/Component/Console/Input/Input.php /^ public function setOption($name, $value)$/;" f +setOptionId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setOptionId($optionId) {$/;" f +setOptionIds ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setOptionIds(\/* array(int) *\/ $optionIds) {$/;" f +setOptional ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setOptional($optional) {$/;" f +setOptions ../../../src/classes/XLite/Core/Layout.php /^ protected function setOptions()$/;" f +setOptions ../../../src/classes/XLite/Model/WidgetParam/Set.php /^ public function setOptions(array $options)$/;" f +setOptions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setOptions(\/* array(OrkutCommunitypolloptionResource) *\/ $options) {$/;" f +setOptions ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setOptions(array $options)$/;" f +setOptions ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ public function setOptions($options = array())$/;" f +setOrTerms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setOrTerms($orTerms) {$/;" f +setOrder ../../../src/classes/XLite/Model/OrderItem.php /^ public function setOrder(\\XLite\\Model\\Order $order = null)$/;" f +setOrder ../../../src/classes/XLite/Model/Profile.php /^ public function setOrder(\\XLite\\Model\\Order $order = null)$/;" f +setOrderId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setOrderId($orderId) {$/;" f +setOrganizations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setOrganizations(\/* array(PersonOrganizations) *\/ $organizations) {$/;" f +setOrganizer ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setOrganizer($organizer) {$/;" f +setOrganizer ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setOrganizer(EventOrganizer $organizer) {$/;" f +setOrigProfile ../../../src/classes/XLite/Model/Order.php /^ public function setOrigProfile(\\XLite\\Model\\Profile $profile = null)$/;" f +setOriginalContent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setOriginalContent($originalContent) {$/;" f +setOriginalEntityData ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function setOriginalEntityData($entity, array $data)$/;" f +setOriginalEntityProperty ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function setOriginalEntityProperty($oid, $property, $value)$/;" f +setOriginalStartTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setOriginalStartTime(EventDateTime $originalStartTime) {$/;" f +setOtherResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setOtherResponseBytes($otherResponseBytes) {$/;" f +setOutputDir ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php /^ public function setOutputDir($dir)$/;" f +setOutputEncoding ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setOutputEncoding($outputEncoding) {$/;" f +setOutputLabel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setOutputLabel($outputLabel) {$/;" f +setOutputMulti ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setOutputMulti(\/* array(OutputOutputMulti) *\/ $outputMulti) {$/;" f +setOutputValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setOutputValue($outputValue) {$/;" f +setOverLimitFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setOverLimitFee($overLimitFee) {$/;" f +setOverrides ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setOverrides(\/* array(EventReminder) *\/ $overrides) {$/;" f +setOverwriteExistingFiles ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php /^ public function setOverwriteExistingFiles($overwrite)$/;" f +setOwner ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setOwner(OrkutAuthorResource $owner) {$/;" f +setOwner ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function setOwner($entity, array $assoc)$/;" f +setOwners ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setOwners(\/* array(string) *\/ $owners) {$/;" f +setPageCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPageCount($pageCount) {$/;" f +setPageIds ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPageIds(\/* array(string) *\/ $pageIds) {$/;" f +setPageStats ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setPageStats(ResultPageStats $pageStats) {$/;" f +setPagemap ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setPagemap($pagemap) {$/;" f +setPages ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setPages(BlogPages $pages) {$/;" f +setParameter ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public function setParameter($key, $value)$/;" f +setParameter ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function setParameter($key, $value, $type = null)$/;" f +setParameter ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setParameter($key, $value, $type = null)$/;" f +setParameter ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function setParameter($key, $value, $type = null)$/;" f +setParameterValue ../../../src/classes/XLite/Model/DataSource.php /^ public function setParameterValue($name, $value)$/;" f +setParameters ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function setParameters(array $params, array $types = array())$/;" f +setParameters ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setParameters(array $params, array $types = array())$/;" f +setParameters ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function setParameters(array $params, array $types = array())$/;" f +setParent ../../../src/classes/XLite/Model/Category.php /^ public function setParent(\\XLite\\Model\\Category $parent = null)$/;" f +setParent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setParent($parent) {$/;" f +setParentClass ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ public function setParentClass($class)$/;" f +setParentClasses ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setParentClasses(array $classNames)$/;" f +setParentId ../../../src/classes/XLite/Model/Category.php /^ public function setParentId($parentID)$/;" f +setParentLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setParentLink(GoalParentLink $parentLink) {$/;" f +setParentLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setParentLink(ProfileParentLink $parentLink) {$/;" f +setParentLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setParentLink(WebpropertyParentLink $parentLink) {$/;" f +setParentLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setParentLink($parentLink) {$/;" f +setParentSubmissionId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setParentSubmissionId(SubmissionParentSubmissionId $parentSubmissionId) {$/;" f +setParents ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setParents(\/* array(string) *\/ $parents) {$/;" f +setParentsCollection ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setParentsCollection(\/* array(DriveFileParentsCollection) *\/ $parentsCollection) {$/;" f +setPath ../../../src/classes/XLite/Core/FileCache.php /^ public function setPath($path)$/;" f +setPath ../../../src/classes/XLite/Core/Layout.php /^ protected function setPath()$/;" f +setPath ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setPath($path)$/;" f +setPaymentMethod ../../../src/classes/XLite/Model/Order.php /^ public function setPaymentMethod($paymentMethod, $value = null)$/;" f +setPaymentStatus ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ public function setPaymentStatus(\\XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\PaymentStatus $status)$/;" f +setPayoutRank ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setPayoutRank($payoutRank) {$/;" f +setPdf ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPdf(VolumeAccessInfoPdf $pdf) {$/;" f +setPdfPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPdfPosition($pdfPosition) {$/;" f +setPendingMembership ../../../src/classes/XLite/Model/Profile.php /^ public function setPendingMembership(\\XLite\\Model\\Membership $pendingMembership = null)$/;" f +setPersistentData ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ abstract protected function setPersistentData($key, $value);$/;" f +setPersistentData ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/facebook.php /^ protected function setPersistentData($key, $value) {$/;" f +setPerson ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setPerson(OrkutActivitypersonResource $person) {$/;" f +setPhoto_url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setPhoto_url($photo_url) {$/;" f +setPicture ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setPicture($picture) {$/;" f +setPlaceId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPlaceId($placeId) {$/;" f +setPlaceName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPlaceName($placeName) {$/;" f +setPlaceholder ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPlaceholder($placeholder) {$/;" f +setPlacesLived ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPlacesLived(\/* array(PersonPlacesLived) *\/ $placesLived) {$/;" f +setPlanner ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ public function setPlanner(\\Swarm\\Planner $planner)$/;" f +setPlatformOption ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setPlatformOption($name, $value)$/;" f +setPlatformOptions ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setPlatformOptions(array $platformOptions)$/;" f +setPlatforms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setPlatforms(\/* array(StringCount) *\/ $platforms) {$/;" f +setPlusOne ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setPlusOne($plusOne) {$/;" f +setPlusVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setPlusVotes($plusVotes) {$/;" f +setPlusoners ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPlusoners(ActivityObjectPlusoners $plusoners) {$/;" f +setPort ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setPort($port)$/;" f +setPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPosition($volumeId, $timestamp, $position, $optParams = array()) {$/;" f +setPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setPosition($position) {$/;" f +setPost ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setPost(CommentPost $post) {$/;" f +setPostBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setPostBody($postBody) {$/;" f +setPosts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setPosts(BlogPosts $posts) {$/;" f +setPrecision ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setPrecision($precision)$/;" f +setPreferences ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setPreferences($preferences) {$/;" f +setPresenter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setPresenter($presenter) {$/;" f +setPrev ../../../src/classes/XLite/Model/ListNode.php /^ public function setPrev(\\XLite\\Model\\ListNode $node = null)$/;" f +setPrevPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setPrevPageToken($prevPageToken) {$/;" f +setPrevPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setPrevPageToken($prevPageToken) {$/;" f +setPreviewImageUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPreviewImageUrl($previewImageUrl) {$/;" f +setPreviewLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPreviewLink($previewLink) {$/;" f +setPreviousLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setPreviousLink($previousLink) {$/;" f +setPreviousLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setPreviousLink($previousLink) {$/;" f +setPreviousPageToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setPreviousPageToken($previousPageToken) {$/;" f +setPreviousTopMessages ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ protected function setPreviousTopMessages()$/;" f +setPrice ../../../src/classes/XLite/Model/OrderItem.php /^ public function setPrice($price)$/;" f +setPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setPrice($price) {$/;" f +setPrimary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPrimary($primary) {$/;" f +setPrimaryKey ../../../src/lib/Doctrine/DBAL/Schema/Table.php /^ public function setPrimaryKey(array $columns, $indexName = false)$/;" f +setPrimaryLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setPrimaryLanguage($primaryLanguage) {$/;" f +setPrimaryTable ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setPrimaryTable(array $table)$/;" f +setPrintType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPrintType($printType) {$/;" f +setPriority ../../../src/lib/Log.php /^ function setPriority($priority)$/;" f +setPrivate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setPrivate($private) {$/;" f +setPrivateCopy ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setPrivateCopy($privateCopy) {$/;" f +setProduct ../../../src/classes/XLite/Model/OrderItem.php /^ public function setProduct(\\XLite\\Model\\Product $product = null)$/;" f +setProduct ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ public function setProduct(\\XLite\\Model\\Product $product = null)$/;" f +setProduct ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setProduct(ShoppingModelProductJsonV1 $product) {$/;" f +setProductCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setProductCategories(\/* array(int) *\/ $productCategories) {$/;" f +setProductClass ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ public function setProductClass(\\XLite\\Model\\ProductClass $class = null)$/;" f +setProductClass ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ public function setProductClass(\\XLite\\Model\\ProductClass $class = null)$/;" f +setProductCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setProductCode($productCode) {$/;" f +setProductCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setProductCode($productCode) {$/;" f +setProductFeedsEnabled ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setProductFeedsEnabled($productFeedsEnabled) {$/;" f +setProductFlag ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ public function setProductFlag()$/;" f +setProductOptions ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php /^ public function setProductOptions(array $options)$/;" f +setProductOptions ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/OrderItem.php /^ public function setProductOptions(array $options)$/;" f +setProducts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setProducts(\/* array(EventProducts) *\/ $products) {$/;" f +setProfile ../../../src/classes/XLite/Model/Order.php /^ public function setProfile(\\XLite\\Model\\Profile $profile = null)$/;" f +setProfileCopy ../../../src/classes/XLite/Model/Order.php /^ public function setProfileCopy(\\XLite\\Model\\Profile $profile)$/;" f +setProfileId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setProfileId($profileId) {$/;" f +setProfileInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setProfileInfo(GaDataProfileInfo $profileInfo) {$/;" f +setProfileName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setProfileName($profileName) {$/;" f +setProhibitedCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setProhibitedCategories(\/* array(string) *\/ $prohibitedCategories) {$/;" f +setProjectId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setProjectId($projectId) {$/;" f +setProjectReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setProjectReference(ProjectReference $projectReference) {$/;" f +setProjects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setProjects(\/* array(ProjectListProjects) *\/ $projects) {$/;" f +setPromotions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setPromotions(\/* array(Promotion) *\/ $promotions) {$/;" f +setPromotions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setPromotions(\/* array(ProductsPromotions) *\/ $promotions) {$/;" f +setProperties ../../../src/classes/XLite/Base.php /^ public function setProperties(array $assoc)$/;" f +setProperties ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setProperties($properties) {$/;" f +setProperty ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setProperty($property) {$/;" f +setPropertyValue ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ public function setPropertyValue($name, $value)$/;" f +setProvidedId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setProvidedId($providedId) {$/;" f +setProvider ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setProvider(ActivityProvider $provider) {$/;" f +setProxy ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setProxy($host, $user = null, $pass = null, $type = CURLPROXY_SOCKS5)$/;" f +setProxyDir ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setProxyDir($dir)$/;" f +setProxyNamespace ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setProxyNamespace($ns)$/;" f +setPublicDomain ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPublicDomain($publicDomain) {$/;" f +setPublicName ../../../src/classes/XLite/Core/Validator/Exception.php /^ public function setPublicName($name)$/;" f +setPublicName ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ public function setPublicName($name)$/;" f +setPublished ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setPublished($published) {$/;" f +setPublished ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setPublished($published) {$/;" f +setPublished ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setPublished($published) {$/;" f +setPublishedDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPublishedDate($publishedDate) {$/;" f +setPublisher ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setPublisher($publisher) {$/;" f +setPublisherFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setPublisherFee(Money $publisherFee) {$/;" f +setPublisherId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setPublisherId($publisherId) {$/;" f +setPublisherName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setPublisherName($publisherName) {$/;" f +setPurchaseRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setPurchaseRateType($purchaseRateType) {$/;" f +setPureAction ../../../src/classes/XLite/Controller/AController.php /^ protected function setPureAction($flag = false)$/;" f +setQuantity ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setQuantity($quantity) {$/;" f +setQueries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setQueries(Query $queries) {$/;" f +setQuery ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setQuery(GaDataQuery $query) {$/;" f +setQuery ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setQuery($query) {$/;" f +setQuery ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setQuery(JobConfigurationQuery $query) {$/;" f +setQueryCacheDriver ../../../src/lib/Doctrine/ORM/Query.php /^ public function setQueryCacheDriver($queryCache)$/;" f +setQueryCacheImpl ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setQueryCacheImpl(Cache $cacheImpl)$/;" f +setQueryCacheLifetime ../../../src/lib/Doctrine/ORM/Query.php /^ public function setQueryCacheLifetime($timeToLive)$/;" f +setQueryDelimiter ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setQueryDelimiter($queryDelimiter)$/;" f +setQueryMatched ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setQueryMatched($queryMatched) {$/;" f +setQueryStringDelimiter ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function setQueryStringDelimiter($queryStringDelimiter)$/;" f +setQueryTime ../../../src/classes/XLite/Core/Profiler.php /^ public function setQueryTime($query)$/;" f +setQuestion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setQuestion($question) {$/;" f +setRadius ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setRadius($radius) {$/;" f +setRange ../../../src/classes/XLite/Core/Validator/Float.php /^ public function setRange($min, $max = null)$/;" f +setRateType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setRateType($rateType) {$/;" f +setRatesCache ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ protected function setRatesCache(\\XLite\\Model\\Currency $from, \\XLite\\Model\\Currency $to, array $rates)$/;" f +setRating ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setRating($rating) {$/;" f +setRatingsCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setRatingsCount($ratingsCount) {$/;" f +setRdcResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setRdcResponse($rdcResponse) {$/;" f +setReadPingTimeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function setReadPingTimeout($timeout)$/;" f +setReadingPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setReadingPosition(ReadingPosition $readingPosition) {$/;" f +setReason ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setReason($reason) {$/;" f +setReason ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setReason($reason) {$/;" f +setReasonCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setReasonCode($reasonCode) {$/;" f +setRecommendationList ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setRecommendationList(\/* array(ShoppingModelRecommendationsJsonV1RecommendationList) *\/ $recommendationList) {$/;" f +setRecommendations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setRecommendations(\/* array(ShoppingModelRecommendationsJsonV1) *\/ $recommendations) {$/;" f +setRecurrence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setRecurrence(\/* array(string) *\/ $recurrence) {$/;" f +setRecurringEventId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setRecurringEventId($recurringEventId) {$/;" f +setRedirectUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setRedirectUri($redirectUri) {$/;" f +setRedirects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setRedirects(\/* array(string) *\/ $redirects) {$/;" f +setRef ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setRef($ref) {$/;" f +setReferrers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setReferrers(\/* array(StringCount) *\/ $referrers) {$/;" f +setRegExp ../../../src/classes/XLite/Core/Validator/String/RegExp.php /^ public function setRegExp($regExp)$/;" f +setRegenerateEntityIfExists ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setRegenerateEntityIfExists($bool)$/;" f +setRegenerateEntityIfExists ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setRegenerateEntityIfExists($bool)$/;" f +setRegexp ../../../src/classes/XLite/Core/FileCache/Iterator.php /^ public function setRegexp($regexp)$/;" f +setRel ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setRel($rel) {$/;" f +setRelatedQueries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setRelatedQueries(\/* array(string) *\/ $relatedQueries) {$/;" f +setRelatedSite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setRelatedSite($relatedSite) {$/;" f +setRelationshipStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setRelationshipStatus($relationshipStatus) {$/;" f +setReminders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setReminders(EventReminders $reminders) {$/;" f +setReplies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setReplies(PostReplies $replies) {$/;" f +setReplies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setReplies(ActivityObjectReplies $replies) {$/;" f +setReplies ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setReplies(ActivityObjectReplies $replies) {$/;" f +setReplyTo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setReplyTo($replyTo) {$/;" f +setRepositoryPath ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ public function setRepositoryPath($path, $preventCheck = false, $preventDeletion = false)$/;" f +setRequestData ../../../src/classes/XLite/View/Model/AModel.php /^ public function setRequestData($name, $value)$/;" f +setRequestHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setRequestHeaders($headers) {$/;" f +setRequestId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setRequestId($requestId) {$/;" f +setRequestMethod ../../../src/classes/XLite/Core/Request.php /^ public function setRequestMethod($method)$/;" f +setRequestMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setRequestMethod($method) {$/;" f +setResharers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setResharers(ActivityObjectResharers $resharers) {$/;" f +setResolution ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setResolution($resolution) {$/;" f +setResource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setResource($resource) {$/;" f +setResponseBody ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setResponseBody($responseBody) {$/;" f +setResponseCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setResponseCode($responseCode) {$/;" f +setResponseHeaders ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setResponseHeaders($headers) {$/;" f +setResponseHttpCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setResponseHttpCode($responseHttpCode) {$/;" f +setResponseStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setResponseStatus($responseStatus) {$/;" f +setRestricted ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setRestricted($restricted) {$/;" f +setResult ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ public function setResult($result) {$/;" f +setResult ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setResult(ResultFormattedResultsRuleResultsUrlBlocksUrlsResult $result) {$/;" f +setResultCacheDriver ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setResultCacheDriver($resultCacheDriver = null)$/;" f +setResultCacheId ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setResultCacheId($id)$/;" f +setResultCacheImpl ../../../src/lib/Doctrine/ORM/Configuration.php /^ public function setResultCacheImpl(Cache $cacheImpl)$/;" f +setResultCacheLifetime ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setResultCacheLifetime($timeToLive)$/;" f +setResultSetMapping ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function setResultSetMapping(Query\\ResultSetMapping $rsm)$/;" f +setResultSetMapping ../../../src/lib/Doctrine/ORM/Query/ParserResult.php /^ public function setResultSetMapping(ResultSetMapping $rsm)$/;" f +setRetailPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setRetailPrice(VolumeSaleInfoRetailPrice $retailPrice) {$/;" f +setReturnURL ../../../src/classes/XLite/Controller/AController.php /^ public function setReturnURL($url)$/;" f +setReturnURLParam ../../../src/classes/XLite/Module/CDev/Conversations/View/Form/Search.php /^ protected function setReturnURLParam(array &$params)$/;" f +setReturnURLParam ../../../src/classes/XLite/View/Form/AForm.php /^ protected function setReturnURLParam(array &$params)$/;" f +setReturnURLParams ../../../src/classes/XLite/Controller/AController.php /^ public function setReturnURLParams(array $params)$/;" f +setReturnedPaymentFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setReturnedPaymentFee($returnedPaymentFee) {$/;" f +setReview ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setReview(Review $review) {$/;" f +setRewardPartner ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setRewardPartner($rewardPartner) {$/;" f +setRewardUnit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setRewardUnit($rewardUnit) {$/;" f +setRewards ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setRewards(\/* array(CcOfferRewards) *\/ $rewards) {$/;" f +setRewardsExpire ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setRewardsExpire($rewardsExpire) {$/;" f +setRewardsHaveBlackoutDates ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setRewardsHaveBlackoutDates($rewardsHaveBlackoutDates) {$/;" f +setRights ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setRights($rights) {$/;" f +setRole ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setRole($role) {$/;" f +setRole ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setRole($role) {$/;" f +setRole ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setRole($role) {$/;" f +setRollbackOnly ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function setRollbackOnly()$/;" f +setRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setRows(\/* array(string) *\/ $rows) {$/;" f +setRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setRows(\/* array(string) *\/ $rows) {$/;" f +setRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setRows(\/* array(string) *\/ $rows) {$/;" f +setRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setRows(\/* array(TableRow) *\/ $rows) {$/;" f +setRuleImpact ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setRuleImpact($ruleImpact) {$/;" f +setRuleResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setRuleResults(ResultFormattedResultsRuleResults $ruleResults) {$/;" f +setRuleScore ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setRuleScore($ruleScore) {$/;" f +setRules ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setRules(SeriesRules $rules) {$/;" f +setRules ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setRules(TopicRules $rules) {$/;" f +setS3Forbid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ public function setS3Forbid($flag = false)$/;" f +setSQL ../../../src/lib/Doctrine/ORM/NativeQuery.php /^ public function setSQL($sql)$/;" f +setSQLLogger ../../../src/lib/Doctrine/DBAL/Configuration.php /^ public function setSQLLogger(SQLLogger $logger = null)$/;" f +setSQLTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function setSQLTableAlias($tableName, $alias, $dqlAlias = '')$/;" f +setSSL ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setSSL($enabled, $validate = true)$/;" f +setSSLAuth ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function setSSLAuth($sslCert = null, $sslKey = null, $sslCACert = null)$/;" f +setSafe ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSafe($safe) {$/;" f +setSaleDataValidators ../../../src/classes/XLite/Module/CDev/Sale/View/Form/AForm.php /^ protected function setSaleDataValidators(&$data)$/;" f +setSaleInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSaleInfo(VolumeSaleInfo $saleInfo) {$/;" f +setSaleability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSaleability($saleability) {$/;" f +setScale ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setScale($scale)$/;" f +setSchema ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSchema(TableSchema $schema) {$/;" f +setSchemaConfig ../../../src/lib/Doctrine/DBAL/Schema/Table.php /^ public function setSchemaConfig(SchemaConfig $schemaConfig)$/;" f +setScope ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setScope(AclRuleScope $scope) {$/;" f +setScope ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setScope($scope) {$/;" f +setScopes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setScopes($scopes) {$/;" f +setScore ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setScore($score) {$/;" f +setScore ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setScore($score) {$/;" f +setSearchInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSearchInfo(VolumeSearchInfo $searchInfo) {$/;" f +setSearchInformation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSearchInformation(SearchSearchInformation $searchInformation) {$/;" f +setSearchRequest ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setSearchRequest($searchRequest) {$/;" f +setSearchResponse ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setSearchResponse($searchResponse) {$/;" f +setSearchTerms ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSearchTerms($searchTerms) {$/;" f +setSearchTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSearchTime($searchTime) {$/;" f +setSearchType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSearchType($searchType) {$/;" f +setSecureHash ../../../src/classes/XLite/Core/Auth.php /^ public function setSecureHash($hashString)$/;" f +setSegment ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSegment($segment) {$/;" f +setSegmentId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSegmentId($segmentId) {$/;" f +setSelected ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setSelected($selected) {$/;" f +setSelectedRate ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ public function setSelectedRate(\\XLite\\Model\\Shipping\\Rate $rate = null)$/;" f +setSelectedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSelectedText($selectedText) {$/;" f +setSelf ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setSelf($self) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setSelfLink($selfLink) {$/;" f +setSelfLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setSelfLink($selfLink) {$/;" f +setSellerNetwork ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setSellerNetwork($sellerNetwork) {$/;" f +setSendMessageDenyNotification ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setSendMessageDenyNotification($sendMessageDenyNotification) {$/;" f +setSensitiveCategories ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setSensitiveCategories(\/* array(int) *\/ $sensitiveCategories) {$/;" f +setSequence ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setSequence($sequence) {$/;" f +setSequenceGeneratorDefinition ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setSequenceGeneratorDefinition(array $definition)$/;" f +setSeriesId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setSeriesId($seriesId) {$/;" f +setServerMillis ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setServerMillis($serverMillis) {$/;" f +setSetting ../../../src/classes/XLite/Model/Payment/Method.php /^ public function setSetting($name, $value)$/;" f +setShared ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setShared($shared) {$/;" f +setShipping ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setShipping($shipping) {$/;" f +setShortName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setShortName($shortName) {$/;" f +setShortUrlClicks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setShortUrlClicks($shortUrlClicks) {$/;" f +setShowInGroupDirectory ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setShowInGroupDirectory($showInGroupDirectory) {$/;" f +setSid ../../../src/classes/XLite/Model/Session.php /^ public function setSid($value)$/;" f +setSignature ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSignature($signature) {$/;" f +setSilenceClose ../../../src/classes/XLite/Controller/AController.php /^ protected function setSilenceClose($flag = true)$/;" f +setSite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setSite(SiteVerificationWebResourceGettokenRequestSite $site) {$/;" f +setSite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setSite(SiteVerificationWebResourceResourceSite $site) {$/;" f +setSiteLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setSiteLanguage($siteLanguage) {$/;" f +setSiteSearch ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSiteSearch($siteSearch) {$/;" f +setSiteSearchCategoryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSiteSearchCategoryParameters($siteSearchCategoryParameters) {$/;" f +setSiteSearchFilter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSiteSearchFilter($siteSearchFilter) {$/;" f +setSiteSearchQueryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSiteSearchQueryParameters($siteSearchQueryParameters) {$/;" f +setSiteUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setSiteUrl($siteUrl) {$/;" f +setSites ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setSites(\/* array(string) *\/ $sites) {$/;" f +setSkin ../../../src/classes/XLite/Core/Layout.php /^ public function setSkin($skin)$/;" f +setSkipLeadingRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSkipLeadingRows($skipLeadingRows) {$/;" f +setSku ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setSku($sku) {$/;" f +setSkuName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setSkuName($skuName) {$/;" f +setSmall ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSmall($small) {$/;" f +setSmallThumbnail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSmallThumbnail($smallThumbnail) {$/;" f +setSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSnippet($snippet) {$/;" f +setSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSnippet($snippet) {$/;" f +setSnippetUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSnippetUrl($snippetUrl) {$/;" f +setSort ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSort(\/* array(string) *\/ $sort) {$/;" f +setSort ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSort($sort) {$/;" f +setSource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSource($source) {$/;" f +setSource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSource(ReviewSource $source) {$/;" f +setSource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSource($source) {$/;" f +setSourceTable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSourceTable(TableReference $sourceTable) {$/;" f +setSourceUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSourceUri(\/* array(string) *\/ $sourceUri) {$/;" f +setSourceUris ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSourceUris(\/* array(string) *\/ $sourceUris) {$/;" f +setSpecVersion ../../../src/lib/Symfony/Component/Yaml/Yaml.php /^ static public function setSpecVersion($version)$/;" f +setSpecialGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setSpecialGroup($specialGroup) {$/;" f +setSpeed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setSpeed($speed) {$/;" f +setSpelling ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setSpelling(SearchSpelling $spelling) {$/;" f +setSpelling ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setSpelling(ProductsSpelling $spelling) {$/;" f +setSponsorLogo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setSponsorLogo($sponsorLogo) {$/;" f +setSponsorName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setSponsorName($sponsorName) {$/;" f +setSponsorUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setSponsorUrl($sponsorUrl) {$/;" f +setSqlExecutor ../../../src/lib/Doctrine/ORM/Query/ParserResult.php /^ public function setSqlExecutor($executor)$/;" f +setStarred ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setStarred($starred) {$/;" f +setStart ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setStart($start) {$/;" f +setStart ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setStart(EventDateTime $start) {$/;" f +setStartDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setStartDate($startDate) {$/;" f +setStartIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setStartIndex($startIndex) {$/;" f +setStartIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setStartIndex($startIndex) {$/;" f +setStartIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setStartIndex($startIndex) {$/;" f +setStartOffset ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setStartOffset($startOffset) {$/;" f +setStartPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setStartPage($startPage) {$/;" f +setStartPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setStartPosition($startPosition) {$/;" f +setStartTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setStartTime($startTime) {$/;" f +setStartTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setStartTime($startTime) {$/;" f +setStart_date ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setStart_date($start_date) {$/;" f +setStart_index ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setStart_index($start_index) {$/;" f +setState ../../../src/classes/XLite/Model/Base/Address.php /^ public function setState($state)$/;" f +setState ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setState($state) {$/;" f +setState ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function setState($state) {$/;" f +setState ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setState($state) {$/;" f +setStateSelectorIds ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ protected function setStateSelectorIds(array &$fields)$/;" f +setStateSelectorIds ../../../src/classes/XLite/View/FormField/Select/Country.php /^ public function setStateSelectorIds($selectorId, $inputId)$/;" f +setStateSelectorIds ../../../src/classes/XLite/View/Model/Address/Address.php /^ protected function setStateSelectorIds(array &$fields)$/;" f +setStatementCopyFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setStatementCopyFee($statementCopyFee) {$/;" f +setStatistics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setStatistics(JobStatistics $statistics) {$/;" f +setStatus ../../../src/classes/XLite/Model/Order.php /^ public function setStatus($value)$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setStatus($status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setStatus($status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setStatus(JobStatus $status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setStatus($status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setStatus($status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setStatus($status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setStatus($status) {$/;" f +setStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setStatus($status) {$/;" f +setSteps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setSteps(\/* array(GoalUrlDestinationDetailsSteps) *\/ $steps) {$/;" f +setStorageDataLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setStorageDataLocation($storageDataLocation) {$/;" f +setStoragePMMLLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setStoragePMMLLocation($storagePMMLLocation) {$/;" f +setStoragePMMLModelLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setStoragePMMLModelLocation($storagePMMLModelLocation) {$/;" f +setStoreCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setStoreCode($storeCode) {$/;" f +setStoreId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setStoreId($storeId) {$/;" f +setStoreName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setStoreName($storeName) {$/;" f +setStores ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setStores(\/* array(ProductsStores) *\/ $stores) {$/;" f +setStyle ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ static public function setStyle($name, $options = array())$/;" f +setSubAccounts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setSubAccounts(\/* array(Account) *\/ $subAccounts) {$/;" f +setSubclasses ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setSubclasses(array $subclasses)$/;" f +setSubject ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setSubject($subject) {$/;" f +setSubmissionId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setSubmissionId($submissionId) {$/;" f +setSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setSubmissions($submissions) {$/;" f +setSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setSubmissions(SeriesRulesSubmissions $submissions) {$/;" f +setSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setSubmissions(TopicRulesSubmissions $submissions) {$/;" f +setSubsets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public function setSubsets($subsets) {$/;" f +setSubtitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setSubtitle($subtitle) {$/;" f +setSuggestion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setSuggestion($suggestion) {$/;" f +setSummary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setSummary($summary) {$/;" f +setSummaryOverride ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setSummaryOverride($summaryOverride) {$/;" f +setSupplier ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ public function setSupplier(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier)$/;" f +setSupplier ../../../src/classes/XLite/Module/CDev/Suppliers/Model/OrderItem.php /^ public function setSupplier(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier = null)$/;" f +setSupportsReporting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setSupportsReporting($supportsReporting) {$/;" f +setSupportsReporting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setSupportsReporting($supportsReporting) {$/;" f +setTTLStart ../../../src/classes/XLite/Core/Marketplace.php /^ protected function setTTLStart($cell)$/;" f +setTableId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setTableId($tableId) {$/;" f +setTableId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTableId($tableId) {$/;" f +setTableName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setTableName($tableName)$/;" f +setTableReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTableReference(TableReference $tableReference) {$/;" f +setTables ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTables(\/* array(TableListTables) *\/ $tables) {$/;" f +setTables ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ public function setTables($entityTables, $manyToManyTables)$/;" f +setTagId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setTagId($tagId) {$/;" f +setTagline ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setTagline($tagline) {$/;" f +setTargetingInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setTargetingInfo(CustomChannelTargetingInfo $targetingInfo) {$/;" f +setTax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setTax($tax) {$/;" f +setTelephone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setTelephone($telephone) {$/;" f +setTemplate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setTemplate($template) {$/;" f +setText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setText($text) {$/;" f +setText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setText($text) {$/;" f +setTextResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setTextResponseBytes($textResponseBytes) {$/;" f +setTextSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setTextSnippet($textSnippet) {$/;" f +setTextToSpeechPermission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setTextToSpeechPermission($textToSpeechPermission) {$/;" f +setThickness ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setThickness($thickness) {$/;" f +setThumbnail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setThumbnail($thumbnail) {$/;" f +setThumbnailHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setThumbnailHeight($thumbnailHeight) {$/;" f +setThumbnailLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setThumbnailLink($thumbnailLink) {$/;" f +setThumbnailWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setThumbnailWidth($thumbnailWidth) {$/;" f +setThumbnails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setThumbnails(\/* array(ShoppingModelProductJsonV1ImagesThumbnails) *\/ $thumbnails) {$/;" f +setTimeMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setTimeMax($timeMax) {$/;" f +setTimeMin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setTimeMin($timeMin) {$/;" f +setTimeWindowSeconds ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setTimeWindowSeconds($timeWindowSeconds) {$/;" f +setTimeZone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setTimeZone($timeZone) {$/;" f +setTimeoutMs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTimeoutMs($timeoutMs) {$/;" f +setTimestampMs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public function setTimestampMs($timestampMs) {$/;" f +setTimezone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setTimezone($timezone) {$/;" f +setTimezone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setTimezone($timezone) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setTitle($title) {$/;" f +setTitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setTitle($title) {$/;" f +setToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setToken($token) {$/;" f +setTop ../../../src/Includes/install/templates/common_js_code.js.php /^function setTop(elm, y)$/;" f +setTopLevelNodeFlag ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ public function setTopLevelNodeFlag()$/;" f +setTopicId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setTopicId($topicId) {$/;" f +setTopics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setTopics(\/* array(ModeratorTopicsResourcePartial) *\/ $topics) {$/;" f +setTotal ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setTotal($total) {$/;" f +setTotalBytesProcessed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTotalBytesProcessed($totalBytesProcessed) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setTotalItems($totalItems) {$/;" f +setTotalMatchedRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setTotalMatchedRows($totalMatchedRows) {$/;" f +setTotalMatchedRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setTotalMatchedRows($totalMatchedRows) {$/;" f +setTotalMatchingVariants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setTotalMatchingVariants($totalMatchingVariants) {$/;" f +setTotalNumberOfVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setTotalNumberOfVotes($totalNumberOfVotes) {$/;" f +setTotalParticipants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setTotalParticipants($totalParticipants) {$/;" f +setTotalRequestBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setTotalRequestBytes($totalRequestBytes) {$/;" f +setTotalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setTotalResults($totalResults) {$/;" f +setTotalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setTotalResults($totalResults) {$/;" f +setTotalRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setTotalRows($totalRows) {$/;" f +setTotals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setTotals(\/* array(string) *\/ $totals) {$/;" f +setTotals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setTotals(\/* array(string) *\/ $totals) {$/;" f +setTotalsForAllResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setTotalsForAllResults($totalsForAllResults) {$/;" f +setTrackingUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setTrackingUrl($trackingUrl) {$/;" f +setTrainingStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setTrainingStatus($trainingStatus) {$/;" f +setTransactionIsolation ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function setTransactionIsolation($level)$/;" f +setTranslatedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setTranslatedText($translatedText) {$/;" f +setTranslations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setTranslations(\/* array(SubmissionTranslations) *\/ $translations) {$/;" f +setTranslations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public function setTranslations(\/* array(TranslationsResource) *\/ $translations) {$/;" f +setTransparency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setTransparency($transparency) {$/;" f +setTrashed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setTrashed($trashed) {$/;" f +setTravelInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setTravelInsurance($travelInsurance) {$/;" f +setTwoHours ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setTwoHours(AnalyticsSnapshot $twoHours) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ public function setType($type)$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setType($type) {$/;" f +setType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setType($type) {$/;" f +setType ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setType(Type $type)$/;" f +setURLToReturn ../../../src/classes/XLite/Controller/Customer/Cart.php /^ protected function setURLToReturn()$/;" f +setURLToReturn ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ protected function setURLToReturn($page)$/;" f +setUnauthSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setUnauthSubmissionAllowed($unauthSubmissionAllowed) {$/;" f +setUnauthVotingAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setUnauthVotingAllowed($unauthVotingAllowed) {$/;" f +setUnit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setUnit($unit) {$/;" f +setUnitPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setUnitPrice(Money $unitPrice) {$/;" f +setUnsigned ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function setUnsigned($unsigned)$/;" f +setUpdateEntityIfExists ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function setUpdateEntityIfExists($bool)$/;" f +setUpdateEntityIfExists ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function setUpdateEntityIfExists($bool)$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setUpdated($updated) {$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setUpdated($updated) {$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setUpdated($updated) {$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setUpdated($updated) {$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setUpdated($updated) {$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setUpdated($updated) {$/;" f +setUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function setUpdated($updated) {$/;" f +setUpgraded ../../../src/classes/XLite/Upgrade/Cell.php /^ public function setUpgraded($value)$/;" f +setUpgraded ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ public function setUpgraded()$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setUrl(SearchUrl $url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setUrl($url) {$/;" f +setUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setUrl($url) {$/;" f +setUrlBlocks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setUrlBlocks(\/* array(ResultFormattedResultsRuleResultsUrlBlocks) *\/ $urlBlocks) {$/;" f +setUrlDestinationDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setUrlDestinationDetails(GoalUrlDestinationDetails $urlDestinationDetails) {$/;" f +setUrlPattern ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setUrlPattern($urlPattern) {$/;" f +setUrlPattern ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setUrlPattern($urlPattern) {$/;" f +setUrls ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setUrls(\/* array(ResultFormattedResultsRuleResultsUrlBlocksUrls) *\/ $urls) {$/;" f +setUrls ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setUrls(\/* array(PersonUrls) *\/ $urls) {$/;" f +setUseBackoff ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function setUseBackoff($enable)$/;" f +setUseBatch ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setUseBatch($useBatch) {$/;" f +setUseDefault ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setUseDefault($useDefault) {$/;" f +setUseEventValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setUseEventValue($useEventValue) {$/;" f +setUseObjects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function setUseObjects($useObjects) {$/;" f +setUser ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setUser($user) {$/;" f +setUserAgent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function setUserAgent($userAgent) {$/;" f +setUserByEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setUserByEmail($userByEmail) {$/;" f +setUserInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setUserInfo(VolumeUserInfo $userInfo) {$/;" f +setUserPermission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function setUserPermission(Permission $userPermission) {$/;" f +setUser_id ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setUser_id($user_id) {$/;" f +setUsername ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setUsername($username) {$/;" f +setUsers ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setUsers($users) {$/;" f +setUtility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setUtility(\/* array(double) *\/ $utility) {$/;" f +setV ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setV($v) {$/;" f +setVATMembership ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ public function setVATMembership(\\XLite\\Model\\Membership $membership = null)$/;" f +setVATZone ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ public function setVATZone(\\XLite\\Model\\Zone $zone = null)$/;" f +setValidator ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ public function setValidator(\\XLite\\Core\\Validator\\AValidator $validator)$/;" f +setValidator ../../../src/classes/XLite/Core/Validator/PlainArray.php /^ public function setValidator(\\XLite\\Core\\Validator\\AValidator $itemValidator)$/;" f +setValue ../../../src/classes/XLite/Model/Base/NameValue.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/Model/Base/Surcharge.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/Model/SessionCell.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/Module/CDev/Conversations/View/FormField/Input/Text/Recipient.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/FormField/Select/Languages.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setValue($value) {$/;" f +setValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setValue($value) {$/;" f +setValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setValue($value) {$/;" f +setValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setValue($value) {$/;" f +setValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setValue($value) {$/;" f +setValue ../../../src/classes/XLite/View/FormField/AFormField.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/View/FormField/Select/ASelect.php /^ public function setValue($value)$/;" f +setValue ../../../src/classes/XLite/View/FormField/Select/Multiple.php /^ public function setValue($value)$/;" f +setValueFromRequest ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ public function setValueFromRequest(array $data = array(), $key = null)$/;" f +setVar ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ public function setVar($name, $value)$/;" f +setVariableRatesLastUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setVariableRatesLastUpdated($variableRatesLastUpdated) {$/;" f +setVariableRatesUpdateFrequency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public function setVariableRatesUpdateFrequency($variableRatesUpdateFrequency) {$/;" f +setVariant ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public function setVariant($variant) {$/;" f +setVariant ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setVariant(ShoppingModelProductJsonV1 $variant) {$/;" f +setVariants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setVariants(\/* array(ShoppingModelProductJsonV1Variants) *\/ $variants) {$/;" f +setVariants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public function setVariants($variants) {$/;" f +setVendorType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setVendorType(\/* array(int) *\/ $vendorType) {$/;" f +setVerb ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setVerb($verb) {$/;" f +setVerb ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setVerb($verb) {$/;" f +setVerbosity ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ public function setVerbosity($level)$/;" f +setVerbosity ../../../src/lib/Symfony/Component/Console/Output/OutputInterface.php /^ function setVerbosity($level);$/;" f +setVerificationMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function setVerificationMethod($verificationMethod) {$/;" f +setVerified_email ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public function setVerified_email($verified_email) {$/;" f +setVersion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public function setVersion(ResultVersion $version) {$/;" f +setVersion ../../../src/lib/Symfony/Component/Console/Application.php /^ public function setVersion($version)$/;" f +setVersionField ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setVersionField($versionField)$/;" f +setVersionMapping ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setVersionMapping(array &$mapping)$/;" f +setVersioned ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function setVersioned($bool)$/;" f +setVideoSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setVideoSubmissionAllowed($videoSubmissionAllowed) {$/;" f +setVideoSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setVideoSubmissions($videoSubmissions) {$/;" f +setVideoURL ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setVideoURL($videoURL) {$/;" f +setViewOrderUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setViewOrderUrl($viewOrderUrl) {$/;" f +setViewType ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ public function setViewType($type)$/;" f +setViewability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setViewability($viewability) {$/;" f +setViewport ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setViewport(BooksLayerGeoDataGeoViewport $viewport) {$/;" f +setVisibility ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ public function setVisibility($isSetting)$/;" f +setVisibility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setVisibility($visibility) {$/;" f +setVisibility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setVisibility($visibility) {$/;" f +setVisitNumPagesDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setVisitNumPagesDetails(GoalVisitNumPagesDetails $visitNumPagesDetails) {$/;" f +setVisitTimeOnSiteDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setVisitTimeOnSiteDetails(GoalVisitTimeOnSiteDetails $visitTimeOnSiteDetails) {$/;" f +setVolumeCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setVolumeCount($volumeCount) {$/;" f +setVolumeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setVolumeId($volumeId) {$/;" f +setVolumeInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setVolumeInfo(VolumeVolumeInfo $volumeInfo) {$/;" f +setVolumesLastUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setVolumesLastUpdated($volumesLastUpdated) {$/;" f +setVote ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setVote($vote) {$/;" f +setVote ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setVote(ModeratorVotesResourcePartial $vote) {$/;" f +setVotedOptions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function setVotedOptions(\/* array(int) *\/ $votedOptions) {$/;" f +setVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setVotes(SeriesRulesVotes $votes) {$/;" f +setVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function setVotes(TopicRulesVotes $votes) {$/;" f +setWarnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public function setWarnings(\/* array(string) *\/ $warnings) {$/;" f +setWarnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public function setWarnings(\/* array(string) *\/ $warnings) {$/;" f +setWarnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function setWarnings(\/* array(string) *\/ $warnings) {$/;" f +setWebDirWOSlash ../../../src/Includes/Utils/ConfigParser.php /^ protected static function setWebDirWOSlash()$/;" f +setWebPropertyId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setWebPropertyId($webPropertyId) {$/;" f +setWebReaderLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setWebReaderLink($webReaderLink) {$/;" f +setWebsiteUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public function setWebsiteUrl($websiteUrl) {$/;" f +setWeek ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public function setWeek(AnalyticsSnapshot $week) {$/;" f +setWhoCanInvite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setWhoCanInvite($whoCanInvite) {$/;" f +setWhoCanJoin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setWhoCanJoin($whoCanJoin) {$/;" f +setWhoCanPostMessage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setWhoCanPostMessage($whoCanPostMessage) {$/;" f +setWhoCanViewGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setWhoCanViewGroup($whoCanViewGroup) {$/;" f +setWhoCanViewMembership ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function setWhoCanViewMembership($whoCanViewMembership) {$/;" f +setWidgetParams ../../../src/classes/XLite/Core/Handler.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/ACustomer.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Model/Conversations.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/Module/CDev/FeaturedProducts/View/Customer/FeaturedProducts.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/Module/CDev/Sale/View/ASale.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/Module/CDev/Sale/View/SaleBlock.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/FormField/AFormField.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/FormField/Input/Text/Price.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/FormField/Select/CurrencyFormat.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/FormField/Select/Multiple.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/Image.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/ItemsList/AItemsList.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/Payment/Iframe.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetParams ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ public function setWidgetParams(array $params)$/;" f +setWidgetRequestParamValues ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ protected function setWidgetRequestParamValues(array &$params)$/;" f +setWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function setWidth($width) {$/;" f +setWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function setWidth($width) {$/;" f +setWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function setWidth($width) {$/;" f +setWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public function setWidth($width) {$/;" f +setWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public function setWidth($width) {$/;" f +setWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public function setWidth($width) {$/;" f +setWriteDisposition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function setWriteDisposition($writeDisposition) {$/;" f +setWritePingTimeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service/Balancer.php /^ public function setWritePingTimeout($timeout)$/;" f +setZone ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ public function setZone(\\XLite\\Model\\Zone $zone = null)$/;" f +setZone ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ public function setZone(\\XLite\\Model\\Zone $zone = null)$/;" f +setting ../../../src/classes/XLite/Model/Payment/Method.php /^ $setting = new \\XLite\\Model\\Payment\\MethodSetting();$/;" v +setting ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Drupal.php /^ $setting = substr($setting, 0, 12);$/;" v +setting_id ../../../src/classes/XLite/Model/Payment/MethodSetting.php /^ protected $setting_id;$/;" v +settings ../../../src/classes/XLite/Controller/Admin/PaymentMethod.php /^ $settings = \\XLite\\Core\\Request::getInstance()->settings;$/;" v +settings ../../../src/classes/XLite/Model/Payment/Method.php /^ $this->settings = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +settings ../../../src/classes/XLite/Model/Payment/Method.php /^ protected $settings;$/;" v +settings ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ $settings = block_custom_block_get($delta);$/;" v +settings ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ $settings = $widget->getWidgetSettings();$/;" v +settings ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Model.php /^ $settings = db_select('block_lc_widget_settings')$/;" v +settings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->settings = new SettingsServiceResource($this, $this->serviceName, 'settings', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/calendar", "https:\/\/www.googleapis.com\/auth\/calendar.readonly"], "id": "calendar.settings.list", "httpMethod": "GET", "path": "users\/me\/settings", "response": {"$ref": "Settings"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/calendar", "https:\/\/www.googleapis.com\/auth\/calendar.readonly"], "parameters": {"setting": {"required": true, "type": "string", "location": "path"}}, "id": "calendar.settings.get", "httpMethod": "GET", "path": "users\/me\/settings\/{setting}", "response": {"$ref": "Setting"}}}}', true));$/;" v +settings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $settings;$/;" v +setupChannel ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP.php /^ protected function setupChannel()$/;" f +shared ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->shared = $shared;$/;" v +shared ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $shared;$/;" v +shemaDefault ../../../src/classes/XLite/View/Model/AModel.php /^ protected $shemaDefault = array();$/;" v +shipping ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/CheckoutSuccess.php /^ $shipping = $order->getSurchargeSumByType('SHIPPING');$/;" v +shipping ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/Header.php /^ $shipping = $order->getSurchargeSumByType('SHIPPING');$/;" v +shipping ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->shipping = $shipping;$/;" v +shipping ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $shipping;$/;" v +shippingAddress ../../../src/classes/XLite/Model/Profile.php /^ $shippingAddress = $this->getShippingAddress();$/;" v +shippingAddress ../../../src/classes/XLite/View/Form/Checkout/UpdateProfile.php /^ $shippingAddress = $validator->addPair($/;" v +shippingModifier ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $shippingModifier = $this->getModifier(\\XLite\\Model\\Base\\Surcharge::TYPE_SHIPPING, 'SHIPPING');$/;" v +shippingModifier ../../../src/classes/XLite/View/Checkout/Steps.php /^ protected $shippingModifier;$/;" v +shippingModifier ../../../src/classes/XLite/View/Invoice.php /^ $this->shippingModifier = $this->getOrder()$/;" v +shippingModifier ../../../src/classes/XLite/View/Invoice.php /^ protected $shippingModifier;$/;" v +shippingModifier ../../../src/classes/XLite/View/Order/Details/Admin/Info.php /^ $this->shippingModifier = $this->getOrder()$/;" v +shippingModifier ../../../src/classes/XLite/View/Order/Details/Admin/Info.php /^ protected $shippingModifier;$/;" v +shipping_id ../../../src/classes/XLite/Model/Order.php /^ protected $shipping_id = 0;$/;" v +shipping_markups ../../../src/classes/XLite/Model/Shipping/Method.php /^ $this->shipping_markups = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +shipping_markups ../../../src/classes/XLite/Model/Shipping/Method.php /^ protected $shipping_markups;$/;" v +shipping_markups ../../../src/classes/XLite/Model/Zone.php /^ $this->shipping_markups = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +shipping_markups ../../../src/classes/XLite/Model/Zone.php /^ protected $shipping_markups;$/;" v +shipping_method ../../../src/classes/XLite/Model/Shipping/Markup.php /^ protected $shipping_method;$/;" v +shipping_method_name ../../../src/classes/XLite/Model/Order.php /^ protected $shipping_method_name = '';$/;" v +shipping_methods ../../../src/classes/XLite/Model/ProductClass.php /^ $this->shipping_methods = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +shipping_methods ../../../src/classes/XLite/Model/ProductClass.php /^ protected $shipping_methods;$/;" v +shippingaddress ../../../src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php /^ $shippingaddress = $this->getProfile()->getShippingAddress();$/;" v +shopCurrency ../../../src/classes/XLite/Controller/Admin/Currency.php /^ $shopCurrency = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config')$/;" v +shortName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->shortName = $shortName;$/;" v +shortName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $shortName;$/;" v +shortURL ../../../src/classes/XLite/View/AView.php /^ $shortURL = str_replace(LC_DS, '\/', $file);$/;" v +shortUrlClicks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->shortUrlClicks = $shortUrlClicks;$/;" v +shortUrlClicks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $shortUrlClicks;$/;" v +shortcut ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : '';$/;" v +shortcut ../../../src/lib/Symfony/Component/Console/Input/InputOption.php /^ $shortcut = substr($shortcut, 1);$/;" v +shortcut ../../../src/lib/Symfony/Component/Console/Input/InputOption.php /^ $shortcut = null;$/;" v +shortcut ../../../src/lib/Symfony/Component/Console/Input/InputOption.php /^ $this->shortcut = $shortcut;$/;" v +shortcut ../../../src/lib/Symfony/Component/Console/Input/InputOption.php /^ protected $shortcut;$/;" v +shortcutToName ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ protected function shortcutToName($shortcut)$/;" f +shortcuts ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ $this->shortcuts = array();$/;" v +shortcuts ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ protected $shortcuts;$/;" v +shouldRetainParam ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ protected function shouldRetainParam($param) {$/;" f +showCommon ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected function showCommon($method, $action, $message, array $args)$/;" f +showDelete ../../../src/classes/XLite/View/ImageUpload.php /^ public $showDelete = true;$/;" v +showDetails ../../../src/Includes/install/templates/common_js_code.js.php /^function showDetails(code)$/;" f +showError ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected function showError($action, $message = null, array $args = array())$/;" f +showErrorPage ../../../src/Includes/ErrorHandler.php /^ protected static function showErrorPage($code, $message, $page = null)$/;" f +showInGroupDirectory ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->showInGroupDirectory = $showInGroupDirectory;$/;" v +showInGroupDirectory ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $showInGroupDirectory;$/;" v +showInfo ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected function showInfo($action, $message = null, array $args = array())$/;" f +showMessage ../../../src/Includes/Utils/Operator.php /^ public static function showMessage($message, $addNewline = true)$/;" f +showQueryStatus ../../../src/Includes/functions.php /^function showQueryStatus($myerr, $ignoreErrors)$/;" f +showReorder ../../../src/classes/XLite/View/OrderList/AOrderList.php /^ protected function showReorder(\\XLite\\Model\\Order $order)$/;" f +showSettingsForm ../../../src/classes/XLite/Module/AModule.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/AustraliaPost/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Bestsellers/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Conversations/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/DrupalConnector/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/GoSocial/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Moneybookers/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Multicurrency/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/PaypalWPS/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/ProductOptions/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/ProductTranslators/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Qiwi/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Quantum/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/Sale/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/SolrSearch/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/USPS/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/VAT/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/CDev/XMLSitemap/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Main.php /^ public static function showSettingsForm()$/;" f +showSettingsForm ../../../src/classes/XLite/Module/SpurIT/Wishlist/Main.php /^ public static function showSettingsForm()$/;" f +showShipAsBillCheckbox ../../../src/classes/XLite/View/FormField/Separator/ShippingAddress.php /^ protected function showShipAsBillCheckbox()$/;" f +showStepInfo ../../../src/Includes/Decorator/Utils/CacheManager.php /^ public static function showStepInfo()$/;" f +showStepMessage ../../../src/Includes/Decorator/Utils/CacheManager.php /^ public static function showStepMessage($text, $addNewline = false)$/;" f +showWarning ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected function showWarning($action, $message = null, array $args = array())$/;" f +show_install_css ../../../src/Includes/install/templates/common_html.php /^function show_install_css() {$/;" f +show_install_html_header ../../../src/Includes/install/templates/common_html.php /^function show_install_html_header() {$/;" f +show_title ../../../src/classes/XLite/Model/Category.php /^ protected $show_title = true;$/;" v +shutdown ../../../src/Includes/ErrorHandler.php /^ public static function shutdown()$/;" f +sid ../../../src/classes/XLite/Core/Session.php /^ $sid = $GLOBALS['_' . $key][$arg];$/;" v +sid ../../../src/classes/XLite/Core/Session.php /^ $sid = null;$/;" v +sid ../../../src/classes/XLite/Core/Session.php /^ $sid = null;$/;" v +sid ../../../src/classes/XLite/Model/Repo/Session.php /^ $sid = '';$/;" v +sid ../../../src/classes/XLite/Model/Session.php /^ $this->sid = $value;$/;" v +sid ../../../src/classes/XLite/Model/Session.php /^ protected $sid;$/;" v +sig ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $sig = self::base64UrlDecode($encoded_sig);$/;" v +sign ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $sign = '−';$/;" v +sign ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $sign = '+';$/;" v +sign ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $sign = '';$/;" v +sign ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuth.php /^ abstract public function sign(apiHttpRequest $request);$/;" f +sign ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAuthNone.php /^ public function sign(apiHttpRequest $request) {$/;" f +sign ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function sign(apiHttpRequest $request) {$/;" f +sign ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiP12Signer.php /^ function sign($data) {$/;" f +sign ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiSigner.php /^ abstract public function sign($data);$/;" f +sign ../../../src/classes/XLite/View/FormField/Inline/Input/Text/Price.php /^ $sign = 0 <= $value ? '' : '− ';$/;" v +sign ../../../src/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php /^ $this->sign = $sign;$/;" v +sign ../../../src/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php /^ public $sign;$/;" v +sign ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $sign = $isPlus;$/;" v +sign ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $sign = null;$/;" v +sign_cert_file ../../../src/lib/PHPMailer/class.phpmailer.php /^ $this->sign_cert_file = $cert_filename;$/;" v +sign_cert_file ../../../src/lib/PHPMailer/class.phpmailer.php /^ private $sign_cert_file = "";$/;" v +sign_key_file ../../../src/lib/PHPMailer/class.phpmailer.php /^ $this->sign_key_file = $key_filename;$/;" v +sign_key_file ../../../src/lib/PHPMailer/class.phpmailer.php /^ private $sign_key_file = "";$/;" v +sign_key_pass ../../../src/lib/PHPMailer/class.phpmailer.php /^ $this->sign_key_pass = $key_pass;$/;" v +sign_key_pass ../../../src/lib/PHPMailer/class.phpmailer.php /^ private $sign_key_pass = "";$/;" v +signature ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $signature = $signer->sign($signingInput);$/;" v +signature ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $signature = apiUtils::urlSafeB64Decode($segments[2]);$/;" v +signature ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->signature = $signature;$/;" v +signature ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $signature;$/;" v +signature ../../../src/lib/Log.php /^ $signature = serialize(array($handler, $name, $ident, $conf, $level));$/;" v +signatureTemplate ../../../src/classes/XLite/View/Mailer.php /^ protected $signatureTemplate = 'signature.tpl';$/;" v +signed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $signed = $segments[0] . "." . $segments[1];$/;" v +signed ../../../src/lib/PHPMailer/class.phpmailer.php /^ $signed = tempnam("", "signed");$/;" v +signed ../../../src/lib/PHPMailer/class.phpmailer.php /^ $signed = $this->DKIM_Sign($toSign);$/;" v +signedRequest ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->signedRequest = $this->parseSignedRequest($/;" v +signedRequest ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->signedRequest = null;$/;" v +signedRequest ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ protected $signedRequest;$/;" v +signed_request ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $signed_request = $this->getSignedRequest();$/;" v +signer ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $signer = new apiP12Signer($this->privateKey, $this->privateKeyPassword);$/;" v +signingInput ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiAssertionCredentials.php /^ $signingInput = implode('.', $segments);$/;" v +silence ../../../src/classes/XLite/Controller/Console/Cron.php /^ $silence = !$runner->getTitle();$/;" v +silenceClose ../../../src/classes/XLite/Controller/AController.php /^ $this->silenceClose = (bool) $flag;$/;" v +silenceClose ../../../src/classes/XLite/Controller/AController.php /^ protected $silenceClose = false;$/;" v +silenceClose ../../../src/classes/XLite/Controller/Customer/SelectAddress.php /^ $this->silenceClose = true;$/;" v +silent ../../../src/classes/XLite/Controller/Admin/Autocomplete.php /^ $this->silent = true;$/;" v +silent ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $this->silent = true;$/;" v +silent ../../../src/classes/XLite/Controller/Admin/Log.php /^ $this->silent = true;$/;" v +silent ../../../src/classes/XLite/Controller/Admin/Storage.php /^ $this->silent = true;$/;" v +silent ../../../src/classes/XLite/Controller/Customer/Autocomplete.php /^ $this->silent = true;$/;" v +silent ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $this->silent = true;$/;" v +silent ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker.php /^ protected $silent = false;$/;" v +silent ../../../src/classes/XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php /^ $this->silent = true;$/;" v +simple ../../../src/classes/XLite/Model/Repo/Config.php /^ $simple = true;$/;" v +simple ../../../src/classes/XLite/Model/Repo/Config.php /^ $simple = in_array($/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php /^ public $simpleArithmeticExpression;$/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php /^ $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();$/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/AbsFunction.php /^ public $simpleArithmeticExpression;$/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php /^ $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();$/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LocateFunction.php /^ public $simpleArithmeticExpression = false;$/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php /^ $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();$/;" v +simpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php /^ public $simpleArithmeticExpression;$/;" v +simpleConditionalExpression ../../../src/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php /^ public $simpleConditionalExpression;$/;" v +simpleSelectClause ../../../src/lib/Doctrine/ORM/Query/AST/Subselect.php /^ $this->simpleSelectClause = $simpleSelectClause;$/;" v +simpleSelectClause ../../../src/lib/Doctrine/ORM/Query/AST/Subselect.php /^ public $simpleSelectClause;$/;" v +simpleSelectExpression ../../../src/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php /^ $this->simpleSelectExpression = $simpleSelectExpression;$/;" v +simpleSelectExpression ../../../src/lib/Doctrine/ORM/Query/AST/SimpleSelectClause.php /^ public $simpleSelectExpression;$/;" v +simpleStateFieldPathExpression ../../../src/lib/Doctrine/ORM/Query/AST/IndexBy.php /^ $this->simpleStateFieldPathExpression = $simpleStateFieldPathExpression;$/;" v +simpleStateFieldPathExpression ../../../src/lib/Doctrine/ORM/Query/AST/IndexBy.php /^ public $simpleStateFieldPathExpression = null;$/;" v +singleIdNotAllowedOnCompositePrimaryKey ../../../src/lib/Doctrine/ORM/Mapping/MappingException.php /^ public static function singleIdNotAllowedOnCompositePrimaryKey($entity) {$/;" f +singleton ../../../src/lib/Log.php /^ static function singleton($handler, $name = '', $ident = '', $conf = array(),$/;" f +singletons ../../../src/classes/XLite/Base.php /^ protected static $singletons = array($/;" v +site ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->site = $site;$/;" v +site ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public $site;$/;" v +siteEmail ../../../src/Includes/install/install.php /^ $siteEmail = (!empty($params['site_mail']) ? $params['site_mail'] : $params['login']);$/;" v +siteLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->siteLanguage = $siteLanguage;$/;" v +siteLanguage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $siteLanguage;$/;" v +siteSearch ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->siteSearch = $siteSearch;$/;" v +siteSearch ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $siteSearch;$/;" v +siteSearchCategoryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->siteSearchCategoryParameters = $siteSearchCategoryParameters;$/;" v +siteSearchCategoryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $siteSearchCategoryParameters;$/;" v +siteSearchFilter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->siteSearchFilter = $siteSearchFilter;$/;" v +siteSearchFilter ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $siteSearchFilter;$/;" v +siteSearchQueryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->siteSearchQueryParameters = $siteSearchQueryParameters;$/;" v +siteSearchQueryParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $siteSearchQueryParameters;$/;" v +siteUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->siteUrl = $siteUrl;$/;" v +siteUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $siteUrl;$/;" v +sites ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->sites = $sites;$/;" v +sites ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $sites;$/;" v +size ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $size = $size ?: \\XLite\\Core\\Request::getInstance()->MAX_FILE_SIZE;$/;" v +size ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $size = \\XLite\\Core\\Converter::convertShortSizeToHumanReadable($size);$/;" v +size ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $size = ini_get('upload_max_filesize');$/;" v +size ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $size = null;$/;" v +size ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $size = $length;$/;" v +size ../../../src/classes/XLite/Core/Converter.php /^ $size = intval($match[1]);$/;" v +size ../../../src/classes/XLite/Core/Converter.php /^ $size = intval($size);$/;" v +size ../../../src/classes/XLite/Core/Converter.php /^ $size = round($size \/ static::GIGABYTE, 3);$/;" v +size ../../../src/classes/XLite/Core/Converter.php /^ $size = round($size \/ static::KILOBYTE, 3);$/;" v +size ../../../src/classes/XLite/Core/Converter.php /^ $size = round($size \/ static::MEGABYTE, 3);$/;" v +size ../../../src/classes/XLite/Core/Converter.php /^ $size = static::convertShortSize($size);$/;" v +size ../../../src/classes/XLite/Core/Profiler.php /^ $size = intval(@filesize($file));$/;" v +size ../../../src/classes/XLite/Core/XML.php /^ $size = 0;$/;" v +size ../../../src/classes/XLite/Core/XML.php /^ $size = sizeof($children[$tagname]);$/;" v +size ../../../src/classes/XLite/Model/Base/Image.php /^ $size = ($width ?: 'x') . '.' . ($height ?: 'x');$/;" v +size ../../../src/classes/XLite/Model/Base/Storage.php /^ protected $size = 0;$/;" v +size ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $this->size = strlen($this->data);$/;" v +size ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ public $size;$/;" v +size ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ $this->size = $size;$/;" v +size ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ protected $size;$/;" v +size ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $size = isset($sizes[$key]) ? $sizes[$key] : $sizes['other'];$/;" v +size ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function size()$/;" f +sizeFunc ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sizeFunc = new AST\\Functions\\SizeFunction('size');$/;" v +sizes ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $sizes = static::getIconSizes();$/;" v +skin ../../../src/Includes/Decorator/Plugin/Templates/ATemplates.php /^ $skin = \\Includes\\Utils\\ArrayManager::getIndex(explode(LC_DS, $base), 0, true);$/;" v +skin ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $skin = preg_replace('\/^([a-x0-9_]+)[^a-x0-9_].+$\/Ssi', '\\1', substr($this->file, strlen(LC_DIR_SKINS)));$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $skin = $options['skin'];$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $skin = static::PATH_ADMIN;$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $skin = static::PATH_COMMON;$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $skin = static::PATH_CONSOLE;$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $skin = static::PATH_MAIL;$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $this->skin = $skin;$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ $this->skin = null;$/;" v +skin ../../../src/classes/XLite/Core/Layout.php /^ protected $skin;$/;" v +skin ../../../src/classes/XLite/View/Mailer.php /^ $skin = $layout->getSkin();$/;" v +skinPaths ../../../src/classes/XLite/Core/Layout.php /^ protected $skinPaths = array();$/;" v +skins ../../../src/Includes/Decorator/Plugin/Templates/Plugin/ViewLists/Main.php /^ $skins = array();$/;" v +skins ../../../src/classes/XLite/Core/Layout.php /^ $skins = $this->getSkinPaths($this->currentInterface);$/;" v +skipLeadingRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->skipLeadingRows = $skipLeadingRows;$/;" v +skipLeadingRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $skipLeadingRows;$/;" v +skipUntil ../../../src/lib/Doctrine/Common/Lexer.php /^ public function skipUntil($type)$/;" f +sku ../../../src/classes/XLite/Model/OrderItem.php /^ $this->sku = '';$/;" v +sku ../../../src/classes/XLite/Model/OrderItem.php /^ protected $sku = '';$/;" v +sku ../../../src/classes/XLite/Model/Product.php /^ protected $sku;$/;" v +sku ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->sku = $sku;$/;" v +sku ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $sku;$/;" v +sku ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ protected $sku;$/;" v +skuBoost ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected $skuBoost = 3;$/;" v +skuName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->skuName = $skuName;$/;" v +skuName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $skuName;$/;" v +sleepImpl ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $sleepImpl = $this->_generateSleep($class);$/;" v +sleepImpl ../../../src/lib/Doctrine/ORM/Proxy/ProxyFactory.php /^ $sleepImpl = '';$/;" v +sleepTime ../../../src/classes/XLite/Controller/Console/Cron.php /^ protected $sleepTime = 3;$/;" v +slice ../../../src/classes/XLite/Core/Operator.php /^ $slice = max(0, $slice) + 1;$/;" v +slice ../../../src/lib/Doctrine/Common/Collections/ArrayCollection.php /^ public function slice($offset, $length = null)$/;" f +slice ../../../src/lib/Doctrine/Common/Collections/Collection.php /^ public function slice($offset, $length = null);$/;" f +slice ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function slice($offset, $length = null)$/;" f +slice ../../../src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php /^ public function slice(PersistentCollection $coll, $offset, $length = null)$/;" f +slice ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ public function slice(PersistentCollection $coll, $offset, $length = null)$/;" f +slice ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ public function slice(PersistentCollection $coll, $offset, $length = null)$/;" f +sm ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $sm = $this->_em->getConnection()->getSchemaManager();$/;" v +small ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->small = $small;$/;" v +small ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $small;$/;" v +smallThumbnail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->smallThumbnail = $smallThumbnail;$/;" v +smallThumbnail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $smallThumbnail;$/;" v +smtp ../../../src/lib/PHPMailer/class.phpmailer.php /^ $this->smtp = new SMTP();$/;" v +smtp ../../../src/lib/PHPMailer/class.phpmailer.php /^ private $smtp = NULL;$/;" v +smtp_conn ../../../src/lib/PHPMailer/class.smtp.php /^ $this->smtp_conn = 0;$/;" v +smtp_conn ../../../src/lib/PHPMailer/class.smtp.php /^ $this->smtp_conn = 0;$/;" v +smtp_conn ../../../src/lib/PHPMailer/class.smtp.php /^ $this->smtp_conn = @fsockopen($host, \/\/ the host of the server$/;" v +smtp_conn ../../../src/lib/PHPMailer/class.smtp.php /^ private $smtp_conn; \/\/ the socket to the server$/;" v +smtp_from ../../../src/lib/PHPMailer/class.phpmailer.php /^ $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;$/;" v +snapshot ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ $this->snapshot = $this->coll->toArray();$/;" v +snapshot ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ private $snapshot = array();$/;" v +snippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->snippet = $snippet;$/;" v +snippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $snippet;$/;" v +snippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->snippet = $snippet;$/;" v +snippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $snippet;$/;" v +snippetUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->snippetUrl = $snippetUrl;$/;" v +snippetUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $snippetUrl;$/;" v +soapCallsReturnCodes ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ protected $soapCallsReturnCodes = array($/;" v +sock_status ../../../src/lib/PHPMailer/class.smtp.php /^ $sock_status = socket_get_status($this->smtp_conn);$/;" v +soft_break ../../../src/lib/PHPMailer/class.phpmailer.php /^ $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;$/;" v +solrLimit ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $this->solrLimit = $value[1];$/;" v +solrLimit ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $this->solrLimit = 1000000;$/;" v +solrLimit ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected $solrLimit;$/;" v +solrOffset ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $this->solrOffset = $value[0];$/;" v +solrOffset ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $this->solrOffset = 0;$/;" v +solrOffset ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected $solrOffset;$/;" v +solrParameters ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $this->solrParameters = array('fl' => array('id'));$/;" v +solrParameters ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected $solrParameters;$/;" v +solrQuery ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $this->solrQuery = array('enabled' => 'enabled:true');$/;" v +solrQuery ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ protected $solrQuery;$/;" v +solrResponse ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $solrResponse = new Apache_Solr_Response($httpResponse, $this->_createDocuments, $this->_collapseSingleValueArrays);$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = 'price';$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = 'pure_name_' . strtolower(\\XLite\\Core\\Session::getInstance()->getLanguage()->getCode());$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = 'quantity';$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = 'sku';$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = 'weight';$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = null;$/;" v +solrSort ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $solrSort = $this->convertSolrSortField($sort);$/;" v +some ../../../src/lib/Doctrine/ORM/Query/AST/Node.php /^ $some = true;$/;" v +some ../../../src/lib/Doctrine/ORM/Query/AST/Node.php /^ $some = false;$/;" v +some ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function some($subquery)$/;" f +sort ../../../src/classes/XLite/Model/Repo/Product.php /^ $sort = 'calculatedPrice';$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->sort = $sort;$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $sort;$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->sort = $sort;$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $sort;$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ $sort = 'calculatedAmount';$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ $sort = 'calculatedName';$/;" v +sort ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ $sort = 'calculatedSku';$/;" v +sortByModes ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/Suppliers.php /^ protected $sortByModes = array($/;" v +sortByModes ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/ACustomer.php /^ protected $sortByModes = array($/;" v +sortByModes ../../../src/classes/XLite/Module/CDev/Conversations/View/ItemsList/Customer/Conversation.php /^ protected $sortByModes = array($/;" v +sortByModes ../../../src/classes/XLite/Module/CDev/Places/View/ItemsList/Model/Places.php /^ protected $sortByModes = array($/;" v +sortByModes ../../../src/classes/XLite/View/ItemsList/AItemsList.php /^ protected $sortByModes = array();$/;" v +sortByModes ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $this->sortByModes = array($/;" v +sortByModes ../../../src/classes/XLite/View/ItemsList/Product/Customer/Category.php /^ $this->sortByModes = array($/;" v +sortCallback ../../../src/classes/XLite/Core/Profiler.php /^ public function sortCallback($a, $b)$/;" f +sortCommands ../../../src/lib/Symfony/Component/Console/Application.php /^ protected function sortCommands($commands)$/;" f +sortOrder ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Supplier/Customer/ACustomer.php /^ $sortOrder = explode(' ', $orderBy[0]);$/;" v +sortOrder ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ $sortOrder = explode(' ', $orderBy[0]);$/;" v +sortOrderModes ../../../src/classes/XLite/View/ItemsList/AItemsList.php /^ protected $sortOrderModes = array($/;" v +sortStates ../../../src/classes/XLite/Model/Zone.php /^ static protected function sortStates($a, $b)$/;" f +sortWidgetIds ../../../src/classes/XLite/View/ItemsList/AItemsList.php /^ protected static $sortWidgetIds = array();$/;" v +sorted ../../../src/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php /^ $sorted = array_reverse($this->_sorted);$/;" v +source ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php /^ $source = $source$/;" v +source ../../../src/classes/XLite/Core/Doctrine/Annotation/Purpose.php /^ public $source;$/;" v +source ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->source = $dom->saveHTML();$/;" v +source ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->source = $class::$method($this->source);$/;" v +source ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->source = \\Includes\\Utils\\FileManager::read($file);$/;" v +source ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->source = preg_replace($/;" v +source ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected $source = null;$/;" v +source ../../../src/classes/XLite/Core/Session.php /^ $source = $key;$/;" v +source ../../../src/classes/XLite/Core/Session.php /^ $source = null;$/;" v +source ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ protected $source;$/;" v +source ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $source = new \\XLite\\Model\\DataSource;$/;" v +source ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $source = $this->getModelObject()->getSource();$/;" v +source ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->source = $source;$/;" v +source ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $source;$/;" v +source ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->source = $source;$/;" v +source ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $source;$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $source = $variant->getTranslation($this->getSourceLanguageCode());$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $source = $group->getTranslation($this->getSourceLanguageCode());$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $source = $option->getTranslation($this->getSourceLanguageCode());$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $source = \\XLite\\Core\\Request::getInstance()->source ?: $this->getSourceLanguageCode();$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $source = $product->getTranslation($this->getSourceLanguageCode());$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $source = new \\XLite\\Model\\DataSource;$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Ecwid.php /^ $source = new static($configuration);$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $source = $configuration->detectSource();$/;" v +source ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Supplier.php /^ $source = new \\XLite\\Model\\DataSource;$/;" v +source ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $source = \\Includes\\Utils\\FileManager::read($path);$/;" v +source ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $source = null;$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $sourceClass = $this->_getClassMetadata($sourceClassName);$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sourceClass = $this->_em->getClassMetadata($assoc['sourceEntity']);$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sourceClass = $this->_em->getClassMetadata($assoc['sourceEntity']);$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sourceClass = $this->_em->getClassMetadata($mapping['sourceEntity']);$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sourceClass = $this->_em->getClassMetadata($mapping['targetEntity']);$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sourceClass = $this->_em->getClassMetadata(get_class($mapping->getOwner()));$/;" v +sourceClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sourceClass = $this->_em->getClassMetadata($relation['sourceEntity']);$/;" v +sourceClassName ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $sourceClassName = $this->_rsm->aliasMap[$this->_rsm->parentAliasMap[$dqlAlias]];$/;" v +sourceColumnName ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php /^ $sourceColumnName = $class->getQuotedColumnName($/;" v +sourceFieldName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $sourceFieldName = $assocMapping['fieldName'];$/;" v +sourceFieldName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $sourceFieldName = $assocMapping['fieldName'];$/;" v +sourceFile ../../../src/Includes/install/install.php /^ $sourceFile = constant('LC_DIR_ROOT') . $source_dir . '\/' . $file;$/;" v +sourceFile ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ $sourceFile = realpath($file[0]);$/;" v +sourceFile ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ $sourceFile = $rc->getFileName();$/;" v +sourceFile ../../../src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php /^ $sourceFile = realpath($file->getPathName());$/;" v +sourceFile ../../../src/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php /^ $sourceFile = $rc->getFileName();$/;" v +sourceId ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sourceId = $uow->getEntityIdentifier($coll->getOwner());$/;" v +sourceId ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sourceId = $uow->getEntityIdentifier($element);$/;" v +sourceShortName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $sourceShortName = strtolower($mapping['sourceEntity']);$/;" v +sourceShortName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $sourceShortName = strtolower(substr($mapping['sourceEntity'], strrpos($mapping['sourceEntity'], '\\\\') + 1));$/;" v +sourceTable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->sourceTable = $sourceTable;$/;" v +sourceTable ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $sourceTable;$/;" v +sourceTableAlias ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php /^ $sourceTableAlias = $sqlWalker->getSQLTableAlias($class->table['name'], $dqlAlias);$/;" v +sourceTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sourceTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);$/;" v +sourceTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sourceTableAlias = $this->getSQLTableAlias($sourceClass->table['name'], $joinAssocPathExpr->identificationVariable);$/;" v +sourceUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->sourceUri = $sourceUri;$/;" v +sourceUri ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $sourceUri;$/;" v +sourceUris ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->sourceUris = $sourceUris;$/;" v +sourceUris ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $sourceUris;$/;" v +space ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function space()$/;" f +spacePos ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $spacePos = strrpos($fromClause, ' ');$/;" v +space_left ../../../src/lib/PHPMailer/class.phpmailer.php /^ $space_left = $length - strlen($buf) - 1;$/;" v +spansColumns ../../../src/lib/Doctrine/DBAL/Schema/Index.php /^ public function spansColumns(array $columnNames)$/;" f +spec ../../../src/lib/Symfony/Component/Yaml/Yaml.php /^ static protected $spec = '1.2';$/;" v +specialGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->specialGroup = $specialGroup;$/;" v +specialGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $specialGroup;$/;" v +speed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ $this->speed = $speed;$/;" v +speed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public $speed;$/;" v +spelling ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->spelling = $spelling;$/;" v +spelling ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $spelling;$/;" v +spelling ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->spelling = $spelling;$/;" v +spelling ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $spelling;$/;" v +split ../../../src/classes/XLite/View/AView.php /^ protected function split(array $array, $count)$/;" f +spointer ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $spointer = $h + $s * 4;$/;" v +sponsorLogo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->sponsorLogo = $sponsorLogo;$/;" v +sponsorLogo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $sponsorLogo;$/;" v +sponsorName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->sponsorName = $sponsorName;$/;" v +sponsorName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $sponsorName;$/;" v +sponsorUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->sponsorUrl = $sponsorUrl;$/;" v +sponsorUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $sponsorUrl;$/;" v +sql ../../../src/Includes/Utils/Database.php /^ $sql = '';$/;" v +sql ../../../src/Includes/Utils/Database.php /^ $sql = substr($sql, 0, strlen($sql) - 1);$/;" v +sql ../../../src/Includes/Utils/Database.php /^ $sql = '';$/;" v +sql ../../../src/classes/XLite/Core/Database.php /^ $sql = array();$/;" v +sql ../../../src/classes/XLite/Core/Statement.php /^ $sql = $this->_stmt->queryString;$/;" v +sql ../../../src/classes/XLite/Core/Statement.php /^ $sql = $this->_sql;$/;" v +sql ../../../src/lib/Doctrine/DBAL/Connection.php /^ $sql = 'UPDATE ' . $tableName . ' SET ' . implode(', ', $set)$/;" v +sql ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ $sql = $args[0];$/;" v +sql ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ $sql = $args[0];$/;" v +sql ../../../src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php /^ $sql = "ALTER SESSION SET ".implode(" ", $vars);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $sql = $this->getForeignKeyBaseDeclarationSQL($foreignKey);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $sql = $this->_getCreateTableSQL($tableName, $columns, $options);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $sql = '';$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ $sql = 'SELECT db22.* FROM (SELECT ROW_NUMBER() OVER() AS DC_ROWNUM, db21.* '.$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff));$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $sql = array_merge($sql, $this->_getAlterTableIndexForeignKeySQL($diff));$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $sql = "SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, ".$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $sql = array_merge($/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sql = array_merge($sql, $this->getCreateAutoincrementSql($name, $table));$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $sql = parent::_getCreateTableSQL($table, $columns, $options);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $sql = $this->getSQLForDelete();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $sql = $this->getSQLForSelect();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $sql = $this->getSQLForUpdate();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $sql = '';$/;" v +sql ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $this->sql = $sql;$/;" v +sql ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ private $sql;$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListDatabasesSQL();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListSequencesSQL($database);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListTableColumnsSQL($table, $database);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListTableForeignKeysSQL($table, $database);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListTableIndexesSQL($table, $this->_conn->getDatabase());$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListTablesSQL();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $sql = $this->_platform->getListViewsSQL($database);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $sql = '';$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $sql = substr($view['text'], $pos+4);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $sql = $this->_platform->getListTablesSQL();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $sql = $this->_platform->getDropAutoincrementSql($table);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ $sql = array_merge($/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ $sql = array_merge($sql, $platform->getAlterTableSQL($tableDiff));$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ $sql = array();$/;" v +sql ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ $sql = array_merge($sql, $foreignKeySql);$/;" v +sql ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php /^ $sql = file_get_contents($fileName);$/;" v +sql ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $sql = $this->getSql();$/;" v +sql ../../../src/lib/Doctrine/ORM/Id/SequenceGenerator.php /^ $sql = $conn->getDatabasePlatform()->getSequenceNextValSQL($this->_sequenceName);$/;" v +sql ../../../src/lib/Doctrine/ORM/Id/TableGenerator.php /^ $sql = $conn->getDatabasePlatform()->getTableHiLoCurrentValSql($this->_tableName, $this->_sequenceName);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php /^ $sql = $this->_getDeleteRowSQL($coll);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php /^ $sql = $this->_getDeleteSQL($coll);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php /^ $sql = $this->_getInsertRowSQL($coll);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php /^ $sql = $this->_getSQLTableAlias($class->name, $alias == 'r' ? '' : $alias) . '.' . $class->getQuotedColumnName($field, $this->_platform);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = "SELECT " . $versionFieldColumnName . " FROM " . $versionedClass->getQuotedTableName($this->_platform)$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = "UPDATE $quotedTableName SET " . implode(', ', $set)$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = $this->_getSQLTableAlias($class->name, $alias == 'r' ? '' : $alias) . '.' . $class->getQuotedColumnName($field, $this->_platform);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, $lockMode);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, 0, $limit, $offset);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = $this->_getSelectEntitiesSQL($criteria, null, 0, $limit, $offset, $orderBy);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = $this->_getSelectEntitiesSQL($id);$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = 'SELECT 1 '$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $sql = 'SELECT 1 FROM ' . $this->_class->getQuotedTableName($this->_platform)$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sql = 'SELECT 1 FROM ' . $joinTable['name'] . ' WHERE ' . $whereClause;$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $sql = 'SELECT count(*) FROM ' . $joinTable['name'] . ' WHERE ' . $whereClause;$/;" v +sql ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $sql = "SELECT count(*) FROM " . $class->getQuotedTableName($this->_conn->getDatabasePlatform()) . " WHERE " . $where;$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php /^ $sql = 'SELECT COUNT(*) FROM ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->_scalarResultAliasMap[$columnName];$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkPathExpression($expr);$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = ' INNER JOIN ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = ' LEFT JOIN ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = '';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $collMemberExpr->not ? 'NOT ' : '';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $stringExpr->dispatch($this) . ($likeExpr->not ? ' NOT' : '') . ' LIKE ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->_platform->modifyLimitQuery($/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkArithmeticExpression($betweenExpr->expression);$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkDeleteClause($AST->deleteClause);$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkPathExpression($inExpr->pathExpression)$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkSelectClause($AST->selectClause);$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkSimpleSelectClause($subselect->simpleSelectClause);$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = $this->walkUpdateClause($AST->updateClause);$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = '';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = 'COALESCE(';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = 'DELETE FROM ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : '') . implode($/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = 'UPDATE ';$/;" v +sql ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sql = ($existsExpr->not) ? 'NOT ' : '';$/;" v +sqlCollector ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $sqlCollector = new CreateSchemaSqlCollector($platform);$/;" v +sqlFile ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $sqlFile = LC_DIR_TMP . sprintf('sqldump.uploaded.%d.sql', time());$/;" v +sqlParams ../../../src/lib/Doctrine/ORM/Query.php /^ $sqlParams = array_values($sqlParams);$/;" v +sqlParams ../../../src/lib/Doctrine/ORM/Query.php /^ $sqlParams = $types = array();$/;" v +sqlPart ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $sqlPart = array($sqlPart);$/;" v +sqlParts ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ private $sqlParts = array($/;" v +sqlParts ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlParts = array ();$/;" v +sqlParts ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlParts = array();$/;" v +sqlPositions ../../../src/lib/Doctrine/ORM/Query.php /^ $sqlPositions = $paramMappings[$key];$/;" v +sqlTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);$/;" v +sqlTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlTableAlias = $this->getSQLTableAlias($owningClass->table['name'], $dqlAlias);$/;" v +sqlTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);$/;" v +sqlTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlTableAlias = $this->getSQLTableAlias($subClass->table['name'], $dqlAlias);$/;" v +sqlTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias);$/;" v +sqldumpFile ../../../src/classes/XLite/Controller/Admin/Base/BackupRestore.php /^ $this->sqldumpFile = LC_DIR_BACKUP . 'sqldump.sql.php';$/;" v +sqldumpFile ../../../src/classes/XLite/Controller/Admin/Base/BackupRestore.php /^ protected $sqldumpFile = null;$/;" v +sqls ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ $sqls = parent::_getCreateTableSQL($tableName, $columns, $options);$/;" v +sqls ../../../src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php /^ $sqls = $schemaTool->getCreateSchemaSql($metadatas);$/;" v +sqls ../../../src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php /^ $sqls = $schemaTool->getDropDatabaseSQL();$/;" v +sqls ../../../src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php /^ $sqls = $schemaTool->getDropSchemaSQL($metadatas);$/;" v +sqls ../../../src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php /^ $sqls = $schemaTool->getUpdateSchemaSql($metadatas, $saveMode);$/;" v +sqrt ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function sqrt($x)$/;" f +src ../../../src/lib/Doctrine/Common/Annotations/PhpParser.php /^ $src = file_get_contents($filename);$/;" v +ssl ../../../src/lib/PHPMailer/class.phpmailer.php /^ $ssl = ($this->SMTPSecure == 'ssl');$/;" v +sslCACert ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $sslCACert = null;$/;" v +sslCert ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $sslCert = null;$/;" v +sslKey ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $sslKey = null;$/;" v +stack ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $stack = array();$/;" v +stack ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->stack = array();$/;" v +stackParameters ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ private $stackParameters = array($/;" v +starred ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->starred = $starred;$/;" v +starred ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $starred;$/;" v +stars ../../../src/classes/XLite/View/VoteBar.php /^ $stars = array();$/;" v +start ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $start = $key;$/;" v +start ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $start = $end = null;$/;" v +start ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $start = (!$start || $end < $start) ? 0 : max($start, 0);$/;" v +start ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $start = abs(intval($start));$/;" v +start ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $start = null;$/;" v +start ../../../src/classes/XLite/Core/Marketplace.php /^ $start = \\XLite\\Core\\TmpVars::getInstance()->$cell;$/;" v +start ../../../src/classes/XLite/Core/Profiler.php /^ protected function start($start)$/;" f +start ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $start = max(0, intval($start));$/;" v +start ../../../src/classes/XLite/Model/Repo/Order.php /^ $start = empty($value[0]) ? null : intval($value[0]);$/;" v +start ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ $start = empty($value[0]) ? null : intval($value[0]);$/;" v +start ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->start = $start;$/;" v +start ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $start;$/;" v +start ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $start = microtime(true);$/;" v +start ../../../src/classes/XLite/View/LanguagesModify/Dialog.php /^ $start = ($data['page'] - 1) * $this->limit;$/;" v +start ../../../src/classes/XLite/View/OrderList/Search.php /^ $start = isset($this->conditions['startDate']) ? $this->conditions['startDate'] : 0;$/;" v +start ../../../src/classes/XLite/View/OrderSearch.php /^ $start = isset($this->conditions['startDate']) ? $this->conditions['startDate'] : 0;$/;" v +start ../../../src/classes/XLite/View/Pager/APager.php /^ $start = $this->getStartItem();$/;" v +start ../../../src/lib/Doctrine/DBAL/Logging/DebugStack.php /^ $this->start = microtime(true);$/;" v +start ../../../src/lib/Doctrine/DBAL/Logging/DebugStack.php /^ public $start = null;$/;" v +start ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $start = $offset + 1;$/;" v +start ../../../src/lib/PHPMailer/class.phpmailer.php /^ $start = "=?".$this->CharSet."?B?";$/;" v +startCounter ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ $startCounter = $this->userAccountsPerStepCounter;$/;" v +startCurrentForm ../../../src/classes/XLite/View/Model/AModel.php /^ protected function startCurrentForm()$/;" f +startDate ../../../src/classes/XLite/Controller/Admin/OrderList.php /^ $this->startDate = mktime(0, 0, 0, $date['mon'], 1, $date['year']);$/;" v +startDate ../../../src/classes/XLite/Controller/Admin/OrderList.php /^ $this->startDate = $this->getDateValue('startDate');$/;" v +startDate ../../../src/classes/XLite/Model/Repo/Profile.php /^ $startDate = mktime(0, 0, 0, date('n', $tmpDate), date('j', $tmpDate), date('Y', $tmpDate));$/;" v +startDate ../../../src/classes/XLite/Model/Repo/Profile.php /^ $startDate = mktime(0, 0, 0, date('n', $endDate), 1, date('Y', $endDate));$/;" v +startDate ../../../src/classes/XLite/Model/Repo/Profile.php /^ $startDate = mktime(0, 0, 0, date('n', $endDate), date('j', $endDate), date('Y', $endDate));$/;" v +startDate ../../../src/classes/XLite/Model/Repo/Profile.php /^ $startDate = mktime(0, 0, 0, date('n', $startDay), date('j', $startDay), date('Y', $startDay));$/;" v +startDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->startDate = $startDate;$/;" v +startDate ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $startDate;$/;" v +startDay ../../../src/classes/XLite/Model/Repo/Profile.php /^ $startDay = $endDate - (date('w', $endDate) * 86400);$/;" v +startDownload ../../../src/classes/XLite/Controller/AController.php /^ protected function startDownload($filename, $contentType = 'application\/force-download')$/;" f +startDump ../../../src/classes/XLite/Controller/AController.php /^ protected function startDump()$/;" f +startDump ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ protected function startDump()$/;" f +startEntityManager ../../../src/classes/XLite/Core/Database.php /^ public function startEntityManager()$/;" f +startExport ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ protected function startExport()$/;" f +startImage ../../../src/classes/XLite/Controller/AController.php /^ protected function startImage()$/;" f +startImportStep ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ protected function startImportStep()$/;" f +startIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->startIndex = $startIndex;$/;" v +startIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $startIndex;$/;" v +startIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->startIndex = $startIndex;$/;" v +startIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $startIndex;$/;" v +startIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->startIndex = $startIndex;$/;" v +startIndex ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $startIndex;$/;" v +startMemory ../../../src/classes/XLite/Controller/Console/Cron.php /^ $this->startMemory = memory_get_usage(true);$/;" v +startOffset ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function startOffset()$/;" f +startOffset ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->startOffset = $startOffset;$/;" v +startOffset ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $startOffset;$/;" v +startPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->startPage = $startPage;$/;" v +startPage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $startPage;$/;" v +startPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->startPosition = $startPosition;$/;" v +startPosition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $startPosition;$/;" v +startProduction ../../../src/lib/Doctrine/ORM/Query/Printer.php /^ public function startProduction($name)$/;" f +startQuery ../../../src/classes/XLite/Core/Profiler.php /^ public function startQuery($sql, array $params = null, array $types = null)$/;" f +startQuery ../../../src/lib/Doctrine/DBAL/Logging/DebugStack.php /^ public function startQuery($sql, array $params = null, array $types = null)$/;" f +startQuery ../../../src/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php /^ public function startQuery($sql, array $params = null, array $types = null)$/;" f +startQuery ../../../src/lib/Doctrine/DBAL/Logging/SQLLogger.php /^ public function startQuery($sql, array $params = null, array $types = null);$/;" f +startStep ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static function startStep($step)$/;" f +startStep ../../../src/classes/XLite/Core/EventListener/Base/Countable.php /^ protected function startStep()$/;" f +startTime ../../../src/classes/XLite/Controller/Console/Cron.php /^ $this->startTime = time();$/;" v +startTime ../../../src/classes/XLite/Controller/Console/Cron.php /^ protected $startTime;$/;" v +startTime ../../../src/classes/XLite/Module/CDev/AustraliaPost/Controller/Admin/Aupost.php /^ $startTime = microtime(true);$/;" v +startTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->startTime = $startTime;$/;" v +startTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $startTime;$/;" v +startTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->startTime = $startTime;$/;" v +startTime ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $startTime;$/;" v +startTime ../../../src/classes/XLite/Module/CDev/USPS/Controller/Admin/Usps.php /^ $startTime = microtime(true);$/;" v +startWorker ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ protected function startWorker(array $info)$/;" f +start_date ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->start_date = $start_date;$/;" v +start_date ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $start_date;$/;" v +start_index ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->start_index = $start_index;$/;" v +start_index ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $start_index;$/;" v +start_time ../../../src/classes/XLite/Core/Profiler.php /^ $this->start_time = $_SERVER['REQUEST_TIME'];$/;" v +start_time ../../../src/classes/XLite/Core/Profiler.php /^ protected $start_time = null;$/;" v +stat ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $stat = fstat($stdin);$/;" v +state ../../../src/Includes/functions.php /^ $state = "field";$/;" v +state ../../../src/Includes/functions.php /^ $state = "inside";$/;" v +state ../../../src/Includes/functions.php /^ $state = "outside";$/;" v +state ../../../src/Includes/functions.php /^ $state = "quote inside";$/;" v +state ../../../src/Includes/functions.php /^ $state = "outside";$/;" v +state ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState($event);$/;" v +state ../../../src/classes/XLite/Controller/Admin/States.php /^ $state = new \\XLite\\Model\\State();$/;" v +state ../../../src/classes/XLite/Controller/Admin/States.php /^ $state = \\XLite\\Core\\Database::getEM()->find('XLite\\Model\\State', $stateId);$/;" v +state ../../../src/classes/XLite/Controller/Admin/States.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')->find($stateId);$/;" v +state ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')->find($addr['state']);$/;" v +state ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $state = new \\XLite\\Model\\State();$/;" v +state ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $state = null;$/;" v +state ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')$/;" v +state ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $state = new \\XLite\\Model\\State;$/;" v +state ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ $state = $stateValidator->sanitize($data['state']);$/;" v +state ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ $state = new \\XLite\\Model\\State;$/;" v +state ../../../src/classes/XLite/Core/Validator/String/ObjectId/State.php /^ $state = $this->sanitize($data);$/;" v +state ../../../src/classes/XLite/Model/Base/Address.php /^ $this->state = $state;$/;" v +state ../../../src/classes/XLite/Model/Base/Address.php /^ $this->state = null;$/;" v +state ../../../src/classes/XLite/Model/Base/Address.php /^ $state = $this->state;$/;" v +state ../../../src/classes/XLite/Model/Base/Address.php /^ $state = new \\XLite\\Model\\State;$/;" v +state ../../../src/classes/XLite/Model/Base/Address.php /^ $this->state = null;$/;" v +state ../../../src/classes/XLite/Model/Base/Address.php /^ protected $state;$/;" v +state ../../../src/classes/XLite/Model/Repo/State.php /^ $state = $this->defineOneByStateIdQuery($stateId)->getSingleResult();$/;" v +state ../../../src/classes/XLite/Model/Repo/State.php /^ $state = new \\XLite\\Model\\State();$/;" v +state ../../../src/classes/XLite/Model/State.php /^ protected $state;$/;" v +state ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')->find($address['state_id']);$/;" v +state ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState('migrateToS3');$/;" v +state ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Migrate.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState('migrateFromS3');$/;" v +state ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/CheckoutSuccess.php /^ $state = ($bAddress && $bAddress->getState()) ? $bAddress->getState()->getState() : '';$/;" v +state ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/Header.php /^ $state = ($bAddress && $bAddress->getState()) ? $bAddress->getState()->getState() : '';$/;" v +state ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->state === $_REQUEST['state']) {$/;" v +state ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->state = null;$/;" v +state ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->state = $this->getPersistentData('state');$/;" v +state ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->state = md5(uniqid(mt_rand(), true));$/;" v +state ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $state = $this->getPersistentData('state');$/;" v +state ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ protected $state;$/;" v +state ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $this->state = $state;$/;" v +state ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public $state;$/;" v +state ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->state = $state;$/;" v +state ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $state;$/;" v +state ../../../src/classes/XLite/Module/CDev/SolrSearch/View/Migrate.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\TmpVar')->getEventState('migrateSolr');$/;" v +state ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $state = 'XX';$/;" v +state ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $state = 'n\/a';$/;" v +state ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $state = $this->getStateFieldValue($address);$/;" v +state ../../../src/classes/XLite/View/Model/Address/Address.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')->find($data['state_id']);$/;" v +state ../../../src/classes/XLite/View/ShippingEstimate.php /^ $state = $this->getCart()->getProfile()->getShippingAddress()->getState();$/;" v +state ../../../src/classes/XLite/View/ShippingEstimate.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')->find($address['state']);$/;" v +state ../../../src/classes/XLite/View/ShippingEstimate.php /^ $state = new \\XLite\\Model\\State();$/;" v +state ../../../src/classes/XLite/View/ShippingEstimate.php /^ $state = null;$/;" v +state ../../../src/classes/XLite/View/ShippingEstimateBox.php /^ $state = $this->getCart()->getProfile()->getShippingAddress()->getState();$/;" v +state ../../../src/classes/XLite/View/ShippingEstimateBox.php /^ $state = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')->find($address['state']);$/;" v +state ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $this->state = self::STATE_CLEAN;$/;" v +state ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $this->state = self::STATE_DIRTY;$/;" v +state ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ private $state = self::STATE_CLEAN;$/;" v +state ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $state = $this->getEntityState($entry, self::STATE_NEW);$/;" v +stateCellValidator ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ $stateCellValidator = $customState$/;" v +stateCodes ../../../src/classes/XLite/Model/Zone.php /^ $stateCodes = $this->getElementsByType(\\XLite\\Model\\ZoneElement::ZONE_ELEMENT_STATE);$/;" v +stateData ../../../src/classes/XLite/Controller/Admin/States.php /^ $stateData = \\XLite\\Core\\Request::getInstance()->state_data;$/;" v +stateData ../../../src/classes/XLite/Controller/Admin/States.php /^ $stateData = array();$/;" v +stateField ../../../src/classes/XLite/View/Model/Address/Address.php /^ $stateField = $data[self::SECTION_PARAM_FIELDS][$namePrefix . 'state_id'];$/;" v +stateValidator ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ $stateValidator = new \\XLite\\Core\\Validator\\String\\ObjectId\\State(true);$/;" v +stateValidator ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ $stateValidator = new \\XLite\\Core\\Validator\\Pair\\Simple;$/;" v +state_id ../../../src/classes/XLite/Model/State.php /^ protected $state_id;$/;" v +statement ../../../src/Includes/Utils/Database.php /^ $statement = static::getHandler()->prepare($sql);$/;" v +statement ../../../src/classes/XLite/Core/Database.php /^ $statement = $dbConnection->query('SELECT * FROM ' . $tableName);$/;" v +statement ../../../src/classes/XLite/Core/Database.php /^ $statement = null;$/;" v +statement ../../../src/lib/Doctrine/DBAL/Connection.php /^ $statement = call_user_func_array(array($this->_conn, 'query'), $args);$/;" v +statement ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ $statement = substr_replace($statement, ":param$count", $i, 1);$/;" v +statement ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $statement = $this->DeleteStatement();$/;" v +statement ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $statement = $this->SelectStatement();$/;" v +statement ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $statement = $this->UpdateStatement();$/;" v +statementCopyFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->statementCopyFee = $statementCopyFee;$/;" v +statementCopyFee ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $statementCopyFee;$/;" v +statements ../../../src/lib/Doctrine/Common/Annotations/PhpParser.php /^ $statements = $class = array();$/;" v +states ../../../src/classes/XLite/Controller/Admin/States.php /^ $states = \\XLite\\Core\\Request::getInstance()->delete_states;$/;" v +states ../../../src/classes/XLite/Controller/Admin/States.php /^ $this->states = \\XLite\\Core\\Database::getRepo('XLite\\Model\\State')$/;" v +states ../../../src/classes/XLite/Controller/Admin/States.php /^ $states = array();$/;" v +states ../../../src/classes/XLite/Model/Country.php /^ $this->states = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +states ../../../src/classes/XLite/Model/Country.php /^ protected $states;$/;" v +states ../../../src/classes/XLite/View/StateSelect.php /^ $states = $this->getParam(self::PARAM_STATE)->getCountry()->getStates();$/;" v +states ../../../src/classes/XLite/View/StateSelect.php /^ $states = array();$/;" v +statesDefined ../../../src/classes/XLite/View/StateSelect.php /^ protected static $statesDefined = false;$/;" v +statistics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->statistics = $statistics;$/;" v +statistics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $statistics;$/;" v +stats ../../../src/classes/XLite/Controller/Admin/OrdersStats.php /^ $this->stats = $this->initStats();$/;" v +stats ../../../src/classes/XLite/Controller/Admin/Stats.php /^ $this->stats = $this->initStats();$/;" v +stats ../../../src/classes/XLite/Controller/Admin/Stats.php /^ protected $stats = null;$/;" v +stats ../../../src/classes/XLite/Controller/Admin/TopSellers.php /^ $stats = $this->stats;$/;" v +stats ../../../src/classes/XLite/Controller/Admin/TopSellers.php /^ $this->stats = $this->processData($this->getData());$/;" v +status ../../../src/Includes/install/install.php /^function status($status, $code = null)$/;" f +status ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $status = $this->currentRepo['repo']->{$this->currentRepo['delete']}($/;" v +status ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $status = $this->currentRepo['repo']->{$this->currentRepo['post']}($/;" v +status ../../../src/classes/XLite/Controller/Admin/Rest.php /^ $status = $this->currentRepo['repo']->{$this->currentRepo['put']}($/;" v +status ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $status = \\XLite\\Model\\Order::STATUS_QUEUED;$/;" v +status ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $status = $cart->isPayed()$/;" v +status ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $status = \\XLite\\Model\\Order::STATUS_PROCESSED;$/;" v +status ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $status = $this->currentRepo['repo']->{$this->currentRepo['delete']}($/;" v +status ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $status = $this->currentRepo['repo']->{$this->currentRepo['post']}($/;" v +status ../../../src/classes/XLite/Controller/Customer/Rest.php /^ $status = $this->currentRepo['repo']->{$this->currentRepo['put']}($/;" v +status ../../../src/classes/XLite/Model/ActionStatus.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Model/ActionStatus.php /^ protected $status = self::STATUS_UNDEFINED;$/;" v +status ../../../src/classes/XLite/Model/Language.php /^ $this->status = $status ? static::ADDED : static::INACTIVE;$/;" v +status ../../../src/classes/XLite/Model/Language.php /^ $this->status = $status ? static::ENABLED : static::ADDED;$/;" v +status ../../../src/classes/XLite/Model/Language.php /^ protected $status = self::INACTIVE;$/;" v +status ../../../src/classes/XLite/Model/Order.php /^ $status = $this->getStatus();$/;" v +status ../../../src/classes/XLite/Model/Order.php /^ $status = $this->getStatus();$/;" v +status ../../../src/classes/XLite/Model/Order.php /^ $this->status = $value;$/;" v +status ../../../src/classes/XLite/Model/Order.php /^ protected $status = self::STATUS_INPROGRESS;$/;" v +status ../../../src/classes/XLite/Model/Payment/Base/Iframe.php /^ $status = self::FAILED;$/;" v +status ../../../src/classes/XLite/Model/Payment/Base/Iframe.php /^ $status = self::SEPARATE;$/;" v +status ../../../src/classes/XLite/Model/Payment/Base/WebBased.php /^ $status = self::FAILED;$/;" v +status ../../../src/classes/XLite/Model/Payment/Base/WebBased.php /^ $status = self::PROLONGATION;$/;" v +status ../../../src/classes/XLite/Model/Payment/Transaction.php /^ protected $status = self::STATUS_INITIALIZED;$/;" v +status ../../../src/classes/XLite/Model/Profile.php /^ protected $status = 'E';$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/Order.php /^ $status = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\FulfillmentStatus')$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Controller/Admin/Order.php /^ $status = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\PaymentStatus')$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $status = $this->getStatus();$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $status = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\FulfillmentStatus')$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $status = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\PaymentStatus')$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/SupplierOrders.php /^ $status = $order->getFulfillmentStatus()$/;" v +status ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/SupplierOrders.php /^ $status = $order->getPaymentStatus()$/;" v +status ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $status = 1 == $request->x_response_code ? $transaction::STATUS_SUCCESS : $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Checkout.php /^ $status = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) $/;" v +status ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $status = $transaction::STATUS_PENDING;$/;" v +status ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $status = $transaction::STATUS_SUCCESS;$/;" v +status ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $status == $transaction::STATUS_SUCCESS$/;" v +status ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $status = $transaction::STATUS_SUCCESS;$/;" v +status ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $status = $transaction::STATUS_PENDING;$/;" v +status ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $status = $transaction::STATUS_PENDING;$/;" v +status ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiPemVerifier.php /^ $status = openssl_verify($data, $signature, $this->publicKey, "sha256");$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->status = $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $status;$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $status = $status[1];$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $status = explode(" ", $status);$/;" v +status ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $status = substr($part, 0, strpos($part, "\\n"));$/;" v +status ../../../src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/Quantum/Model/Payment/Processor/Quantum.php /^ $status = 'APPROVED' == $request->trans_result$/;" v +status ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/FileGetContents.php /^ $status = intval(substr($httpHeaders[0], 9));$/;" v +status ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/FileGetContents.php /^ $status = 0;$/;" v +status ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $status = 0;$/;" v +status ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $status = 0;$/;" v +status ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $status = $transaction::STATUS_FAILED;$/;" v +status ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $status = $request->cart_order_id ? $transaction::STATUS_SUCCESS : $transaction::STATUS_FAILED;$/;" v +statusCode ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Curl.php /^ $statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);$/;" v +statusCode ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/CurlNoReuse.php /^ $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);$/;" v +statusCode ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Response.php /^ $statusCode = (int) $statusCode;$/;" v +statusCode ../../../src/lib/Symfony/Component/Console/Application.php /^ $statusCode = 255;$/;" v +statusCode ../../../src/lib/Symfony/Component/Console/Application.php /^ $statusCode = $e->getCode();$/;" v +statusCode ../../../src/lib/Symfony/Component/Console/Application.php /^ $statusCode = $this->doRun($input, $output);$/;" v +statusCode ../../../src/lib/Symfony/Component/Console/Application.php /^ $statusCode = is_numeric($statusCode) && $statusCode ? $statusCode : 1;$/;" v +statusCode ../../../src/lib/Symfony/Component/Console/Application.php /^ $statusCode = $command->run($input, $output);$/;" v +statusHandlers ../../../src/classes/XLite/Model/Order.php /^ protected static $statusHandlers = array($/;" v +status_skipped ../../../src/Includes/install/install.php /^function status_skipped()$/;" f +statuses ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ protected $statuses = array($/;" v +stdin ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $this->stdin = null;$/;" v +stdin ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $this->stdin = @fopen($path, 'r');$/;" v +stdin ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $this->stdin = false;$/;" v +stdin ../../../src/classes/XLite/Controller/Console/AConsole.php /^ $stdin = @fopen('php:\/\/stdin', 'r');$/;" v +step ../../../src/Includes/Decorator/ADecorator.php /^ protected static $step;$/;" v +step ../../../src/Includes/Decorator/Utils/CacheManager.php /^ $step = static::getCurrentStep();$/;" v +step ../../../src/classes/XLite/Model/Collection/CheckoutSteps.php /^ $step = $step->getPrev();$/;" v +step ../../../src/classes/XLite/View/Checkout/Steps.php /^ $step = get_class($step);$/;" v +stepMemory ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static $stepMemory;$/;" v +stepStart ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static $stepStart;$/;" v +step_back ../../../src/Includes/install/install.php /^ function step_back() {$/;" f +step_next ../../../src/Includes/install/install.php /^ function step_next() {$/;" f +steps ../../../src/Includes/Decorator/Utils/CacheManager.php /^ protected static $steps = array($/;" v +steps ../../../src/Includes/install/install.php /^ $steps = array($/;" v +steps ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $steps = new \\XLite\\View\\Checkout\\Steps();$/;" v +steps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->steps = $steps;$/;" v +steps ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $steps;$/;" v +steps ../../../src/classes/XLite/View/Checkout/Steps.php /^ $this->steps = array();$/;" v +steps ../../../src/classes/XLite/View/Checkout/Steps.php /^ $steps = $this->getSteps();$/;" v +steps ../../../src/classes/XLite/View/Checkout/Steps.php /^ $steps = array();$/;" v +steps ../../../src/classes/XLite/View/Checkout/Steps.php /^ protected $steps;$/;" v +stmt ../../../src/classes/XLite/Core/Database.php /^ $stmt = $conn->prepare($sql);$/;" v +stmt ../../../src/classes/XLite/Model/Repo/Cart.php /^ $stmt = null;$/;" v +stmt ../../../src/classes/XLite/Model/Repo/Cart.php /^ $stmt = $this->_em->getConnection()->prepare($/;" v +stmt ../../../src/classes/XLite/Model/Repo/Cart.php /^ $stmt = $this->defineMarkAsOrderQuery($orderId);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Connection.php /^ $stmt = $this->_conn->prepare($query);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Connection.php /^ $stmt = $this->_conn->query($query);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Connection.php /^ $stmt = $this->executeQuery($query, $params ?: array());$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ $stmt = $this->prepare($sql);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ $stmt = $this->prepare($statement);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php /^ $stmt = @db2_prepare($this->_conn, $sql);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ $stmt = $this->prepare($sql);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php /^ $stmt = $this->prepare($statement);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Portability/Connection.php /^ $stmt = call_user_func_array(array($this->_conn, 'query'), func_get_args());$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $this->stmt = $stmt;$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ private $stmt;$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $stmt = $this->_conn->executeQuery($columnNameSql);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php /^ $stmt = $this->_conn->executeQuery( "PRAGMA INDEX_INFO ( '{$keyName}' )" );$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php /^ $stmt = $this->_conn->executeQuery( "PRAGMA TABLE_INFO ('$tableName')" );$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Statement.php /^ $stmt = $this->_stmt->execute($params);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php /^ $stmt = $conn->prepare($sql);$/;" v +stmt ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php /^ $stmt = $conn->prepare($sql);$/;" v +stmt ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $stmt = $this->_doExecute();$/;" v +stmt ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $stmt = $this->_doExecute();$/;" v +stmt ../../../src/lib/Doctrine/ORM/NativeQuery.php /^ $stmt = $this->_em->getConnection()->prepare($this->_sql);$/;" v +stmt ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $stmt = $this->_conn->executeQuery($sql, $params, $types);$/;" v +stmt ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $stmt = $this->_conn->prepare($this->_getInsertSQL());$/;" v +stmt ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $stmt = $this->getManyToManyStatement($assoc, $sourceEntity);$/;" v +stmt ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $stmt = $this->getManyToManyStatement($assoc, $sourceEntity, $offset, $limit);$/;" v +stmt ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $stmt = $this->getOneToManyStatement($assoc, $sourceEntity);$/;" v +stmt ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $stmt = $this->getOneToManyStatement($assoc, $sourceEntity, $offset, $limit);$/;" v +stmtLen ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ $stmtLen = strlen($statement); \/\/ adjust statement length$/;" v +stmtLen ../../../src/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php /^ $stmtLen = strlen($statement);$/;" v +stmtLen ../../../src/lib/Doctrine/DBAL/SQLParserUtils.php /^ $stmtLen = strlen($statement);$/;" v +stop ../../../src/classes/XLite/Core/Profiler.php /^ protected function stop()$/;" f +stopQuery ../../../src/classes/XLite/Core/Profiler.php /^ public function stopQuery()$/;" f +stopQuery ../../../src/lib/Doctrine/DBAL/Logging/DebugStack.php /^ public function stopQuery()$/;" f +stopQuery ../../../src/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php /^ public function stopQuery()$/;" f +stopQuery ../../../src/lib/Doctrine/DBAL/Logging/SQLLogger.php /^ public function stopQuery();$/;" f +stop_time ../../../src/classes/XLite/Core/Profiler.php /^ $this->stop_time = microtime(true);$/;" v +stop_time ../../../src/classes/XLite/Core/Profiler.php /^ protected $stop_time = null;$/;" v +storage ../../../src/classes/XLite/Controller/Admin/Storage.php /^ $this->storage = null;$/;" v +storage ../../../src/classes/XLite/Controller/Admin/Storage.php /^ $this->storage = \\XLite\\Core\\Database::getRepo($class)->find($id);$/;" v +storage ../../../src/classes/XLite/Controller/Admin/Storage.php /^ protected $storage;$/;" v +storage ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $this->storage = null;$/;" v +storage ../../../src/classes/XLite/Controller/Customer/Storage.php /^ $this->storage = \\XLite\\Core\\Database::getRepo($class)->find($id);$/;" v +storage ../../../src/classes/XLite/Controller/Customer/Storage.php /^ protected $storage;$/;" v +storage ../../../src/classes/XLite/Module/CDev/FileAttachments/Model/Product/Attachment.php /^ protected $storage;$/;" v +storageDataLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->storageDataLocation = $storageDataLocation;$/;" v +storageDataLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $storageDataLocation;$/;" v +storageDir ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ $storageDir = $this->getCacheDir(md5($key));$/;" v +storageDir ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ $storageDir = dirname($storageFile);$/;" v +storageFile ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ $storageFile = $this->getCacheFile(md5($key));$/;" v +storagePMMLLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->storagePMMLLocation = $storagePMMLLocation;$/;" v +storagePMMLLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $storagePMMLLocation;$/;" v +storagePMMLModelLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->storagePMMLModelLocation = $storagePMMLModelLocation;$/;" v +storagePMMLModelLocation ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $storagePMMLModelLocation;$/;" v +storageType ../../../src/classes/XLite/Model/Base/Storage.php /^ $this->storageType = $this->isURL($this->getPath())$/;" v +storageType ../../../src/classes/XLite/Model/Base/Storage.php /^ protected $storageType = self::STORAGE_RELATIVE;$/;" v +store ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $store = array(); $/;" v +storeCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->storeCode = $storeCode;$/;" v +storeCode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $storeCode;$/;" v +storeFields ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $storeFields = $this->storeFields;$/;" v +storeFields ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ protected $storeFields = array($/;" v +storeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->storeId = $storeId;$/;" v +storeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $storeId;$/;" v +storeName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->storeName = $storeName;$/;" v +storeName ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $storeName;$/;" v +stores ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->stores = $stores;$/;" v +stores ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $stores;$/;" v +stores ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $stores = array_map(function ($storeData) use ($storeFields, $xml) {$/;" v +stores ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ protected $stores = array();$/;" v +storesCount ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $this->storesCount = 0;$/;" v +storesCount ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $this->storesCount = intval($xml->getArrayByPath($xmlParsed, 'storeList\/#\/total\/0\/#'));$/;" v +storesCount ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ protected $storesCount = null;$/;" v +storesData ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $storesData = $xml->getArrayByPath($xmlParsed, 'storeList\/#\/stores');$/;" v +str ../../../src/Includes/functions.php /^ $str = preg_replace($/;" v +str ../../../src/classes/XLite/Core/Database.php /^ $str = preg_replace('\/UNIQUE INDEX \\S+ \\(' . $id . '\\),\/Ssi', '', $str);$/;" v +str ../../../src/classes/XLite/Core/Database.php /^ $str = str_replace(PHP_EOL . PHP_EOL, PHP_EOL, $str);$/;" v +str ../../../src/classes/XLite/Core/Database.php /^ $str = $schema[1];$/;" v +str ../../../src/classes/XLite/Core/Database.php /^ $str = preg_replace($/;" v +str ../../../src/classes/XLite/Core/Database.php /^ $str = preg_replace('\/PRIMARY KEY\\(([^)]+)\\)\/Ssi', 'PRIMARY KEY ($1)', $str);$/;" v +str ../../../src/classes/XLite/Core/Database.php /^ $str = preg_replace('\/numeric\\((\\d+), (\\d+)\\)\/Ssi', 'NUMERIC($1,$2)', $str);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str,1); \/\/ eat )$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str,1); \/\/ eat , or ($/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = $this->getTokenText($i);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = $this->getTokenText($tokenIndex);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, $pos);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, $pos+1);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str,2); \/\/ eat ()$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = '';$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, $len);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, $pos + 1);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, $pos+1);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, 0, strlen($str) - 1);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, 1);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str,1);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = $this->removeBraces($str);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, $len);$/;" v +str ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $str = substr($str, 1);$/;" v +str ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $str = $this->getType() . ': ';$/;" v +str ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $str = '';$/;" v +str ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $str = $this->getSubstringExpression($str, $startPos);$/;" v +str ../../../src/lib/Doctrine/ORM/Query/AST/Node.php /^ $str = '';$/;" v +str ../../../src/lib/PHPMailer/class.phpmailer.php /^ $str = str_replace("\\n", $this->LE, $str);$/;" v +str ../../../src/lib/PHPMailer/class.phpmailer.php /^ $str = str_replace("\\n", '', $str);$/;" v +str ../../../src/lib/PHPMailer/class.phpmailer.php /^ $str = str_replace("\\r", "\\n", $str);$/;" v +str ../../../src/lib/PHPMailer/class.phpmailer.php /^ $str = str_replace("\\r", '', $str);$/;" v +str ../../../src/lib/PHPMailer/class.phpmailer.php /^ $str = str_replace("\\r\\n", "\\n", $str);$/;" v +strategy ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $strategy = 'AUTO';$/;" v +strategy ../../../src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php /^ $strategy = isset($idElement->generator['strategy']) ?$/;" v +stream ../../../src/lib/Symfony/Component/Console/Output/StreamOutput.php /^ $this->stream = $stream;$/;" v +stream ../../../src/lib/Symfony/Component/Console/Output/StreamOutput.php /^ protected $stream;$/;" v +streamNotifyCallback ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpstream.php /^ public function streamNotifyCallback($notification_code, $severity, $message, $message_code,$/;" f +street ../../../src/classes/XLite/Model/Base/Address.php /^ protected $street = '';$/;" v +string ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/FixturesManager.php /^ $string = '';$/;" v +string ../../../src/Includes/SafeMode.php /^ $string = '; <' . '?php \/*' . PHP_EOL;$/;" v +string ../../../src/Includes/Utils/ModulesManager.php /^ $string = '';$/;" v +string ../../../src/Includes/install/install.php /^ $string = trim($string);$/;" v +string ../../../src/classes/XLite/Core/Probe.php /^ $string = array_flip($data);$/;" v +string ../../../src/classes/XLite/Core/Probe.php /^ $string = array_map('addslashes', $data);$/;" v +string ../../../src/classes/XLite/Core/Probe.php /^ $string = array_map('md5', $data);$/;" v +string ../../../src/classes/XLite/Core/Probe.php /^ $string = array_map('strlen', $data);$/;" v +string ../../../src/classes/XLite/Core/Probe.php /^ $string = array_map('urlencode', $data);$/;" v +string ../../../src/classes/XLite/Core/Probe.php /^ $string = array_sum($data);$/;" v +string ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $string = $this->getSetting('login') . '^'$/;" v +string ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $string = '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . $metas . '<\/body>';$/;" v +string ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $string = preg_replace('\/(^\\s+)|(\\s+$)\/Sus', '', $string);$/;" v +string ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php /^ $string = '<' . '?xml version="1.0" encoding="UTF-8" ?' . '>' . PHP_EOL$/;" v +string ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php /^ $string = '';$/;" v +string ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $string = \\XLite\\Core\\Request::getInstance()->string;$/;" v +string ../../../src/classes/XLite/View/AView.php /^ $string = $base->get($field);$/;" v +string ../../../src/classes/XLite/View/AView.php /^ $string = $base->{'get' . \\XLite\\Core\\Converter::convertToCamelCase($field)}();$/;" v +string ../../../src/classes/XLite/View/AView.php /^ $string = preg_replace('\/\\s+?(\\S+)?$\/', '', substr($string, 0, $length + 1));$/;" v +string ../../../src/classes/XLite/View/AView.php /^ $string = $base;$/;" v +string ../../../src/classes/XLite/View/AView.php /^ $string = '';$/;" v +string ../../../src/classes/XLite/View/AView.php /^ $string = substr($string, 0, $length) . $etc;$/;" v +string ../../../src/classes/XLite/View/ShippingEstimateBox.php /^ $string = $country->getCountry();$/;" v +string ../../../src/classes/XLite/View/ShippingEstimateBox.php /^ $string = '';$/;" v +string ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $string = $column;$/;" v +string ../../../src/lib/PHPMailer/class.phpmailer.php /^ $string = $attachment[0];$/;" v +string ../../../src/lib/PHPMailer/class.phpmailer.php /^ $string = preg_replace('\/\\r\\n?\/', $this->LE, $string); \/\/Normalise line breaks$/;" v +stringData ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $stringData = $this->fetchStoresData($offset, $limit);$/;" v +stringData ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $stringData = null;$/;" v +stringExpr ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $stringExpr = $this->StringExpression();$/;" v +stringExpr ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $stringExpr = $likeExpr->stringExpression;$/;" v +stringExpression ../../../src/lib/Doctrine/ORM/Query/AST/LikeExpression.php /^ $this->stringExpression = $stringExpression;$/;" v +stringExpression ../../../src/lib/Doctrine/ORM/Query/AST/LikeExpression.php /^ public $stringExpression;$/;" v +stringPattern ../../../src/lib/Doctrine/ORM/Query/AST/LikeExpression.php /^ $this->stringPattern = $stringPattern;$/;" v +stringPattern ../../../src/lib/Doctrine/ORM/Query/AST/LikeExpression.php /^ public $stringPattern;$/;" v +stringPattern ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $stringPattern = $this->_lexer->token['value'];$/;" v +stringPattern ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $stringPattern = new AST\\InputParameter($this->_lexer->token['value']);$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php /^ $this->stringPrimary = $parser->StringPrimary();$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LengthFunction.php /^ public $stringPrimary;$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php /^ $this->stringPrimary = $parser->StringPrimary();$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/LowerFunction.php /^ public $stringPrimary;$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php /^ $this->stringPrimary = $parser->StringPrimary();$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php /^ public $stringPrimary;$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $this->stringPrimary = $parser->StringPrimary();$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ public $stringPrimary;$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php /^ $this->stringPrimary = $parser->StringPrimary();$/;" v +stringPrimary ../../../src/lib/Doctrine/ORM/Query/AST/Functions/UpperFunction.php /^ public $stringPrimary;$/;" v +stringToPriority ../../../src/lib/Log.php /^ function stringToPriority($name)$/;" f +stripNull ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ protected function stripNull(&$o) {$/;" f +strlen ../../../src/lib/Symfony/Component/Console/Application.php /^ $strlen = function ($string)$/;" v +strlen ../../../src/lib/Symfony/Component/Console/Helper/FormatterHelper.php /^ protected function strlen($string)$/;" f +strlenVar ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiUtils.php /^ $strlenVar = strlen($str);$/;" v +stubMethods ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $stubMethods = $this->_generateEntityStubMethods ? $this->_generateEntityStubMethods($metadata) : null;$/;" v +stubMethods ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $stubMethods = $this->_generateEntityStubMethods ? $this->_generateEntityStubMethods($metadata) : null;$/;" v +styles ../../../src/lib/Log/win.php /^ $styles = $this->_styles;$/;" v +styles ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ static protected $styles = array($/;" v +subAccounts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->subAccounts = $subAccounts;$/;" v +subAccounts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $subAccounts;$/;" v +subClass ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $subClass = $this->_em->getClassMetadata($subClassName);$/;" v +subClass ../../../src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php /^ $subClass = $this->_em->getClassMetadata($subClassName);$/;" v +subClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $subClass = $this->_em->getClassMetadata($subClassName);$/;" v +subClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $subClass = $this->_em->getClassMetadata($subClassName);$/;" v +subClass ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $subClass = $this->_em->getClassMetadata($subClassName);$/;" v +subClasses ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $subClasses = array();$/;" v +subTableStmts ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $subTableStmts = array();$/;" v +sub_delims ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ public static $sub_delims = array('!', '$', '&', '\\'', '(', ')', '*', '+', ',', ';', '=');$/;" v +sub_delims_pct ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ public static $sub_delims_pct = array('%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', '%3B', '%3D');$/;" v +subcategories_count_all ../../../src/classes/XLite/Model/Category/QuickFlags.php /^ protected $subcategories_count_all = 0;$/;" v +subcategories_count_enabled ../../../src/classes/XLite/Model/Category/QuickFlags.php /^ protected $subcategories_count_enabled = 0;$/;" v +subdirs ../../../src/classes/XLite/Controller/Admin/Settings.php /^ $subdirs = array();$/;" v +subject ../../../src/classes/XLite/Module/CDev/Conversations/Model/Conversation.php /^ protected $subject;$/;" v +subject ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->subject = $subject;$/;" v +subject ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $subject;$/;" v +subject ../../../src/lib/PHPMailer/class.phpmailer.php /^ $subject = str_replace('|','=7C',$this->DKIM_QP($subject_header)) ; \/\/ Copied header fields (dkim-quoted-printable$/;" v +subjectTemplate ../../../src/classes/XLite/View/Mailer.php /^ protected $subjectTemplate = 'subject.tpl';$/;" v +subject_header ../../../src/lib/PHPMailer/class.phpmailer.php /^ $subject_header = "Subject: $subject";$/;" v +submissionId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->submissionId = $submissionId;$/;" v +submissionId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $submissionId;$/;" v +submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->submissions = $submissions;$/;" v +submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->submissions = new SubmissionsServiceResource($this, $this->serviceName, 'submissions', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "topicId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "unauthToken": {"type": "string", "location": "query"}, "anonymous": {"type": "boolean", "location": "query"}}, "request": {"$ref": "Submission"}, "id": "moderator.submissions.insert", "httpMethod": "POST", "path": "series\/{seriesId}\/topics\/{topicId}\/submissions", "response": {"$ref": "Submission"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"lang": {"type": "string", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "includeVotes": {"type": "boolean", "location": "query"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "id": "moderator.submissions.get", "httpMethod": "GET", "path": "series\/{seriesId}\/submissions\/{submissionId}", "response": {"$ref": "Submission"}}}}', true));$/;" v +submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $submissions;$/;" v +submitUserPermissionsForm ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ public function submitUserPermissionsForm(array &$form, array &$formState)$/;" f +submitUserProfileForm ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ public function submitUserProfileForm(array &$form, array &$formState)$/;" f +submitWidgetDeleteForm ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ public function submitWidgetDeleteForm(array &$form, array &$formState)$/;" f +submitWidgetModifyForm ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ public function submitWidgetModifyForm(array &$form, array &$formState)$/;" f +subpath ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $subpath = $path . $name;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php /^ public $subselect;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/AST/ExistsExpression.php /^ $this->subselect = $subselect;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/AST/ExistsExpression.php /^ public $subselect;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/AST/InExpression.php /^ public $subselect;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php /^ $this->subselect = $subselect;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php /^ public $subselect;$/;" v +subselect ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $subselect = new AST\\Subselect($this->SimpleSelectClause(), $this->SubselectFromClause());$/;" v +subselectFromClause ../../../src/lib/Doctrine/ORM/Query/AST/Subselect.php /^ $this->subselectFromClause = $subselectFromClause;$/;" v +subselectFromClause ../../../src/lib/Doctrine/ORM/Query/AST/Subselect.php /^ public $subselectFromClause;$/;" v +subselectIdVarDecl ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $subselectIdVarDecl = new AST\\SubselectIdentificationVariableDeclaration();$/;" v +subsets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ $this->subsets = $subsets;$/;" v +subsets ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public $subsets;$/;" v +subst ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function subst($start, $end, $value)$/;" f +substImage ../../../src/classes/XLite/Model/MailImageParser.php /^ public function substImage($start, $end)$/;" f +substitute ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function substitute()$/;" f +substituteTemplate ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php /^ protected function substituteTemplate($template, array $entries)$/;" f +substituteTemplate ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php /^ protected function substituteTemplate($template, array $entries)$/;" f +substitutionEnd ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->substitutionEnd = array();$/;" v +substitutionEnd ../../../src/classes/XLite/Core/FlexyCompiler.php /^ public $substitutionEnd = array();$/;" v +substitutionStart ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->substitutionStart = array();$/;" v +substitutionStart ../../../src/classes/XLite/Core/FlexyCompiler.php /^ public $substitutionStart = array();$/;" v +substitutionValue ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->substitutionValue = array();$/;" v +substitutionValue ../../../src/classes/XLite/Core/FlexyCompiler.php /^ public $substitutionValue = array();$/;" v +substring ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function substring($x, $from, $len = null)$/;" f +substutionalSkins ../../../src/classes/XLite/Core/Layout.php /^ protected $substutionalSkins = array();$/;" v +substutionalSkinsCache ../../../src/classes/XLite/Core/Layout.php /^ $this->substutionalSkinsCache = (bool)\\XLite::getInstance()$/;" v +substutionalSkinsCache ../../../src/classes/XLite/Core/Layout.php /^ protected $substutionalSkinsCache = false;$/;" v +subtitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->subtitle = $subtitle;$/;" v +subtitle ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $subtitle;$/;" v +subtotal ../../../src/classes/XLite/Logic/Order/Modifier/Discount.php /^ $subtotal = 0;$/;" v +subtotal ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $subtotal = 0;$/;" v +subtotal ../../../src/classes/XLite/Model/Base/SurchargeOwner.php /^ protected $subtotal = 0.0000;$/;" v +subtotal ../../../src/classes/XLite/Model/Order.php /^ $subtotal = $this->getCurrency()->roundValue($subtotal);$/;" v +subtotal ../../../src/classes/XLite/Model/Order.php /^ $subtotal = 0;$/;" v +subtotal ../../../src/classes/XLite/Model/OrderItem.php /^ $subtotal = $this->calculateNetSubtotal();$/;" v +success ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/Base/AMQP.php /^ $success = true;$/;" v +success ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/Base/AMQP.php /^ $success = true;$/;" v +success ../../../src/classes/XLite/Module/CDev/Swarm/Core/Swarm/Handler/Base/AMQP.php /^ $success = false;$/;" v +success ../../../src/lib/Log/composite.php /^ $success = true;$/;" v +success ../../../src/lib/Log/error_log.php /^ $success = error_log($line, $this->_type, $this->_destination,$/;" v +success ../../../src/lib/Log/file.php /^ $success = (fwrite($this->_fp, $line) !== false);$/;" v +suexecMode ../../../src/Includes/Utils/FileManager.php /^ $suexecMode = \\Includes\\Utils\\Operator::isSuexecMode() ? 'su' : 'nosu';$/;" v +suexecMode ../../../src/Includes/Utils/Operator.php /^ protected static $suexecMode;$/;" v +suffix ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $suffix = $separator . $increment++;$/;" v +suffix ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $suffix = '';$/;" v +suffix ../../../src/classes/XLite/Model/Currency.php /^ protected $suffix = '';$/;" v +suffix ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $suffix = 0 == $i ? '' : ('_' . $i);$/;" v +suffix ../../../src/classes/XLite/View/FormField/AFormField.php /^ $suffix = preg_replace('\/^.+\\\\\\(?:Module\\\\\\([a-zA-Z0-9]+\\\\\\[a-zA-Z0-9]+\\\\\\))?View\\\\\\FormField\\\\\\(.+)$\/Ss', '$1$2', get_called_class());$/;" v +suffix ../../../src/classes/XLite/View/FormField/AFormField.php /^ $suffix = str_replace('\\\\', '-', strtolower($suffix));$/;" v +suffix ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $suffix = $column[static::COLUMN_METHOD_SUFFIX];$/;" v +suggestion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->suggestion = $suggestion;$/;" v +suggestion ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $suggestion;$/;" v +suggestions ../../../src/lib/Symfony/Component/Console/Application.php /^ $suggestions = $this->getAbbreviationSuggestions(array_map(function ($command) use ($namespace) { return $namespace.':'.$command; }, $abbrevs[$name]));$/;" v +sum ../../../src/classes/XLite/Core/Profiler.php /^ $sum = array_sum($d['time']);$/;" v +sum ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $sum = 0;$/;" v +sum ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function sum($x, $y)$/;" f +sumObjectsArrayFieldValues ../../../src/Includes/Utils/ArrayManager.php /^ public static function sumObjectsArrayFieldValues(array $array, $field, $isGetter = true)$/;" f +summary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->summary = $summary;$/;" v +summary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $summary;$/;" v +summaryOverride ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->summaryOverride = $summaryOverride;$/;" v +summaryOverride ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $summaryOverride;$/;" v +summarySchema ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ protected $summarySchema = array($/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SelectFile.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->find($id);$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Supplier.php /^ $supplier = $this->getSupplierFromRequest();$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Customer/Supplier.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->find($this->getId());$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ $this->supplier = $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Core/EventListener/SupplierImport.php /^ $this->supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/DataSource.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier/Address.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier/Category.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier/Image.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/SupplierOrders.php /^ $supplier = \\XLite\\Core\\Auth::getInstance()->getProfile()->getManageSuppliers()->first();$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplierCategoriesTree.php /^ $this->supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplierCategoriesTree.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/ImportExport.php /^ $supplier = $profile->isSupplier()$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/ImportExport.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->findOneByName($data);$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $supplier = $list[0];$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $supplier = null;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $supplier = null;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->find($id);$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Model/OrderItem.php /^ $this->supplier = $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Model/OrderItem.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Product.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ $supplier = is_object($supplier) ?$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/View/LowStockReport.php /^ $supplier = \\XLite::getController()->getSupplier();$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/View/LowStockReport.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/CDev/Suppliers/View/Model/Profile/AdminMain.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $this->supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->find($id);$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $this->supplier = false;$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected $supplier;$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/RegisterStore.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $supplier = $this->createSupplier($cell);$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $supplier = \\XLite\\Core\\Auth::getInstance()->getProfile()->getManageSuppliers()->first();$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $supplier = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $supplier = array_shift($supplier);$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $supplier = new \\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier;$/;" v +supplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Supplier.php /^ $supplier = new \\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier;$/;" v +supplierCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Category.php /^ $this->supplierCategories = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +supplierCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Category.php /^ protected $supplierCategories;$/;" v +supplierCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Product.php /^ $this->supplierCategories = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +supplierCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Product.php /^ protected $supplierCategories;$/;" v +supplierCategory ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Supplier.php /^ $supplierCategory = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Aggregator\\Model\\Supplier\\Category')$/;" v +supplierForbidFields ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Product.php /^ protected $supplierForbidFields = array($/;" v +supplierLinkAssigned ../../../src/classes/XLite/Module/CDev/Suppliers/Model/QueryBuilder/Product.php /^ $this->supplierLinkAssigned = true;$/;" v +supplierLinkAssigned ../../../src/classes/XLite/Module/CDev/Suppliers/Model/QueryBuilder/Product.php /^ protected $supplierLinkAssigned = false;$/;" v +supplierNote ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Order.php /^ protected $supplierNote = '';$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Aggregator/Core/Task/ReinitializeImport.php /^ $suppliers = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Aggregator/View/FormField/Select/CustomerSupplier.php /^ $suppliers = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->findAvailable();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Product/Admin/LowInventory.php /^ $suppliers = \\XLite\\Core\\Auth::getInstance()->getProfile()->getManageSuppliers()->toArray();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $this->suppliers = array();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ protected $suppliers;$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $suppliers = $profile->getManageSuppliers()->toArray();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $suppliers = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->findAll();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/Product.php /^ $suppliers = array();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Profile.php /^ $suppliers = $this->getManageSuppliers()->toArray();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Profile.php /^ $suppliers = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\Suppliers\\Model\\Supplier')->findAll();$/;" v +suppliers ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Profile.php /^ $suppliers = array();$/;" v +supplyStatus ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Order.php /^ $supplyStatus = \\XLite\\Core\\Request::getInstance()->supplyStatus;$/;" v +supplyStatus ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/SupplierOrder.php /^ $supplyStatus = \\XLite\\Core\\Request::getInstance()->supplyStatus;$/;" v +supplyStatus ../../../src/classes/XLite/Module/CDev/Aggregator/Model/OrderItem.php /^ protected $supplyStatus = self::SUPPLY_STATUS_NOT_SHIPPED;$/;" v +supplyStatus ../../../src/classes/XLite/Module/CDev/Aggregator/View/ItemsList/Model/Order/Admin/Search.php /^ $supplyStatus = \\XLite\\Core\\Request::getInstance()->supplyStatus;$/;" v +supplyStatusNames ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplyStatusSelector.php /^ protected $supplyStatusNames = array($/;" v +supportsAlias ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $supportsAlias = false;$/;" v +supportsAlias ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $supportsAlias = false;$/;" v +supportsAlias ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $supportsAlias = true;$/;" v +supportsAlterTable ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsAlterTable()$/;" f +supportsAlterTable ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ public function supportsAlterTable()$/;" f +supportsCommentOnStatement ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsCommentOnStatement()$/;" f +supportsCommentOnStatement ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ public function supportsCommentOnStatement()$/;" f +supportsCommentOnStatement ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ public function supportsCommentOnStatement()$/;" f +supportsCreateDropDatabase ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsCreateDropDatabase()$/;" f +supportsCreateDropDatabase ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ public function supportsCreateDropDatabase()$/;" f +supportsCreateDropDatabase ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function supportsCreateDropDatabase()$/;" f +supportsForeignKeyConstraints ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsForeignKeyConstraints()$/;" f +supportsForeignKeyConstraints ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ public function supportsForeignKeyConstraints()$/;" f +supportsForeignKeyOnUpdate ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsForeignKeyOnUpdate()$/;" f +supportsForeignKeyOnUpdate ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ public function supportsForeignKeyOnUpdate()$/;" f +supportsGettingAffectedRows ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsGettingAffectedRows()$/;" f +supportsIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsIdentityColumns()$/;" f +supportsIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ public function supportsIdentityColumns()$/;" f +supportsIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function supportsIdentityColumns()$/;" f +supportsIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ public function supportsIdentityColumns()$/;" f +supportsIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ public function supportsIdentityColumns()$/;" f +supportsIdentityColumns ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ public function supportsIdentityColumns()$/;" f +supportsIndexes ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsIndexes()$/;" f +supportsInlineColumnComments ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsInlineColumnComments()$/;" f +supportsInlineColumnComments ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ public function supportsInlineColumnComments()$/;" f +supportsPrimaryConstraints ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsPrimaryConstraints()$/;" f +supportsReleaseSavepoints ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsReleaseSavepoints()$/;" f +supportsReleaseSavepoints ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ public function supportsReleaseSavepoints()$/;" f +supportsReleaseSavepoints ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ public function supportsReleaseSavepoints()$/;" f +supportsReleaseSavepoints ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ public function supportsReleaseSavepoints()$/;" f +supportsReporting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->supportsReporting = $supportsReporting;$/;" v +supportsReporting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $supportsReporting;$/;" v +supportsReporting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->supportsReporting = $supportsReporting;$/;" v +supportsReporting ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $supportsReporting;$/;" v +supportsSavepoints ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsSavepoints()$/;" f +supportsSavepoints ../../../src/lib/Doctrine/DBAL/Platforms/DB2Platform.php /^ public function supportsSavepoints()$/;" f +supportsSchemas ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsSchemas()$/;" f +supportsSchemas ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ public function supportsSchemas()$/;" f +supportsSequences ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsSequences()$/;" f +supportsSequences ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ public function supportsSequences()$/;" f +supportsSequences ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ public function supportsSequences()$/;" f +supportsTransactions ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ public function supportsTransactions()$/;" f +surcharge ../../../src/classes/XLite/Logic/Order/Modifier/AModifier.php /^ $surcharge = new \\XLite\\Model\\OrderItem\\Surcharge;$/;" v +surcharge ../../../src/classes/XLite/Logic/Order/Modifier/AModifier.php /^ $surcharge = new \\XLite\\Model\\Order\\Surcharge;$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange.php /^ $surcharge = doubleval(\\XLite\\Core\\Config::getInstance()->CDev->Multicurrency->exchange_surcharge);$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OptionSurcharge.php /^ $surcharge = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +surcharge ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Model/OptionSurcharge.php /^ $surcharge = parent::postprocessSurchargePrice($surcharge);$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ $surcharge = new \\XLite\\Module\\CDev\\ProductOptions\\Model\\OptionSurcharge();$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Controller/Admin/Product.php /^ $surcharge = $option->getSurcharge($type);$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ $surcharge = new \\XLite\\Module\\CDev\\ProductOptions\\Model\\OptionSurcharge;$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ $surcharge = $model->getSurcharge($type);$/;" v +surcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ $surcharge = $this->getSurcharge($type);$/;" v +surcharge_id ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ protected $surcharge_id;$/;" v +surcharges ../../../src/classes/XLite/Model/Base/SurchargeOwner.php /^ $surcharges = array();$/;" v +surcharges ../../../src/classes/XLite/Model/Order.php /^ $surcharges = $type$/;" v +surcharges ../../../src/classes/XLite/Model/Order.php /^ $this->surcharges = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +surcharges ../../../src/classes/XLite/Model/Order.php /^ protected $surcharges;$/;" v +surcharges ../../../src/classes/XLite/Model/OrderItem.php /^ $this->surcharges = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +surcharges ../../../src/classes/XLite/Model/OrderItem.php /^ protected $surcharges;$/;" v +surcharges ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ $this->surcharges = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +surcharges ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ protected $surcharges;$/;" v +swarm ../../../src/classes/XLite/Module/CDev/Swarm/Controller/Console/Swarm.php /^ $swarm = \\Swarm\\Manager::getInstance()$/;" v +switch ../../../src/classes/XLite/View/Tabber.php /^ $switch = $this->getParam(self::PARAM_SWITCH);$/;" v +switchLCAutoloadDir ../../../src/Includes/Autoloader.php /^ public static function switchLCAutoloadDir()$/;" f +switchModule ../../../src/Includes/Utils/ModulesManager.php /^ public static function switchModule($author, $name)$/;" f +sword ../../../src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php /^ $sword = \\XLite\\Module\\CDev\\Moneybookers\\Model\\Payment\\Processor\\Moneybookers::getPlatformSecretWord();$/;" v +sword ../../../src/classes/XLite/Module/CDev/Moneybookers/Controller/Admin/MoneybookersSettings.php /^ $sword = md5($sword);$/;" v +symbol ../../../src/classes/XLite/Model/Currency.php /^ protected $symbol;$/;" v +syncVolumeLicenses ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function syncVolumeLicenses($source, $nonce, $cpksver, $optParams = array()) {$/;" f +syntaxError ../../../src/lib/Doctrine/Common/Annotations/AnnotationException.php /^ public static function syntaxError($message)$/;" f +syntaxError ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ private function syntaxError($expected, $token = null)$/;" f +syntaxError ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ public function syntaxError($expected = '', $token = null)$/;" f +syntaxError ../../../src/lib/Doctrine/ORM/Query/QueryException.php /^ public static function syntaxError($message)$/;" f +sysRoot ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $sysRoot = \\Includes\\Utils\\FileManager::getRealPath('\/');$/;" v +t ../../../src/classes/XLite/Base/SuperClass.php /^ protected static function t($name, array $arguments = array(), $code = null)$/;" f +t ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $t = $this->tokens[$n];$/;" v +t ../../../src/classes/XLite/Core/QuickAccess.php /^ protected static function t($name, array $arguments = array(), $code = null)$/;" f +t ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ $t = $o + $n * 8;$/;" v +t ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $t = preg_quote($t, '\/');$/;" v +t ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Option.php /^ $t = $this->getTranslation($language->getCode());$/;" v +t ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/OptionGroup.php /^ $t = $this->getTranslation($language->getCode());$/;" v +t ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Product.php /^ $t = $this->getTranslation($language->getCode());$/;" v +t ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/Product.php /^ $t = $this->getProduct()->getTranslation($language->getCode());$/;" v +t ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $t = $option->getTranslation($language->getCode());$/;" v +t ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/Model/ProductOptions.php /^ $t = $optionGroup->getTranslation($language->getCode());$/;" v +tab ../../../src/classes/XLite/View/Tabs/ATabs.php /^ $tab = $this->getSelectedTab();$/;" v +table ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $table = array();$/;" v +table ../../../src/Includes/Utils/ModulesManager.php /^ $table = substr($metadata->getTableName(), $len);$/;" v +table ../../../src/Includes/Utils/ModulesManager.php /^ $table = static::getTableName();$/;" v +table ../../../src/Includes/Utils/ModulesManager.php /^ $table = static::getTableName();$/;" v +table ../../../src/classes/XLite/Core/Probe.php /^ $table = \\XLite\\Core\\Database::getEM()->getClassMetadata('XLite\\Model\\MeasureDump')->getTableName();$/;" v +table ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $table = $table->getQuotedName($this);$/;" v +table ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $table = $table->getQuotedName($this);$/;" v +table ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $table = $table->getQuotedName($this);$/;" v +table ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $table = $table->getQuotedName($this);$/;" v +table ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $table = $table->getQuotedName($this);$/;" v +table ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $table = strtoupper($table);$/;" v +table ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : '');$/;" v +table ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $table = \\array_change_key_case($table, CASE_LOWER);$/;" v +table ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $table = $this->getTable($oldTableName);$/;" v +table ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $table = $this->getTable($tableName);$/;" v +table ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $table = new Table($tableName);$/;" v +table ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $table;$/;" v +table ../../../src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php /^ $table = array();$/;" v +table ../../../src/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php /^ $table = array();$/;" v +table ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $table = $targetClass->getTableName();$/;" v +table ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $table = array();$/;" v +table ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $table = $schema->createTable($class->getQuotedTableName($this->_platform));$/;" v +table1Columns ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $table1Columns = $table1->getColumns();$/;" v +table1Indexes ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $table1Indexes = $table1->getIndexes();$/;" v +table2Columns ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $table2Columns = $table2->getColumns();$/;" v +table2Indexes ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $table2Indexes = $table2->getIndexes();$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $tableAlias = isset($this->_class->fieldMappings[$fieldName]['inherited']) ?$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $tableAlias = 't' . $this->_sqlAliasCounter++;$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $tableAlias = isset($owningAssoc['inherited']) ?$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $tableAlias = isset($assoc2['inherited']) ?$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $tableAlias = $this->_getSQLTableAlias($parentClassName);$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $tableAlias = $this->_getSQLTableAlias($subClassName);$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php /^ $tableAlias = $this->_getSQLTableAlias($rootClass->name);$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableAlias = $this->getSQLTableAlias($subClass->table['name'], $dqlAlias);$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableAlias = $this->getSQLTableAlias($class->getTableName(), $expr);$/;" v +tableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableAlias = $this->getSQLTableAlias($parentClass->table['name'], $dqlAlias);$/;" v +tableAlreadyExists ../../../src/lib/Doctrine/DBAL/Schema/SchemaException.php /^ static public function tableAlreadyExists($tableName)$/;" f +tableAnnot ../../../src/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php /^ $tableAnnot = $classAnnotations['Doctrine\\ORM\\Mapping\\Table'];$/;" v +tableColumn ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $tableColumn = array_change_key_case($tableColumn, \\CASE_LOWER);$/;" v +tableColumn ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $tableColumn = array_change_key_case($tableColumn, CASE_LOWER);$/;" v +tableColumn ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $tableColumn = \\array_change_key_case($tableColumn, CASE_LOWER);$/;" v +tableColumn ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $tableColumn = array_change_key_case($tableColumn, CASE_LOWER);$/;" v +tableColumns ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tableColumns = $this->_conn->fetchAll($sql);$/;" v +tableDiff ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tableDiff = new TableDiff($name);$/;" v +tableDifferences ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $tableDifferences = $this->diffTable( $fromSchema->getTable($tableName), $table );$/;" v +tableDifferences ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $tableDifferences = new TableDiff($table1->getName());$/;" v +tableDoesNotExist ../../../src/lib/Doctrine/DBAL/Schema/SchemaException.php /^ static public function tableDoesNotExist($tableName)$/;" f +tableForeignKey ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $tableForeignKey = array_change_key_case($tableForeignKey, CASE_LOWER);$/;" v +tableForeignKey ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $tableForeignKey = array_change_key_case($tableForeignKey, CASE_LOWER);$/;" v +tableForeignKeys ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tableForeignKeys = $this->_conn->fetchAll($sql);$/;" v +tableGeneratorDefinition ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $tableGeneratorDefinition;$/;" v +tableId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->tableId = $tableId;$/;" v +tableId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $tableId;$/;" v +tableId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->tableId = $tableId;$/;" v +tableId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $tableId;$/;" v +tableIdGeneratorNotImplemented ../../../src/lib/Doctrine/ORM/Mapping/MappingException.php /^ public static function tableIdGeneratorNotImplemented($className)$/;" f +tableIndex ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $tableIndex = \\array_change_key_case($tableIndex, CASE_LOWER);$/;" v +tableIndexRows ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $tableIndexRows = array();$/;" v +tableIndexes ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tableIndexes = $this->_conn->fetchAll($sql);$/;" v +tableName ../../../src/Includes/install/install.php /^ $tableName = array_pop($row);$/;" v +tableName ../../../src/classes/XLite/Core/Database.php /^ $tableName = $m[1];$/;" v +tableName ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $tableName = $diff->name;$/;" v +tableName ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $tableName = $diff->newName;$/;" v +tableName ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $tableName = $diff->name;$/;" v +tableName ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $tableName = $table->getQuotedName($this);$/;" v +tableName ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $tableName = strtolower($table->getName());$/;" v +tableName ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ $tableName = strtolower($tableName);$/;" v +tableName ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ $tableName = $this->classToTableNames[$className];$/;" v +tableName ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $tableName;$/;" v +tableName ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $tableName = $this->_class->table['name'];$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php /^ $tableName = $em->getClassMetadata($className)->getQuotedTableName($platform);$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableName = $qComp['metadata']->table['name'];$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName);$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableName = $class->getTableName();$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableName = $class->table['name'];$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableName = $this->_em->getClassMetadata($mapping['inherited'])->table['name'];$/;" v +tableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName);$/;" v +tableNames ../../../src/classes/XLite/Core/Database.php /^ $tableNames = $this->detectTruncateTables($metadatas);$/;" v +tableNames ../../../src/classes/XLite/Core/Database.php /^ $tableNames = static::$em->getConnection()->getSchemaManager()->listTableNames();$/;" v +tableNames ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tableNames = $this->listTableNames();$/;" v +tableNames ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tableNames = array_map('strtolower', (array)$tableNames);$/;" v +tableNames ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $tableNames = array();$/;" v +tablePrefix ../../../src/classes/XLite/Core/Database.php /^ $this->tablePrefix = \\XLite::getInstance()->getOptions(array('database_details', 'table_prefix'));$/;" v +tablePrefix ../../../src/classes/XLite/Core/Database.php /^ protected $tablePrefix = '';$/;" v +tablePrefix ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $tablePrefix = preg_quote(\\XLite\\Core\\Database::getInstance()->getTablePrefix(), '\/');$/;" v +tableReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->tableReference = $tableReference;$/;" v +tableReference ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $tableReference;$/;" v +tableRow ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $tableRow = array_change_key_case($tableRow, \\CASE_LOWER);$/;" v +table_name ../../../src/Includes/functions.php /^ $table_name = $matches[1];$/;" v +table_name ../../../src/Includes/functions.php /^ $table_name = '';$/;" v +tabledata ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->tabledata = new TabledataServiceResource($this, $this->serviceName, 'tabledata', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"projectId": {"required": true, "type": "string", "location": "path"}, "startIndex": {"format": "uint64", "type": "string", "location": "query"}, "tableId": {"required": true, "type": "string", "location": "path"}, "datasetId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}}, "id": "bigquery.tabledata.list", "httpMethod": "GET", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables\/{tableId}\/data", "response": {"$ref": "TableDataList"}}}}', true));$/;" v +tabledata ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $tabledata;$/;" v +tableize ../../../src/lib/Doctrine/Common/Util/Inflector.php /^ public static function tableize($word)$/;" f +tables ../../../src/Includes/Utils/ModulesManager.php /^ $tables = array();$/;" v +tables ../../../src/classes/XLite/Core/Database.php /^ $tables = array_merge($tables, $list['tables']);$/;" v +tables ../../../src/classes/XLite/Core/Database.php /^ $tables = array();$/;" v +tables ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->tables = $tables;$/;" v +tables ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->tables = new TablesServiceResource($this, $this->serviceName, 'tables', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"projectId": {"required": true, "type": "string", "location": "path"}, "datasetId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Table"}, "id": "bigquery.tables.insert", "httpMethod": "POST", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables", "response": {"$ref": "Table"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"projectId": {"required": true, "type": "string", "location": "path"}, "tableId": {"required": true, "type": "string", "location": "path"}, "datasetId": {"required": true, "type": "string", "location": "path"}}, "id": "bigquery.tables.get", "httpMethod": "GET", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables\/{tableId}", "response": {"$ref": "Table"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "datasetId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "uint32", "type": "integer", "location": "query"}, "projectId": {"required": true, "type": "string", "location": "path"}}, "id": "bigquery.tables.list", "httpMethod": "GET", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables", "response": {"$ref": "TableList"}}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"projectId": {"required": true, "type": "string", "location": "path"}, "tableId": {"required": true, "type": "string", "location": "path"}, "datasetId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Table"}, "id": "bigquery.tables.update", "httpMethod": "PUT", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables\/{tableId}", "response": {"$ref": "Table"}}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"projectId": {"required": true, "type": "string", "location": "path"}, "tableId": {"required": true, "type": "string", "location": "path"}, "datasetId": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Table"}, "id": "bigquery.tables.patch", "httpMethod": "PATCH", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables\/{tableId}", "response": {"$ref": "Table"}}, "delete": {"scopes": ["https:\/\/www.googleapis.com\/auth\/bigquery"], "parameters": {"projectId": {"required": true, "type": "string", "location": "path"}, "tableId": {"required": true, "type": "string", "location": "path"}, "datasetId": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "projects\/{projectId}\/datasets\/{datasetId}\/tables\/{tableId}", "id": "bigquery.tables.delete"}}}', true));$/;" v +tables ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $tables;$/;" v +tables ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tables = $this->_conn->fetchAll($sql);$/;" v +tables ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tables = $this->listTables();$/;" v +tables ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $tables = array();$/;" v +tables ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $tables = $this->_conn->fetchAll($sql);$/;" v +tables ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ $tables = array();$/;" v +tables ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ $this->tables = $this->manyToManyTables = $this->classToTableNames = array();$/;" v +tables ../../../src/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php /^ private $tables = null;$/;" v +tablesExist ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ public function tablesExist($tableNames)$/;" f +tabs ../../../src/classes/XLite/Module/CDev/Catalog/View/Tabs/Account.php /^ $tabs = parent::getTabs();$/;" v +tabs ../../../src/classes/XLite/Module/CDev/Demo/Controller/Admin/Settings.php /^ $tabs = parent::getTabPages();$/;" v +tabs ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $tabs = array();$/;" v +tabs ../../../src/classes/XLite/View/Product/Details/Customer/Page/APage.php /^ $this->tabs = $list;$/;" v +tabs ../../../src/classes/XLite/View/Product/Details/Customer/Page/APage.php /^ protected $tabs;$/;" v +tabs ../../../src/classes/XLite/View/Tabs/ATabs.php /^ protected $tabs = array();$/;" v +tabs ../../../src/classes/XLite/View/Tabs/Account.php /^ protected $tabs = array($/;" v +tabs ../../../src/classes/XLite/View/Tabs/AdminProfile.php /^ protected $tabs = array($/;" v +tabs ../../../src/classes/XLite/View/Tabs/BackupRestore.php /^ protected $tabs = array($/;" v +tabs ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ protected $tabs = array($/;" v +tabs ../../../src/classes/XLite/View/Tabs/Statistics.php /^ protected $tabs = array($/;" v +tag ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function tag()$/;" f +tag ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $tag = array('#type' => 'html_tag', '#tag' => $node->nodeName, '#attributes' => array());$/;" v +tag ../../../src/classes/XLite/Module/CDev/OrderTags/Controller/Admin/Order.php /^ $tag = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\CDev\\OrderTags\\Model\\Order\\Tag')$/;" v +tag ../../../src/classes/XLite/View/ItemsList/Module/Manage.php /^ $tag = '';$/;" v +tag ../../../src/classes/XLite/View/ItemsList/Module/Manage.php /^ $tag = \\XLite\\Core\\Request::getInstance()->tag;$/;" v +tagId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->tagId = $tagId;$/;" v +tagId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $tagId;$/;" v +tagline ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->tagline = $tagline;$/;" v +tagline ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $tagline;$/;" v +tagname ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $tagname = $c = '';$/;" v +tagname ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function tagname()$/;" f +tagname ../../../src/classes/XLite/Core/XML.php /^ $tagname = $vals[$i]['tag'];$/;" v +tagname ../../../src/classes/XLite/Core/XML.php /^ $tagname = '';$/;" v +tagname ../../../src/classes/XLite/Core/XML.php /^ $tagname = $vals[$i]['tag'];$/;" v +tagname ../../../src/classes/XLite/Core/XML.php /^ $tagname = $vals[$i]['tag'];$/;" v +tags ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ $this->tags = \\Includes\\Decorator\\Utils\\Operator::getTags($this->getReflection()->docComment);$/;" v +tags ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ $this->tags = $reversible ? null : array();$/;" v +tags ../../../src/Includes/Decorator/Plugin/Templates/Data/Templates/Node.php /^ $tags = $this->__get(\\Includes\\Decorator\\ADecorator::N_TAGS);$/;" v +tags ../../../src/classes/XLite/Module/CDev/GoSocial/Model/Product.php /^ $tags = $this->getUseCustomOG()$/;" v +tags ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Order.php /^ $this->tags = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +tags ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Order.php /^ protected $tags;$/;" v +tags ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->tags = new TagsServiceResource($this, $this->serviceName, 'tags', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Tag"}, "id": "moderator.tags.insert", "httpMethod": "POST", "path": "series\/{seriesId}\/submissions\/{submissionId}\/tags", "response": {"$ref": "Tag"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "id": "moderator.tags.list", "httpMethod": "GET", "path": "series\/{seriesId}\/submissions\/{submissionId}\/tags", "response": {"$ref": "TagList"}}, "delete": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "tagId": {"required": true, "type": "string", "location": "path"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "httpMethod": "DELETE", "path": "series\/{seriesId}\/submissions\/{submissionId}\/tags\/{tagId}", "id": "moderator.tags.delete"}}}', true));$/;" v +tags ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $tags;$/;" v +tail ../../../src/classes/XLite/Core/Layout.php /^ $tail = \\XLite\\View\\AView::getTail();$/;" v +tail ../../../src/classes/XLite/Model/Collection.php /^ $this->tail = $node;$/;" v +tail ../../../src/classes/XLite/Model/Collection.php /^ protected $tail = null;$/;" v +tail ../../../src/classes/XLite/View/AView.php /^ $tail = '[' . implode('][', array_slice($args, 2)) . ']';$/;" v +tail ../../../src/classes/XLite/View/AView.php /^ $tail = '';$/;" v +tail ../../../src/lib/Log/file.php /^ $tail = basename($path);$/;" v +tail ../../../src/lib/Log/file.php /^ $tail = basename($path);$/;" v +takeSnapshot ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function takeSnapshot()$/;" f +target ../../../src/classes/XLite/Controller/AController.php /^ $target = isset($params['target']) ? $params['target'] : '';$/;" v +target ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $target = 'installed';$/;" v +target ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $target = 'marketplace';$/;" v +target ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ $target = '';$/;" v +target ../../../src/classes/XLite/Core/Converter.php /^ $target = $possibleTarget;$/;" v +target ../../../src/classes/XLite/Core/Converter.php /^ $target = null;$/;" v +target ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $target = implode('\\',\\'', $class::getAllowedTargets());$/;" v +target ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $target = str_replace(',', '\\',\\'', preg_replace('\/[^\\w,]+\/', '', $target));$/;" v +target ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Converter.php /^ $target = \\XLite::TARGET_DEFAULT;$/;" v +target ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $target = $args['target'];$/;" v +target ../../../src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php /^ $target = 'product';$/;" v +target ../../../src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/SelectFile.php /^ $target = parent::getRedirectTarget();$/;" v +target ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php /^ $target = $loc['target'];$/;" v +target ../../../src/classes/XLite/Module/CDev/XMLSitemapDrupal/Drupal/Controller.php /^ $target = $record['loc']['target'];$/;" v +target ../../../src/classes/XLite/View/Authorization.php /^ $target = \\XLite\\Core\\Request::getInstance()->target;$/;" v +target ../../../src/classes/XLite/View/Sort/ASort.php /^ $target = $params['target'];$/;" v +target ../../../src/classes/XLite/View/Sort/ASort.php /^ $target = \\XLite::TARGET_DEFAULT;$/;" v +targetClass ../../../src/classes/XLite/Core/Database.php /^ $targetClass = static::$em->getClassMetadata($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $targetClass = $this->_ce[$relation['targetEntity']];$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $targetClass = $this->_em->getClassMetadata($mapping['sourceEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $targetClass = $this->_em->getClassMetadata($mapping['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $targetClass = $this->_em->getClassMetadata($mapping->getTargetEntityName());$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php /^ $targetClass = $sqlWalker->getEntityManager()->getClassMetadata($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $targetClass = $this->_em->getClassMetadata($relation['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Tools/SchemaValidator.php /^ $targetClass = $cmf->getMetadataFor($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/Tools/SchemaValidator.php /^ $targetClass = $cmf->getMetadataFor($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $targetClass = $this->em->getClassMetadata($assoc2['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);$/;" v +targetClass ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);$/;" v +targetClassName ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $targetClassName = $parentClass->associationMappings[$assocField]['targetEntity'];$/;" v +targetEntity ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $targetEntity = $fData['targetEntity'];$/;" v +targetEntity ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $targetEntity;$/;" v +targetEntity ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $targetEntity = $this->load($identifier, $targetEntity, $assoc);$/;" v +targetEntity ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $targetEntity = $this->load($identifier, $targetEntity, $assoc, $hints);$/;" v +targetId ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $targetId = $uow->getEntityIdentifier($coll->getOwner());$/;" v +targetId ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $targetId = $uow->getEntityIdentifier($element);$/;" v +targetMapping ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $targetMapping = $this->_em->getClassMetadata($this->_class->associationMappings[$idField]['targetEntity']);$/;" v +targetMetadata ../../../src/lib/Doctrine/ORM/Tools/SchemaValidator.php /^ $targetMetadata = $cmf->getMetadataFor($assoc['targetEntity']);$/;" v +targetPlatform ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform();$/;" v +targetPlatform ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ private $targetPlatform;$/;" v +targetShortName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $targetShortName = strtolower($mapping['targetEntity']);$/;" v +targetShortName ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $targetShortName = strtolower(substr($mapping['targetEntity'], strrpos($mapping['targetEntity'], '\\\\') + 1));$/;" v +targetSubClass ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $targetSubClass = $this->em->getClassMetadata($subClassName);$/;" v +targetTableAlias ../../../src/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php /^ $targetTableAlias = $sqlWalker->getSQLTableAlias($targetClass->table['name']);$/;" v +targetTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name']);$/;" v +targetTableAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name'], $joinedDqlAlias);$/;" v +targetTableName ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $targetTableName = $targetClass->getQuotedTableName($this->_platform);$/;" v +targetingInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->targetingInfo = $targetingInfo;$/;" v +targetingInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $targetingInfo;$/;" v +targets ../../../src/classes/XLite/Module/CDev/AustraliaPost/View/TopMenu.php /^ $targets = parent::getRelatedTargets($target);$/;" v +targets ../../../src/classes/XLite/Module/CDev/USPS/View/TopMenu.php /^ $targets = parent::getRelatedTargets($target);$/;" v +targets ../../../src/classes/XLite/View/AView.php /^ $targets = static::getAllowedTargets();$/;" v +targets ../../../src/classes/XLite/View/Payment/Iframe.php /^ $targets = parent::getAllowedTargets();$/;" v +task ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ $task = \\XLite\\Core\\Database::getRepo('XLite\\Model\\EventTask')->findOneBy(array('name' => $event));$/;" v +task ../../../src/classes/XLite/Controller/Console/Cron.php /^ $task = $task[0];$/;" v +tasklists ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->tasklists = new TasklistsServiceResource($this, $this->serviceName, 'tasklists', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "request": {"$ref": "TaskList"}, "response": {"$ref": "TaskList"}, "httpMethod": "POST", "path": "users\/@me\/lists", "id": "tasks.tasklists.insert"}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks", "https:\/\/www.googleapis.com\/auth\/tasks.readonly"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "id": "tasks.tasklists.get", "httpMethod": "GET", "path": "users\/@me\/lists\/{tasklist}", "response": {"$ref": "TaskList"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks", "https:\/\/www.googleapis.com\/auth\/tasks.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int64", "type": "string", "location": "query"}}, "response": {"$ref": "TaskLists"}, "httpMethod": "GET", "path": "users\/@me\/lists", "id": "tasks.tasklists.list"}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "TaskList"}, "id": "tasks.tasklists.update", "httpMethod": "PUT", "path": "users\/@me\/lists\/{tasklist}", "response": {"$ref": "TaskList"}}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "TaskList"}, "id": "tasks.tasklists.patch", "httpMethod": "PATCH", "path": "users\/@me\/lists\/{tasklist}", "response": {"$ref": "TaskList"}}, "delete": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "users\/@me\/lists\/{tasklist}", "id": "tasks.tasklists.delete"}}}', true));$/;" v +tasklists ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $tasklists;$/;" v +tasks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->tasks = new TasksServiceResource($this, $this->serviceName, 'tasks', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "parent": {"type": "string", "location": "query"}, "previous": {"type": "string", "location": "query"}}, "request": {"$ref": "Task"}, "id": "tasks.tasks.insert", "httpMethod": "POST", "path": "lists\/{tasklist}\/tasks", "response": {"$ref": "Task"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks", "https:\/\/www.googleapis.com\/auth\/tasks.readonly"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "id": "tasks.tasks.get", "httpMethod": "GET", "path": "lists\/{tasklist}\/tasks\/{task}", "response": {"$ref": "Task"}}, "clear": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "POST", "path": "lists\/{tasklist}\/clear", "id": "tasks.tasks.clear"}, "move": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"previous": {"type": "string", "location": "query"}, "tasklist": {"required": true, "type": "string", "location": "path"}, "parent": {"type": "string", "location": "query"}, "task": {"required": true, "type": "string", "location": "path"}}, "id": "tasks.tasks.move", "httpMethod": "POST", "path": "lists\/{tasklist}\/tasks\/{task}\/move", "response": {"$ref": "Task"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks", "https:\/\/www.googleapis.com\/auth\/tasks.readonly"], "parameters": {"dueMax": {"type": "string", "location": "query"}, "tasklist": {"required": true, "type": "string", "location": "path"}, "pageToken": {"type": "string", "location": "query"}, "updatedMin": {"type": "string", "location": "query"}, "completedMin": {"type": "string", "location": "query"}, "maxResults": {"format": "int64", "type": "string", "location": "query"}, "showCompleted": {"type": "boolean", "location": "query"}, "showDeleted": {"type": "boolean", "location": "query"}, "completedMax": {"type": "string", "location": "query"}, "showHidden": {"type": "boolean", "location": "query"}, "dueMin": {"type": "string", "location": "query"}}, "id": "tasks.tasks.list", "httpMethod": "GET", "path": "lists\/{tasklist}\/tasks", "response": {"$ref": "Tasks"}}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Task"}, "id": "tasks.tasks.update", "httpMethod": "PUT", "path": "lists\/{tasklist}\/tasks\/{task}", "response": {"$ref": "Task"}}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Task"}, "id": "tasks.tasks.patch", "httpMethod": "PATCH", "path": "lists\/{tasklist}\/tasks\/{task}", "response": {"$ref": "Task"}}, "delete": {"scopes": ["https:\/\/www.googleapis.com\/auth\/tasks"], "parameters": {"tasklist": {"required": true, "type": "string", "location": "path"}, "task": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "lists\/{tasklist}\/tasks\/{task}", "id": "tasks.tasks.delete"}}}', true));$/;" v +tasks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $tasks;$/;" v +tax ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/CheckoutSuccess.php /^ $tax = $order->getSurchargeSumByType('TAX');$/;" v +tax ../../../src/classes/XLite/Module/CDev/GoogleAnalytics/View/Header.php /^ $tax = $order->getSurchargeSumByType('TAX');$/;" v +tax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->tax = $tax;$/;" v +tax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $tax;$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $tax = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\SalesTax\\Model\\Tax')->getTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $tax = $this->getTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $tax = parent::getTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $tax = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\SalesTax\\Model\\Tax')->find($id);$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Repo/Tax.php /^ $tax = $this->createTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Repo/Tax.php /^ $tax = $this->createQueryBuilder()$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Repo/Tax.php /^ $tax = new \\XLite\\Module\\CDev\\SalesTax\\Model\\Tax;$/;" v +tax ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ protected $tax;$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $tax = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\VAT\\Model\\Tax')->getTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $tax = $this->getTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $tax = parent::getTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $tax = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\VAT\\Model\\Tax')->find($id);$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Model/Repo/Tax.php /^ $tax = $this->createTax();$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Model/Repo/Tax.php /^ $tax = $this->createQueryBuilder()$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Model/Repo/Tax.php /^ $tax = new \\XLite\\Module\\CDev\\VAT\\Model\\Tax;$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ protected $tax;$/;" v +tax ../../../src/classes/XLite/Module/CDev/VAT/View/Price.php /^ $tax = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\VAT\\Model\\Tax')->getTax();$/;" v +taxId ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $taxId = $tax->getId();$/;" v +taxTotal ../../../src/classes/XLite/Module/CDev/VAT/Logic/Product/Tax.php /^ $taxTotal = 0;$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/Logic/ATax.php /^ $this->taxes = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\VAT\\Model\\Tax')->findActive();$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/Logic/ATax.php /^ protected $taxes;$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $taxes = $this->getShippingTaxRates($modifier->getSelectedRate(), $zones, $membership);$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $taxes = array();$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/Logic/Product/Tax.php /^ $taxes = $this->calculateProductTaxes($product, $price);$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/Logic/Product/Tax.php /^ $taxes = array();$/;" v +taxes ../../../src/classes/XLite/Module/CDev/VAT/View/Price.php /^ $taxes = $product->getIncludedTaxList();$/;" v +tblAlias ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $tblAlias = $this->getSQLTableAlias($rootClass->table['name'], $dqlAlias);$/;" v +telephone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->telephone = $telephone;$/;" v +telephone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $telephone;$/;" v +tempTable ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php /^ $tempTable = $platform->getTemporaryTableName($rootClass->getTemporaryIdTableName());$/;" v +tempTable ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $tempTable = $platform->getTemporaryTableName($rootClass->getTemporaryIdTableName());$/;" v +template ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $template = self::$$var;$/;" v +template ../../../src/Includes/Decorator/Plugin/Templates/ATemplates.php /^ $template = substr($base, strpos($base, LC_DS) + ('common' == $skin ? 1 : 4));$/;" v +template ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $template = 'common' == $skin$/;" v +template ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $template = 'common\/sidebar_box.tpl';$/;" v +template ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $template == $this->getDefaultTemplate()$/;" v +template ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $template = parent::getTemplate();$/;" v +template ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->template = $template;$/;" v +template ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $template;$/;" v +template ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $this->template = $template;$/;" v +template ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $template = array();$/;" v +template ../../../src/classes/XLite/View/AView.php /^ $template = substr($template, strlen(LC_DIR_SKINS));$/;" v +template ../../../src/classes/XLite/View/Controller.php /^ $this->template = $contentTemplate;$/;" v +template ../../../src/classes/XLite/View/Mailer.php /^ $this->template = $template;$/;" v +template ../../../src/classes/XLite/View/Mailer.php /^ protected $template = null;$/;" v +template ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $template = self::$$var;$/;" v +templateGet ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php /^ protected $templateGet = <<templatesSkin = null;$/;" v +templatesSkin ../../../src/classes/XLite/View/Mailer.php /^ protected $templatesSkin = null;$/;" v +templatesToHide ../../../src/classes/XLite/Module/CDev/Catalog/Model/Repo/ViewList.php /^ protected $templatesToHide = array($/;" v +terms ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $terms = array();$/;" v +test ../../../src/Includes/functions.php /^ $test = '';$/;" v +text ../../../src/Includes/Decorator/Utils/CacheManager.php /^ $text = number_format(microtime(true) - static::$stepStart, 2) . 'sec, ';$/;" v +text ../../../src/Includes/install/install.php /^ $text = str_replace($key, $value, $text);$/;" v +text ../../../src/Includes/install/install.php /^ $text = getTextByLabel($label);$/;" v +text ../../../src/classes/XLite/Core/TopMessage.php /^ $text = static::t($text, $arguments, $code);$/;" v +text ../../../src/classes/XLite/Model/MeasureDump.php /^ protected $text;$/;" v +text ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->text = $text;$/;" v +text ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $text;$/;" v +text ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ $this->text = new TextServiceResource($this, $this->serviceName, 'text', json_decode('{"methods": {"get": {"parameters": {"format": {"default": "plain", "enum": ["html", "plain", "raw"], "location": "query", "type": "string"}, "id": {"repeated": true, "required": true, "type": "string", "location": "path"}, "maxlength": {"format": "uint32", "type": "integer", "location": "query"}}, "id": "freebase.text.get", "httpMethod": "GET", "path": "text{\/id*}", "response": {"$ref": "ContentserviceGet"}}}}', true));$/;" v +text ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ public $text;$/;" v +text ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->text = $text;$/;" v +text ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $text;$/;" v +text ../../../src/classes/XLite/View/Mailer.php /^ $text = $this->getContent();$/;" v +text ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ $text = array();$/;" v +text ../../../src/lib/Symfony/Component/Console/Shell.php /^ $text = substr($info['line_buffer'], 0, $info['end']);$/;" v +text ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $text = substr($text, 0, -1)."\\n";$/;" v +text ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $text = preg_replace('#\\n+$#s', "\\n", $text);$/;" v +text ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $text = preg_replace('#\\n+$#s', '', $text);$/;" v +text ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $text = preg_replace('\/ (\\n*)$\/', "\\n$1", $text);$/;" v +text ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $text = '';$/;" v +textFields ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Importer/Product.php /^ protected $textFields = array($/;" v +textIndent ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $textIndent = $matches['indent'];$/;" v +textMsg ../../../src/lib/PHPMailer/class.phpmailer.php /^ $textMsg = trim(strip_tags(preg_replace('\/<(head|title|style|script)[^>]*>.*?<\\\/\\\\1>\/s','',$message)));$/;" v +textResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->textResponseBytes = $textResponseBytes;$/;" v +textResponseBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $textResponseBytes;$/;" v +textSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->textSnippet = $textSnippet;$/;" v +textSnippet ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $textSnippet;$/;" v +textToSpeechPermission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->textToSpeechPermission = $textToSpeechPermission;$/;" v +textToSpeechPermission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $textToSpeechPermission;$/;" v +theJoinTable ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $theJoinTable = $schema->createTable($foreignClass->getQuotedJoinTableName($mapping, $this->_platform));$/;" v +thickness ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->thickness = $thickness;$/;" v +thickness ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $thickness;$/;" v +thousand ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Select/Format.php /^ protected $thousand = array('', '.', ',', ' ');$/;" v +thousandDelimiter ../../../src/classes/XLite/Model/Currency.php /^ protected $thousandDelimiter = '';$/;" v +threads ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ public function threads()$/;" f +throwAPIException ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ protected function throwAPIException($result) {$/;" f +throwCleanURLError ../../../src/classes/XLite/Core/Validator/String/CleanURL.php /^ protected function throwCleanURLError()$/;" f +throwError ../../../src/classes/XLite/Core/Validator/AValidator.php /^ protected function throwError($message, array $arguments = array(), $pathItem = null, $publicName = null)$/;" f +throwException ../../../src/Includes/ErrorHandler.php /^ protected static function throwException($message, $code)$/;" f +throwInternalError ../../../src/classes/XLite/Core/Validator/AValidator.php /^ protected function throwInternalError($message, array $arguments = array())$/;" f +throwSKUError ../../../src/classes/XLite/Core/Validator/SKU.php /^ protected function throwSKUError()$/;" f +thumbnail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->thumbnail = $thumbnail;$/;" v +thumbnail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $thumbnail;$/;" v +thumbnailHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->thumbnailHeight = $thumbnailHeight;$/;" v +thumbnailHeight ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $thumbnailHeight;$/;" v +thumbnailLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->thumbnailLink = $thumbnailLink;$/;" v +thumbnailLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $thumbnailLink;$/;" v +thumbnailWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->thumbnailWidth = $thumbnailWidth;$/;" v +thumbnailWidth ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $thumbnailWidth;$/;" v +thumbnails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->thumbnails = $thumbnails;$/;" v +thumbnails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $thumbnails;$/;" v +till ../../../src/classes/XLite/View/Pager/APager.php /^ $till = min($this->getPagesCount()+1, $this->getFrameStartPage()+$this->getFrameLength());$/;" v +time ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $time = strtotime(strval($data));$/;" v +time ../../../src/classes/XLite/Controller/Console/Cron.php /^ $time = gmdate('H:i:s', time() - $this->startTime);$/;" v +time ../../../src/classes/XLite/Controller/Customer/OrderList.php /^ $time = strtotime(\\XLite\\Core\\Request::getInstance()->endDate);$/;" v +time ../../../src/classes/XLite/Controller/Customer/OrderList.php /^ $time = strtotime(\\XLite\\Core\\Request::getInstance()->startDate);$/;" v +time ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $time = microtime(true);$/;" v +time ../../../src/classes/XLite/Core/Probe.php /^ $time = microtime(true);$/;" v +time ../../../src/classes/XLite/Module/CDev/Conversations/View/Model/Conversation.php /^ $time = time();$/;" v +time ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php /^ $time = filemtime($path);$/;" v +time ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php /^ $time = $record['lastmod'];$/;" v +time ../../../src/classes/XLite/View/FormField/Select/DateFormat.php /^ $time = time();$/;" v +time ../../../src/classes/XLite/View/FormField/Select/TimeFormat.php /^ $time = time();$/;" v +timeLimit ../../../src/classes/XLite/Controller/Console/Cron.php /^ protected $timeLimit = 600;$/;" v +timeMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->timeMax = $timeMax;$/;" v +timeMax ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $timeMax;$/;" v +timeMin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->timeMin = $timeMin;$/;" v +timeMin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $timeMin;$/;" v +timePoint ../../../src/classes/XLite/View/AView.php /^ $timePoint = str_repeat('+', $cntLevel) . '[TPL ' . str_repeat('0', 4 - strlen((string)$cnt)) . $cnt . '] '$/;" v +timeToLive ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $timeToLive = (int) $timeToLive;$/;" v +timeToLive ../../../src/lib/Doctrine/ORM/Query.php /^ $timeToLive = (int) $timeToLive;$/;" v +timeWindowSeconds ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->timeWindowSeconds = $timeWindowSeconds;$/;" v +timeWindowSeconds ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $timeWindowSeconds;$/;" v +timeZone ../../../src/classes/XLite/Core/Converter.php /^ $timeZone = \\XLite\\Core\\Config::getInstance()->General->time_zone ?: $user->getTimezone()->getName();$/;" v +timeZone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->timeZone = $timeZone;$/;" v +timeZone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $timeZone;$/;" v +timeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Abstract.php /^ $timeout = (float) $timeout;$/;" v +timeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/Curl.php /^ $timeout = $this->getDefaultTimeout();$/;" v +timeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/CurlNoReuse.php /^ $timeout = $this->getDefaultTimeout();$/;" v +timeout ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/HttpTransport/FileGetContents.php /^ $timeout = (float) $timeout \/ 2;$/;" v +timeoutMs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->timeoutMs = $timeoutMs;$/;" v +timeoutMs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $timeoutMs;$/;" v +timesLimit ../../../src/classes/XLite/Core/Profiler.php /^ $timesLimit = (self::QUERY_LIMIT_TIMES < $d['count'] ? $warnStyle : '');$/;" v +timestampMs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ $this->timestampMs = $timestampMs;$/;" v +timestampMs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ public $timestampMs;$/;" v +timezone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->timezone = $timezone;$/;" v +timezone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $timezone;$/;" v +timezone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->timezone = $timezone;$/;" v +timezone ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public $timezone;$/;" v +title ../../../src/classes/XLite/Controller/Customer/Order.php /^ $title = 'Order not found';$/;" v +title ../../../src/classes/XLite/Controller/Customer/Order.php /^ $title = static::t($/;" v +title ../../../src/classes/XLite/Model/Base/PersonalAddress.php /^ protected $title = '';$/;" v +title ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $title = $this->getTitle();$/;" v +title ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $title = $this->getPageTitle();$/;" v +title ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Portal.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Portal.php /^ protected $title = '';$/;" v +title ../../../src/classes/XLite/Module/CDev/FileAttachments/Model/Product/AttachmentTranslation.php /^ protected $title = '';$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->title = $title;$/;" v +title ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $title;$/;" v +title ../../../src/lib/Symfony/Component/Console/Application.php /^ $title = sprintf(' [%s] ', get_class($e));$/;" v +titles ../../../src/classes/XLite/View/OrderStatus.php /^ protected $titles = array($/;" v +tls ../../../src/lib/PHPMailer/class.phpmailer.php /^ $tls = ($this->SMTPSecure == 'tls');$/;" v +tmp ../../../src/Includes/functions.php /^ $tmp = @fread($fp, 43);$/;" v +tmp ../../../src/Includes/functions.php /^ $tmp = substr($salt, $num, 1);$/;" v +tmp ../../../src/Includes/functions.php /^ $tmp = fread($fp, 43);$/;" v +tmp ../../../src/Includes/install/templates/step0_copyright.tpl.php /^ $tmp = ob_get_contents();$/;" v +tmp ../../../src/classes/XLite.php /^ $tmp = \\XLite\\Core\\Request::getInstance();$/;" v +tmp ../../../src/classes/XLite/Core/Database.php /^ $tmp = explode(':', $row, 2);$/;" v +tmp ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $tmp = substr($str, 0, $pos+1);$/;" v +tmp ../../../src/classes/XLite/Model/Base/Storage.php /^ $tmp = LC_DIR_TMP . $name;$/;" v +tmp ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ $tmp = @unserialize($value);$/;" v +tmp ../../../src/classes/XLite/View/PoweredBy.php /^ $tmp = $this->phrases[$index];$/;" v +tmp ../../../src/lib/PEAR2/HTTP/Request/Adapter/Http.php /^ $tmp = 'HTTP_METH_'.strtoupper($this->verb);$/;" v +tmp ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ $tmp = unpack('V2', substr($data, -8));$/;" v +tmp ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpstream.php /^ $tmp = $this->parseResponseCode($headers[0]);$/;" v +tmp ../../../src/lib/PHPMailer/class.phpmailer.php /^ $tmp="";$/;" v +tmpConn ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $tmpConn = $this->_conn;$/;" v +tmpDate ../../../src/classes/XLite/Model/Repo/Profile.php /^ $tmpDate = strtotime($this->currentSearchCnd->$paramEndDate);$/;" v +tmpDate ../../../src/classes/XLite/Model/Repo/Profile.php /^ $tmpDate = strtotime($this->currentSearchCnd->$paramStartDate);$/;" v +tmpElem ../../../src/classes/XLite/Core/XML.php /^ $tmpElem = & $elem['#'][$key];$/;" v +tmpElem ../../../src/classes/XLite/Core/XML.php /^ $tmpElem = & $elem[0]['#'][$key];$/;" v +tmpElem ../../../src/classes/XLite/Core/XML.php /^ $tmpElem = & $elem[$key];$/;" v +tmpFile ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $tmpFile = $_FILES['userfile']['tmp_name'];$/;" v +tmpMessage ../../../src/lib/PEAR2/HTTP/Request/Listener.php /^ $tmpMessage = "Additional data: ";$/;" v +tmpPath ../../../src/classes/XLite/Controller/Admin/SelectFile.php /^ $tmpPath = \\Includes\\Utils\\FileManager::getUniquePath(LC_DIR_TMP, basename($path));$/;" v +tmpPlatform ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $tmpPlatform = $this->_platform;$/;" v +tmpProfile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $tmpProfile = new \\XLite\\Model\\Profile;$/;" v +tn ../../../src/classes/XLite/Core/XML.php /^ $tn = $match[1];$/;" v +to ../../../src/classes/XLite/Core/Converter.php /^ protected static $to = array($/;" v +to ../../../src/lib/PHPMailer/class.phpmailer.php /^ $this->to = array();$/;" v +to ../../../src/lib/PHPMailer/class.phpmailer.php /^ $to = str_replace('|','=7C',$this->DKIM_QP($to_header));$/;" v +to ../../../src/lib/PHPMailer/class.phpmailer.php /^ $to = implode(', ', $toArr);$/;" v +to ../../../src/lib/PHPMailer/class.phpmailer.php /^ private $to = array();$/;" v +toArr ../../../src/lib/PHPMailer/class.phpmailer.php /^ $toArr = array();$/;" v +toArray ../../../src/lib/Doctrine/Common/Collections/ArrayCollection.php /^ public function toArray()$/;" f +toArray ../../../src/lib/Doctrine/Common/Collections/Collection.php /^ function toArray();$/;" f +toArray ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function toArray()$/;" f +toArray ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function toArray()$/;" f +toArray ../../../src/lib/PEAR2/HTTP/Request/Uri.php /^ public function toArray()$/;" f +toArray ../../../src/lib/PEAR2/MultiErrors.php /^ public function toArray()$/;" f +toBatchString ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ public function toBatchString($id) {$/;" f +toDelete ../../../src/classes/XLite/Module/CDev/FeaturedProducts/Controller/Admin/Categories.php /^ $toDelete = \\XLite\\Core\\Request::getInstance()->delete;$/;" v +toDelete ../../../src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php /^ $toDelete = array();$/;" v +toDropSql ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ public function toDropSql(\\Doctrine\\DBAL\\Platforms\\AbstractPlatform $platform)$/;" f +toFkeys ../../../src/lib/Doctrine/DBAL/Schema/Comparator.php /^ $toFkeys = $table2->getForeignKeys();$/;" v +toRemove ../../../src/classes/XLite/Model/Base/Storage.php /^ $toRemove = $this->getPath() && $this->getPath() !== $savePath;$/;" v +toSaveSql ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ public function toSaveSql(AbstractPlatform $platform)$/;" f +toSchema ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $toSchema = $this->getSchemaFromMetadata($classes);$/;" v +toSign ../../../src/lib/PHPMailer/class.phpmailer.php /^ $toSign = $this->DKIM_HeaderC($from_header . "\\r\\n" . $to_header . "\\r\\n" . $subject_header . "\\r\\n" . $dkimhdrs);$/;" v +toSql ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ public function toSql(\\Doctrine\\DBAL\\Platforms\\AbstractPlatform $platform)$/;" f +toSql ../../../src/lib/Doctrine/DBAL/Schema/SchemaDiff.php /^ public function toSql(AbstractPlatform $platform)$/;" f +toString ../../../src/lib/Doctrine/Common/Util/Debug.php /^ public static function toString($obj)$/;" f +toType ../../../src/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php /^ $toType = $input->getArgument('to-type');$/;" v +toType ../../../src/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php /^ $toType = strtolower($input->getArgument('to-type'));$/;" v +toUpgrade ../../../src/classes/XLite/Upgrade/Cell.php /^ $toUpgrade = $module;$/;" v +toUpgrade ../../../src/classes/XLite/Upgrade/Cell.php /^ $toUpgrade = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Module')->$method($/;" v +to_header ../../../src/lib/PHPMailer/class.phpmailer.php /^ $to_header=$header;$/;" v +token ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $token = array($index, $token);$/;" v +token ../../../src/classes/XLite/Controller/Customer/Login.php /^ $token = empty($data[self::SECURE_TOKEN]) ? null : $data[self::SECURE_TOKEN];$/;" v +token ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $token = substr($str, 0, $len);$/;" v +token ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $token = $this->tokens[$i];$/;" v +token ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $token = $this->tokens[$tokenIndex];$/;" v +token ../../../src/classes/XLite/Model/MailImageParser.php /^ $token = $this->tokens[$i];$/;" v +token ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Profile.php /^ $token = \\XLite\\Core\\Converter::generateRandomToken();$/;" v +token ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ $token = self::$auth->getAccessToken();$/;" v +token ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $token = $this->accessToken['access_token'];$/;" v +token ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $token = json_decode($body, true);$/;" v +token ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->token = $token;$/;" v +token ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public $token;$/;" v +token ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ $token = $this->lexer->lookahead;$/;" v +token ../../../src/lib/Doctrine/Common/Annotations/PhpParser.php /^ $token = $this->next();$/;" v +token ../../../src/lib/Doctrine/Common/Lexer.php /^ $this->token = $this->lookahead;$/;" v +token ../../../src/lib/Doctrine/Common/Lexer.php /^ $this->token = null;$/;" v +token ../../../src/lib/Doctrine/Common/Lexer.php /^ public $token;$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $peek;$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_lexer->lookahead;$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_peekBeyondClosingParenthesis();$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_lexer->glimpse();$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_lexer->lookahead;$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_lexer->peek();$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_lexer->lookahead;$/;" v +token ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $token = $this->_lexer->peek();$/;" v +token ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $token = $tokens[$i];$/;" v +tokenPos ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $tokenPos = (isset($token['position'])) ? $token['position'] : '-1';$/;" v +tokenType ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $tokenType == Lexer::T_COUNT;$/;" v +tokenType ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $tokenType == Lexer::T_MAX || $tokenType == Lexer::T_SUM ||$/;" v +tokenize ../../../src/lib/Symfony/Component/Console/Input/StringInput.php /^ protected function tokenize($input)$/;" f +tokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $tokens = array_filter($/;" v +tokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $tokens = explode(',', static::composeTokens($tokens));$/;" v +tokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $tokens = array();$/;" v +tokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $tokens = array();$/;" v +tokens ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ protected static $tokens;$/;" v +tokens ../../../src/Includes/Utils/Converter.php /^ $tokens = explode($glue, trim($part));$/;" v +tokens ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->tokens = array();$/;" v +tokens ../../../src/lib/Doctrine/Common/Annotations/PhpParser.php /^ $this->tokens = token_get_all($src);$/;" v +tokens ../../../src/lib/Doctrine/Common/Annotations/PhpParser.php /^ private $tokens;$/;" v +tokens ../../../src/lib/Doctrine/Common/Lexer.php /^ $this->tokens = array();$/;" v +tokens ../../../src/lib/Doctrine/Common/Lexer.php /^ private $tokens = array();$/;" v +tokens ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $tokens = token_get_all($src);$/;" v +tokens ../../../src/lib/Symfony/Component/Console/Input/ArgvInput.php /^ $this->tokens = $argv;$/;" v +tokens ../../../src/lib/Symfony/Component/Console/Input/ArgvInput.php /^ protected $tokens;$/;" v +tokens ../../../src/lib/Symfony/Component/Console/Input/StringInput.php /^ $this->tokens = $this->tokenize($input);$/;" v +tokens ../../../src/lib/Symfony/Component/Console/Input/StringInput.php /^ $tokens = array();$/;" v +tool ../../../src/Includes/Utils/ModulesManager.php /^ $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool(\\XLite\\Core\\Database::getEM());$/;" v +tool ../../../src/classes/XLite/Core/Database.php /^ $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool(static::$em);$/;" v +tool ../../../src/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php /^ $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool($em);$/;" v +top ../../../src/classes/XLite/View/Image.php /^ $top = $this->getParam(self::PARAM_MAX_HEIGHT) - $this->properties['height'];$/;" v +top ../../../src/classes/XLite/View/Image.php /^ $top = max(0, ceil($vertical));$/;" v +top ../../../src/classes/XLite/View/Image.php /^ $top = 0;$/;" v +topDir ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $topDir = \\Includes\\Utils\\FileManager::getDir($topDir);$/;" v +topDir ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ $topDir = $this->manageFile($path, 'getDir');$/;" v +topNode ../../../src/Includes/Decorator/Utils/Operator.php /^ $topNode = new \\Includes\\Decorator\\DataStructure\\Graph\\Classes($node->getClass(), $node->getFile());$/;" v +topicId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->topicId = $topicId;$/;" v +topicId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $topicId;$/;" v +topics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->topics = $topics;$/;" v +topics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->topics = new TopicsServiceResource($this, $this->serviceName, 'topics', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Topic"}, "id": "moderator.topics.insert", "httpMethod": "POST", "path": "series\/{seriesId}\/topics", "response": {"$ref": "Topic"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"max-results": {"format": "uint32", "type": "integer", "location": "query"}, "q": {"type": "string", "location": "query"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}, "mode": {"type": "string", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "id": "moderator.topics.list", "httpMethod": "GET", "path": "series\/{seriesId}\/topics", "response": {"$ref": "TopicList"}}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "topicId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Topic"}, "id": "moderator.topics.update", "httpMethod": "PUT", "path": "series\/{seriesId}\/topics\/{topicId}", "response": {"$ref": "Topic"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "topicId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "id": "moderator.topics.get", "httpMethod": "GET", "path": "series\/{seriesId}\/topics\/{topicId}", "response": {"$ref": "Topic"}}}}', true));$/;" v +topics ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $topics;$/;" v +topics_submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->topics_submissions = new TopicsSubmissionsServiceResource($this, $this->serviceName, 'submissions', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"max-results": {"format": "uint32", "type": "integer", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "includeVotes": {"type": "boolean", "location": "query"}, "topicId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}, "author": {"type": "string", "location": "query"}, "sort": {"type": "string", "location": "query"}, "q": {"type": "string", "location": "query"}, "hasAttachedVideo": {"type": "boolean", "location": "query"}}, "id": "moderator.topics.submissions.list", "httpMethod": "GET", "path": "series\/{seriesId}\/topics\/{topicId}\/submissions", "response": {"$ref": "SubmissionList"}}}}', true));$/;" v +topics_submissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $topics_submissions;$/;" v +total ../../../src/classes/XLite/Model/Base/SurchargeOwner.php /^ $total = 0;$/;" v +total ../../../src/classes/XLite/Model/Base/SurchargeOwner.php /^ protected $total = 0.0000;$/;" v +total ../../../src/classes/XLite/Model/Order.php /^ $total = $this->getTotal();$/;" v +total ../../../src/classes/XLite/Model/OrderItem.php /^ $total = $this->getSubtotal();$/;" v +total ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $total = $this->getTotal();$/;" v +total ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Order.php /^ $total = 0;$/;" v +total ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->total = $total;$/;" v +total ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $total;$/;" v +total ../../../src/classes/XLite/Module/CDev/VAT/Model/Shipping/Rate.php /^ $total = \\XLite\\Module\\CDev\\VAT\\Logic\\Shipping\\Tax::getInstance()->calculateRateCost($this, $total);$/;" v +total ../../../src/classes/XLite/Module/CDev/VAT/Model/Shipping/Rate.php /^ $total = parent::getTotalRate();$/;" v +totalBytesProcessed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->totalBytesProcessed = $totalBytesProcessed;$/;" v +totalBytesProcessed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $totalBytesProcessed;$/;" v +totalCount ../../../src/classes/XLite/View/OrderSearch.php /^ $this->totalCount = count($this->getOrders());$/;" v +totalCount ../../../src/classes/XLite/View/OrderSearch.php /^ protected $totalCount = null;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->totalItems = $totalItems;$/;" v +totalItems ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $totalItems;$/;" v +totalMatchedRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->totalMatchedRows = $totalMatchedRows;$/;" v +totalMatchedRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $totalMatchedRows;$/;" v +totalMatchedRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->totalMatchedRows = $totalMatchedRows;$/;" v +totalMatchedRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $totalMatchedRows;$/;" v +totalMatchingVariants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->totalMatchingVariants = $totalMatchingVariants;$/;" v +totalMatchingVariants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $totalMatchingVariants;$/;" v +totalNonSynchronizedAccounts ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ $this->totalNonSynchronizedAccounts = count($this->drupalAccounts)$/;" v +totalNonSynchronizedAccounts ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ protected $totalNonSynchronizedAccounts = 0;$/;" v +totalNumberOfVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->totalNumberOfVotes = $totalNumberOfVotes;$/;" v +totalNumberOfVotes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $totalNumberOfVotes;$/;" v +totalParticipants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->totalParticipants = $totalParticipants;$/;" v +totalParticipants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $totalParticipants;$/;" v +totalQueries ../../../src/classes/XLite/Core/Profiler.php /^ $totalQueries = count(self::$queries);$/;" v +totalQueriesTime ../../../src/classes/XLite/Core/Profiler.php /^ $totalQueriesTime = 0;$/;" v +totalQueriesTime ../../../src/classes/XLite/Core/Profiler.php /^ $totalQueriesTime = number_format($totalQueriesTime, 4, self::DEC_POINT, self::THOUSANDS_SEP);$/;" v +totalRequestBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->totalRequestBytes = $totalRequestBytes;$/;" v +totalRequestBytes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $totalRequestBytes;$/;" v +totalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->totalResults = $totalResults;$/;" v +totalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $totalResults;$/;" v +totalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->totalResults = $totalResults;$/;" v +totalResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $totalResults;$/;" v +totalRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->totalRows = $totalRows;$/;" v +totalRows ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $totalRows;$/;" v +totalSize ../../../src/classes/XLite/Upgrade/Cell.php /^ $totalSize = \\Includes\\Utils\\ArrayManager::sumObjectsArrayFieldValues($this->getEntries(), 'getPackSize');$/;" v +totals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->totals = $totals;$/;" v +totals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $totals;$/;" v +totals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->totals = $totals;$/;" v +totals ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $totals;$/;" v +totalsForAllResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->totalsForAllResults = $totalsForAllResults;$/;" v +totalsForAllResults ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $totalsForAllResults;$/;" v +tpl ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $tpl = substr($this->file, strlen(LC_DIR_SKINS));$/;" v +tpl ../../../src/classes/XLite/Model/Repo/TemplatePatch.php /^ $tpl = $patch->tpl;$/;" v +tpl ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $tpl;$/;" v +tpl ../../../src/classes/XLite/Model/ViewList.php /^ protected $tpl = '';$/;" v +tpl ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductOptions.php /^ $tpl = 'modules\/CDev\/ProductOptions\/display\/input.tpl';$/;" v +tpl ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductOptions.php /^ $tpl = 'modules\/CDev\/ProductOptions\/display\/radio.tpl';$/;" v +tpl ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductOptions.php /^ $tpl = 'modules\/CDev\/ProductOptions\/display\/select.tpl';$/;" v +tpl ../../../src/classes/XLite/Module/CDev/ProductOptions/View/ProductOptions.php /^ $tpl = 'modules\/CDev\/ProductOptions\/display\/textarea.tpl';$/;" v +tpl ../../../src/classes/XLite/Module/CDev/VAT/View/ProductOptionModifier.php /^ $tpl = 'modules\/CDev\/VAT\/product_option_modifier_price.tpl';$/;" v +tpl ../../../src/classes/XLite/Module/CDev/VAT/View/ProductOptionModifier.php /^ $tpl = parent::getModifierTemplate($surcharge);$/;" v +tpls ../../../src/classes/XLite/Module/CDev/ProductVariants/Controller/Admin/Product.php /^ $tpls = parent::getPageTemplates();$/;" v +trace ../../../src/Includes/functions.php /^ $trace = array();$/;" v +trace ../../../src/classes/XLite/Core/Operator.php /^ $trace = array();$/;" v +trace ../../../src/classes/XLite/Core/Profiler.php /^ $trace = array();$/;" v +trace ../../../src/lib/PEAR2/Autoload.php /^ $trace = $e->getTrace();$/;" v +trace ../../../src/lib/PEAR2/Exception.php /^ $trace = $this->getTraceSafe();$/;" v +trace ../../../src/lib/Symfony/Component/Console/Application.php /^ $trace = $e->getTrace();$/;" v +tracking ../../../src/classes/XLite/Model/Order.php /^ protected $tracking = '';$/;" v +trackingUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->trackingUrl = $trackingUrl;$/;" v +trackingUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $trackingUrl;$/;" v +trail ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $trail = array();$/;" v +trailing ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $this->trailing = true;$/;" v +trailing ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ public $trailing;$/;" v +trailingZeroes ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $trailingZeroes = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config')$/;" v +trails ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $trails = menu_get_active_trail();$/;" v +trainedmodels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->trainedmodels = new TrainedmodelsServiceResource($this, $this->serviceName, 'trainedmodels', json_decode('{"methods": {"predict": {"scopes": ["https:\/\/www.googleapis.com\/auth\/prediction"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Input"}, "id": "prediction.trainedmodels.predict", "httpMethod": "POST", "path": "trainedmodels\/{id}\/predict", "response": {"$ref": "Output"}}, "insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/devstorage.read_only", "https:\/\/www.googleapis.com\/auth\/prediction"], "request": {"$ref": "Training"}, "response": {"$ref": "Training"}, "httpMethod": "POST", "path": "trainedmodels", "id": "prediction.trainedmodels.insert"}, "delete": {"scopes": ["https:\/\/www.googleapis.com\/auth\/prediction"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "trainedmodels\/{id}", "id": "prediction.trainedmodels.delete"}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/prediction"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Update"}, "id": "prediction.trainedmodels.update", "httpMethod": "PUT", "path": "trainedmodels\/{id}", "response": {"$ref": "Training"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/prediction"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "id": "prediction.trainedmodels.get", "httpMethod": "GET", "path": "trainedmodels\/{id}", "response": {"$ref": "Training"}}}}', true));$/;" v +trainedmodels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $trainedmodels;$/;" v +trainingStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->trainingStatus = $trainingStatus;$/;" v +trainingStatus ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $trainingStatus;$/;" v +transTbl ../../../src/classes/XLite/View/Mailer.php /^ $transTbl = array_flip(get_html_translation_table(HTML_ENTITIES));$/;" v +transaction ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $transaction = $cart->getFirstOpenPaymentTransaction();$/;" v +transaction ../../../src/classes/XLite/Model/Order.php /^ $transaction = $this->getFirstOpenPaymentTransaction();$/;" v +transaction ../../../src/classes/XLite/Model/Order.php /^ $transaction = $this->hasUnpaidTotal() || 0 == count($this->getPaymentTransactions())$/;" v +transaction ../../../src/classes/XLite/Model/Order.php /^ $transaction = new \\XLite\\Model\\Payment\\Transaction();$/;" v +transaction ../../../src/classes/XLite/Model/Order.php /^ $transaction = $this->getFirstOpenPaymentTransaction();$/;" v +transaction ../../../src/classes/XLite/Model/Payment/Base/Online.php /^ $this->transaction = $transaction;$/;" v +transaction ../../../src/classes/XLite/Model/Payment/Base/Processor.php /^ $this->transaction = $transaction;$/;" v +transaction ../../../src/classes/XLite/Model/Payment/Base/Processor.php /^ protected $transaction;$/;" v +transaction ../../../src/classes/XLite/Model/Payment/TransactionData.php /^ protected $transaction;$/;" v +transaction ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/Order/Admin/Search.php /^ $transaction = array_shift($transactions);$/;" v +transaction ../../../src/classes/XLite/Module/CDev/Qiwi/Core/QiwiSoapServer.php /^ $transaction = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Transaction')$/;" v +transactionId ../../../src/classes/XLite/Module/CDev/TwoCheckout/Model/Payment/Processor/TwoCheckout.php /^ $transactionId = \\XLite\\Core\\Request::getInstance()->cart_order_id;$/;" v +transactionRequired ../../../src/lib/Doctrine/ORM/TransactionRequiredException.php /^ static public function transactionRequired()$/;" f +transaction_id ../../../src/classes/XLite/Model/Payment/Transaction.php /^ protected $transaction_id;$/;" v +transactional ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function transactional(Closure $func)$/;" f +transactional ../../../src/lib/Doctrine/ORM/EntityManager.php /^ public function transactional(Closure $func)$/;" f +transactions ../../../src/classes/XLite/Model/Order.php /^ $transactions = $this->getPaymentTransactions();$/;" v +transactions ../../../src/classes/XLite/Model/Payment/Base/CreditCard.php /^ $transactions = array();$/;" v +transactions ../../../src/classes/XLite/Model/Payment/Method.php /^ $this->transactions = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +transactions ../../../src/classes/XLite/Model/Payment/Method.php /^ protected $transactions;$/;" v +transactions ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/ItemsList/Model/Order/Admin/Search.php /^ $transactions = $order->getActivePaymentTransactions();$/;" v +transferValueToField ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Inline/Input/Text/Currency/Rate.php /^ protected function transferValueToField(array $field, $value)$/;" f +transferValueToField ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ protected function transferValueToField(array $field, $value)$/;" f +translate ../../../src/classes/XLite/Core/Translation.php /^ public function translate($name, array $arguments = array(), $code = null)$/;" f +translate ../../../src/classes/XLite/Core/TranslationDriver/ATranslationDriver.php /^ abstract public function translate($name, $code);$/;" f +translate ../../../src/classes/XLite/Core/TranslationDriver/Db.php /^ public function translate($name, $code)$/;" f +translate ../../../src/classes/XLite/Core/TranslationDriver/Gettext.php /^ public function translate($name, $code)$/;" f +translate ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator.php /^ public function translate($string, $source, $target)$/;" f +translate ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator/ATranslator.php /^ abstract public function translate($string, $source, $target);$/;" f +translate ../../../src/classes/XLite/Module/CDev/ProductTranslators/Core/Translator/Google.php /^ public function translate($string, $source, $target)$/;" f +translateAllow ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ $this->translateAllow = (bool)\\XLite\\Module\\CDev\\ProductTranslators\\Core\\Translator::getInstance()->getDriver();$/;" v +translateAllow ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ protected $translateAllow;$/;" v +translateFail ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $translateFail = true;$/;" v +translateFail ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $translateFail = false;$/;" v +translateInboundURL ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ public function translateInboundURL(&$path, $originalPath, $pathLanguage)$/;" f +translateLanguage ../../../src/classes/XLite/View/LanguagesModify/Dialog.php /^ $this->translateLanguage = $language;$/;" v +translateLanguage ../../../src/classes/XLite/View/LanguagesModify/Dialog.php /^ $this->translateLanguage = false;$/;" v +translateLanguage ../../../src/classes/XLite/View/LanguagesModify/Dialog.php /^ protected $translateLanguage = null;$/;" v +translateLanguage ../../../src/classes/XLite/View/LanguagesModify/SelectLanguage.php /^ $this->translateLanguage = false;$/;" v +translateLanguage ../../../src/classes/XLite/View/LanguagesModify/SelectLanguage.php /^ $this->translateLanguage = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Language')->findOneByCode($/;" v +translateLanguage ../../../src/classes/XLite/View/LanguagesModify/SelectLanguage.php /^ protected $translateLanguage = null;$/;" v +translateOutboundURL ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ public function translateOutboundURL(&$path, array &$options, $originalPath)$/;" f +translateSchema ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ protected function translateSchema($name)$/;" f +translateSchema ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ protected function translateSchema($name)$/;" f +translateSchema ../../../src/classes/XLite/View/Model/AModel.php /^ protected function translateSchema($name)$/;" f +translateTopMessagesToHTTPHeaders ../../../src/classes/XLite/Controller/AController.php /^ protected function translateTopMessagesToHTTPHeaders()$/;" f +translated ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $translated = \\XLite\\Core\\Request::getInstance()->translated;$/;" v +translated ../../../src/classes/XLite/Module/CDev/ProductTranslators/Model/Product.php /^ protected $translated = false;$/;" v +translated ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Product.php /^ protected $translated = false;$/;" v +translatedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ $this->translatedText = $translatedText;$/;" v +translatedText ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public $translatedText;$/;" v +translatedVariantFields ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ protected static $translatedVariantFields = array('name', 'description', 'brief_description');$/;" v +translation ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php /^ $translation = $this->getTranslationClassDefault($main);$/;" v +translation ../../../src/Includes/install/install.php /^ static $translation;$/;" v +translation ../../../src/Includes/install/translations/en.php /^$translation = array ($/;" v +translation ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $translation = \\XLite\\Core\\Database::getRepo('XLite\\Model\\ProductClassTranslation')->findOneBy(array('name' => $name));$/;" v +translation ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $translation = $lbl->getTranslation($code);$/;" v +translation ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $translation = $label->getTranslation($code);$/;" v +translation ../../../src/classes/XLite/Core/QuickAccess.php /^ $this->translation = \\XLite\\Core\\Translation::getInstance();$/;" v +translation ../../../src/classes/XLite/Core/QuickAccess.php /^ protected $translation;$/;" v +translation ../../../src/classes/XLite/Model/Repo/LanguageLabel.php /^ $translation = $row->getLabelTranslation($code);$/;" v +translation ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $translation = $product->getSoftTranslation($language->getCode());$/;" v +translation ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ $translation = $product->getSoftTranslation(\\XLite\\Core\\Config::getInstance()->General->default_language);$/;" v +translation ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ $translation = $variant->getTranslation($this->getSourceLanguageCode());$/;" v +translationDriver ../../../src/classes/XLite/Core/Translation.php /^ $translationDriver = \\XLite::getInstance()->getOptions(array('other', 'translation_driver'));$/;" v +translations ../../../src/classes/XLite/Core/TranslationDriver/Db.php /^ $this->translations = array();$/;" v +translations ../../../src/classes/XLite/Core/TranslationDriver/Db.php /^ protected $translations = array();$/;" v +translations ../../../src/classes/XLite/Model/Base/I18n.php /^ $this->translations = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +translations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->translations = $translations;$/;" v +translations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $translations;$/;" v +translations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ $this->translations = $translations;$/;" v +translations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ $this->translations = new TranslationsServiceResource($this, $this->serviceName, 'translations', json_decode('{"methods": {"list": {"parameters": {"q": {"repeated": true, "required": true, "type": "string", "location": "query"}, "source": {"type": "string", "location": "query"}, "cid": {"repeated": true, "type": "string", "location": "query"}, "target": {"required": true, "type": "string", "location": "query"}, "format": {"enum": ["html", "text"], "type": "string", "location": "query"}}, "id": "language.translations.list", "httpMethod": "GET", "path": "v2", "response": {"$ref": "TranslationsListResponse"}}}}', true));$/;" v +translations ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ public $translations;$/;" v +translator ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $translator = \\XLite\\Module\\CDev\\ProductTranslators\\Core\\Translator::getInstance();$/;" v +transparency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->transparency = $transparency;$/;" v +transparency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $transparency;$/;" v +transparent ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $transparent = imagecolorallocatealpha($newImage, 255, 255, 255, 127);$/;" v +transparentIndex ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $transparentIndex = imagecolortransparent($this->image);$/;" v +trashed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->trashed = $trashed;$/;" v +trashed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $trashed;$/;" v +travelInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->travelInsurance = $travelInsurance;$/;" v +travelInsurance ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $travelInsurance;$/;" v +tree ../../../src/Includes/Decorator/Utils/CacheManager.php /^ $tree = static::getClassesTree();$/;" v +treeWalkerChain ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $treeWalkerChain = new TreeWalkerChain($this->_query, $this->_parserResult, $this->_queryComponents);$/;" v +tries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiApcCache.php /^ $tries = 20;$/;" v +tries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ $tries = 20;$/;" v +tries ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiMemcacheCache.php /^ $tries = 20;$/;" v +trigger ../../../src/classes/XLite/Core/Event.php /^ public function trigger($name, array $arguments = array())$/;" f +trigger ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $trigger = $table . '_AI_PK';$/;" v +triggerEagerLoads ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function triggerEagerLoads()$/;" f +triggerName ../../../src/lib/Doctrine/DBAL/Platforms/OraclePlatform.php /^ $triggerName = $table . '_AI_PK';$/;" v +triggerTime ../../../src/classes/XLite/Model/Task.php /^ protected $triggerTime = 0;$/;" v +trim ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function trim($x)$/;" f +trimChar ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $trimChar = ($char != false) ? $char . ' FROM ' : '';$/;" v +trimChar ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $trimChar = ($char != false) ? (', ' . $char) : '';$/;" v +trimChar ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ $this->trimChar = $lexer->token['value'];$/;" v +trimChar ../../../src/lib/Doctrine/ORM/Query/AST/Functions/TrimFunction.php /^ public $trimChar = false;$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $trimFn = 'LTRIM';$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $trimFn = 'RTRIM';$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $trimFn = '';$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $trimFn = 'LTRIM';$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $trimFn = 'RTRIM';$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $trimFn = 'TRIM';$/;" v +trimFn ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ $trimFn = '';$/;" v +trimLeadingChars ../../../src/Includes/Utils/Converter.php /^ public static function trimLeadingChars($string, $chars)$/;" f +trimQuotes ../../../src/lib/Doctrine/DBAL/Schema/AbstractAsset.php /^ protected function trimQuotes($identifier)$/;" f +trimTrailingChars ../../../src/Includes/Utils/Converter.php /^ public static function trimTrailingChars($string, $chars)$/;" f +trimTrailingSlashes ../../../src/Includes/Utils/URLManager.php /^ public static function trimTrailingSlashes($url)$/;" f +trimmedValue ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $trimmedValue = preg_replace('#^((\\#.*?\\n)|(\\-\\-\\-.*?\\n))*#s', '', $value, -1, $count);$/;" v +trueValues ../../../src/classes/XLite/Model/WidgetParam/Bool.php /^ protected $trueValues = array('1', 'true', 1, true);$/;" v +trueValues ../../../src/lib/Symfony/Component/Yaml/Inline.php /^ $trueValues = '1.1' == Yaml::getSpecVersion() ? array('true', 'on', '+', 'yes', 'y') : array('true');$/;" v +truncate ../../../src/classes/XLite/Core/Database.php /^ public function truncate(array $tableNames = array())$/;" f +truncate ../../../src/classes/XLite/View/AView.php /^ protected function truncate($base, $field, $length = 0, $etc = '...', $breakWords = false)$/;" f +truncateByType ../../../src/classes/XLite/Core/Database.php /^ public function truncateByType($type)$/;" f +tryGetById ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function tryGetById($id, $rootClassName)$/;" f +tryGetByIdHash ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ public function tryGetByIdHash($idHash, $rootClassName)$/;" f +tryMethod ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ public function tryMethod()$/;" f +ts ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $ts = microtime(true);$/;" v +tstamp ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $tstamp = gmdate('U');$/;" v +ttl ../../../src/classes/XLite/Core/Auth.php /^ $ttl = time() + 86400 * intval(\\XLite\\Core\\Config::getInstance()->General->login_lifetime);$/;" v +ttl ../../../src/classes/XLite/Core/FileCache.php /^ $ttl = intval(file_get_contents($path, false, null, $this->headerLength, $this->ttlLength));$/;" v +ttl ../../../src/classes/XLite/Core/Session.php /^ $ttl = static::getTTL();$/;" v +ttl ../../../src/classes/XLite/Model/Session.php /^ $ttl = \\XLite\\Core\\Session::getTTL();$/;" v +ttl ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Session.php /^ $ttl = intval(ini_get('session.cookie_lifetime'));$/;" v +ttlLength ../../../src/classes/XLite/Core/FileCache.php /^ protected $ttlLength = 11;$/;" v +tval ../../../src/lib/PHPMailer/class.pop3.php /^ $this->tval = $this->POP3_TIMEOUT;$/;" v +tval ../../../src/lib/PHPMailer/class.pop3.php /^ $this->tval = $tval;$/;" v +tval ../../../src/lib/PHPMailer/class.pop3.php /^ public $tval;$/;" v +twoHours ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->twoHours = $twoHours;$/;" v +twoHours ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $twoHours;$/;" v +txn ../../../src/classes/XLite/Controller/Customer/Callback.php /^ $txn = $method->getProcessor()->getCallbackOwnerTransaction();$/;" v +txn ../../../src/classes/XLite/Controller/Customer/Callback.php /^ $txn = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Transaction')$/;" v +txn ../../../src/classes/XLite/Controller/Customer/Callback.php /^ $txn = null;$/;" v +txn ../../../src/classes/XLite/Controller/Customer/PaymentReturn.php /^ $txn = $method->getProcessor()->getReturnOwnerTransaction();$/;" v +txn ../../../src/classes/XLite/Controller/Customer/PaymentReturn.php /^ $txn = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Transaction')$/;" v +txn ../../../src/classes/XLite/Controller/Customer/PaymentReturn.php /^ $txn = null;$/;" v +txn ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $txn = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Transaction')$/;" v +txn ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $txn = null;$/;" v +txnIdName ../../../src/classes/XLite/Controller/Customer/Callback.php /^ $txnIdName = \\XLite\\Core\\Request::getInstance()->txn_id_name;$/;" v +txnIdName ../../../src/classes/XLite/Controller/Customer/Callback.php /^ $txnIdName = 'txnId';$/;" v +txnIdName ../../../src/classes/XLite/Controller/Customer/PaymentReturn.php /^ $txnIdName = \\XLite\\Core\\Request::getInstance()->txn_id_name;$/;" v +txnIdName ../../../src/classes/XLite/Controller/Customer/PaymentReturn.php /^ $txnIdName = \\XLite\\Model\\Payment\\Base\\Online::RETURN_TXN_ID;$/;" v +txnIdName ../../../src/classes/XLite/Module/CDev/Qiwi/Model/Payment/Processor/Qiwi.php /^ $txnIdName = \\XLite\\Core\\Request::getInstance()->txn_id_name;$/;" v +txt ../../../src/classes/XLite/View/Mailer.php /^ $txt = strtr(strip_tags($html), $transTbl);$/;" v +type ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $type = 'ManyToMany';$/;" v +type ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $type = 'ManyToOne';$/;" v +type ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $type = 'OneToMany';$/;" v +type ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $type = 'OneToOne';$/;" v +type ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $type = null;$/;" v +type ../../../src/classes/XLite/Controller/Admin/ShippingSettings.php /^ $type = $option->getType();$/;" v +type ../../../src/classes/XLite/Controller/Console/Db.php /^ $type = $type ? strtolower($type) : 'all';$/;" v +type ../../../src/classes/XLite/Controller/Console/Db.php /^ $type = \\XLite\\Core\\Request::getInstance()->type ?: \\XLite\\Core\\Database::SCHEMA_CREATE;$/;" v +type ../../../src/classes/XLite/Controller/Console/Db.php /^ $type = \\XLite\\Core\\Request::getInstance()->type;$/;" v +type ../../../src/classes/XLite/Controller/Console/Db.php /^ $type = strtolower($type);$/;" v +type ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $type = ucfirst(\\Includes\\Utils\\ArrayManager::getIndex($attrs, 'type'));$/;" v +type ../../../src/classes/XLite/Core/Layout.php /^ $type = self::WEB_PATH_OUTPUT_FULL == $outputType$/;" v +type ../../../src/classes/XLite/Core/TopMessage.php /^ $type = static::INFO;$/;" v +type ../../../src/classes/XLite/Logger.php /^ $type = preg_replace('\/[^a-zA-Z0-9_-]\/Ss', '', strval($type));$/;" v +type ../../../src/classes/XLite/Logic/Order/Modifier/ADiscount.php /^ protected $type = \\XLite\\Model\\Base\\Surcharge::TYPE_DISCOUNT;$/;" v +type ../../../src/classes/XLite/Logic/Order/Modifier/AModifier.php /^ protected $type;$/;" v +type ../../../src/classes/XLite/Logic/Order/Modifier/AShipping.php /^ protected $type = \\XLite\\Model\\Base\\Surcharge::TYPE_SHIPPING;$/;" v +type ../../../src/classes/XLite/Logic/Order/Modifier/ATax.php /^ protected $type = \\XLite\\Model\\Base\\Surcharge::TYPE_TAX;$/;" v +type ../../../src/classes/XLite/Model/Base/Surcharge.php /^ protected $type;$/;" v +type ../../../src/classes/XLite/Model/Config.php /^ protected $type = '';$/;" v +type ../../../src/classes/XLite/Model/DataSource.php /^ protected $type;$/;" v +type ../../../src/classes/XLite/Model/Payment/Transaction.php /^ protected $type = 'sale';$/;" v +type ../../../src/classes/XLite/Model/Repo/ARepo.php /^ protected $type = self::TYPE_STORE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Address.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Config.php /^ $type = $option->getType();$/;" v +type ../../../src/classes/XLite/Model/Repo/Config.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Country.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Currency.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/FormId.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Language.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/LanguageLabel.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Membership.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/Repo/Module.php /^ protected $type = self::TYPE_INTERNAL;$/;" v +type ../../../src/classes/XLite/Model/Repo/Payment/Method.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/Repo/Payment/MethodSetting.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/Repo/Profile.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Session.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/Shipping/Markup.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/Repo/Shipping/Method.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/Repo/State.php /^ protected $type = self::TYPE_SERVICE;$/;" v +type ../../../src/classes/XLite/Model/Repo/TemplatePatch.php /^ protected $type = self::TYPE_INTERNAL;$/;" v +type ../../../src/classes/XLite/Model/Repo/ViewList.php /^ protected $type = self::TYPE_INTERNAL;$/;" v +type ../../../src/classes/XLite/Model/Repo/Zone.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/Repo/ZoneElement.php /^ protected $type = self::TYPE_SECONDARY;$/;" v +type ../../../src/classes/XLite/Model/SessionCell.php /^ $this->type = static::getTypeByValue($value);$/;" v +type ../../../src/classes/XLite/Model/SessionCell.php /^ $type = $type ?: static::getTypeByValue($value);$/;" v +type ../../../src/classes/XLite/Model/SessionCell.php /^ $type = gettype($value);$/;" v +type ../../../src/classes/XLite/Model/SessionCell.php /^ protected $type;$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ protected $type = null;$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/Checkbox.php /^ protected $type = 'checkbox';$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/Collection.php /^ protected $type = 'list';$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/File.php /^ protected $type = 'string';$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/Float.php /^ protected $type = 'float';$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/Int.php /^ protected $type = 'integer';$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/Set.php /^ protected $type = 'list';$/;" v +type ../../../src/classes/XLite/Model/WidgetParam/String.php /^ protected $type = 'string';$/;" v +type ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $type = array_pop($type);$/;" v +type ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $type = explode(' ', str_replace('; charset=', ';charset=', $type));$/;" v +type ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $type = explode(';', $type);$/;" v +type ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $type = trim(array_shift($type));$/;" v +type ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $type = trim(mime_content_type($file));$/;" v +type ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $type = false;$/;" v +type ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $type = 'AUTH_CAPTURE';$/;" v +type ../../../src/classes/XLite/Module/CDev/AuthorizeNet/Model/Payment/Processor/AuthorizeNetSIM.php /^ $type = 'AUTH_ONLY';$/;" v +type ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Portal.php /^ $this->type = isset($type) ? $type : $this->getDefaultType();$/;" v +type ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Portal.php /^ protected $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/Moneybookers/Model/Payment/Processor/Moneybookers.php /^ $type = $this->convertServiceNameToType($method->getServiceName());$/;" v +type ../../../src/classes/XLite/Module/CDev/Places/Model/Place.php /^ protected $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ protected $type = self::GROUP_TYPE;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $type = $this->getType();$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ protected $type = 'price';$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->type = $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $type;$/;" v +type ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiModel.php /^ $type = $this->$name;$/;" v +type ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ protected $type = self::TYPE_PERCENT;$/;" v +type ../../../src/classes/XLite/Module/CDev/Suppliers/Controller/Admin/LowStockReport.php /^ $type = \\XLite\\Core\\Request::getInstance()->type;$/;" v +type ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ protected $type = self::TYPE_PERCENT;$/;" v +type ../../../src/classes/XLite/View/BrowseServer.php /^ $type = $file->isDir() ? 'catalog' : 'file';$/;" v +type ../../../src/classes/XLite/View/Model/Settings.php /^ $type = $option->type;$/;" v +type ../../../src/classes/XLite/View/Model/Settings.php /^ $type = $option->getType() ?: 'text';$/;" v +type ../../../src/classes/XLite/View/Pager/APager.php /^ $type => true,$/;" v +type ../../../src/classes/XLite/View/Pager/APager.php /^ $type = $page['type'];$/;" v +type ../../../src/lib/Doctrine/Common/Annotations/DocLexer.php /^ $type = self::T_NONE;$/;" v +type ../../../src/lib/Doctrine/Common/Lexer.php /^ $type = $this->getType($match[0]);$/;" v +type ../../../src/lib/Doctrine/DBAL/Connection.php /^ $type = Type::getType($type);$/;" v +type ../../../src/lib/Doctrine/DBAL/Connection.php /^ $type = $types[$name];$/;" v +type ../../../src/lib/Doctrine/DBAL/Connection.php /^ $type = $types[$typeIndex];$/;" v +type ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $type = DB2_CHAR;$/;" v +type ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php /^ $type = self::$_typeMap[$type];$/;" v +type ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $type = 'UNIQUE ';$/;" v +type ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $type = '';$/;" v +type ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $type = 'UNIQUE ';$/;" v +type ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $type = '';$/;" v +type ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $type = $column->getType();$/;" v +type ../../../src/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php /^ $this->type = $type;$/;" v +type ../../../src/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php /^ private $type;$/;" v +type ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $this->type = self::DELETE;$/;" v +type ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $this->type = self::SELECT;$/;" v +type ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $this->type = self::UPDATE;$/;" v +type ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ private $type = self::SELECT;$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $type = $this->_platform->getDoctrineTypeMapping($tableColumn['typename']);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php /^ $type = array_reverse($type);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php /^ $type = 'boolean';$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php /^ $type = $this->_platform->getDoctrineTypeMapping($dbType);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php /^ $type = array();$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $type = $this->_platform->getDoctrineTypeMapping($dbType);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $type = array();$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = 'bigint';$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = 'boolean';$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = 'decimal';$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = 'smallint';$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = $this->_platform->getDoctrineTypeMapping($dbType);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = $this->extractDoctrineTypeFromComment($tableColumn['comments'], $type);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $type = array();$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $type = $this->_platform->getDoctrineTypeMapping($dbType);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php /^ $type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type);$/;" v +type ../../../src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php /^ $type = $this->_platform->getDoctrineTypeMapping($dbType);$/;" v +type ../../../src/lib/Doctrine/DBAL/Statement.php /^ $type = Type::getType($type);$/;" v +type ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ $type = Query\\ParameterTypeInferer::inferType($value);$/;" v +type ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $type == self::INHERITANCE_TYPE_JOINED ||$/;" v +type ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $type == self::INHERITANCE_TYPE_SINGLE_TABLE ||$/;" v +type ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $type == self::INHERITANCE_TYPE_TABLE_PER_CLASS;$/;" v +type ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $type = 'string';$/;" v +type ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $type;$/;" v +type ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $type = Type::getType($this->_class->fieldMappings[$field]['type'])->getBindingType();$/;" v +type ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $type = null;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/AST/Literal.php /^ $this->type = $type;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/AST/Literal.php /^ public $type;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/AST/OrderByItem.php /^ public $type;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/AST/PathExpression.php /^ public $type;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/AST/QuantifiedExpression.php /^ public $type;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Lexer.php /^ $type = constant($name);$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Lexer.php /^ $type = self::T_NONE;$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $type = 'ANY';$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $type = 'SOME';$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $type = 'ALL';$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $type = 'DESC';$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $type = '';$/;" v +type ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $type = 'ASC';$/;" v +type ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $type = Query\\ParameterTypeInferer::inferType($value);$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $type = 'many';$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $type = isset($relation['type']) ? $relation['type'] : 'one';$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php /^ $type = (isset($index['type']) && $index['type'] == 'unique')$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $type = 'ManyToMany';$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $type = 'ManyToOne';$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $type = 'OneToMany';$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $type = 'OneToOne';$/;" v +type ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $type = null;$/;" v +type ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $type = $association['type'];$/;" v +type ../../../src/lib/Log/observer.php /^ $type = strtolower($type);$/;" v +type ../../../src/lib/PHPMailer/class.phpmailer.php /^ $type = $attachment[4];$/;" v +type ../../../src/lib/Symfony/Component/Console/Application.php /^ $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';$/;" v +typeClass ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ $this->typeClass = $class;$/;" v +typeClass ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ private $typeClass;$/;" v +typeDecl ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $typeDecl = $field['type']->getSqlDeclaration($field, $this);$/;" v +typeExists ../../../src/lib/Doctrine/DBAL/DBALException.php /^ public static function typeExists($name)$/;" f +typeIndex ../../../src/lib/Doctrine/DBAL/Connection.php /^ $typeIndex = $bindIndex + $typeOffset;$/;" v +typeNames ../../../src/classes/XLite/Model/Base/Surcharge.php /^ protected static $typeNames = array($/;" v +typeNotFound ../../../src/lib/Doctrine/DBAL/DBALException.php /^ public static function typeNotFound($name)$/;" f +typeOffset ../../../src/lib/Doctrine/DBAL/Connection.php /^ $typeOffset = array_key_exists(0, $types) ? -1 : 0;$/;" v +typeOptions ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $typeOptions = array();$/;" v +typeOptions ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $typeOptions = array();$/;" v +types ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $types = \\Doctrine\\DBAL\\Types\\Type::getTypesMap();$/;" v +types ../../../src/classes/XLite/Controller/Console/Db.php /^ $types = array_map('trim', explode(',', $type));$/;" v +types ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ protected static $types = array($/;" v +types ../../../src/classes/XLite/Core/TopMessage.php /^ protected $types = array(self::INFO, self::WARNING, self::ERROR);$/;" v +types ../../../src/classes/XLite/Model/Base/Image.php /^ protected static $types = array($/;" v +types ../../../src/classes/XLite/Model/Base/Storage.php /^ protected static $types = array();$/;" v +types ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Option.php /^ $types = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\CDev\\ProductOptions\\Model\\OptionSurcharge')$/;" v +types ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $types = $this->getRepository()->getOptionGroupTypes();$/;" v +types ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $types = $this->getRepository()->getModifierTypes();$/;" v +types ../../../src/lib/Doctrine/DBAL/SQLParserUtils.php /^ $types = array_merge($/;" v +types ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $types = \\Doctrine\\DBAL\\Types\\Type::getTypesMap();$/;" v +tz ../../../src/lib/PHPMailer/class.phpmailer.php /^ $tz = (int)($tz\/3600)*100 + ($tz%3600)\/60;$/;" v +tz ../../../src/lib/PHPMailer/class.phpmailer.php /^ $tz = abs($tz);$/;" v +tz ../../../src/lib/PHPMailer/class.phpmailer.php /^ $tz = date('Z');$/;" v +tzs ../../../src/lib/PHPMailer/class.phpmailer.php /^ $tzs = ($tz < 0) ? '-' : '+';$/;" v +udfLocate ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ static public function udfLocate($str, $substr, $offset = 0)$/;" f +udfMod ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ static public function udfMod($a, $b)$/;" f +udfSqrt ../../../src/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php /^ static public function udfSqrt($value)$/;" f +uid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Profile.php /^ $uid = $connection->executeQuery('SELECT MAX(uid) FROM drupal_users')->fetchAll(\\PDO::FETCH_COLUMN, 0);$/;" v +uid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Profile.php /^ $uid = isset($uid[0]) ? $uid[0] + 1 : 1;$/;" v +uname ../../../src/classes/XLite/Model/Repo/ARepo.php /^ $uname = ucfirst($name);$/;" v +unauthSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->unauthSubmissionAllowed = $unauthSubmissionAllowed;$/;" v +unauthSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $unauthSubmissionAllowed;$/;" v +unauthVotingAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->unauthVotingAllowed = $unauthVotingAllowed;$/;" v +unauthVotingAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $unauthVotingAllowed;$/;" v +uniq_id ../../../src/lib/PHPMailer/class.phpmailer.php /^ $uniq_id = md5(uniqid(time()));$/;" v +unique ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $unique = (isset($field['unique']) && $field['unique']) ?$/;" v +unique ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $unique = ($data['uniquerule'] == "D") ? false : true;$/;" v +unique ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $unique = false;$/;" v +uniqueConstraintXml ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php /^ $uniqueConstraintXml = $uniqueConstraintsXml->addChild('unique-constraint');$/;" v +uniqueConstraints ../../../src/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php /^ public $uniqueConstraints;$/;" v +uniqueConstraintsXml ../../../src/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php /^ $uniqueConstraintsXml = $root->addChild('unique-constraints');$/;" v +uniqueContraintColumns ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $uniqueContraintColumns = array();$/;" v +uniqueIds ../../../src/classes/XLite/Core/DataSource/Base/Categories.php /^ $uniqueIds = array();$/;" v +uniqueIds ../../../src/classes/XLite/Core/DataSource/Base/Products.php /^ $uniqueIds = array();$/;" v +uniqueScripts ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Module.php /^ $uniqueScripts = array();$/;" v +unit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->unit = $unit;$/;" v +unit ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $unit;$/;" v +unit ../../../src/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php /^ $this->unit = $parser->StringPrimary();$/;" v +unit ../../../src/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php /^ $unit = strtolower($this->unit);$/;" v +unit ../../../src/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php /^ public $unit = null;$/;" v +unit ../../../src/lib/Doctrine/ORM/Query/AST/Functions/DateSubFunction.php /^ $unit = strtolower($this->unit);$/;" v +unit ../../../src/lib/Doctrine/ORM/Query/AST/Functions/DateSubFunction.php /^ public $unit = null;$/;" v +unitOfWork ../../../src/lib/Doctrine/ORM/EntityManager.php /^ $this->unitOfWork = new UnitOfWork($this);$/;" v +unitOfWork ../../../src/lib/Doctrine/ORM/EntityManager.php /^ private $unitOfWork;$/;" v +unitOfWorkSize ../../../src/classes/XLite/Core/Profiler.php /^ $unitOfWorkSize = \\XLite\\Core\\Database::getEM()->getUnitOfWork()->size();$/;" v +unitPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->unitPrice = $unitPrice;$/;" v +unitPrice ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $unitPrice;$/;" v +unitedMarkup ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Product.php /^ protected $unitedMarkup = 0;$/;" v +unitsInGrams ../../../src/classes/XLite/Core/Converter.php /^ $unitsInGrams = array($/;" v +unknownColumnType ../../../src/lib/Doctrine/DBAL/DBALException.php /^ public static function unknownColumnType($name)$/;" f +unknownDriver ../../../src/lib/Doctrine/DBAL/DBALException.php /^ public static function unknownDriver($unknownDriverName, array $knownDrivers)$/;" f +unknownEntityNamespace ../../../src/lib/Doctrine/ORM/ORMException.php /^ public static function unknownEntityNamespace($entityNamespaceAlias)$/;" f +unknownParameter ../../../src/lib/Doctrine/ORM/Query/QueryException.php /^ public static function unknownParameter($key)$/;" f +unlinkImages ../../../src/classes/XLite/Model/MailImageParser.php /^ public function unlinkImages()$/;" f +unlinkRecursive ../../../src/Includes/Utils/FileManager.php /^ public static function unlinkRecursive($dir)$/;" f +unloadFixture ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function unloadFixture($/;" f +unloadFixtures ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function unloadFixtures(array $data, \\XLite\\Model\\AEntity $parent = null, array $parentAssoc = array())$/;" f +unloadFixturesFromYaml ../../../src/classes/XLite/Core/Database.php /^ public function unloadFixturesFromYaml($path)$/;" f +unloadPreviousMessages ../../../src/classes/XLite/Core/TopMessage.php /^ public function unloadPreviousMessages()$/;" f +unloadedLines ../../../src/classes/XLite/Controller/Console/Db.php /^ $unloadedLines = \\XLite\\Core\\Database::getInstance()->unloadFixturesFromYaml($path);$/;" v +unmanagedTables ../../../src/classes/XLite/Core/Database.php /^ protected $unmanagedTables = array();$/;" v +unpack ../../../src/Includes/Utils/PHARManager.php /^ public static function unpack($file, $dir)$/;" f +unpack ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ public function unpack()$/;" f +unpack ../../../src/classes/XLite/Upgrade/Entry/Module/Uploaded.php /^ public function unpack()$/;" f +unpackAll ../../../src/classes/XLite/Upgrade/Cell.php /^ public function unpackAll()$/;" f +unpacked ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ $unpacked = @gzinflate(substr($data, $headerLength, -8), $dataSize);$/;" v +unrecognizedField ../../../src/lib/Doctrine/ORM/ORMException.php /^ public static function unrecognizedField($field)$/;" f +unregister ../../../src/lib/Doctrine/Common/ClassLoader.php /^ public function unregister()$/;" f +unregisterProcessor ../../../src/classes/XLite/Model/Shipping.php /^ public static function unregisterProcessor($processorClass)$/;" f +unregisterWorker ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner.php /^ public function unregisterWorker($index)$/;" f +unserialize ../../../src/lib/Doctrine/ORM/Id/SequenceGenerator.php /^ public function unserialize($serialized)$/;" f +unsetAttributes ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected function unsetAttributes(array &$attrs, array $keys)$/;" f +unsetVariant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ public function unsetVariant()$/;" f +unsharpImage ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $unsharpImage = UnsharpMask($this->image);$/;" v +unsigned ../../../src/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php /^ $unsigned = (isset($columnDef['unsigned']) && $columnDef['unsigned']) ? ' UNSIGNED' : '';$/;" v +unsigned ../../../src/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php /^ $unsigned = (isset($columnDef['unsigned']) && $columnDef['unsigned']) ? ' UNSIGNED' : '';$/;" v +unsigned ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $unsigned = false;$/;" v +unsigned ../../../src/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php /^ $unsigned = $fixed = null;$/;" v +unsigned ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $unsigned = $fixed = null;$/;" v +unsigned ../../../src/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php /^ $unsigned = (boolean) isset($tableColumn['unsigned']) ? $tableColumn['unsigned'] : false;$/;" v +unsupportedOptimisticLockingType ../../../src/lib/Doctrine/ORM/Mapping/MappingException.php /^ public static function unsupportedOptimisticLockingType($entity, $fieldName, $unsupportedType) {$/;" f +unwrap ../../../src/lib/Doctrine/ORM/PersistentCollection.php /^ public function unwrap()$/;" f +uow ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $uow = $this->_em->getUnitOfWork();$/;" v +uow ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $uow = $this->_em->getUnitOfWork();$/;" v +uow ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $uow = $this->_em->getUnitOfWork();$/;" v +update ../../../src/classes/XLite/Controller/Admin/Countries.php /^ $update = true;$/;" v +update ../../../src/classes/XLite/Controller/Admin/Countries.php /^ $update = false;$/;" v +update ../../../src/classes/XLite/Core/Config.php /^ public function update()$/;" f +update ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected function update(\\XLite\\Model\\Product $product, array $cell)$/;" f +update ../../../src/classes/XLite/Model/AEntity.php /^ public function update()$/;" f +update ../../../src/classes/XLite/Model/Base/Address.php /^ public function update()$/;" f +update ../../../src/classes/XLite/Model/Profile.php /^ public function update($cloneMode = false)$/;" f +update ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function update(\\XLite\\Model\\AEntity $entity, array $data = array(), $flush = self::FLUSH_BY_DEFAULT)$/;" f +update ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Category.php /^ protected function update(\\XLite\\Module\\CDev\\Aggregator\\Model\\Supplier\\Category $category, array $cell)$/;" f +update ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ protected function update(\\XLite\\Model\\Product $product, array $cell)$/;" f +update ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Profile.php /^ public function update($cloneMode = false)$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ protected function update(\\XLite\\Model\\Product $product, array $cell)$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public function update($id, Account $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function update($projectId, $datasetId, $tableId, Table $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public function update($projectId, $datasetId, Dataset $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public function update($annotationId, Annotation $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function update($calendarId, $eventId, Event $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function update($calendarId, $ruleId, AclRule $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function update($calendarId, Calendar $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public function update($calendarId, CalendarListEntry $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public function update($id, DriveFile $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public function update($groupUniqueId, Groups $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function update($seriesId, $submissionId, Vote $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function update($seriesId, $topicId, Topic $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function update($seriesId, Series $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public function update(Profile $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public function update($activityId, Visibility $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public function update($id, Update $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public function update($id, SiteVerificationWebResourceResource $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function update($tasklist, $task, Task $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public function update($tasklist, TaskList $postBody, $optParams = array()) {$/;" f +update ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ protected function update(\\XLite\\Model\\Product $product, array $cell)$/;" f +update ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Importer/Product.php /^ protected function update(\\XLite\\Model\\Product $product, array $cell)$/;" f +update ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function update()$/;" f +update ../../../src/lib/Doctrine/DBAL/Connection.php /^ public function update($tableName, array $data, array $identifier)$/;" f +update ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function update($update = null, $alias = null)$/;" f +update ../../../src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php /^ public function update(PersistentCollection $coll)$/;" f +update ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ public function update($entity)$/;" f +update ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ public function update($entity)$/;" f +update ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function update($update = null, $alias = null)$/;" f +update ../../../src/lib/PEAR2/HTTP/Request/Listener.php /^ public function update($subject, $event, $data = null)$/;" f +updateAccessLevel ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ protected function updateAccessLevel(array $profiles, $accessLevel)$/;" f +updateAdminAccessLevels ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ protected function updateAdminAccessLevels()$/;" f +updateBill ../../../src/classes/XLite/Module/CDev/Qiwi/Core/QiwiSoapServer.php /^ public function updateBill(\\stdClass $bill)$/;" f +updateBillingAddress ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function updateBillingAddress()$/;" f +updateById ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function updateById($id, array $data = array(), $flush = self::FLUSH_BY_DEFAULT)$/;" f +updateCart ../../../src/classes/XLite/Controller/Customer/ACustomer.php /^ protected function updateCart()$/;" f +updateCategories ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected function updateCategories(\\XLite\\Model\\Product $product, array $categories)$/;" f +updateCategories ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Product.php /^ protected function updateCategories(\\XLite\\Model\\Product $product, array $categories)$/;" f +updateCell ../../../src/classes/XLite/Model/Repo/SessionCell.php /^ public function updateCell(\\XLite\\Model\\SessionCell $cell, $value)$/;" f +updateChoicesHash ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ public function updateChoicesHash()$/;" f +updateClause ../../../src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php /^ $this->updateClause = $updateClause;$/;" v +updateClause ../../../src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php /^ public $updateClause;$/;" v +updateClause ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $updateClause = $AST->updateClause;$/;" v +updateClause ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $updateClause = new AST\\UpdateClause($abstractSchemaName, $updateItems);$/;" v +updateConversation ../../../src/classes/XLite/Module/CDev/Conversations/Model/Message.php /^ public function updateConversation()$/;" f +updateCount ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ $this->updateCount = 0;$/;" v +updateCount ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected $updateCount = 0;$/;" v +updateCount ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Category.php /^ $this->updateCount = 0;$/;" v +updateCount ../../../src/classes/XLite/Module/CDev/Aggregator/Core/DataSource/Importer/Category.php /^ protected $updateCount = 0;$/;" v +updateDBRecords ../../../src/classes/XLite/Upgrade/Entry/Module/AModule.php /^ abstract protected function updateDBRecords();$/;" f +updateDBRecords ../../../src/classes/XLite/Upgrade/Entry/Module/Marketplace.php /^ protected function updateDBRecords()$/;" f +updateDBRecords ../../../src/classes/XLite/Upgrade/Entry/Module/Uploaded.php /^ protected function updateDBRecords()$/;" f +updateDBSchema ../../../src/classes/XLite/Core/Database.php /^ public function updateDBSchema()$/;" f +updateData ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $updateData = $this->_prepareUpdateData($entity);$/;" v +updateData ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $updateData = $this->_prepareUpdateData($entity);$/;" v +updateDate ../../../src/classes/XLite/Model/Product.php /^ protected $updateDate = 0;$/;" v +updateDistribution ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static function updateDistribution($dist)$/;" f +updateDrupalRoles ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Profile.php /^ public function updateDrupalRoles($newDrupalRoles)$/;" f +updateExpiry ../../../src/classes/XLite/Model/Session.php /^ public function updateExpiry()$/;" f +updateFile ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ protected function updateFile($path, $isTestMode, $manageCustomFiles)$/;" f +updateFileCallback ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ protected function updateFileCallback($path, $isTestMode)$/;" f +updateFlags ../../../src/classes/XLite/View/CoreVersionTopLink.php /^ $this->updateFlags = \\XLite\\Core\\Marketplace::getInstance()->checkForUpdates();$/;" v +updateFlags ../../../src/classes/XLite/View/CoreVersionTopLink.php /^ protected $updateFlags;$/;" v +updateImages ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected function updateImages(\\XLite\\Model\\Product $product, array $images)$/;" f +updateInBatch ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function updateInBatch(array $entities, $flush = self::FLUSH_BY_DEFAULT)$/;" f +updateInBatchById ../../../src/classes/XLite/Model/Repo/ARepo.php /^ public function updateInBatchById(array $data, $flush = self::FLUSH_BY_DEFAULT)$/;" f +updateInstance ../../../src/classes/XLite/Core/Config.php /^ public static function updateInstance()$/;" f +updateItem ../../../src/classes/XLite/Module/CDev/Aggregator/View/SupplyStatusSelector.php /^ public static function updateItem(\\XLite\\Model\\OrderItem $item, $status)$/;" f +updateItem ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $updateItem = new AST\\UpdateItem($pathExpr, $this->NewValue());$/;" v +updateItems ../../../src/lib/Doctrine/ORM/Query/AST/UpdateClause.php /^ $this->updateItems = $updateItems;$/;" v +updateItems ../../../src/lib/Doctrine/ORM/Query/AST/UpdateClause.php /^ public $updateItems = array();$/;" v +updateItems ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $updateItems = $updateClause->updateItems;$/;" v +updateItems ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $updateItems = array();$/;" v +updateMarketplaceModules ../../../src/classes/XLite/Model/Repo/Module.php /^ public function updateMarketplaceModules(array $data)$/;" f +updateMessage ../../../src/classes/XLite/Module/CDev/Places/View/Model/Place.php /^ protected $updateMessage = 'The place has been updated';$/;" v +updateMessage ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ protected $updateMessage = 'The supplier has been updated';$/;" v +updateMessage ../../../src/classes/XLite/Module/CDev/Suppliers/View/Model/Supplier.php /^ protected $updateMessage = 'The supplier has been updated';$/;" v +updateMessage ../../../src/classes/XLite/View/Model/Base/Simple.php /^ protected $updateMessage = null;$/;" v +updateMetaTags ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ public function updateMetaTags(array &$elements)$/;" f +updateOption ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ protected function updateOption(\\XLite\\Module\\CDev\\ProductOptions\\Model\\Option $model, array $option)$/;" f +updateOptionGroup ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ protected function updateOptionGroup(\\XLite\\Module\\CDev\\ProductOptions\\Model\\OptionGroup $model, array $group)$/;" f +updateOptionGroupInfo ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected function updateOptionGroupInfo(\\XLite\\Model\\Product $product, array $data)$/;" f +updateOptionGroups ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ protected function updateOptionGroups(\\XLite\\Model\\Product $product, array $optionGroups)$/;" f +updateOptionInfo ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected function updateOptionInfo(\\XLite\\Module\\CDev\\ProductOptions\\Model\\OptionGroup $group)$/;" f +updateOptionSurcharge ../../../src/classes/XLite/Module/CDev/ProductOptions/Core/DataSource/Importer/Product.php /^ protected function updateOptionSurcharge(\\XLite\\Module\\CDev\\ProductOptions\\Model\\Option $model, array $modifier, $type)$/;" f +updateOptionSurcharge ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Importer/Product.php /^ protected function updateOptionSurcharge(\\XLite\\Module\\CDev\\ProductOptions\\Model\\Option $model, array $modifier, $type)$/;" f +updateOrder ../../../src/classes/XLite/Model/Order.php /^ public function updateOrder()$/;" f +updatePathByMIME ../../../src/classes/XLite/Model/Base/Image.php /^ protected function updatePathByMIME()$/;" f +updatePathByMIME ../../../src/classes/XLite/Model/Base/Storage.php /^ protected function updatePathByMIME()$/;" f +updatePathByMIME ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ protected function updatePathByMIME()$/;" f +updateProduct ../../../src/classes/XLite/Module/CDev/SolrSearch/Core/SolrClient.php /^ public function updateProduct(\\XLite\\Model\\Product $product)$/;" f +updateProduct ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected function updateProduct(\\XLite\\Model\\Product $product)$/;" f +updateProductCategories ../../../src/classes/XLite/Core/DataSource/Importer/Product.php /^ protected function updateProductCategories(\\XLite\\Model\\Product $product, array $categories)$/;" f +updateProductInfo ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected function updateProductInfo(\\XLite\\Model\\Product $product, array $data)$/;" f +updateProfile ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function updateProfile()$/;" f +updateProfile ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Checkout.php /^ protected function updateProfile()$/;" f +updateProfile ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ protected function updateProfile(array $store)$/;" f +updateProfileRole ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Profile.php /^ protected function updateProfileRole(\\XLite\\Model\\Profile $profile)$/;" f +updateProfileRoles ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Customer/Profile.php /^ protected function updateProfileRoles(\\XLite\\Model\\Profile $profile, array $roles)$/;" f +updateQuickFlags ../../../src/classes/XLite/Model/Repo/Category.php /^ protected function updateQuickFlags(\\XLite\\Model\\Category $entity, array $flags)$/;" f +updateResultPointer ../../../src/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php /^ private function updateResultPointer(array &$coll, $index, $dqlAlias, $oneToOne)$/;" f +updateRows ../../../src/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php /^ \/\/public function updateRows(PersistentCollection $coll)$/;" f +updateSchema ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ public function updateSchema(array $classes, $saveMode=false)$/;" f +updateSchemaSql ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $updateSchemaSql = $this->getUpdateSchemaSql($classes, $saveMode);$/;" v +updateSessionLanguage ../../../src/classes/XLite/Core/Session.php /^ public function updateSessionLanguage()$/;" f +updateShippingAddress ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ protected function updateShippingAddress()$/;" f +updateSolrDocument ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Product.php /^ public function updateSolrDocument()$/;" f +updateSql ../../../src/lib/Doctrine/ORM/Id/TableGenerator.php /^ $updateSql = $conn->getDatabasePlatform()->getTableHiLoUpdateNextValSql($/;" v +updateSql ../../../src/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php /^ $updateSql = 'UPDATE ' . $class->getQuotedTableName($platform) . ' SET ';$/;" v +updateStatement ../../../src/lib/Doctrine/ORM/Query/Parser.php /^ $updateStatement = new AST\\UpdateStatement($this->UpdateClause());$/;" v +updateSupplier ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ protected function updateSupplier(\\XLite\\Module\\CDev\\Suppliers\\Model\\Supplier $supplier, array $info)$/;" f +updateSupplyStatuses ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Order.php /^ protected function updateSupplyStatuses()$/;" f +updateTemplateVars ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ public function updateTemplateVars(array &$variables)$/;" f +updateVariant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/OrderItem.php /^ protected function updateVariant()$/;" f +updateVariantInfo ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected function updateVariantInfo(\\XLite\\Model\\Product $product, array $data)$/;" f +updateVariants ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ protected function updateVariants(\\XLite\\Model\\Product $product, array $variants)$/;" f +updateWidgetSettings ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ protected function updateWidgetSettings($blockId, array $settings = array())$/;" f +update_config_settings ../../../src/Includes/install/install.php /^function update_config_settings($params)$/;" f +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->updated = $updated;$/;" v +updated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ public $updated;$/;" v +upgrade ../../../src/classes/XLite/Upgrade/Cell.php /^ public function upgrade($isTestMode = true, array $filesToOverwrite = array())$/;" f +upgrade ../../../src/classes/XLite/Upgrade/Entry/AEntry.php /^ public function upgrade($isTestMode = true, $filesToOverwrite = null)$/;" f +upgrade ../../../src/classes/XLite/Upgrade/Entry/Module/AModule.php /^ public function upgrade($isTestMode = true, $filesToOverwrite = null)$/;" f +upload ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $upload = $params['mediaUpload']['value'];$/;" v +uploadQuery ../../../src/Includes/functions.php /^function uploadQuery($fileName, $ignoreErrors = false, $is_restore = false)$/;" f +uploadSQLFromFile ../../../src/Includes/Utils/Database.php /^ public static function uploadSQLFromFile($fileName, $verbose = false)$/;" f +uploadType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiMediaFileUpload.php /^ $uploadType = self::getUploadType($meta, $payload, $params);$/;" v +upper ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $upper = strtoupper($action);$/;" v +upper ../../../src/lib/Doctrine/ORM/Query/Expr.php /^ public function upper($x)$/;" f +uri ../../../src/Includes/install/install.php /^ $uri = defined('LC_URI') ? constant('LC_URI') : $_SERVER['REQUEST_URI'];$/;" v +uri ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $this->uri = $uri !== '' ? '\/'.str_replace('%2F', '\/', rawurlencode($uri)) : '\/';$/;" v +uri ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $uri = str_replace('%2F', '\/', rawurlencode($uri)); \/\/ URI should be encoded (thanks Sean O'Dea)$/;" v +uri ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public $uri;$/;" v +uri ../../../src/lib/PEAR2/HTTP/Request/Adapter/Filesystem.php /^ $uri = $this->uri->url;$/;" v +uriTemplateParser ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $uriTemplateParser = new URI_Template_Parser($requestUrl);$/;" v +uriTemplateVars ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiREST.php /^ $uriTemplateVars = array();$/;" v +url ../../../src/Includes/ErrorHandler.php /^ $url = '' . $url . '<\/a>';$/;" v +url ../../../src/Includes/ErrorHandler.php /^ $url = 'install.php<\/strong>';$/;" v +url ../../../src/Includes/Utils/URLManager.php /^ $url = $hostDetails['web_dir_wo_slash'] . '\/' . $url;$/;" v +url ../../../src/Includes/Utils/URLManager.php /^ $url = $proto . $host . $url;$/;" v +url ../../../src/Includes/Utils/URLManager.php /^ $url = '',$/;" v +url ../../../src/Includes/functions.php /^ $url = parse_url($dbURL);$/;" v +url ../../../src/Includes/install/install.php /^ $url = getLiteCommerceURL();$/;" v +url ../../../src/Includes/install/install.php /^ $url = $host . ('\/' == substr($web_dir, -1) ? substr($web_dir, 0, -1) : $web_dir);$/;" v +url ../../../src/classes/XLite/Controller/AController.php /^ $url = str_replace($param, '', $url);$/;" v +url ../../../src/classes/XLite/Controller/Admin/AddressBook.php /^ $url = $this->buildURL('address_book', '', $params);$/;" v +url ../../../src/classes/XLite/Controller/Admin/AddressBook.php /^ $url = parent::getReturnURL();$/;" v +url ../../../src/classes/XLite/Controller/Admin/DbBackup.php /^ $url = parent::getPageReturnURL();$/;" v +url ../../../src/classes/XLite/Controller/Admin/DbBackup.php /^ $url = array();$/;" v +url ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $url = parent::getPageReturnURL();$/;" v +url ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $url = array();$/;" v +url ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $url = trim($url);$/;" v +url ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $url = $this->buildURL($/;" v +url ../../../src/classes/XLite/Controller/Admin/Languages.php /^ $url = parent::getReturnURL();$/;" v +url ../../../src/classes/XLite/Controller/Admin/Measure.php /^ $url = \\XLite::getInstance()->getShopURL($/;" v +url ../../../src/classes/XLite/Controller/Customer/AddressBook.php /^ $url = $this->buildURL('address_book', '', $params);$/;" v +url ../../../src/classes/XLite/Controller/Customer/AddressBook.php /^ $url = parent::getReturnURL();$/;" v +url ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $url = $_SERVER['HTTP_REFERER'];$/;" v +url ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $url = $this->buildURL('product', '', array('product_id' => $this->getProductId()));$/;" v +url ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $url = \\XLite\\Core\\Request::getInstance()->returnURL;$/;" v +url ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $url = \\XLite\\Core\\Session::getInstance()->productListURL;$/;" v +url ../../../src/classes/XLite/Controller/Customer/IframeContent.php /^ $url = $content->getUrl();$/;" v +url ../../../src/classes/XLite/Controller/Customer/Login.php /^ $url = $this->getRedirectFromLoginURL();$/;" v +url ../../../src/classes/XLite/Controller/Customer/PaymentReturn.php /^ $url = $this->getShopURL($/;" v +url ../../../src/classes/XLite/Core/DataSource/Ecwid.php /^ $url = 'http:\/\/app.ecwid.com\/api\/v1\/'$/;" v +url ../../../src/classes/XLite/Core/Handler.php /^ $url = $this->buildURL($target, $action, $params);$/;" v +url ../../../src/classes/XLite/Core/Layout.php /^ $url = \\Includes\\Utils\\URLManager::getShopURL($/;" v +url ../../../src/classes/XLite/Core/Marketplace.php /^ $url = $this->getMarketplaceActionURL($action);$/;" v +url ../../../src/classes/XLite/Core/Session.php /^ $url = $secure$/;" v +url ../../../src/classes/XLite/Core/Session.php /^ $url = $this->getCookieURL($secure);$/;" v +url ../../../src/classes/XLite/Model/Base/Image.php /^ $url = $this->getURL();$/;" v +url ../../../src/classes/XLite/Model/Base/Image.php /^ $url = $this->getResizedPublicURL($size, $name);$/;" v +url ../../../src/classes/XLite/Model/Base/Storage.php /^ $url = $this->getGetterURL();$/;" v +url ../../../src/classes/XLite/Model/Base/Storage.php /^ $url = \\XLite::getInstance()->getShopURL($/;" v +url ../../../src/classes/XLite/Model/Base/Storage.php /^ $url = $this->getPath();$/;" v +url ../../../src/classes/XLite/Model/Base/Storage.php /^ $url = \\XLite::getInstance()->getShopURL($/;" v +url ../../../src/classes/XLite/Model/Base/Storage.php /^ $url = null;$/;" v +url ../../../src/classes/XLite/Model/IframeContent.php /^ protected $url;$/;" v +url ../../../src/classes/XLite/Model/Payment/Base/WebBased.php /^ $url = $this->getFormURL();$/;" v +url ../../../src/classes/XLite/Module/AModule.php /^ $url = \\XLite\\Core\\Converter::buildURL('module', null, compact('author', 'name'), 'image.php');$/;" v +url ../../../src/classes/XLite/Module/AModule.php /^ $url = '';$/;" v +url ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Supplier.php /^ protected $url = '';$/;" v +url ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $url = $this->getS3() ? $this->getS3()->getURL($this->generateS3Path()) : null;$/;" v +url ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Model/Base/Image.php /^ $url = parent::getURL();$/;" v +url ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $url = (S3::$useSSL ? 'https:\/\/' : 'http:\/\/') . $this->headers['Host'].$this->uri;$/;" v +url ../../../src/classes/XLite/Module/CDev/Demo/Controller/Admin/AAdmin.php /^ $url = $this->getForbidInDemoModeRedirectURL();$/;" v +url ../../../src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php /^ $url = \\XLite\\Core\\Converter::buildURL($/;" v +url ../../../src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php /^ $url = \\XLite\\Core\\Converter::buildURL('profile', '', array('mode' => 'register'));$/;" v +url ../../../src/classes/XLite/Module/CDev/Demo/Controller/Admin/Profile.php /^ $url = \\XLite\\Core\\Converter::buildURL('users', '', array('mode' => 'search'));$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Converter.php /^ $url = implode('\/', array($node, $target, $action));$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Session.php /^ $url = ($secure ? 'https' : 'http') . ':\/\/' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Session.php /^ $url = parent::getCookieURL($secure);$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Core/Session.php /^ $url = parse_url($url);$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $url = $this->{'get' . ucfirst($target) . 'CleanURL'}($id, $args);$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $url = $this->getCleanURL($this->getControllerArgs($args, false));$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Handler.php /^ $url = null;$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Portal.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/DrupalConnector/Model/Portal.php /^ protected $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/GoSocial/View/Button/Tweet.php /^ $url = \\XLite::getInstance()->getShopURL($this->getURL());$/;" v +url ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/ECB.php /^ $url = 'http:\/\/www.ecb.int\/stats\/eurofxref\/eurofxref-daily.xml';$/;" v +url ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/GoogleCalculator.php /^ $url = 'http:\/\/www.google.com\/ig\/calculator?hl=en&q=1' . $from->getCode() . '%3D%3F' . $to->getCode();$/;" v +url ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/OpenExchangeRates.php /^ $url = 'https:\/\/raw.github.com\/currencybot\/open-exchange-rates\/master\/latest.json';$/;" v +url ../../../src/classes/XLite/Module/CDev/Multicurrency/Core/CurrencyExchange/YahooFinance.php /^ $url = 'http:\/\/finance.yahoo.com\/d\/quotes.csv?e=.csv&f=sl1d1t1&s=' . $from->getCode() . $to->getCode() . '=X';$/;" v +url ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $url = self::$DOMAIN_MAP[$name];$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->url = new UrlServiceResource($this, $this->serviceName, 'url', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/urlshortener"], "request": {"$ref": "Url"}, "response": {"$ref": "Url"}, "httpMethod": "POST", "path": "url", "id": "urlshortener.url.insert"}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/urlshortener"], "parameters": {"start-token": {"type": "string", "location": "query"}, "projection": {"enum": ["ANALYTICS_CLICKS", "FULL"], "type": "string", "location": "query"}}, "response": {"$ref": "UrlHistory"}, "httpMethod": "GET", "path": "url\/history", "id": "urlshortener.url.list"}, "get": {"parameters": {"shortUrl": {"required": true, "type": "string", "location": "query"}, "projection": {"enum": ["ANALYTICS_CLICKS", "ANALYTICS_TOP_STRINGS", "FULL"], "type": "string", "location": "query"}}, "id": "urlshortener.url.get", "httpMethod": "GET", "path": "url", "response": {"$ref": "Url"}}}}', true));$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->url = $apiConfig['basePath'] . $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->url = $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $url;$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiBatchRequest.php /^ $url = $apiConfig['basePath'] . '\/batch';$/;" v +url ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $url = apiREST::createRequestUri($restBasePath, $method['path'], $parameters);$/;" v +url ../../../src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php /^ $url = str_replace('%url%', $url, $engine['url']);$/;" v +url ../../../src/classes/XLite/Module/CDev/XMLSitemap/Controller/Admin/Sitemap.php /^ $url = urlencode($/;" v +url ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $url = $this->apiEndpoint$/;" v +url ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $url = $_SERVER['HTTP_REFERER'];$/;" v +url ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $url = $this->buildURL('user_wishlist', '', array('page' => $this->getPage()));$/;" v +url ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $url = \\XLite\\Core\\Request::getInstance()->returnURL;$/;" v +url ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $url = \\XLite\\Core\\Session::getInstance()->continueLink;$/;" v +url ../../../src/classes/XLite/View/Button/ContinueShopping.php /^ $url = \\XLite\\Core\\Session::getInstance()->continueShoppingURL ?: $_SERVER['HTTP_REFERER'];$/;" v +url ../../../src/classes/XLite/View/Cart.php /^ $url = $_SERVER['HTTP_REFERER'];$/;" v +url ../../../src/classes/XLite/View/Cart.php /^ $url = $this->buildURL('main');$/;" v +url ../../../src/classes/XLite/View/Cart.php /^ $url = \\XLite\\Core\\Session::getInstance()->continueURL;$/;" v +url ../../../src/classes/XLite/View/Category.php /^ $url = \\XLite::getInstance()->getShopURL(null, \\XLite\\Core\\Request::getInstance()->isHTTPS());$/;" v +url ../../../src/classes/XLite/View/Category.php /^ $url = preg_replace('\/(\\?.*)\/', '', $url);$/;" v +url ../../../src/classes/XLite/View/CheckoutSuccess.php /^ $url = $_SERVER['HTTP_REFERER'];$/;" v +url ../../../src/classes/XLite/View/CheckoutSuccess.php /^ $url = $this->buildURL('main');$/;" v +url ../../../src/classes/XLite/View/CheckoutSuccess.php /^ $url = \\XLite\\Core\\Session::getInstance()->continueURL;$/;" v +url ../../../src/classes/XLite/View/Form/Login/ALogin.php /^ $url = $this->getReturnURL();$/;" v +url ../../../src/classes/XLite/View/Image.php /^ $url = \\XLite\\Core\\Layout::getInstance()->getResourceWebPath($/;" v +url ../../../src/classes/XLite/View/Image.php /^ $url = $this->getParam(self::PARAM_USE_CACHE)$/;" v +url ../../../src/classes/XLite/View/Image.php /^ $url = \\XLite::getInstance()->getOptions(array('images', 'default_image'));$/;" v +url ../../../src/classes/XLite/View/Image.php /^ $url = null;$/;" v +url ../../../src/classes/XLite/View/ItemsList/Module/AModule.php /^ $url = $this->buildURL('addons_list_marketplace', '', array('substring' => $module->getModuleName()));$/;" v +url ../../../src/classes/XLite/View/Payment/Methods.php /^ $url = $method->getProcessor()->getModule()$/;" v +url ../../../src/classes/XLite/View/Tabber.php /^ $url = $this->get('url');$/;" v +url ../../../src/lib/PEAR2/HTTP/Request.php /^ $this->url = $url;$/;" v +urlBlocks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->urlBlocks = $urlBlocks;$/;" v +urlBlocks ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $urlBlocks;$/;" v +urlData ../../../src/Includes/Utils/URLManager.php /^ $urlData = parse_url('http:\/\/' . $str . '\/path');$/;" v +urlDestinationDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->urlDestinationDetails = $urlDestinationDetails;$/;" v +urlDestinationDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $urlDestinationDetails;$/;" v +urlParams ../../../src/Includes/Utils/Converter.php /^ $urlParams = array();$/;" v +urlParams ../../../src/classes/XLite/Core/Converter.php /^ $urlParams = array();$/;" v +urlPattern ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->urlPattern = $urlPattern;$/;" v +urlPattern ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $urlPattern;$/;" v +urlPattern ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->urlPattern = $urlPattern;$/;" v +urlPattern ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $urlPattern;$/;" v +urlPrefix ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $this->urlPrefix = $config->cloudfront_domain$/;" v +urlPrefix ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ protected $urlPrefix;$/;" v +urlRewrite ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->urlRewrite = array($/;" v +urlRewrite ../../../src/classes/XLite/Core/FlexyCompiler.php /^ protected $urlRewrite = array();$/;" v +urlSafeB64Decode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiUtils.php /^ public static function urlSafeB64Decode($b64) {$/;" f +urlSafeB64Encode ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiUtils.php /^ public static function urlSafeB64Encode($data) {$/;" f +url_details ../../../src/Includes/functions.php /^ $url_details = func_parse_url($host);$/;" v +url_request ../../../src/Includes/install/install.php /^ $url_request = $url . '\/install.php?target=install' . (($action_str) ? '&' . $action_str : '');$/;" v +urlchannels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->urlchannels = new UrlchannelsServiceResource($this, $this->serviceName, 'urlchannels', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/adsense", "https:\/\/www.googleapis.com\/auth\/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.urlchannels.list", "httpMethod": "GET", "path": "adclients\/{adClientId}\/urlchannels", "response": {"$ref": "UrlChannels"}}}}', true));$/;" v +urlchannels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $urlchannels;$/;" v +urlchannels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->urlchannels = new UrlchannelsServiceResource($this, $this->serviceName, 'urlchannels', json_decode('{"methods": {"list": {"parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsensehost.urlchannels.list", "httpMethod": "GET", "path": "adclients\/{adClientId}\/urlchannels", "response": {"$ref": "UrlChannels"}}}}', true));$/;" v +urlchannels ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $urlchannels;$/;" v +urls ../../../src/classes/XLite/Controller/Admin/AAdmin.php /^ $urls = (array)$this->getPageReturnURL();$/;" v +urls ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->urls = $urls;$/;" v +urls ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $urls;$/;" v +urls ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->urls = $urls;$/;" v +urls ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $urls;$/;" v +useAliasesBefore ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $useAliasesBefore = $this->_useSqlTableAliases;$/;" v +useBatch ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ static $useBatch = false;$/;" v +useBodyTemplate ../../../src/classes/XLite/View/Address.php /^ protected function useBodyTemplate()$/;" f +useBodyTemplate ../../../src/classes/XLite/View/Container.php /^ protected function useBodyTemplate()$/;" f +useBodyTemplate ../../../src/classes/XLite/View/Model/AModel.php /^ protected function useBodyTemplate()$/;" f +useButtonPanel ../../../src/classes/XLite/View/Model/AModel.php /^ protected function useButtonPanel()$/;" f +useCustomOG ../../../src/classes/XLite/Module/CDev/GoSocial/Model/Product.php /^ protected $useCustomOG = false;$/;" v +useDafaultCategory ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Importer/Product.php /^ $this->useDafaultCategory = !$product->getProductId()$/;" v +useDafaultCategory ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Importer/Product.php /^ $this->useDafaultCategory = true;$/;" v +useDafaultCategory ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/DataSource/Importer/Product.php /^ protected $useDafaultCategory = false;$/;" v +useDefault ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->useDefault = $useDefault;$/;" v +useDefault ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $useDefault;$/;" v +useDefaultDisplayMode ../../../src/classes/XLite/View/Controller.php /^ protected function useDefaultDisplayMode()$/;" f +useEventValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->useEventValue = $useEventValue;$/;" v +useEventValue ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $useEventValue;$/;" v +useExceptions ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $useExceptions = false;$/;" v +useFileUploadSupport ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ public function useFileUploadSupport() {$/;" f +useObjects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ protected $useObjects = false;$/;" v +useObjects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiModel.php /^ protected function useObjects() {$/;" f +useObjects ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ protected function useObjects() {$/;" f +useQueryCache ../../../src/lib/Doctrine/ORM/Query.php /^ public function useQueryCache($bool)$/;" f +useResultCache ../../../src/lib/Doctrine/ORM/AbstractQuery.php /^ public function useResultCache($bool, $timeToLive = null, $resultCacheId = null)$/;" f +useSSL ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $useSSL = self::$useSSL;$/;" v +useSSL ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $useSSL = false;$/;" v +useSSLValidation ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ public static $useSSLValidation = true;$/;" v +useTableAliasesBefore ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $useTableAliasesBefore = $this->_useSqlTableAliases;$/;" v +useVerp ../../../src/lib/PHPMailer/class.smtp.php /^ $useVerp = ($this->do_verp ? "XVERP" : "");$/;" v +useXdebugStackTrace ../../../src/classes/XLite/Core/Profiler.php /^ protected static $useXdebugStackTrace = false;$/;" v +usedFunctions ../../../src/Includes/install/install.php /^ static $usedFunctions = array($/;" v +usedOnly ../../../src/classes/XLite/View/CurrencySelect.php /^ protected function usedOnly()$/;" f +user ../../../src/classes/XLite/Core/Converter.php /^ $user = $user->getTimezone()->getOffset($user);$/;" v +user ../../../src/classes/XLite/Core/Converter.php /^ $user = new \\DateTime();$/;" v +user ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ $user = user_load($account->uid);$/;" v +user ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $user = $signed_request['user_id'];$/;" v +user ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $user = $this->getUserFromAccessToken();$/;" v +user ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $this->user = null;$/;" v +user ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $user = $this->getPersistentData('user_id', $default = 0);$/;" v +user ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ protected $user;$/;" v +user ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->user = $user;$/;" v +user ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $user;$/;" v +user ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/Suppliers.php /^ $user = $supplier->getManagers()->first();$/;" v +user ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Repo/Profile.php /^ $user = new \\XLite\\Model\\Profile;$/;" v +user ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ $user = $this->getManagers()->first();$/;" v +user ../../../src/lib/Doctrine/DBAL/Connection.php /^ $user = isset($this->_params['user']) ? $this->_params['user'] : null;$/;" v +user ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $user = \\array_change_key_case($user, CASE_LOWER);$/;" v +userAccountsPerStepCounter ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/UserSync.php /^ protected $userAccountsPerStepCounter = 50;$/;" v +userAgent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->userAgent = $apiConfig['application_name'] . " " . self::USER_AGENT_SUFFIX;$/;" v +userAgent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->userAgent = self::USER_AGENT_SUFFIX;$/;" v +userAgent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ $this->userAgent = $userAgent;$/;" v +userAgent ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiHttpRequest.php /^ protected $userAgent;$/;" v +userByEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->userByEmail = $userByEmail;$/;" v +userByEmail ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $userByEmail;$/;" v +userInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->userInfo = $userInfo;$/;" v +userInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $userInfo;$/;" v +userLogin ../../../src/classes/XLite/Controller/Customer/Profile.php /^ $userLogin = $this->getModelForm()->getModelObject()->getLogin();$/;" v +userPassword ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ $this->userPassword = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->generatePassword();$/;" v +userPassword ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ $this->userPassword = null;$/;" v +userPassword ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Model/Supplier.php /^ protected $userPassword;$/;" v +userPermission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->userPermission = $userPermission;$/;" v +userPermission ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ public $userPermission;$/;" v +userType ../../../src/classes/XLite/Module/CDev/Conversations/Model/Message.php /^ protected $userType = self::USER_TYPE_CUSTOMER;$/;" v +user_access_token ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $user_access_token = $this->getUserAccessToken();$/;" v +user_id ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->user_id = $user_id;$/;" v +user_id ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public $user_id;$/;" v +user_info ../../../src/classes/XLite/Module/CDev/Places/sdk/Facebook/base_facebook.php /^ $user_info = $this->api('\/me');$/;" v +userinfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->userinfo = new UserinfoServiceResource($this, $this->serviceName, 'userinfo', json_decode('{"methods": {"get": {"path": "oauth2\/v2\/userinfo", "response": {"$ref": "Userinfo"}, "httpMethod": "GET", "id": "oauth2.userinfo.get"}}}', true));$/;" v +userinfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public $userinfo;$/;" v +userinfo_v2_me ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->userinfo_v2_me = new UserinfoV2MeServiceResource($this, $this->serviceName, 'me', json_decode('{"methods": {"get": {"path": "userinfo\/v2\/me", "response": {"$ref": "Userinfo"}, "httpMethod": "GET", "id": "oauth2.userinfo.v2.me.get"}}}', true));$/;" v +userinfo_v2_me ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public $userinfo_v2_me;$/;" v +username ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->username = $username;$/;" v +username ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $username;$/;" v +username ../../../src/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php /^ $username = null;$/;" v +username ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $username = $database;$/;" v +username ../../../src/lib/PHPMailer/class.pop3.php /^ $username = $this->username;$/;" v +username ../../../src/lib/PHPMailer/class.pop3.php /^ $this->username = $username;$/;" v +username ../../../src/lib/PHPMailer/class.pop3.php /^ public $username;$/;" v +users ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->users = new UsersServiceResource($this, $this->serviceName, 'users', json_decode('{"methods": {"get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/blogger"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}}, "id": "blogger.users.get", "httpMethod": "GET", "path": "users\/{userId}", "response": {"$ref": "User"}}}}', true));$/;" v +users ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $users;$/;" v +users ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->users = $users;$/;" v +users ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $users;$/;" v +users ../../../src/classes/XLite/View/AdminPanel.php /^ $users = array('profile_list');$/;" v +users_blogs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->users_blogs = new UsersBlogsServiceResource($this, $this->serviceName, 'blogs', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/blogger"], "parameters": {"userId": {"required": true, "type": "string", "location": "path"}}, "id": "blogger.users.blogs.list", "httpMethod": "GET", "path": "users\/{userId}\/blogs", "response": {"$ref": "BlogList"}}}}', true));$/;" v +users_blogs ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $users_blogs;$/;" v +uses ../../../src/lib/Doctrine/Common/Annotations/PhpParser.php /^ $uses = array();$/;" v +usesIdGenerator ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public function usesIdGenerator()$/;" f +usps ../../../src/classes/XLite/Module/CDev/USPS/Controller/Admin/Usps.php /^ $usps = new \\XLite\\Module\\CDev\\USPS\\Model\\Shipping\\Processor\\USPS();$/;" v +uspsCountries ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ static $uspsCountries = array($/;" v +util ../../../src/Includes/Decorator/DataStructure/Graph/Classes.php /^ $util = '\\Includes\\Decorator\\Utils\\Tokenizer';$/;" v +util ../../../src/Includes/install/install.php /^ $util = '\\Includes\\Utils\\FileManager';$/;" v +util ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $util = '\\Includes\\Utils\\ArrayManager';$/;" v +utility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->utility = $utility;$/;" v +utility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $utility;$/;" v +v ../../../src/classes/XLite/Core/Database.php /^ $v = preg_replace('\/^((?:UNIQUE )?INDEX) (\\S+) \\(\/Ss', '$1 `$2` (', $v);$/;" v +v ../../../src/classes/XLite/Core/Database.php /^ $v = preg_replace('\/^(INDEX \\S+ \\()([^,)]+)\/Ss', '$1`$2`', $v);$/;" v +v ../../../src/classes/XLite/Core/Database.php /^ $v = preg_replace('\/^(INDEX \\S+ \\(.+,)([^`,)]+)\/Ss', '$1`$2`', $v);$/;" v +v ../../../src/classes/XLite/Core/Database.php /^ $v = preg_replace('\/^(PRIMARY KEY \\()([^,\\)]+)\/Ss', '$1`$2`', $v);$/;" v +v ../../../src/classes/XLite/Core/Database.php /^ $v = preg_replace('\/^(PRIMARY KEY \\(.+,)([^`,\\)]+)\/Ss', '$1`$2`', $v);$/;" v +v ../../../src/classes/XLite/Core/Database.php /^ $v = static::SCHEMA_FILE_IDENT . preg_replace('\/^([a-z][\\w\\d_]+) ([A-Z]+)\/Ss', '`$1` $2', $v);$/;" v +v ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->v = $v;$/;" v +v ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $v;$/;" v +v ../../../src/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php /^ $v = array_change_key_case($v, CASE_LOWER);$/;" v +v ../../../src/lib/Symfony/Component/Console/Input/ArrayInput.php /^ $v = $k;$/;" v +val ../../../src/Includes/functions.php /^ $val = trim($file_size);$/;" v +val ../../../src/classes/XLite/Model/MailImageParser.php /^ $val = $this->getTokenText($i);$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = $var->default;$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = self::val_from_var($var, $exp);$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = $var->name . ($var->data ? '=' : '');$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = $var->name . (isset($var->data) ? '=' : '');$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = '';$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = str_replace(self::$reserved_pct, self::$reserved, $val);$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = trim($val, $del);$/;" v +val ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $val = '';$/;" v +val ../../../src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php /^ $val = substr($val, 0, -1);$/;" v +val ../../../src/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php /^ $val = parent::quote($value, $type);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/ArrayType.php /^ $val = unserialize($value);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/DateTimeType.php /^ $val = \\DateTime::createFromFormat($platform->getDateTimeFormatString(), $value);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/DateTimeTzType.php /^ $val = \\DateTime::createFromFormat($platform->getDateTimeTzFormatString(), $value);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/DateType.php /^ $val = \\DateTime::createFromFormat('!'.$platform->getDateFormatString(), $value);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/ObjectType.php /^ $val = unserialize($value);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/TimeType.php /^ $val = \\DateTime::createFromFormat($platform->getTimeFormatString(), $value);$/;" v +val ../../../src/lib/Doctrine/DBAL/Types/VarDateTimeType.php /^ $val = date_create($value);$/;" v +val ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $val = $class->reflFields[$field]->getValue($entity);$/;" v +val_from_var ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ private function val_from_var($var, $exp) {$/;" f +valid ../../../src/classes/XLite/Controller/AController.php /^ protected $valid = true;$/;" v +valid ../../../src/classes/XLite/Controller/Admin/EventTask.php /^ $this->valid = $result;$/;" v +valid ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $valid = true;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/Cart.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/Checkout.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/SelectAddress.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/SelectAddress.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $this->valid = true;$/;" v +valid ../../../src/classes/XLite/Controller/Customer/ShippingEstimate.php /^ $this->valid = true;$/;" v +valid ../../../src/classes/XLite/Core/CommonCell.php /^ public function valid()$/;" f +valid ../../../src/classes/XLite/Core/DataSource/Base/Categories.php /^ $valid = false;$/;" v +valid ../../../src/classes/XLite/Core/DataSource/Base/Categories.php /^ $valid = true;$/;" v +valid ../../../src/classes/XLite/Core/DataSource/Base/Products.php /^ $valid = false;$/;" v +valid ../../../src/classes/XLite/Core/DataSource/Base/Products.php /^ $valid = true;$/;" v +valid ../../../src/classes/XLite/Core/DataSource/Ecwid/Categories.php /^ public function valid()$/;" f +valid ../../../src/classes/XLite/Core/DataSource/Ecwid/Products.php /^ public function valid()$/;" f +valid ../../../src/classes/XLite/Module/CDev/Aggregator/Controller/Admin/Supplier.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $this->valid = true;$/;" v +valid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $valid = true;$/;" v +valid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ $valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ protected $valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/Customer/Checkout.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/FileAttachments/Controller/Admin/Product.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/Multicurrency/Controller/Admin/Currencies.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/OrderTags/Controller/Admin/Order.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/Qiwi/Core/QiwiSoapServer.php /^ $valid = $bill->password === strtoupper(md5($bill->txn . strtoupper(md5($password))));$/;" v +valid ../../../src/classes/XLite/Module/CDev/Qiwi/Core/QiwiSoapServer.php /^ $valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapIterator.php /^ public function valid()$/;" f +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $this->valid = $this->updateProduct($product);$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $valid = $this->updateOptionGroupInfo($product, $data) && $valid;$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $valid = $this->updateProductInfo($product, $data) && $valid;$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $valid = $this->updateVariantInfo($product, $data) && $valid;$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $valid = is_array($check) && 0 == count(array_filter($check, 'empty'));$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/RegisterStore.php /^ $this->valid = false;$/;" v +valid ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ public function valid()$/;" f +valid ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $this->valid = false;$/;" v +valid ../../../src/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php /^ public function valid()$/;" f +valid ../../../src/lib/PEAR2/HTTP/Request/Headers.php /^ public function valid()$/;" f +valid ../../../src/lib/PEAR2/MultiErrors.php /^ public function valid()$/;" f +validate ../../../src/classes/XLite/Core/Validator/AValidator.php /^ abstract public function validate($data);$/;" f +validate ../../../src/classes/XLite/Core/Validator/Enum/AEnum.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/Float.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/HashArray.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/Integer.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/Pair/CountryState.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/PlainArray.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/SKU.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/CleanURL.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/Email.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/IP4.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/ObjectId/Country.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/ObjectId/State.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/RegExp.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Core/Validator/String/Switcher.php /^ public function validate($data)$/;" f +validate ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ public function validate($value)$/;" f +validate ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $validate = $this->validateWishlistData($values);$/;" v +validate ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ $validate = $this->validateWishlistData($values);$/;" v +validate ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ $validate = $this->validateWishlistData($values, true);$/;" v +validate ../../../src/classes/XLite/View/FormField/AFormField.php /^ public function validate()$/;" f +validate ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ public function validate()$/;" f +validate ../../../src/lib/Symfony/Component/Console/Input/Input.php /^ public function validate()$/;" f +validate ../../../src/lib/Symfony/Component/Console/Input/InputInterface.php /^ function validate();$/;" f +validateAgainstSchema ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateAgainstSchema(array $data, array $schema)$/;" f +validateAttributes ../../../src/classes/XLite/Core/Handler.php /^ public function validateAttributes(array $attrs)$/;" f +validateCell ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function validateCell(\\XLite\\View\\FormField\\Inline\\AInline $inline, $key = null)$/;" f +validateField ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ protected function validateField(array $field)$/;" f +validateFields ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php /^ protected function validateFields(array $data, $section)$/;" f +validateFields ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ protected function validateFields(array $data, $section)$/;" f +validateFields ../../../src/classes/XLite/View/Model/AModel.php /^ protected function validateFields(array $data, $section)$/;" f +validateFields ../../../src/classes/XLite/View/Model/Address/Address.php /^ protected function validateFields(array $data, $section)$/;" f +validateMapping ../../../src/lib/Doctrine/ORM/Tools/SchemaValidator.php /^ public function validateMapping()$/;" f +validateResponseForCheckAddonKeyAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForCheckAddonKeyAction(array $data)$/;" f +validateResponseForCheckForUpdatesAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForCheckForUpdatesAction(array $data)$/;" f +validateResponseForErrorAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForErrorAction(array $data)$/;" f +validateResponseForGetAddonHashAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForGetAddonHashAction(array $data)$/;" f +validateResponseForGetAddonInfoAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForGetAddonInfoAction(array $data)$/;" f +validateResponseForGetAddonsAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForGetAddonsAction(array $data)$/;" f +validateResponseForGetCoreHashAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForGetCoreHashAction(array $data)$/;" f +validateResponseForGetCoresAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForGetCoresAction(array $data)$/;" f +validateResponseForGetHostingScoreAction ../../../src/classes/XLite/Core/Marketplace.php /^ protected function validateResponseForGetHostingScoreAction(array $data)$/;" f +validateUpdate ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ protected function validateUpdate()$/;" f +validateWidgetModifyForm ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ public function validateWidgetModifyForm(array &$form, array &$formState)$/;" f +validateWishlistData ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ protected function validateWishlistData(array $postedData)$/;" f +validateWishlistData ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ protected function validateWishlistData(array $postedData, $isNew = false)$/;" f +validated ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $validated = $this->validateCell($inline, $key) && $validated;$/;" v +validated ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $validated = 0 < count($fields);$/;" v +validated ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $validated = $this->validateCell($field) && $validated;$/;" v +validated ../../../src/classes/XLite/View/ItemsList/Model/AModel.php /^ $validated = true;$/;" v +validationCache ../../../src/classes/XLite/Core/FileCache.php /^ protected $validationCache = array();$/;" v +validationMessage ../../../src/classes/XLite/View/Form/AForm.php /^ protected $validationMessage;$/;" v +validationMethod ../../../src/classes/XLite/Model/MoneyModificator.php /^ $validationMethod = $this->getValidator();$/;" v +validationRules ../../../src/classes/XLite/View/FormField/AFormField.php /^ $validationRules = $this->assembleValidationRules();$/;" v +validator ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ $this->validator = $validator;$/;" v +validator ../../../src/classes/XLite/Core/Validator/Pair/Simple.php /^ protected $validator;$/;" v +validator ../../../src/classes/XLite/Model/MoneyModificator.php /^ protected $validator = '';$/;" v +validator ../../../src/classes/XLite/Module/CDev/Sale/View/Form/SaleSelectedDialog.php /^ $validator = parent::getValidator();$/;" v +validator ../../../src/classes/XLite/View/Form/AForm.php /^ $validator = $this->getValidator();$/;" v +validator ../../../src/classes/XLite/View/Form/Category/Modify/Single.php /^ $validator = parent::getValidator();$/;" v +validator ../../../src/classes/XLite/View/Form/Checkout/UpdateProfile.php /^ $validator = parent::getValidator();$/;" v +validator ../../../src/classes/XLite/View/Form/Product/Modify/Batch.php /^ $validator = parent::getValidator();$/;" v +validator ../../../src/classes/XLite/View/Form/Product/Modify/Single.php /^ $validator = parent::getValidator();$/;" v +validator ../../../src/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php /^ $validator = new \\Doctrine\\ORM\\Tools\\SchemaValidator($em);$/;" v +validityFlag ../../../src/classes/XLite/View/FormField/AFormField.php /^ $this->validityFlag = $this->checkFieldValidity();$/;" v +validityFlag ../../../src/classes/XLite/View/FormField/AFormField.php /^ protected $validityFlag = null;$/;" v +vals ../../../src/classes/XLite/Core/XML.php /^ $vals = $index = $array = array();$/;" v +value ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $value = str_replace("'", '"', $value);$/;" v +value ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $value = var_export($value, true);$/;" v +value ../../../src/Includes/Decorator/Utils/Tokenizer.php /^ $value = static::$tokens[$end][1];$/;" v +value ../../../src/Includes/Utils/Converter.php /^ $value = trim($tokens[1], $quotes);$/;" v +value ../../../src/Includes/install/install.php /^ $value = $value . ', ' . $version['ssl_version'];$/;" v +value ../../../src/Includes/install/install.php /^ $value = $version;$/;" v +value ../../../src/Includes/install/install.php /^ $value = 'libcurl ' . $version['version'];$/;" v +value ../../../src/Includes/install/install.php /^ $value = 'unknown version';$/;" v +value ../../../src/Includes/install/install.php /^ $value = trim($info['phar_ext_ver']);$/;" v +value ../../../src/Includes/install/install.php /^ $value = $gdConfig['GD Version'];$/;" v +value ../../../src/Includes/install/install.php /^ $value = 'Off';$/;" v +value ../../../src/Includes/install/install.php /^ $value = 'On';$/;" v +value ../../../src/Includes/install/install.php /^ $value = 'none';$/;" v +value ../../../src/Includes/install/install.php /^ $value = implode(', ', $ext);$/;" v +value ../../../src/Includes/install/install.php /^ $value = substr(@ini_get('disable_functions'), 0, 45) . '...';$/;" v +value ../../../src/Includes/install/install.php /^ $value = xtr('Unlimited');$/;" v +value ../../../src/Includes/install/install.php /^ $value = $currentPhpVersion = phpversion();$/;" v +value ../../../src/Includes/install/install.php /^ $value = $info['pdo_drivers'];$/;" v +value ../../../src/Includes/install/install.php /^ $value = $version;$/;" v +value ../../../src/Includes/install/install.php /^ $value = (ini_get('file_uploads') ? 'On' : 'Off');$/;" v +value ../../../src/Includes/install/install.php /^ $value = @ini_get("memory_limit");$/;" v +value ../../../src/Includes/install/install.php /^ $value = @ini_get("upload_max_filesize");$/;" v +value ../../../src/Includes/install/install.php /^ $value = @ini_get('magic_quotes_runtime');$/;" v +value ../../../src/Includes/install/install.php /^ $value = xtr('unknown');$/;" v +value ../../../src/classes/XLite/Controller/AController.php /^ $value = $this->get($name);$/;" v +value ../../../src/classes/XLite/Controller/Admin/Base/Catalog.php /^ $value = $this->generateCleanURL(parent::getPostedData('name'));$/;" v +value ../../../src/classes/XLite/Controller/Admin/ImportExport.php /^ $value = null,$/;" v +value ../../../src/classes/XLite/Controller/Admin/Product.php /^ $value = intval(strtotime($value)) ?: time();$/;" v +value ../../../src/classes/XLite/Controller/Admin/Product.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/Controller/Admin/Product.php /^ $value = parent::getPostedData($field);$/;" v +value ../../../src/classes/XLite/Controller/Customer/OrderList.php /^ $value = intval($value);$/;" v +value ../../../src/classes/XLite/Logic/Math.php /^ $value = $currency->roundValue($value);$/;" v +value ../../../src/classes/XLite/Logic/Price.php /^ $value = $modifier->apply($value, $model, $property, $behaviors, $purpose);$/;" v +value ../../../src/classes/XLite/Logic/Price.php /^ $value = $model->$method();$/;" v +value ../../../src/classes/XLite/Model/Base/NameValue.php /^ $this->value = is_scalar($value) ? $value : serialize($value);$/;" v +value ../../../src/classes/XLite/Model/Base/NameValue.php /^ $value = @unserialize($this->value);$/;" v +value ../../../src/classes/XLite/Model/Base/NameValue.php /^ protected $value;$/;" v +value ../../../src/classes/XLite/Model/Base/Surcharge.php /^ $this->value = round($value, \\XLite\\Logic\\Math::STORE_PRECISION);$/;" v +value ../../../src/classes/XLite/Model/Base/Surcharge.php /^ protected $value;$/;" v +value ../../../src/classes/XLite/Model/Config.php /^ protected $value = '';$/;" v +value ../../../src/classes/XLite/Model/MoneyModificator.php /^ $value = $class::$calculateMethod($value, $model, $property, $behaviors, $purpose);$/;" v +value ../../../src/classes/XLite/Model/Order.php /^ $value = $this->getOpenTotal();$/;" v +value ../../../src/classes/XLite/Model/Order.php /^ $value = min($value, $this->getOpenTotal());$/;" v +value ../../../src/classes/XLite/Model/OrderDetail.php /^ protected $value;$/;" v +value ../../../src/classes/XLite/Model/Payment/MethodSetting.php /^ protected $value = '';$/;" v +value ../../../src/classes/XLite/Model/Payment/Transaction.php /^ $value = 0;$/;" v +value ../../../src/classes/XLite/Model/Payment/Transaction.php /^ protected $value = 0.0000;$/;" v +value ../../../src/classes/XLite/Model/Payment/TransactionData.php /^ protected $value;$/;" v +value ../../../src/classes/XLite/Model/Repo/Config.php /^ $value = ('Y' == $value || '1' === $value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Config.php /^ $value = unserialize($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Config.php /^ $value = $option->getValue();$/;" v +value ../../../src/classes/XLite/Model/Repo/Module.php /^ $value = str_replace($match[0], '', $value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Module.php /^ $value = trim($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Order.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Profile')->find($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Order.php /^ $value = array_values($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Product.php /^ $value = str_replace($match[0], '', $value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Product.php /^ $value = $value->getCategoryId();$/;" v +value ../../../src/classes/XLite/Model/Repo/Product.php /^ $value = trim($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Product.php /^ $value = trim($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Profile.php /^ $value = array($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/Profile.php /^ $value = trim($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ $value = $tmp;$/;" v +value ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ $value = serialize($value);$/;" v +value ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ $value = $entity ? $entity->getValue() : null;$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = $value;$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = (bool) $value;$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = doubleval($value);$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = intval($value);$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = serialize($value);$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $value = unserialize($value);$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ $this->value = static::prepareValueForSet($value, $this->type);$/;" v +value ../../../src/classes/XLite/Model/SessionCell.php /^ protected $value = '';$/;" v +value ../../../src/classes/XLite/Model/TmpVar.php /^ protected $value = '';$/;" v +value ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ $this->value = $value;$/;" v +value ../../../src/classes/XLite/Model/WidgetParam/AWidgetParam.php /^ protected $value = null;$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Method')->find(intval($value));$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Shipping\\Method')->find(intval($value));$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\FulfillmentStatus')$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\PaymentStatus')$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/Model/Repo/Order.php /^ $value = array_values($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/FormField/Inline/Select/OrderStatuses.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\FulfillmentStatus')$/;" v +value ../../../src/classes/XLite/Module/CDev/AdvancedOrderStatuses/View/FormField/Inline/Select/OrderStatuses.php /^ $value = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\AdvancedOrderStatuses\\Model\\Order\\PaymentStatus')$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Order.php /^ $value = array($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ $value = $value->getProfileId();$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ $value = is_array($value) ? $value : array($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/Model/Repo/Supplier.php /^ $value = strval($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $value = $this->getAddressModel()->$methodName();$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $value = ($this->getModelObject() && $this->getModelObject()->getSource())$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $value = parent::getModelObjectValue($name);$/;" v +value ../../../src/classes/XLite/Module/CDev/Aggregator/View/Model/Supplier.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/Module/CDev/Conversations/View/FormField/Input/Text/Recipient.php /^ $value = $value->getLogin();$/;" v +value ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $value = static::t('Administrator');$/;" v +value ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $value = static::t('Customer');$/;" v +value ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $value = static::t('Unknown');$/;" v +value ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $value = 'E' === $value ? static::t('Enabled') : static::t('Disabled');$/;" v +value ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/Model/Profile/AdminMain.php /^ $value = parent::getDefaultFieldValue($name);$/;" v +value ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Inline/Input/Text/Currency/Rate.php /^ $value = 0;$/;" v +value ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Input/Text/GeoIPPath.php /^ $value = LC_DIR_VAR . 'GeoIP.dat';$/;" v +value ../../../src/classes/XLite/Module/CDev/Multicurrency/View/FormField/Input/Text/GeoIPPath.php /^ $value = parent::getDefaultValue();$/;" v +value ../../../src/classes/XLite/Module/CDev/MulticurrencyPayments/Logic/Order/Modifier/Shipping.php /^ $value = \\XLite\\Module\\CDev\\Multicurrency\\Core\\CurrencyExchange::getInstance()->convert($/;" v +value ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $value = $this->transaction->getValue();$/;" v +value ../../../src/classes/XLite/Module/CDev/PaypalWPS/Model/Payment/Processor/PaypalWPS.php /^ $value = sprintf('%0.2f', $value);$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionSurcharge.php /^ $value = $this->getAbsoluteValue();$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItemOption.php /^ protected $value = '';$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/Product.php /^ $value = $optionGroup->getDefaultPlainValue($/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/FormField/Select/Languages.php /^ $value = array();$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/View/FormField/Select/Languages.php /^ $value = @unserialize($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->value = $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->value = $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->value = $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->value = $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->value = $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $value;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiServiceResource.php /^ $value = $parameters[$paramName];$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ $value = $this->$property;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ $value = $this->getSoftTranslation()->$property;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ $value = parent::getImage();$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ $value = array($sort, $order);$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Product.php /^ $value = trim($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Repo/Variant.php /^ $value = $value->getProductId();$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ $value = $option->getOptionId();$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ $value = $field->getValue();$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ $value = $value ? 'Y' : 'N';$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ $value = parent::getModelObjectValue($name);$/;" v +value ../../../src/classes/XLite/Module/CDev/ProductVariants/View/Model/Variant.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ protected $value = 0.0000;$/;" v +value ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $value = array($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $value = \\XLite\\Module\\CDev\\SolrSearch\\Core\\SolrClient::getInstance()->escape($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/SolrSearch/Model/Repo/Product.php /^ $value = trim($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Response.php /^ $value = array_shift($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $value = htmlspecialchars($value, ENT_NOQUOTES, 'UTF-8');$/;" v +value ../../../src/classes/XLite/Module/CDev/Suppliers/Model/Repo/Product.php /^ $value = is_array($value) ? $value : array($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/Suppliers/View/ItemsList/Model/LowStockProducts.php /^ $value = (0 < $limit && $limit > $amount) ? round((1 - ($amount \/ $limit)) * 100) : 0;$/;" v +value ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner.php /^ $value = intval($value);$/;" v +value ../../../src/classes/XLite/Module/CDev/VAT/Model/OptionSurcharge.php /^ $value = \\XLite\\Module\\CDev\\VAT\\Logic\\Product\\Tax::getInstance()->deductTaxFromPrice($product, $value);$/;" v +value ../../../src/classes/XLite/Module/CDev/VAT/Model/OptionSurcharge.php /^ $value = parent::getAbsoluteValue();$/;" v +value ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ protected $value = 0.0000;$/;" v +value ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/Drupal.php /^ $value = ord($input[$i]);$/;" v +value ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/Model/Supplier.php /^ $value = ($this->getModelObject() && $this->getModelObject()->getSource())$/;" v +value ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/Model/Supplier.php /^ $value = parent::getModelObjectValue($name);$/;" v +value ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $value = array($/;" v +value ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ $value = array($/;" v +value ../../../src/classes/XLite/View/AView.php /^ $value = parent::__get($name);$/;" v +value ../../../src/classes/XLite/View/AView.php /^ $value = parent::get($name);$/;" v +value ../../../src/classes/XLite/View/Date.php /^ $value = time();$/;" v +value ../../../src/classes/XLite/View/Date.php /^ $value = $this->getParam(self::PARAM_VALUE);$/;" v +value ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $value = $this->$method($value);$/;" v +value ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $value = $field['widget']->getValue();$/;" v +value ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $value = $this->preprocessValueBeforeSave($value);$/;" v +value ../../../src/classes/XLite/View/FormField/Inline/AInline.php /^ $value = $field['widget']->getValue();$/;" v +value ../../../src/classes/XLite/View/FormField/Inline/Input/Text/Price.php /^ $value = parent::getViewValue($field);$/;" v +value ../../../src/classes/XLite/View/FormField/Select/ASelect.php /^ $value = $value->getUniqueIdentifier();$/;" v +value ../../../src/classes/XLite/View/FormField/Select/Multiple.php /^ $value = $value->toArray();$/;" v +value ../../../src/classes/XLite/View/FormField/Select/Multiple.php /^ $value = array($value);$/;" v +value ../../../src/classes/XLite/View/ItemsList/Model/Order/Admin/Search.php /^ $value = $this->getParam($requestParam);$/;" v +value ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $value = $this->$method($value, $column, $entity);$/;" v +value ../../../src/classes/XLite/View/ItemsList/Model/Table.php /^ $value = method_exists($this, $method)$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = $value[0];$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = explode("\\n", $value);$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = str_replace("\\r", '', $value);$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = str_replace("\\t", '', $value);$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = str_replace('\\n', "\\n", $value);$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = str_replace('\\r', "\\r", $value);$/;" v +value ../../../src/classes/XLite/View/Mailer.php /^ $value = str_replace('\\t', "\\t", $value);$/;" v +value ../../../src/classes/XLite/View/Model/AModel.php /^ $value = $this->getModelObjectValue($name);$/;" v +value ../../../src/classes/XLite/View/Model/AModel.php /^ $value = $this->getModelObject()->$methodName();$/;" v +value ../../../src/classes/XLite/View/Model/AModel.php /^ $value = $this->getRequestData($name);$/;" v +value ../../../src/classes/XLite/View/Model/AModel.php /^ $value = $this->getSavedData($name);$/;" v +value ../../../src/classes/XLite/View/Model/AModel.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $value = 1;$/;" v +value ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $value = ('' !== \\XLite\\Core\\Config::getInstance()->General->trailing_zeroes);$/;" v +value ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $value = \\XLite\\View\\FormField\\Select\\CurrencyFormat::getFormat($/;" v +value ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $value = parent::getDefaultFieldValue($name);$/;" v +value ../../../src/classes/XLite/View/Model/Currency/Currency.php /^ $value = parent::getModelObjectValue($name);$/;" v +value ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $value = date('r', $value);$/;" v +value ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $value = static::t('never');$/;" v +value ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $value = $value ?: static::t('unknown');$/;" v +value ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $value = 0 < $value ? $this->getModelObject()->getPendingMembership()->getName() : static::t('none');$/;" v +value ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $value = isset($lng) ? $lng->getName() : $value;$/;" v +value ../../../src/classes/XLite/View/Model/Profile/AdminMain.php /^ $value = parent::getDefaultFieldValue($name);$/;" v +value ../../../src/classes/XLite/View/Model/Settings.php /^ $value = $option->getValue();$/;" v +value ../../../src/classes/XLite/View/Model/Settings.php /^ $value = $option->value;$/;" v +value ../../../src/classes/XLite/View/Model/Settings.php /^ $value = null;$/;" v +value ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ $value = $this->getSavedRequestParam($name);$/;" v +value ../../../src/classes/XLite/View/RequestHandler/ARequestHandler.php /^ $value = \\XLite\\Core\\Request::getInstance()->$name;$/;" v +value ../../../src/lib/Doctrine/Common/Annotations/Annotation.php /^ public $value;$/;" v +value ../../../src/lib/Doctrine/Common/Annotations/DocLexer.php /^ $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2));$/;" v +value ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ $value = $this->Value();$/;" v +value ../../../src/lib/Doctrine/DBAL/Connection.php /^ $value = $type->convertToDatabaseValue($value, $this->_platform);$/;" v +value ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $value = null;$/;" v +value ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $value = rtrim($value);$/;" v +value ../../../src/lib/Doctrine/DBAL/Portability/Statement.php /^ $value = $this->stmt->fetchColumn($columnIndex);$/;" v +value ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $value = \\array_change_key_case($value, CASE_LOWER);$/;" v +value ../../../src/lib/Doctrine/DBAL/Statement.php /^ $value = $type->convertToDatabaseValue($value, $this->_platform);$/;" v +value ../../../src/lib/Doctrine/DBAL/Types/ArrayType.php /^ $value = (is_resource($value)) ? stream_get_contents($value) : $value;$/;" v +value ../../../src/lib/Doctrine/DBAL/Types/ConversionException.php /^ $value = (strlen($value) > 32) ? substr($value, 0, 20) . "..." : $value;$/;" v +value ../../../src/lib/Doctrine/DBAL/Types/ObjectType.php /^ $value = (is_resource($value)) ? stream_get_contents($value) : $value;$/;" v +value ../../../src/lib/Doctrine/ORM/EntityRepository.php /^ $value = is_array($id) ? array_values($id) : array($id);$/;" v +value ../../../src/lib/Doctrine/ORM/Id/AssignedGenerator.php /^ $value = $class->reflFields[$idField]->getValue($entity);$/;" v +value ../../../src/lib/Doctrine/ORM/Id/AssignedGenerator.php /^ $value = $class->reflFields[$idField]->getValue($entity);$/;" v +value ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $value = new ArrayCollection;$/;" v +value ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $value = new PersistentCollection($/;" v +value ../../../src/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php /^ $value = $class->reflFields[$fieldName]->getValue($entity);$/;" v +value ../../../src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php /^ $value = Type::getType($cache[$column]['class']->fieldMappings[$cache[$column]['name']]['type'])$/;" v +value ../../../src/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php /^ $value = Type::getType($this->class->fieldMappings[$cache[$column]['name']]['type'])$/;" v +value ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $value = $this->reflFields[$idField]->getValue($entity);$/;" v +value ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadata.php /^ $value = $this->reflFields[$this->identifier[0]]->getValue($entity);$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $this->_em->getUnitOfWork()->getEntityIdentifier($value);$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $value[$this->_em->getClassMetadata($assoc['targetEntity'])->identifier[0]];$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $this->_em->getUnitOfWork()->getEntityIdentifier($value);$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $value[$this->_em->getClassMetadata($assoc['targetEntity'])->identifier[0]];$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $this->_conn->fetchColumn($sql, array_values((array)$id));$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $value = $this->fetchVersionValue($this->_class, $id);$/;" v +value ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $value = $this->fetchVersionValue($this->_getVersionedClassMetadata(), $id);$/;" v +value ../../../src/lib/Doctrine/ORM/Query/AST/InstanceOfExpression.php /^ public $value;$/;" v +value ../../../src/lib/Doctrine/ORM/Query/AST/Literal.php /^ $this->value = $value;$/;" v +value ../../../src/lib/Doctrine/ORM/Query/AST/Literal.php /^ public $value;$/;" v +value ../../../src/lib/Doctrine/ORM/Query/Lexer.php /^ $value = str_replace("''", "'", substr($value, 1, strlen($value) - 2));$/;" v +value ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $value = new ArrayCollection($value);$/;" v +value ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $value = $refProp->getValue($entity);$/;" v +value ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $value = $value->unwrap();$/;" v +value ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $value = array($value);$/;" v +value ../../../src/lib/PHPMailer/class.phpmailer.php /^ $value=preg_replace("\/\\s+\/"," ",$value) ; \/\/ Compress useless spaces$/;" v +value ../../../src/lib/Symfony/Component/Console/Helper/DialogHelper.php /^ $value = $this->ask($output, $question, null);$/;" v +value ../../../src/lib/Symfony/Component/Console/Input/ArgvInput.php /^ $value = $next;$/;" v +value ../../../src/lib/Symfony/Component/Console/Input/ArgvInput.php /^ $value = $option->isValueOptional() ? $option->getDefault() : true;$/;" v +value ../../../src/lib/Symfony/Component/Console/Input/ArrayInput.php /^ $value = $option->isValueOptional() ? $option->getDefault() : true;$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Inline.php /^ $value = self::parseMapping('{'.$value.'}');$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Inline.php /^ $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i);$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Inline.php /^ $value = trim($value);$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = $data;$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = $this->getNextEmbedBlock();$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = $values['value'];$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = Inline::load($this->lines[0]);$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = substr($value, 1);$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = substr($value, 1, $pos - 2);$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = $trimmedValue;$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = preg_replace('#^\\%YAML[: ][\\d\\.]+.*\\n#s', '', $value, -1, $count);$/;" v +value ../../../src/lib/Symfony/Component/Yaml/Parser.php /^ $value = str_replace(array("\\r\\n", "\\r"), "\\n", $value);$/;" v +values ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ $values = $this->prepareData($values);$/;" v +values ../../../src/classes/XLite/Core/Translation.php /^ $values = array();$/;" v +values ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Profile.php /^ $values = (is_array($edit) && isset($edit['values'])) ? $edit['values'] : array();$/;" v +values ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $values = array_flip(explode(',', $values['ids']));$/;" v +values ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $values = $this->getPostedData();$/;" v +values ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $values = \\XLite\\Core\\Request::getInstance()->getData(); $/;" v +values ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $values = \\XLite\\Core\\Request::getInstance()->getData();$/;" v +values ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/Wishlist.php /^ $values = $this->getPostedData();$/;" v +values ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ $values = $this->Values();$/;" v +values ../../../src/lib/Doctrine/Common/Annotations/DocParser.php /^ $values = array();$/;" v +values ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $values = array($values);$/;" v +values ../../../src/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php /^ $values = $this->getIdentifiers($values);$/;" v +values ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $values = array_fill(0, count($columns), '?');$/;" v +values ../../../src/lib/Doctrine/ORM/Persisters/SingleTablePersister.php /^ $values = array();$/;" v +values ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ $values = array();$/;" v +values ../../../src/lib/Log/mdb2.php /^ $values = array($/;" v +values ../../../src/lib/Log/sql.php /^ $values = array($id, $this->_ident, $priority, $message);$/;" v +values ../../../src/lib/Symfony/Component/Console/Input/ArgvInput.php /^ $values = array($values);$/;" v +values ../../../src/lib/Symfony/Component/Console/Input/ArrayInput.php /^ $values = array($values);$/;" v +values ../../../src/lib/Symfony/Component/Console/Input/InputDefinition.php /^ $values = array();$/;" v +var ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $var = sprintf('_%sMethodTemplate', $type);$/;" v +var ../../../src/classes/XLite/Core/TmpVars.php /^ $var = $this->getRepo()->insert($data + array('name' => $name));$/;" v +var ../../../src/classes/XLite/Core/TmpVars.php /^ $var = $this->getVar($name);$/;" v +var ../../../src/classes/XLite/Model/Repo/TmpVar.php /^ $var = $this->findOneBy(array('name' => static::EVENT_TASK_STATE_PREFIX . $name));$/;" v +var ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/external/URITemplateParser.php /^ $var = new StdClass();$/;" v +var ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $var = $var->toArray();$/;" v +var ../../../src/lib/Doctrine/Common/Util/Debug.php /^ $var = self::export($var, $maxDepth++);$/;" v +var ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $var = sprintf('_%sMethodTemplate', $type);$/;" v +varDump ../../../src/Includes/install/install.php /^ $varDump = ob_get_contents();$/;" v +variableRatesLastUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->variableRatesLastUpdated = $variableRatesLastUpdated;$/;" v +variableRatesLastUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $variableRatesLastUpdated;$/;" v +variableRatesUpdateFrequency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->variableRatesUpdateFrequency = $variableRatesUpdateFrequency;$/;" v +variableRatesUpdateFrequency ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ public $variableRatesUpdateFrequency;$/;" v +variableType ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ $variableType = $typeHint ? $typeHint . ' ' : null;$/;" v +variableType ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ $variableType = $typeHint ? $typeHint . ' ' : null;$/;" v +variables ../../../src/classes/XLite/Core/Mailer.php /^ $variables = is_array($name) ? $name : array($name => $value);$/;" v +variables ../../../src/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php /^ $variables = array($/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->variant = $variant;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ public $variant;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->variant = $variant;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $variant;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Controller/Admin/SelectFile.php /^ $variant = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductVariants\\Model\\Variant')$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Controller/Admin/SelectFile.php /^ $variant = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductVariants\\Model\\Variant')->find($id);$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ $variant = $this->detectVariant($product, $id, $data['choices']);$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ $variant = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductVariants\\Model\\Variant')$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ $variant = new \\XLite\\Module\\CDev\\ProductVariants\\Model\\Variant;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ $variant = null;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/OrderItem.php /^ $variant = \\XLite\\Core\\Database::getRepo('XLite\\Module\\CDev\\ProductVariants\\Model\\Variant')$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/OrderItem.php /^ protected $variant;$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Product.php /^ $variant = $this->getHasVariants()$/;" v +variant ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant/Image.php /^ protected $variant;$/;" v +variant ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ $variant = $repo->find(intval($vid));$/;" v +variantFields ../../../src/classes/XLite/Module/CDev/ProductVariants/Core/DataSource/Importer/Product.php /^ protected $variantFields = array('price', 'weight', 'sku', 'inventoryAmount');$/;" v +variantMultilangProperties ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Controller/Admin/ProductTranslations.php /^ protected $variantMultilangProperties = array('name', 'brief_description', 'description');$/;" v +variantMultilangualProperties ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ protected $variantMultilangualProperties = array('name', 'description', 'brief_description');$/;" v +variants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->variants = $variants;$/;" v +variants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $variants;$/;" v +variants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ $this->variants = $variants;$/;" v +variants ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public $variants;$/;" v +variants ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/View/ProductTranslate.php /^ $this->variants = array();$/;" v +vars ../../../src/classes/XLite/Module/CDev/AmazonS3Images/View/Model/Settings.php /^ $vars = array();$/;" v +vars ../../../src/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php /^ $vars = array();$/;" v +vary ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/io/apiCacheParser.php /^ $vary = $resp->getResponseHeader('vary');$/;" v +vatMembership ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $vatMembership = $vatMembership$/;" v +vatMembership ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $vatMembership = \\XLite\\Core\\Request::getInstance()->vatMembership;$/;" v +vatMembership ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ $this->vatMembership = $membership;$/;" v +vatMembership ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ protected $vatMembership;$/;" v +vatZone ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $vatZone = $vatZone$/;" v +vatZone ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $vatZone = \\XLite\\Core\\Request::getInstance()->vatZone;$/;" v +vatZone ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ $this->vatZone = $zone;$/;" v +vatZone ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax.php /^ protected $vatZone;$/;" v +vendorType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->vendorType = $vendorType;$/;" v +vendorType ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $vendorType;$/;" v +verb ../../../src/classes/XLite/Module/CDev/AmazonS3Images/lib/S3.php /^ $this->verb = $verb;$/;" v +verb ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->verb = $verb;$/;" v +verb ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $verb;$/;" v +verb ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->verb = $verb;$/;" v +verb ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $verb;$/;" v +verb ../../../src/lib/PEAR2/HTTP/Request/Adapter.php /^ public $verb = 'GET';$/;" v +verbose ../../../src/classes/XLite/Controller/Admin/DbBackup.php /^ $verbose = true;$/;" v +verbose ../../../src/classes/XLite/Controller/Admin/DbBackup.php /^ $verbose = false;$/;" v +verbose ../../../src/classes/XLite/Controller/Admin/DbRestore.php /^ $verbose = true;$/;" v +verbosity ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ $this->verbosity = (int) $level;$/;" v +verbosity ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity;$/;" v +verbosity ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ protected $verbosity;$/;" v +verificationMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->verificationMethod = $verificationMethod;$/;" v +verificationMethod ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public $verificationMethod;$/;" v +verified ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $verified = true;$/;" v +verified ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ $verified = false;$/;" v +verified_email ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->verified_email = $verified_email;$/;" v +verified_email ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ public $verified_email;$/;" v +verify ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiPemVerifier.php /^ function verify($data, $signature) {$/;" f +verify ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiVerifier.php /^ abstract public function verify($data, $signature);$/;" f +verifyIdToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/apiClient.php /^ public function verifyIdToken($token = null) {$/;" f +verifyIdToken ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ public function verifyIdToken($id_token = null, $audience = null) {$/;" f +verifySignedJwtWithCerts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/auth/apiOAuth2.php /^ function verifySignedJwtWithCerts($jwt, $certs, $required_audience) {$/;" f +version ../../../src/Includes/install/install.php /^ $version = \\Includes\\Utils\\Database::getDbVersion();$/;" v +version ../../../src/Includes/install/install.php /^ $version = curl_version();$/;" v +version ../../../src/Includes/install/install.php /^ $version = false;$/;" v +version ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $version = \\XLite\\Upgrade\\Cell::getInstance()->getCoreMajorVersion();$/;" v +version ../../../src/classes/XLite/Controller/Admin/Upgrade.php /^ $version = \\XLite\\Core\\Request::getInstance()->version;$/;" v +version ../../../src/classes/XLite/Core/Marketplace.php /^ $version = $this->getField($module, static::FIELD_VERSION) ?: array();$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->version = 'v1.1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->version = 'v4';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->version = 'v3';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->version = 'v2';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBloggerService.php /^ $this->version = 'v2';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->version = 'v3';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiDriveService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiFreebaseService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGanService.php /^ $this->version = 'v1beta1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiLatitudeService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOauth2Service.php /^ $this->version = 'v2';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->version = 'v2';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->version = $version;$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPagespeedonlineService.php /^ public $version;$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->version = 'v1.4';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTasksService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiTranslateService.php /^ $this->version = 'v2';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ $this->version = 'v1';$/;" v +version ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/service/apiService.php /^ public $version;$/;" v +version ../../../src/classes/XLite/Upgrade/Entry/Core.php /^ $version = \\Includes\\Utils\\Converter::composeVersion($majorVersion, $minorVersion);$/;" v +version ../../../src/lib/Doctrine/Common/Version.php /^ $version = str_replace(' ', '', $version);$/;" v +version ../../../src/lib/Doctrine/DBAL/Version.php /^ $version = str_replace(' ', '', $version);$/;" v +version ../../../src/lib/Doctrine/ORM/Version.php /^ $version = str_replace(' ', '', $version);$/;" v +version ../../../src/lib/Symfony/Component/Console/Application.php /^ $this->version = $version;$/;" v +version ../../../src/lib/Symfony/Component/Console/Application.php /^ protected $version;$/;" v +versionColumn ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $versionColumn = $this->_class->getQuotedColumnName($versionField, $this->_platform);$/;" v +versionCore ../../../src/classes/XLite/View/Upgrade/Step/Prepare/IncompatibleEntries.php /^ $versionCore = \\XLite\\Upgrade\\Cell::getInstance()->getCoreMajorVersion();$/;" v +versionField ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $this->versionField = $mapping['fieldName'];$/;" v +versionField ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ $this->versionField = $versionField;$/;" v +versionField ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php /^ public $versionField;$/;" v +versionField ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $versionField = $this->_class->versionField;$/;" v +versionField ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $versionField = $versionedClass->versionField;$/;" v +versionFieldColumnName ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $versionFieldColumnName = $versionedClass->getColumnName($versionField);$/;" v +versionFieldType ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $versionFieldType = $this->_class->fieldMappings[$versionField]['type'];$/;" v +versionModule ../../../src/classes/XLite/View/Upgrade/Step/Prepare/IncompatibleEntries.php /^ $versionModule = $module->getMajorVersion();$/;" v +versionedClass ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $versionedClass = $this->_getVersionedClassMetadata();$/;" v +versionedTable ../../../src/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php /^ $versionedTable = $versionedClass->table['name'];$/;" v +vertical ../../../src/classes/XLite/View/Image.php /^ $vertical = ($this->getParam(self::PARAM_MAX_HEIGHT) - $this->properties['height']) \/ 2;$/;" v +videoSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->videoSubmissionAllowed = $videoSubmissionAllowed;$/;" v +videoSubmissionAllowed ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $videoSubmissionAllowed;$/;" v +videoSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->videoSubmissions = $videoSubmissions;$/;" v +videoSubmissions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $videoSubmissions;$/;" v +videoURL ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->videoURL = $videoURL;$/;" v +videoURL ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $videoURL;$/;" v +view ../../../src/classes/XLite/Module/CDev/Multicurrency/Main.php /^ $view = \\XLite\\Core\\Database::getRepo('XLite\\Model\\ViewList')->findOneBy($/;" v +view ../../../src/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php /^ $view = array_change_key_case($view, \\CASE_LOWER);$/;" v +view ../../../src/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php /^ $view = \\array_change_key_case($view, CASE_LOWER);$/;" v +viewLists ../../../src/classes/XLite/View/AView.php /^ protected $viewLists = array();$/;" v +viewName ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $viewName = strtolower($view->getQuotedName($this->_platform));$/;" v +viewOrderUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->viewOrderUrl = $viewOrderUrl;$/;" v +viewOrderUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $viewOrderUrl;$/;" v +view_type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $this->view_type = array_shift($views);$/;" v +view_type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $this->view_type = $type;$/;" v +view_type ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ protected $view_type = self::SELECT_VISIBLE;$/;" v +viewability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->viewability = $viewability;$/;" v +viewability ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $viewability;$/;" v +viewer ../../../src/classes/XLite.php /^ $viewer = $this->getController()->getViewer();$/;" v +viewer ../../../src/classes/XLite/Controller/AController.php /^ $viewer = $this->getViewer();$/;" v +viewer ../../../src/classes/XLite/Module/CDev/DrupalConnector/Controller/AController.php /^ $viewer = parent::getViewer();$/;" v +viewer ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $this->viewer = $this->getHandler()->getViewer();$/;" v +viewer ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ protected $viewer;$/;" v +viewer ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $viewer = $this->getCurrentProfileObject();$/;" v +viewer ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/SelectCategory.php /^ $viewer = $this->getCurrentProfile();$/;" v +viewport ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->viewport = $viewport;$/;" v +viewport ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $viewport;$/;" v +views ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $views = array_keys($types[$this->type]['views']);$/;" v +views ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OptionGroup.php /^ $views = $types[$this->type]['views'];$/;" v +views ../../../src/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php /^ $views = $this->_conn->fetchAll($sql);$/;" v +violations ../../../src/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php /^ private $violations = array();$/;" v +violations ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php /^ $violations = $visitor->getViolations();$/;" v +visibility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->visibility = $visibility;$/;" v +visibility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $visibility;$/;" v +visibility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->visibility = $visibility;$/;" v +visibility ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $visibility;$/;" v +visibleBox ../../../src/Includes/install/templates/common_js_code.js.php /^function visibleBox(id, status)$/;" f +visit ../../../src/lib/Doctrine/DBAL/Schema/Column.php /^ public function visit(\\Doctrine\\DBAL\\Schema\\Visitor $visitor)$/;" f +visit ../../../src/lib/Doctrine/DBAL/Schema/Schema.php /^ public function visit(Visitor $visitor)$/;" f +visit ../../../src/lib/Doctrine/DBAL/Schema/Sequence.php /^ public function visit(Visitor $visitor)$/;" f +visit ../../../src/lib/Doctrine/DBAL/Schema/Table.php /^ public function visit(Visitor $visitor)$/;" f +visitNumPagesDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->visitNumPagesDetails = $visitNumPagesDetails;$/;" v +visitNumPagesDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $visitNumPagesDetails;$/;" v +visitTimeOnSiteDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->visitTimeOnSiteDetails = $visitTimeOnSiteDetails;$/;" v +visitTimeOnSiteDetails ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $visitTimeOnSiteDetails;$/;" v +visited ../../../src/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php /^ $visited = array();$/;" v +visited ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $visited = array();$/;" v +visitedCollections ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ $this->visitedCollections =$/;" v +visitedCollections ../../../src/lib/Doctrine/ORM/UnitOfWork.php /^ private $visitedCollections = array();$/;" v +visitor ../../../src/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php /^ $visitor = new ReservedKeywordsValidator($keywords);$/;" v +visitor ../../../src/lib/Doctrine/ORM/Tools/SchemaTool.php /^ $visitor = new \\Doctrine\\DBAL\\Schema\\Visitor\\DropSchemaSqlCollector($this->_platform);$/;" v +voided ../../../src/classes/XLite/Model/Payment/Base/CreditCard.php /^ $voided = 0;$/;" v +volumeCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->volumeCount = $volumeCount;$/;" v +volumeCount ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $volumeCount;$/;" v +volumeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->volumeId = $volumeId;$/;" v +volumeId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $volumeId;$/;" v +volumeInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->volumeInfo = $volumeInfo;$/;" v +volumeInfo ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $volumeInfo;$/;" v +volumes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->volumes = new VolumesServiceResource($this, $this->serviceName, 'volumes', json_decode('{"methods": {"list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/books"], "parameters": {"orderBy": {"enum": ["newest", "relevance"], "type": "string", "location": "query"}, "filter": {"enum": ["ebooks", "free-ebooks", "full", "paid-ebooks", "partial"], "type": "string", "location": "query"}, "projection": {"enum": ["full", "lite"], "type": "string", "location": "query"}, "libraryRestrict": {"enum": ["my-library", "no-restrict"], "type": "string", "location": "query"}, "langRestrict": {"type": "string", "location": "query"}, "printType": {"enum": ["all", "books", "magazines"], "type": "string", "location": "query"}, "showPreorders": {"type": "boolean", "location": "query"}, "maxResults": {"format": "uint32", "maximum": "40", "minimum": "0", "location": "query", "type": "integer"}, "q": {"required": true, "type": "string", "location": "query"}, "source": {"type": "string", "location": "query"}, "startIndex": {"format": "uint32", "minimum": "0", "type": "integer", "location": "query"}, "download": {"enum": ["epub"], "type": "string", "location": "query"}, "partner": {"type": "string", "location": "query"}}, "id": "books.volumes.list", "httpMethod": "GET", "path": "volumes", "response": {"$ref": "Volumes"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/books"], "parameters": {"source": {"type": "string", "location": "query"}, "partner": {"type": "string", "location": "query"}, "projection": {"enum": ["full", "lite"], "type": "string", "location": "query"}, "volumeId": {"required": true, "type": "string", "location": "path"}}, "id": "books.volumes.get", "httpMethod": "GET", "path": "volumes\/{volumeId}", "response": {"$ref": "Volume"}}}}', true));$/;" v +volumes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $volumes;$/;" v +volumesLastUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->volumesLastUpdated = $volumesLastUpdated;$/;" v +volumesLastUpdated ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $volumesLastUpdated;$/;" v +vote ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->vote = $vote;$/;" v +vote ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $vote;$/;" v +votedOptions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ $this->votedOptions = $votedOptions;$/;" v +votedOptions ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiOrkutService.php /^ public $votedOptions;$/;" v +votes ../../../src/classes/XLite/Model/Module.php /^ protected $votes = 0;$/;" v +votes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->votes = $votes;$/;" v +votes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ $this->votes = new VotesServiceResource($this, $this->serviceName, 'votes', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "unauthToken": {"type": "string", "location": "query"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Vote"}, "id": "moderator.votes.insert", "httpMethod": "POST", "path": "series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me", "response": {"$ref": "Vote"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "userId": {"type": "string", "location": "query"}, "unauthToken": {"type": "string", "location": "query"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "id": "moderator.votes.get", "httpMethod": "GET", "path": "series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me", "response": {"$ref": "Vote"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"max-results": {"format": "uint32", "type": "integer", "location": "query"}, "seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "start-index": {"format": "uint32", "type": "integer", "location": "query"}}, "id": "moderator.votes.list", "httpMethod": "GET", "path": "series\/{seriesId}\/votes\/@me", "response": {"$ref": "VoteList"}}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "userId": {"type": "string", "location": "query"}, "unauthToken": {"type": "string", "location": "query"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Vote"}, "id": "moderator.votes.update", "httpMethod": "PUT", "path": "series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me", "response": {"$ref": "Vote"}}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/moderator"], "parameters": {"seriesId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}, "userId": {"type": "string", "location": "query"}, "unauthToken": {"type": "string", "location": "query"}, "submissionId": {"format": "uint32", "required": true, "type": "integer", "location": "path"}}, "request": {"$ref": "Vote"}, "id": "moderator.votes.patch", "httpMethod": "PATCH", "path": "series\/{seriesId}\/submissions\/{submissionId}\/votes\/@me", "response": {"$ref": "Vote"}}}}', true));$/;" v +votes ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiModeratorService.php /^ public $votes;$/;" v +w ../../../src/lib/phpunsharpmask.php /^ $w = imagesx($img); $h = imagesy($img); $/;" v +wait ../../../src/classes/XLite/Controller/Console/AMQPListener.php /^ protected function wait()$/;" f +wait ../../../src/classes/XLite/Core/EventDriver/AMQP.php /^ public function wait()$/;" f +wait ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ protected function wait()$/;" f +wait ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP.php /^ protected function wait()$/;" f +wait ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/Permanent.php /^ protected function wait()$/;" f +waitForLock ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiApcCache.php /^ private function waitForLock($key) {$/;" f +waitForLock ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiFileCache.php /^ private function waitForLock($storageFile) {$/;" f +waitForLock ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/cache/apiMemcacheCache.php /^ private function waitForLock($key) {$/;" f +walkAggregateExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkAggregateExpression($aggExpression)$/;" f +walkAggregateExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkAggregateExpression($aggExpression);$/;" f +walkAggregateExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkAggregateExpression($aggExpression) {}$/;" f +walkAggregateExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkAggregateExpression($aggExpression)$/;" f +walkArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkArithmeticExpression($arithmeticExpr)$/;" f +walkArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkArithmeticExpression($arithmeticExpr);$/;" f +walkArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkArithmeticExpression($arithmeticExpr) {}$/;" f +walkArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkArithmeticExpression($arithmeticExpr)$/;" f +walkArithmeticFactor ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkArithmeticFactor($factor)$/;" f +walkArithmeticFactor ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkArithmeticFactor($factor);$/;" f +walkArithmeticFactor ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkArithmeticFactor($factor) {}$/;" f +walkArithmeticFactor ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkArithmeticFactor($factor)$/;" f +walkArithmeticPrimary ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkArithmeticPrimary($primary)$/;" f +walkArithmeticTerm ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkArithmeticTerm($term)$/;" f +walkArithmeticTerm ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkArithmeticTerm($term);$/;" f +walkArithmeticTerm ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkArithmeticTerm($term) {}$/;" f +walkArithmeticTerm ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkArithmeticTerm($term)$/;" f +walkBetweenExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkBetweenExpression($betweenExpr)$/;" f +walkBetweenExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkBetweenExpression($betweenExpr);$/;" f +walkBetweenExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkBetweenExpression($betweenExpr) {}$/;" f +walkBetweenExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkBetweenExpression($betweenExpr)$/;" f +walkCaseExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkCaseExpression($expression)$/;" f +walkCoalesceExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkCoalesceExpression($coalesceExpression)$/;" f +walkCollectionMemberExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkCollectionMemberExpression($collMemberExpr)$/;" f +walkCollectionMemberExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkCollectionMemberExpression($collMemberExpr);$/;" f +walkCollectionMemberExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkCollectionMemberExpression($collMemberExpr) {}$/;" f +walkCollectionMemberExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkCollectionMemberExpression($collMemberExpr)$/;" f +walkComparisonExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkComparisonExpression($compExpr)$/;" f +walkComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkComparisonExpression($compExpr);$/;" f +walkComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkComparisonExpression($compExpr) {}$/;" f +walkComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkComparisonExpression($compExpr)$/;" f +walkConditionalExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkConditionalExpression($condExpr)$/;" f +walkConditionalExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkConditionalExpression($condExpr);$/;" f +walkConditionalExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkConditionalExpression($condExpr) {}$/;" f +walkConditionalExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkConditionalExpression($condExpr)$/;" f +walkConditionalFactor ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkConditionalFactor($factor)$/;" f +walkConditionalFactor ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkConditionalFactor($factor);$/;" f +walkConditionalFactor ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkConditionalFactor($factor) {}$/;" f +walkConditionalFactor ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkConditionalFactor($factor)$/;" f +walkConditionalPrimary ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkConditionalPrimary($primary)$/;" f +walkConditionalPrimary ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkConditionalPrimary($primary);$/;" f +walkConditionalPrimary ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkConditionalPrimary($primary) {}$/;" f +walkConditionalPrimary ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkConditionalPrimary($condPrimary)$/;" f +walkConditionalTerm ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkConditionalTerm($condTerm)$/;" f +walkConditionalTerm ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkConditionalTerm($condTerm);$/;" f +walkConditionalTerm ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkConditionalTerm($condTerm) {}$/;" f +walkConditionalTerm ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkConditionalTerm($condTerm)$/;" f +walkDeleteClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkDeleteClause(AST\\DeleteClause $deleteClause)$/;" f +walkDeleteClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkDeleteClause(AST\\DeleteClause $deleteClause);$/;" f +walkDeleteClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkDeleteClause(AST\\DeleteClause $deleteClause) {}$/;" f +walkDeleteClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkDeleteClause(AST\\DeleteClause $deleteClause)$/;" f +walkDeleteStatement ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkDeleteStatement(AST\\DeleteStatement $AST)$/;" f +walkDeleteStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkDeleteStatement(AST\\DeleteStatement $AST);$/;" f +walkDeleteStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkDeleteStatement(AST\\DeleteStatement $AST) {}$/;" f +walkDeleteStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkDeleteStatement(AST\\DeleteStatement $AST)$/;" f +walkEmptyCollectionComparisonExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr)$/;" f +walkEmptyCollectionComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkEmptyCollectionComparisonExpression($emptyCollCompExpr);$/;" f +walkEmptyCollectionComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) {}$/;" f +walkEmptyCollectionComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr)$/;" f +walkExistsExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkExistsExpression($existsExpr)$/;" f +walkExistsExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkExistsExpression($existsExpr);$/;" f +walkExistsExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkExistsExpression($existsExpr) {}$/;" f +walkExistsExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkExistsExpression($existsExpr)$/;" f +walkFromClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkFromClause($fromClause)$/;" f +walkFromClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkFromClause($fromClause);$/;" f +walkFromClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkFromClause($fromClause) {}$/;" f +walkFromClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkFromClause($fromClause)$/;" f +walkFunction ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkFunction($function)$/;" f +walkFunction ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkFunction($function);$/;" f +walkFunction ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkFunction($function) {}$/;" f +walkFunction ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkFunction($function)$/;" f +walkGroupByClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkGroupByClause($groupByClause)$/;" f +walkGroupByClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkGroupByClause($groupByClause);$/;" f +walkGroupByClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkGroupByClause($groupByClause) {}$/;" f +walkGroupByClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkGroupByClause($groupByClause)$/;" f +walkGroupByItem ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkGroupByItem(AST\\PathExpression $pathExpr)$/;" f +walkGroupByItem ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkGroupByItem(AST\\PathExpression $pathExpr);$/;" f +walkGroupByItem ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkGroupByItem(AST\\PathExpression $pathExpr) {}$/;" f +walkGroupByItem ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkGroupByItem(AST\\PathExpression $pathExpr)$/;" f +walkHavingClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkHavingClause($havingClause)$/;" f +walkHavingClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkHavingClause($havingClause);$/;" f +walkHavingClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkHavingClause($havingClause) {}$/;" f +walkHavingClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkHavingClause($havingClause)$/;" f +walkIdentificationVariable ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkIdentificationVariable($identificationVariable, $fieldName = null)$/;" f +walkInExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkInExpression($inExpr)$/;" f +walkInExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkInExpression($inExpr);$/;" f +walkInExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkInExpression($inExpr) {}$/;" f +walkInExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkInExpression($inExpr)$/;" f +walkInParameter ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkInParameter($inParam)$/;" f +walkInputParameter ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkInputParameter($inputParam)$/;" f +walkInputParameter ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkInputParameter($inputParam);$/;" f +walkInputParameter ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkInputParameter($inputParam) {}$/;" f +walkInputParameter ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkInputParameter($inputParam)$/;" f +walkInstanceOfExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkInstanceOfExpression($instanceOfExpr)$/;" f +walkInstanceOfExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkInstanceOfExpression($instanceOfExpr);$/;" f +walkInstanceOfExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ function walkInstanceOfExpression($instanceOfExpr) {}$/;" f +walkInstanceOfExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ function walkInstanceOfExpression($instanceOfExpr)$/;" f +walkJoinVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkJoinVariableDeclaration($joinVarDecl)$/;" f +walkJoinVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkJoinVariableDeclaration($joinVarDecl);$/;" f +walkJoinVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkJoinVariableDeclaration($joinVarDecl) {}$/;" f +walkJoinVariableDeclaration ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkJoinVariableDeclaration($joinVarDecl)$/;" f +walkLikeExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkLikeExpression($likeExpr)$/;" f +walkLikeExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkLikeExpression($likeExpr);$/;" f +walkLikeExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkLikeExpression($likeExpr) {}$/;" f +walkLikeExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkLikeExpression($likeExpr)$/;" f +walkLiteral ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkLiteral($literal)$/;" f +walkLiteral ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkLiteral($literal);$/;" f +walkLiteral ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkLiteral($literal) {}$/;" f +walkLiteral ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkLiteral($literal)$/;" f +walkNullComparisonExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkNullComparisonExpression($nullCompExpr)$/;" f +walkNullComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkNullComparisonExpression($nullCompExpr);$/;" f +walkNullComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkNullComparisonExpression($nullCompExpr) {}$/;" f +walkNullComparisonExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkNullComparisonExpression($nullCompExpr)$/;" f +walkNullIfExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkNullIfExpression($nullIfExpression)$/;" f +walkOrderByClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkOrderByClause($orderByClause)$/;" f +walkOrderByClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkOrderByClause($orderByClause);$/;" f +walkOrderByClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkOrderByClause($orderByClause) {}$/;" f +walkOrderByClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkOrderByClause($orderByClause)$/;" f +walkOrderByItem ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkOrderByItem($orderByItem)$/;" f +walkOrderByItem ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkOrderByItem($orderByItem);$/;" f +walkOrderByItem ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkOrderByItem($orderByItem) {}$/;" f +walkOrderByItem ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkOrderByItem($orderByItem)$/;" f +walkPathExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkPathExpression($pathExpr)$/;" f +walkPathExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkPathExpression($pathExpr);$/;" f +walkPathExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkPathExpression($pathExpr) {}$/;" f +walkPathExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkPathExpression($pathExpr)$/;" f +walkQuantifiedExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkQuantifiedExpression($qExpr)$/;" f +walkQuantifiedExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkQuantifiedExpression($qExpr);$/;" f +walkQuantifiedExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkQuantifiedExpression($qExpr) {}$/;" f +walkQuantifiedExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkQuantifiedExpression($qExpr)$/;" f +walkSelectClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSelectClause($selectClause)$/;" f +walkSelectClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSelectClause($selectClause);$/;" f +walkSelectClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSelectClause($selectClause) {}$/;" f +walkSelectClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSelectClause($selectClause)$/;" f +walkSelectExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSelectExpression($selectExpression)$/;" f +walkSelectExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSelectExpression($selectExpression);$/;" f +walkSelectExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSelectExpression($selectExpression) {}$/;" f +walkSelectExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSelectExpression($selectExpression)$/;" f +walkSelectStatement ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSelectStatement(AST\\SelectStatement $AST)$/;" f +walkSelectStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSelectStatement(AST\\SelectStatement $AST);$/;" f +walkSelectStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSelectStatement(AST\\SelectStatement $AST) {}$/;" f +walkSelectStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSelectStatement(AST\\SelectStatement $AST)$/;" f +walkSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSimpleArithmeticExpression($simpleArithmeticExpr)$/;" f +walkSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSimpleArithmeticExpression($simpleArithmeticExpr);$/;" f +walkSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSimpleArithmeticExpression($simpleArithmeticExpr) {}$/;" f +walkSimpleArithmeticExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSimpleArithmeticExpression($simpleArithmeticExpr)$/;" f +walkSimpleSelectClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSimpleSelectClause($simpleSelectClause)$/;" f +walkSimpleSelectClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSimpleSelectClause($simpleSelectClause);$/;" f +walkSimpleSelectClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSimpleSelectClause($simpleSelectClause) {}$/;" f +walkSimpleSelectClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSimpleSelectClause($simpleSelectClause)$/;" f +walkSimpleSelectExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSimpleSelectExpression($simpleSelectExpression)$/;" f +walkSimpleSelectExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSimpleSelectExpression($simpleSelectExpression);$/;" f +walkSimpleSelectExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSimpleSelectExpression($simpleSelectExpression) {}$/;" f +walkSimpleSelectExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSimpleSelectExpression($simpleSelectExpression)$/;" f +walkStateFieldPathExpression ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkStateFieldPathExpression($stateFieldPathExpression)$/;" f +walkStateFieldPathExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkStateFieldPathExpression($stateFieldPathExpression);$/;" f +walkStateFieldPathExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkStateFieldPathExpression($stateFieldPathExpression) {}$/;" f +walkStateFieldPathExpression ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkStateFieldPathExpression($stateFieldPathExpression)$/;" f +walkStringPrimary ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkStringPrimary($stringPrimary)$/;" f +walkStringPrimary ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkStringPrimary($stringPrimary);$/;" f +walkStringPrimary ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkStringPrimary($stringPrimary) {}$/;" f +walkStringPrimary ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkStringPrimary($stringPrimary)$/;" f +walkSubselect ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSubselect($subselect)$/;" f +walkSubselect ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSubselect($subselect);$/;" f +walkSubselect ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSubselect($subselect) {}$/;" f +walkSubselect ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSubselect($subselect)$/;" f +walkSubselectFromClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkSubselectFromClause($subselectFromClause)$/;" f +walkSubselectFromClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkSubselectFromClause($subselectFromClause);$/;" f +walkSubselectFromClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkSubselectFromClause($subselectFromClause) {}$/;" f +walkSubselectFromClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkSubselectFromClause($subselectFromClause)$/;" f +walkThrough ../../../src/Includes/DataStructure/Graph.php /^ public function walkThrough($callback, self $parent = null, $isStarted = false)$/;" f +walkUpdateClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkUpdateClause($updateClause)$/;" f +walkUpdateClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkUpdateClause($updateClause);$/;" f +walkUpdateClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkUpdateClause($updateClause) {}$/;" f +walkUpdateClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkUpdateClause($updateClause)$/;" f +walkUpdateItem ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkUpdateItem($updateItem)$/;" f +walkUpdateItem ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkUpdateItem($updateItem);$/;" f +walkUpdateItem ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkUpdateItem($updateItem) {}$/;" f +walkUpdateItem ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkUpdateItem($updateItem)$/;" f +walkUpdateStatement ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkUpdateStatement(AST\\UpdateStatement $AST)$/;" f +walkUpdateStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkUpdateStatement(AST\\UpdateStatement $AST);$/;" f +walkUpdateStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkUpdateStatement(AST\\UpdateStatement $AST) {}$/;" f +walkUpdateStatement ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkUpdateStatement(AST\\UpdateStatement $AST)$/;" f +walkWhereClause ../../../src/lib/Doctrine/ORM/Query/SqlWalker.php /^ public function walkWhereClause($whereClause)$/;" f +walkWhereClause ../../../src/lib/Doctrine/ORM/Query/TreeWalker.php /^ function walkWhereClause($whereClause);$/;" f +walkWhereClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php /^ public function walkWhereClause($whereClause) {}$/;" f +walkWhereClause ../../../src/lib/Doctrine/ORM/Query/TreeWalkerChain.php /^ public function walkWhereClause($whereClause)$/;" f +wantHelps ../../../src/lib/Symfony/Component/Console/Application.php /^ $this->wantHelps = true;$/;" v +wantHelps ../../../src/lib/Symfony/Component/Console/Application.php /^ $this->wantHelps = false;$/;" v +wantHelps ../../../src/lib/Symfony/Component/Console/Application.php /^ protected $wantHelps = false;$/;" v +warnStyle ../../../src/classes/XLite/Core/Profiler.php /^ $warnStyle = ' background-color: red; font-weight: bold;';$/;" v +warning ../../../src/lib/Log.php /^ function warning($message)$/;" f +warning_error ../../../src/Includes/install/install.php /^function warning_error($txt) {$/;" f +warnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ $this->warnings = $warnings;$/;" v +warnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsenseService.php /^ public $warnings;$/;" v +warnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ $this->warnings = $warnings;$/;" v +warnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdsensehostService.php /^ public $warnings;$/;" v +warnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ $this->warnings = $warnings;$/;" v +warnings ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPredictionService.php /^ public $warnings;$/;" v +warningsFound ../../../src/Includes/install/install.php /^ $warningsFound = false;$/;" v +warningsFound ../../../src/Includes/install/templates/step1_chkconfig.tpl.php /^ $warningsFound = ($warningsFound || (!$reqData['status'] && !$reqData['critical']));$/;" v +webPropertyId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->webPropertyId = $webPropertyId;$/;" v +webPropertyId ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $webPropertyId;$/;" v +webReaderLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->webReaderLink = $webReaderLink;$/;" v +webReaderLink ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $webReaderLink;$/;" v +webResource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ $this->webResource = new WebResourceServiceResource($this, $this->serviceName, 'webResource', json_decode('{"methods": {"insert": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification", "https:\/\/www.googleapis.com\/auth\/siteverification.verify_only"], "parameters": {"verificationMethod": {"required": true, "type": "string", "location": "query"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "id": "siteVerification.webResource.insert", "httpMethod": "POST", "path": "webResource", "response": {"$ref": "SiteVerificationWebResourceResource"}}, "get": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "id": "siteVerification.webResource.get", "httpMethod": "GET", "path": "webResource\/{id}", "response": {"$ref": "SiteVerificationWebResourceResource"}}, "list": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification"], "id": "siteVerification.webResource.list", "httpMethod": "GET", "path": "webResource", "response": {"$ref": "SiteVerificationWebResourceListResponse"}}, "update": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "id": "siteVerification.webResource.update", "httpMethod": "PUT", "path": "webResource\/{id}", "response": {"$ref": "SiteVerificationWebResourceResource"}}, "patch": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "SiteVerificationWebResourceResource"}, "id": "siteVerification.webResource.patch", "httpMethod": "PATCH", "path": "webResource\/{id}", "response": {"$ref": "SiteVerificationWebResourceResource"}}, "getToken": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification", "https:\/\/www.googleapis.com\/auth\/siteverification.verify_only"], "request": {"$ref": "SiteVerificationWebResourceGettokenRequest"}, "response": {"$ref": "SiteVerificationWebResourceGettokenResponse"}, "httpMethod": "POST", "path": "token", "id": "siteVerification.webResource.getToken"}, "delete": {"scopes": ["https:\/\/www.googleapis.com\/auth\/siteverification"], "parameters": {"id": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE", "path": "webResource\/{id}", "id": "siteVerification.webResource.delete"}}}', true));$/;" v +webResource ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiSiteVerificationService.php /^ public $webResource;$/;" v +web_dir ../../../src/Includes/install/install.php /^ $web_dir = preg_replace('\/\\\/install(\\.php)*\/', '', $uri);$/;" v +webdir ../../../src/classes/XLite/Model/MailImageParser.php /^ public $webdir;$/;" v +webfonts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ $this->webfonts = new WebfontsServiceResource($this, $this->serviceName, 'webfonts', json_decode('{"methods": {"list": {"parameters": {"sort": {"enum": ["alpha", "date", "popularity", "style", "trending"], "type": "string", "location": "query"}}, "id": "webfonts.webfonts.list", "httpMethod": "GET", "path": "webfonts", "response": {"$ref": "WebfontList"}}}}', true));$/;" v +webfonts ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiWebfontsService.php /^ public $webfonts;$/;" v +websiteUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ $this->websiteUrl = $websiteUrl;$/;" v +websiteUrl ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAnalyticsService.php /^ public $websiteUrl;$/;" v +week ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ $this->week = $week;$/;" v +week ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiUrlshortenerService.php /^ public $week;$/;" v +weight ../../../src/classes/XLite/Logic/Order/Modifier/Shipping.php /^ $weight = 0;$/;" v +weight ../../../src/classes/XLite/Model/Order/Modifier.php /^ protected $weight = 0;$/;" v +weight ../../../src/classes/XLite/Model/Product.php /^ protected $weight = 0.0000;$/;" v +weight ../../../src/classes/XLite/Model/ViewList.php /^ protected $weight = 0;$/;" v +weight ../../../src/classes/XLite/Module/CDev/ProductOptions/Model/OrderItem.php /^ $weight = parent::getWeight();$/;" v +weight ../../../src/classes/XLite/Module/CDev/ProductVariants/Model/Variant.php /^ protected $weight;$/;" v +weight1 ../../../src/Includes/Decorator/Utils/Operator.php /^ $weight1 = static::getModuleWeight($node1);$/;" v +weight2 ../../../src/Includes/Decorator/Utils/Operator.php /^ $weight2 = static::getModuleWeight($node2);$/;" v +where ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $where = new CompositeExpression(CompositeExpression::TYPE_AND, $args);$/;" v +where ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $where = new CompositeExpression(CompositeExpression::TYPE_OR, $args);$/;" v +where ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ $where = $this->getQueryPart('where');$/;" v +where ../../../src/lib/Doctrine/DBAL/Query/QueryBuilder.php /^ public function where($predicates)$/;" f +where ../../../src/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php /^ $where = array();$/;" v +where ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $where = '';$/;" v +where ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $where = new Expr\\Andx($args);$/;" v +where ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $where = new Expr\\Orx($args);$/;" v +where ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $where = $this->getDQLPart('where');$/;" v +where ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ $where = $this->getDqlPart('where');$/;" v +where ../../../src/lib/Doctrine/ORM/QueryBuilder.php /^ public function where($predicates)$/;" f +whereClause ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $whereClause = "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = '" . $schema . "'";$/;" v +whereClause ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $whereClause = "$classAlias.relname = '" . $table . "'";$/;" v +whereClause ../../../src/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php /^ $whereClause = "";$/;" v +whereClause ../../../src/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php /^ $whereClause = '';$/;" v +whereClause ../../../src/lib/Doctrine/ORM/Persisters/OneToManyPersister.php /^ $whereClause = '';$/;" v +whereClause ../../../src/lib/Doctrine/ORM/Query/AST/DeleteStatement.php /^ public $whereClause;$/;" v +whereClause ../../../src/lib/Doctrine/ORM/Query/AST/SelectStatement.php /^ public $whereClause;$/;" v +whereClause ../../../src/lib/Doctrine/ORM/Query/AST/Subselect.php /^ public $whereClause;$/;" v +whereClause ../../../src/lib/Doctrine/ORM/Query/AST/UpdateStatement.php /^ public $whereClause;$/;" v +which ../../../src/lib/Log/console.php /^ * abstract class which writes message to the text console.$/;" c +which ../../../src/lib/Log/daemon.php /^ * abstract class which sends messages to syslog daemon on UNIX-like machines.$/;" c +which ../../../src/lib/Log/display.php /^ * abstract class which writes message into browser in usual PHP maner.$/;" c +which ../../../src/lib/Log/firebug.php /^ * abstract class which writes message into Firebug console.$/;" c +which ../../../src/lib/Log/mcal.php /^ * abstract class which sends messages to a local or remote calendar$/;" c +which ../../../src/lib/Log/sql.php /^ * abstract class which sends messages to an SQL server. Each entry$/;" c +which ../../../src/lib/Log/sqlite.php /^ * abstract class which sends messages to an Sqlite database.$/;" c +which ../../../src/lib/Log/syslog.php /^ * abstract class which sends messages to syslog on UNIX-like machines$/;" c +whichOne ../../../src/lib/PEAR2/HTTP/Request/Adapter/Curl.php /^ static public $whichOne;$/;" v +whoCanInvite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->whoCanInvite = $whoCanInvite;$/;" v +whoCanInvite ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $whoCanInvite;$/;" v +whoCanJoin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->whoCanJoin = $whoCanJoin;$/;" v +whoCanJoin ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $whoCanJoin;$/;" v +whoCanPostMessage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->whoCanPostMessage = $whoCanPostMessage;$/;" v +whoCanPostMessage ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $whoCanPostMessage;$/;" v +whoCanViewGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->whoCanViewGroup = $whoCanViewGroup;$/;" v +whoCanViewGroup ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $whoCanViewGroup;$/;" v +whoCanViewMembership ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ $this->whoCanViewMembership = $whoCanViewMembership;$/;" v +whoCanViewMembership ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiGroupssettingsService.php /^ public $whoCanViewMembership;$/;" v +widget ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Admin.php /^ $widget = $this->getHandler()->getWidget($class);$/;" v +widget ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Block.php /^ $widget = $this->getHandler()->getWidget($blockInfo['lc_class'], $blockInfo['options']);$/;" v +widget ../../../src/classes/XLite/Module/CDev/DrupalConnector/Drupal/Controller.php /^ $widget = $this->getHandler()->getWidget('\\XLite\\\\View\\\\Location');$/;" v +widget ../../../src/classes/XLite/View/AView.php /^ $widget = $this->getChildWidget($class);$/;" v +widget ../../../src/classes/XLite/View/AView.php /^ $widget = $this->namedWidgets[$name];$/;" v +widget ../../../src/classes/XLite/View/Checkout/Steps.php /^ $widget = $this->getWidget($/;" v +widget ../../../src/classes/XLite/View/Model/AModel.php /^ $widget = new \\XLite\\View\\FormField\\Separator\\Regular($/;" v +widget ../../../src/classes/XLite/View/Payment/Method.php /^ $widget = $this->getPaymentMethod()->getProcessor()->getSettingsWidget();$/;" v +widgetClass ../../../src/classes/XLite/Model/ListNode/CheckoutStep.php /^ $this->widgetClass = $widgetClass;$/;" v +widgetClass ../../../src/classes/XLite/Model/ListNode/CheckoutStep.php /^ protected $widgetClass = null;$/;" v +widgetClass ../../../src/classes/XLite/View/OrderList/AOrderList.php /^ protected $widgetClass = '';$/;" v +widgetClass ../../../src/classes/XLite/View/OrderList/Search.php /^ protected $widgetClass = '\\XLite\\View\\OrderList\\Search';$/;" v +widgetDisplayCode ../../../src/classes/XLite/Core/FlexyCompiler.php /^ function widgetDisplayCode(array $attrs, $target, $module, $name)$/;" f +widgetNames ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $this->widgetNames = array();$/;" v +widgetParameters ../../../src/classes/XLite/Model/Config.php /^ protected $widgetParameters;$/;" v +widgetParams ../../../src/classes/XLite/Core/Handler.php /^ $this->widgetParams = array($/;" v +widgetParams ../../../src/classes/XLite/Core/Handler.php /^ protected $widgetParams;$/;" v +widgetType ../../../src/classes/XLite/Module/CDev/Bestsellers/View/Bestsellers.php /^ $widgetType = \\XLite\\Core\\Config::getInstance()->CDev->Bestsellers->bestsellers_menu$/;" v +widgetType ../../../src/classes/XLite/Module/CDev/Sale/View/SaleBlock.php /^ $widgetType = \\XLite\\Core\\Config::getInstance()->CDev->Sale->sale_menu$/;" v +widgetTypes ../../../src/classes/XLite/View/ItemsList/Product/Customer/ACustomer.php /^ protected $widgetTypes = array($/;" v +widgets ../../../src/classes/XLite/View/AView.php /^ $widgets = array();$/;" v +widgetsList ../../../src/classes/XLite/Core/CMSConnector.php /^ protected $widgetsList = array($/;" v +width ../../../src/classes/XLite/Core/ImageOperator/AImageOperator.php /^ $this->width = $image->getWidth();$/;" v +width ../../../src/classes/XLite/Core/ImageOperator/AImageOperator.php /^ protected $width;$/;" v +width ../../../src/classes/XLite/Core/ImageOperator/GD.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Model/Base/Image.php /^ protected $width;$/;" v +width ../../../src/classes/XLite/Model/Repo/Category.php /^ $width = $entity->getRpos() - $entity->getLpos() - ($onlySubtree ? 1 : -1);$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiAdexchangebuyerService.php /^ public $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBooksService.php /^ public $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCalendarService.php /^ public $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiCustomsearchService.php /^ public $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiPlusService.php /^ public $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ $this->width = $width;$/;" v +width ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiShoppingService.php /^ public $width;$/;" v +width ../../../src/lib/Symfony/Component/Console/Application.php /^ $width = strlen($command->getName()) > $width ? strlen($command->getName()) : $width;$/;" v +width ../../../src/lib/Symfony/Component/Console/Application.php /^ $width = 0;$/;" v +willBeInlined ../../../src/lib/Symfony/Component/Yaml/Dumper.php /^ $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value);$/;" v +win ../../../src/lib/Log/win.php /^ $win = $this->_name;$/;" v +win ../../../src/lib/Log/win.php /^ $win = $this->_name;$/;" v +win ../../../src/lib/Log/win.php /^$win = window.open('', '{$this->_name}', 'toolbar=no,scrollbars,width=600,height=400');$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $wishlist = $this->getWishlistProduct((int) $item);$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $wishlist = $this->getWishlistProduct((int) $values['id']);$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/Controller/Customer/UserWishlist.php /^ $wishlist = (int) \\XLite\\Core\\Request::getInstance()->wishlist_id;$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Profile.php /^ $this->wishlist = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Profile.php /^ protected $wishlist;$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/WishlistProducts.php /^ protected $wishlist;$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/UserWishlist.php /^ $this->wishlist = $this->getWishlistItem();$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/UserWishlist.php /^ protected $wishlist = null;$/;" v +wishlist ../../../src/classes/XLite/Module/SpurIT/Wishlist/View/WishlistProducts.php /^ $wishlist = \\XLite\\Core\\Database::getRepo('\\XLite\\Module\\SpurIT\\Wishlist\\Model\\Wishlist')$/;" v +wishlistId ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Wishlist.php /^ protected $wishlistId;$/;" v +wishlistProducts ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Product.php /^ $this->wishlistProducts = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +wishlistProducts ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Product.php /^ protected $wishlistProducts;$/;" v +wishlistProducts ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Wishlist.php /^ $this->wishlistProducts = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +wishlistProducts ../../../src/classes/XLite/Module/SpurIT/Wishlist/Model/Wishlist.php /^ protected $wishlistProducts;$/;" v +word ../../../src/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php /^ $word = str_replace('`', '', $word);$/;" v +word ../../../src/lib/PHPMailer/class.phpmailer.php /^ $word = substr($word, $len);$/;" v +word ../../../src/lib/PHPMailer/class.phpmailer.php /^ $word = substr($word, $len);$/;" v +word ../../../src/lib/PHPMailer/class.phpmailer.php /^ $word = $line_part[$e];$/;" v +work ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/AMQP.php /^ protected function work()$/;" f +work ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Worker/Permanent.php /^ abstract protected function work();$/;" f +workers ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ $workers = $this->planner->getWorkers();$/;" v +workers ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Manager.php /^ protected $workers = array();$/;" v +workers ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner.php /^ $this->workers = array();$/;" v +workers ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner.php /^ protected $workers;$/;" v +workers ../../../src/classes/XLite/Module/CDev/Swarm/lib/Swarm/Planner/Directory.php /^ $this->workers = array();$/;" v +wrapperClass ../../../src/lib/Doctrine/DBAL/DriverManager.php /^ $wrapperClass = $params['wrapperClass'];$/;" v +wrapperClass ../../../src/lib/Doctrine/DBAL/DriverManager.php /^ $wrapperClass = 'Doctrine\\DBAL\\Connection';$/;" v +write ../../../src/Includes/Utils/FileManager.php /^ public static function write($path, $data, $flags = 0, $mode = 0644)$/;" f +write ../../../src/classes/XLite/Module/CDev/AmazonS3Images/Core/S3.php /^ public function write($path, $data, array $httpHeaders = array())$/;" f +write ../../../src/classes/XLite/Upgrade/Logger.php /^ protected function write($message)$/;" f +write ../../../src/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php /^ public function write($filename)$/;" f +write ../../../src/lib/PEAR2/HTTP/Request/Adapter/Phpsocket.php /^ public function write($payload)$/;" f +write ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ public function write($messages, $newline = false, $type = 0)$/;" f +write ../../../src/lib/Symfony/Component/Console/Output/OutputInterface.php /^ function write($messages, $newline = false, $type = 0);$/;" f +writeCallToSourceFile ../../../src/Includes/Decorator/Plugin/StaticRoutines/Main.php /^ protected function writeCallToSourceFile(\\Includes\\Decorator\\DataStructure\\Graph\\Classes $node)$/;" f +writeClassFile ../../../src/Includes/Decorator/Utils/Operator.php /^ public static function writeClassFile($/;" f +writeData ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Money/Main.php /^ protected function writeData()$/;" f +writeData ../../../src/Includes/Decorator/Plugin/Doctrine/Plugin/Multilangs/Main.php /^ protected function writeData()$/;" f +writeDataToFile ../../../src/classes/XLite/Core/Marketplace.php /^ protected function writeDataToFile(\\PEAR2\\HTTP\\Request\\Response $response)$/;" f +writeDisposition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ $this->writeDisposition = $writeDisposition;$/;" v +writeDisposition ../../../src/classes/XLite/Module/CDev/ProductTranslators/gapi/contrib/apiBigqueryService.php /^ public $writeDisposition;$/;" v +writeEntityClass ../../../src/Includes/Decorator/Plugin/Doctrine/Utils/ModelGenerator.php /^ public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)$/;" f +writeEntityClass ../../../src/lib/Doctrine/ORM/Tools/EntityGenerator.php /^ public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)$/;" f +writeEntityRepositoryClass ../../../src/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php /^ public function writeEntityRepositoryClass($fullClassName, $outputDirectory)$/;" f +writeRecord ../../../src/classes/XLite/Module/CDev/XMLSitemap/Logic/SitemapGenerator.php /^ protected function writeRecord($string)$/;" f +writeln ../../../src/lib/Symfony/Component/Console/Output/Output.php /^ public function writeln($messages, $type = 0)$/;" f +wrongKeys ../../../src/classes/XLite/Core/Validator/PlainArray.php /^ $wrongKeys = preg_grep('\/^\\d+$\/Ss', array_keys($data), PREG_GREP_INVERT);$/;" v +wrongModifier ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $wrongModifier = false;$/;" v +wrongModifier ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $wrongModifier = true;$/;" v +x ../../../src/classes/XLite/Model/Repo/Profile.php /^ $x = explode('.', uniqid('', true));$/;" v +x ../../../src/classes/XLite/Model/Repo/Session.php /^ $x = explode('.', uniqid('', true));$/;" v +x ../../../src/lib/PHPMailer/class.phpmailer.php /^ $x = preg_match_all('\/[()"]\/', $str, $matches);$/;" v +x ../../../src/lib/PHPMailer/class.phpmailer.php /^ $x = preg_match_all('\/[^\\040\\041\\043-\\133\\135-\\176]\/', $str, $matches);$/;" v +x ../../../src/lib/PHPMailer/class.phpmailer.php /^ $x = 0;$/;" v +x_install_get_host ../../../src/Includes/install/install.php /^function x_install_get_host($host)$/;" f +x_install_log ../../../src/Includes/install/install.php /^function x_install_log($message = null)$/;" f +x_install_log_mask_params ../../../src/Includes/install/install.php /^function x_install_log_mask_params($params)$/;" f +xlite ../../../src/Includes/functions.php /^function xlite($restart = false)$/;" f +xliteFormId ../../../src/classes/XLite/Core/Session.php /^ protected static $xliteFormId;$/;" v +xlitePath ../../../src/classes/XLite/Module/CDev/DrupalConnector/View/AView.php /^ $xlitePath = static::prepareBasePath(\\XLite::getInstance()->getOptions(array('host_details', 'web_dir')));$/;" v +xml ../../../src/classes/XLite/Core/XML.php /^ $xml = substr($xml, 0, $end) . str_repeat($indentStr, $level) . substr($xml, $end);$/;" v +xml ../../../src/classes/XLite/Core/XML.php /^ $xml = substr($xml, 0, $i + $len) . "\\n" . substr($xml, $i + $len);$/;" v +xml ../../../src/classes/XLite/Core/XML.php /^ $xml = substr($xml, 0, $i) . str_repeat($indentStr, $level) . substr($xml, $i);$/;" v +xml ../../../src/classes/XLite/Core/XML.php /^ $xml = preg_replace('\/>[ ' . "\\t\\n\\r" . ']+<\/', '><', trim($xml));$/;" v +xml ../../../src/classes/XLite/Module/CDev/SolrSearch/client/Apache/Solr/Service.php /^ $xml = 'getXMLData($data);$/;" v +xmlElement ../../../src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php /^ $xmlElement = simplexml_load_file($file);$/;" v +xmlParsed ../../../src/classes/XLite/Module/CDev/USPS/Model/Shipping/Processor/USPS.php /^ $xmlParsed = $xml->parse($stringData, $err);$/;" v +xmlParsed ../../../src/classes/XLite/Module/Qualiteam/EcwidAggregator/Core/PartnerStores.php /^ $xmlParsed = $xml->parse($stringData, $err);$/;" v +xmlRoot ../../../src/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php /^ $xmlRoot = $this->getElement($className);$/;" v +xpath ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $xpath = new DOMXPath($dom);$/;" v +xpath ../../../src/classes/XLite/View/AView.php /^ $xpath = $this->getXpathByContent($content);$/;" v +xpath_block ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $xpath_block = '';$/;" v +xpath_insert_type ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $xpath_insert_type = 'before';$/;" v +xpath_query ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $xpath_query = '';$/;" v +xtr ../../../src/Includes/install/install.php /^function xtr($label, array $substitute = array())$/;" f +yaml ../../../src/classes/XLite/Controller/Admin/AddonsListInstalled.php /^ $yaml = \\Includes\\Utils\\FileManager::read($/;" v +yaml ../../../src/classes/XLite/Upgrade/Entry/Module/AModule.php /^ $yaml = \\Includes\\Utils\\ModulesManager::getModuleYAMLFile($author, $name);$/;" v +yaml ../../../src/lib/Symfony/Component/Yaml/Yaml.php /^ $yaml = new Dumper();$/;" v +yaml ../../../src/lib/Symfony/Component/Yaml/Yaml.php /^ $yaml = new Parser();$/;" v +yamlFile ../../../src/classes/XLite/Module/CDev/AuthorizeNet/upgrade/1.0/5/post_rebuild.php /^ $yamlFile = __DIR__ . LC_DS . 'post_rebuild.yaml';$/;" v +yamlFile ../../../src/classes/XLite/Module/CDev/VAT/upgrade/1.0/6/post_rebuild.php /^ $yamlFile = __DIR__ . LC_DS . 'post_rebuild.yaml';$/;" v +yamlFiles ../../../src/Includes/install/install.php /^ $yamlFiles = $lcSettings['yaml_files']['base'];$/;" v +yearsArray ../../../src/classes/XLite/View/Date.php /^ $yearsArray = array();$/;" v +yearsRange ../../../src/classes/XLite/View/Date.php /^ $yearsRange = $this->getParam(self::PARAM_YEARS_RANGE);$/;" v +yiq ../../../src/classes/XLite/Module/CDev/OrderTags/Model/Order/Tag.php /^ $yiq = (($r * 299) + ($g * 587) + ($b * 114)) \/ 1000;$/;" v +zipcode ../../../src/classes/XLite/Model/Base/Address.php /^ protected $zipcode = '';$/;" v +zone ../../../src/Includes/Decorator/Plugin/Templates/ATemplates.php /^ $zone = array_search($skin, static::$zones) ?: \\XLite\\Model\\ViewList::INTERFACE_CUSTOMER;$/;" v +zone ../../../src/classes/XLite/Controller/Admin/ShippingRates.php /^ $zone = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')->find(intval($value));$/;" v +zone ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zone = $this->addElements($zone, $data);$/;" v +zone ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zone = $this->addElements($zone, $data);$/;" v +zone ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zone = new \\XLite\\Model\\Zone();$/;" v +zone ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zone = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')->find($zoneId);$/;" v +zone ../../../src/classes/XLite/Core/Converter.php /^ $zone = 'Admin';$/;" v +zone ../../../src/classes/XLite/Core/Converter.php /^ $zone = 'Console';$/;" v +zone ../../../src/classes/XLite/Core/Converter.php /^ $zone = 'Customer';$/;" v +zone ../../../src/classes/XLite/Core/FlexyCompiler.php /^ $zone = '';$/;" v +zone ../../../src/classes/XLite/Core/Session.php /^ $zone = \\XLite::isAdminZone() ? 'admin' : 'customer';$/;" v +zone ../../../src/classes/XLite/Core/Session.php /^ $zone = \\XLite::isAdminZone() ? 'admin' : 'customer';$/;" v +zone ../../../src/classes/XLite/Model/Repo/TemplatePatch.php /^ $zone = $patch->zone;$/;" v +zone ../../../src/classes/XLite/Model/Shipping/Markup.php /^ protected $zone;$/;" v +zone ../../../src/classes/XLite/Model/TemplatePatch.php /^ protected $zone = 'customer';$/;" v +zone ../../../src/classes/XLite/Model/ViewList.php /^ protected $zone = self::INTERFACE_CUSTOMER;$/;" v +zone ../../../src/classes/XLite/Model/ZoneElement.php /^ protected $zone;$/;" v +zone ../../../src/classes/XLite/Module/CDev/SalesTax/Controller/Admin/Taxes.php /^ $zone = $data['zone']$/;" v +zone ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ $this->zone = $zone;$/;" v +zone ../../../src/classes/XLite/Module/CDev/SalesTax/Model/Tax/Rate.php /^ protected $zone;$/;" v +zone ../../../src/classes/XLite/Module/CDev/VAT/Controller/Admin/Taxes.php /^ $zone = $data['zone']$/;" v +zone ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ $this->zone = $zone;$/;" v +zone ../../../src/classes/XLite/Module/CDev/VAT/Model/Tax/Rate.php /^ protected $zone;$/;" v +zone ../../../src/classes/XLite/View/AView.php /^ $zone = \\XLite\\Model\\ViewList::INTERFACE_ADMIN;$/;" v +zone ../../../src/classes/XLite/View/AView.php /^ $zone = \\XLite\\Model\\ViewList::INTERFACE_CONSOLE;$/;" v +zone ../../../src/classes/XLite/View/AView.php /^ $zone = \\XLite\\Model\\ViewList::INTERFACE_CUSTOMER;$/;" v +zone ../../../src/classes/XLite/View/AView.php /^ $zone = \\XLite\\Model\\ViewList::INTERFACE_MAIL;$/;" v +zone ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $zone = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')$/;" v +zone ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $zone = new \\XLite\\Model\\Zone();$/;" v +zoneCountries ../../../src/classes/XLite/Model/Zone.php /^ $zoneCountries = array();$/;" v +zoneId ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zoneId = $zone->getZoneId();$/;" v +zoneId ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zoneId = intval($postedData['zoneid']);$/;" v +zoneId ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $zoneId = intval($postedData['zoneid']);$/;" v +zoneId ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $zoneId = $methodId = null;$/;" v +zoneIds ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zoneIds = array();$/;" v +zoneName ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zoneName = trim($postedData['zone_name']);$/;" v +zoneName ../../../src/classes/XLite/Controller/Admin/ShippingZones.php /^ $zoneName = trim($postedData['zone_name']);$/;" v +zoneStates ../../../src/classes/XLite/Model/Zone.php /^ $zoneStates = array();$/;" v +zoneWeight ../../../src/classes/XLite/Model/Repo/Zone.php /^ $zoneWeight = $zone->getZoneWeight($address);$/;" v +zoneWeight ../../../src/classes/XLite/Model/Zone.php /^ $zoneWeight = 0;$/;" v +zoneWeight ../../../src/classes/XLite/Model/Zone.php /^ $zoneWeight = 0;$/;" v +zone_elements ../../../src/classes/XLite/Model/Zone.php /^ $this->zone_elements = new \\Doctrine\\Common\\Collections\\ArrayCollection();$/;" v +zone_elements ../../../src/classes/XLite/Model/Zone.php /^ protected $zone_elements;$/;" v +zone_id ../../../src/classes/XLite/Model/Zone.php /^ protected $zone_id;$/;" v +zone_name ../../../src/classes/XLite/Model/Zone.php /^ protected $zone_name = '';$/;" v +zones ../../../src/Includes/Decorator/Plugin/Templates/ATemplates.php /^ protected static $zones = array($/;" v +zones ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $zones = $address ? \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')->findApplicableZones($address) : array();$/;" v +zones ../../../src/classes/XLite/Module/CDev/SalesTax/Logic/Order/Modifier/Tax.php /^ $zones = $this->getZonesList();$/;" v +zones ../../../src/classes/XLite/Module/CDev/VAT/Logic/ATax.php /^ $zones = $address ? \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')->findApplicableZones($address) : array();$/;" v +zones ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $zones = $address ? \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')->findApplicableZones($address) : array();$/;" v +zones ../../../src/classes/XLite/Module/CDev/VAT/Logic/Order/Modifier/Tax.php /^ $zones = $this->getZonesList();$/;" v +zones ../../../src/classes/XLite/Module/CDev/VAT/Logic/Product/Tax.php /^ $zones = $this->getZonesList();$/;" v +zones ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $this->zones = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone')->findAllZones();$/;" v +zones ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ $zones = $this->getShippingZones();$/;" v +zones ../../../src/classes/XLite/View/Tabs/ShippingSettings.php /^ protected $zones = null;$/;" v +zoomId ../../../src/classes/XLite/Controller/Admin/Product.php /^ $zoomId = array_shift($keys);$/;" v +zoomId ../../../src/classes/XLite/Controller/Admin/Product.php /^ $zoomId = 0;$/;" v From a28d3be1082532aaf89b3767d1e1d277ed0f4aa7 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Thu, 12 Jul 2012 15:59:14 +0400 Subject: [PATCH 218/562] [*] Small logic changes --- .dev/macro/core.php | 8 ------- src/classes/XLite/Model/Profile.php | 2 +- src/classes/XLite/Model/Repo/Role.php | 34 ++++++++++++++++++++++++++- src/classes/XLite/Model/Role.php | 2 +- 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.dev/macro/core.php b/.dev/macro/core.php index 2106834c60..4ad634daad 100644 --- a/.dev/macro/core.php +++ b/.dev/macro/core.php @@ -419,14 +419,6 @@ function macro_get_class_header($path) $header = preg_replace('/( \*\s*.)+ \*\//SsU', ' */', $header); - if (macro_is_entity($path)) { - $header = preg_replace( - '/( \*\/)/SsU', - ' *' . PHP_EOL .' * @MappedSuperclass' . PHP_EOL . '$1', - $header - ); - } - return $header; } diff --git a/src/classes/XLite/Model/Profile.php b/src/classes/XLite/Model/Profile.php index 5ba03f2243..b69a3d33f4 100644 --- a/src/classes/XLite/Model/Profile.php +++ b/src/classes/XLite/Model/Profile.php @@ -281,7 +281,7 @@ class Profile extends \XLite\Model\AEntity * @see ____var_see____ * @since 1.0.0 * - * @manyToMany (targetEntity="XLite\Model\Role", mappedBy="profiles", cascade={"merge","detach"}) + * @ManyToMany (targetEntity="XLite\Model\Role", mappedBy="profiles", cascade={"merge","detach"}) */ protected $roles; diff --git a/src/classes/XLite/Model/Repo/Role.php b/src/classes/XLite/Model/Repo/Role.php index f3ebd0de03..b04c4c4cd4 100644 --- a/src/classes/XLite/Model/Repo/Role.php +++ b/src/classes/XLite/Model/Repo/Role.php @@ -36,7 +36,21 @@ class Role extends \XLite\Model\Repo\Base\I18n { /** - * Find one role byN nme + * Find one role by permisssion code + * + * @param string $code Permission code + * + * @return \XLite\Model\Role + * @see ____func_see____ + * @since 1.0.19 + */ + public function findOneByPermissionCode($code) + { + return $this->defineFindOneByPermissionCodeQuery($code)->getSingleResult(); + } + + /** + * Find one role by name * * @param string $name Name * @@ -87,6 +101,24 @@ public function findOneRoot() return $this->defineFindOneRootQuery()->getSingleResult(); } + /** + * Define query for findOneByPermissionCode() method + * + * @param string $code Permission code + * + * @return \XLite\Model\QueryBuilder\AQueryBuilder + * @see ____func_see____ + * @since 1.0.19 + */ + protected function defineFindOneByPermissionCodeQuery($code) + { + return $this->createQueryBuilder('r') + ->linkInner('r.permissions') + ->andWhere('permissions.code = :code') + ->setParameter('code', $code) + ->setMaxResults(1); + } + /** * Define query for findOneByName() method * diff --git a/src/classes/XLite/Model/Role.php b/src/classes/XLite/Model/Role.php index 104db0aadd..65304da69a 100644 --- a/src/classes/XLite/Model/Role.php +++ b/src/classes/XLite/Model/Role.php @@ -65,7 +65,7 @@ class Role extends \XLite\Model\Base\I18n /** * Profiles * - * @var \XLite\Model\Profile + * @var \Doctrine\Common\Collections\Collection * @see ____var_see____ * @since 1.0.0 * From 6feac626fa4e5144cc70e9ebae018a1c56b02e64 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Thu, 12 Jul 2012 16:09:42 +0400 Subject: [PATCH 219/562] [!] Decorator corrected: rebuildCache() called deletion of var/run/Classes.php file on every step when this method was called by installation script. Fixed. --- src/Includes/Decorator/Utils/CacheManager.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Includes/Decorator/Utils/CacheManager.php b/src/Includes/Decorator/Utils/CacheManager.php index 39f0b99691..44405e74fa 100644 --- a/src/Includes/Decorator/Utils/CacheManager.php +++ b/src/Includes/Decorator/Utils/CacheManager.php @@ -692,15 +692,22 @@ public static function rebuildCache() { static::checkPermissions(LC_DIR_VAR); + $stepStatus = false; + foreach (static::$steps as $step) { - if (static::runStepConditionally($step) && static::isDoOneStepOnly()) { + + $stepStatus = static::runStepConditionally($step); + + if ($stepStatus && static::isDoOneStepOnly()) { // Break after first performed step if isDoOneStepOnly() returned true break; } } - // Clear classes cache - \Includes\Utils\FileManager::deleteFile(static::getClassesHashPath()); + if (!$stepStatus) { + // Clear classes cache + \Includes\Utils\FileManager::deleteFile(static::getClassesHashPath()); + } } /** From 603b4dae898fcd7f3b70cd1e585d14b8551a1e80 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 12 Jul 2012 17:36:29 +0400 Subject: [PATCH 220/562] [*] Small design changes for settings table --- src/skins/admin/en/css/style.css | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index 7df35e85a0..1d82ebf8a9 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -792,12 +792,11 @@ table.form input[type="text"] } .settings ul.table { - width: 100%; + width: 1160px; } .settings ul.table li { - float: none; } .settings ul.table li.even @@ -812,7 +811,7 @@ table.form input[type="text"] .settings ul.table .table-label { - width: 40%; + width: 25%; padding: 7px 0 7px 10px; color: #456583; white-space: normal; @@ -828,7 +827,7 @@ table.form input[type="text"] } .settings ul.table .table-value { - width: 40%; + width: 70%; padding: 7px 0px; } @@ -1212,8 +1211,6 @@ button.disabled span { .table tr td { - padding-left: 25px; - padding-bottom: 10px; font-size: 12px; } @@ -1627,7 +1624,7 @@ div.star { } div.table-value { - float: left; + float: right; } div.table-value input[type="text"], From ca533c19385438f3e3ae869dfaa056b2b7ab03b2 Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Thu, 12 Jul 2012 21:41:53 +0400 Subject: [PATCH 221/562] Raise version to 1.1.0 --- src/classes/XLite/Module/CDev/SocialLogin/Main.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Main.php b/src/classes/XLite/Module/CDev/SocialLogin/Main.php index 07b3c8eb52..d369baad30 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Main.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Main.php @@ -47,6 +47,18 @@ public static function getAuthorName() return 'Creative Development LLC'; } + /** + * Get module major version + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public static function getMajorVersion() + { + return '1.1'; + } + /** * Get version * From b1e68f27745696af8e468512233ff2d805e73b26 Mon Sep 17 00:00:00 2001 From: Maxim Shamaev Date: Fri, 13 Jul 2012 06:11:06 +0400 Subject: [PATCH 222/562] [*] Add separate cell class for config; small logic changes --- src/classes/XLite/Core/ConfigCell.php | 38 +++++++++++++++++ src/classes/XLite/Model/Profile.php | 4 +- src/classes/XLite/Model/Repo/Config.php | 12 +++--- .../XLite/View/FormField/Label/ALabel.php | 12 ++++++ src/classes/XLite/View/Mailer.php | 42 +++++++++++++++---- src/skins/admin/en/form_field/label.tpl | 2 +- 6 files changed, 95 insertions(+), 15 deletions(-) create mode 100644 src/classes/XLite/Core/ConfigCell.php diff --git a/src/classes/XLite/Core/ConfigCell.php b/src/classes/XLite/Core/ConfigCell.php new file mode 100644 index 0000000000..a37c00b40b --- /dev/null +++ b/src/classes/XLite/Core/ConfigCell.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Core; + +/** + * Config cell class + * + * @see ____class_see____ + * @since 1.0.0 + */ +class ConfigCell extends \XLite\Core\CommonCell +{ +} diff --git a/src/classes/XLite/Model/Profile.php b/src/classes/XLite/Model/Profile.php index b69a3d33f4..526da688ea 100644 --- a/src/classes/XLite/Model/Profile.php +++ b/src/classes/XLite/Model/Profile.php @@ -646,7 +646,9 @@ public function setOrder(\XLite\Model\Order $order = null) protected function prepareCreate() { // Assign a profile creation date/time - $this->setAdded(time()); + if (!$this->getAdded()) { + $this->setAdded(time()); + } // Assign current language $language = $this->getLanguage(); diff --git a/src/classes/XLite/Model/Repo/Config.php b/src/classes/XLite/Model/Repo/Config.php index 937f65b472..f982e5ff8e 100644 --- a/src/classes/XLite/Model/Repo/Config.php +++ b/src/classes/XLite/Model/Repo/Config.php @@ -156,18 +156,18 @@ public function getAllOptions($force = false) } /** - * Preprocess options and transform its to the hierarchy of \XLite\Core\CommonCell objects + * Preprocess options and transform its to the hierarchy of \XLite\Core\ConfigCell objects * * @param array $data Array of options data gathered from the database * - * @return \XLite\Core\CommonCell + * @return \XLite\Core\ConfigCell * @see ____func_see____ * @since 1.0.0 */ public function processOptions($data) { - $config = new \XLite\Core\CommonCell(); + $config = new \XLite\Core\ConfigCell(); foreach ($data as $option) { @@ -185,15 +185,15 @@ public function processOptions($data) list($author, $module) = explode('\\', $category); if (!isset($config->$author)) { - $config->$author = new \XLite\Core\CommonCell(); + $config->$author = new \XLite\Core\ConfigCell(); } if (!isset($config->$author->$module)) { - $config->$author->$module = new \XLite\Core\CommonCell(); + $config->$author->$module = new \XLite\Core\ConfigCell(); } } elseif (!isset($config->$category)) { - $config->$category = new \XLite\Core\CommonCell(); + $config->$category = new \XLite\Core\ConfigCell(); } if ('checkbox' === $type) { diff --git a/src/classes/XLite/View/FormField/Label/ALabel.php b/src/classes/XLite/View/FormField/Label/ALabel.php index 1f50814a8f..28004681a5 100644 --- a/src/classes/XLite/View/FormField/Label/ALabel.php +++ b/src/classes/XLite/View/FormField/Label/ALabel.php @@ -46,4 +46,16 @@ public function getFieldType() { return self::FIELD_TYPE_LABEL; } + + /** + * Get label value + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getLabelValue() + { + return strval($this->getValue()); + } } diff --git a/src/classes/XLite/View/Mailer.php b/src/classes/XLite/View/Mailer.php index 5f6b17ad82..c25dbdb5ff 100644 --- a/src/classes/XLite/View/Mailer.php +++ b/src/classes/XLite/View/Mailer.php @@ -290,12 +290,22 @@ public function compose($from, $to, $dir, $customHeaders = array(), $interface = */ public function send() { - if ('' !== $this->get('to')) { + if ('' === $this->get('to')) { + \XLite\Logger::getInstance()->log( + 'Send mail FAILED: sender address is empty', + LOG_ERR + ); - if (!isset($this->mail)) { + } elseif (!isset($this->mail)) { - \XLite\Logger::getInstance()->log('Send mail FAILED: not initialized inner mailer'); - } + \XLite\Logger::getInstance()->log( + 'Send mail FAILED: not initialized inner mailer', + LOG_ERR + ); + + } else { + + $this->errorInfo = null; ob_start(); @@ -308,7 +318,12 @@ public function send() // Check if there are any error during mail sending if ($this->mail->isError()) { - \XLite\Logger::getInstance()->log('Send mail FAILED: ' . $this->mail->ErrorInfo . ' : [' . $error . ']'); + \XLite\Logger::getInstance()->log( + 'Send mail FAILED: ' . $this->prepareErrorMessage($this->mail->ErrorInfo) . PHP_EOL + . $this->prepareErrorMessage($error), + LOG_ERR + ); + $this->errorInfo = $this->mail->ErrorInfo; } } @@ -321,8 +336,6 @@ public function send() } $this->imageParser->unlinkImages(); - - $this->errorInfo = $this->mail->ErrorInfo; } @@ -530,4 +543,19 @@ protected function getHeaders() return $headers; } + + /** + * Prepare error message + * + * @param string $message Message + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function prepareErrorMessage($message) + { + return trim(strip_tags($message)); + } + } diff --git a/src/skins/admin/en/form_field/label.tpl b/src/skins/admin/en/form_field/label.tpl index cf738ce5e7..37b9fe6e35 100644 --- a/src/skins/admin/en/form_field/label.tpl +++ b/src/skins/admin/en/form_field/label.tpl @@ -10,4 +10,4 @@ * @since 1.0.0 *} -{t(getValue())}
    +{t(getLabelValue())}
    From 45f47453533677f7637152da91f892b01cef171c Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Fri, 13 Jul 2012 11:26:49 +0400 Subject: [PATCH 223/562] Widget caption text template --- .../SocialLogin/parts/social_login.caption.tpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.caption.tpl diff --git a/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.caption.tpl b/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.caption.tpl new file mode 100644 index 0000000000..8b6c564aed --- /dev/null +++ b/src/skins/default/en/modules/CDev/SocialLogin/parts/social_login.caption.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * SocialLogin widget caption + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.24 + * + * @ListChild (list="social.login.buttons", weight="1") + *} + + From aba11abf10d38745d984b53024484a7610da1d14 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 13 Jul 2012 11:50:06 +0400 Subject: [PATCH 224/562] E:41763 [!] Bug: There was no filter for profile fields on orders list --- src/skins/admin/en/css/style.css | 6 +++++- .../admin/en/items_list/order/parts/columns/customer.tpl | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index 1d82ebf8a9..1c358133ce 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -1623,10 +1623,14 @@ div.star { line-height: 24px; } -div.table-value { +.settings div.table-value { float: right; } +div.table-value { + float: left; +} + div.table-value input[type="text"], div.table-value input[type="password"], div.table-value select diff --git a/src/skins/admin/en/items_list/order/parts/columns/customer.tpl b/src/skins/admin/en/items_list/order/parts/columns/customer.tpl index 6a41da65f9..b11b7d1549 100644 --- a/src/skins/admin/en/items_list/order/parts/columns/customer.tpl +++ b/src/skins/admin/en/items_list/order/parts/columns/customer.tpl @@ -15,9 +15,9 @@ - {order.profile.billing_address.title:h} {order.profile.billing_address.firstname:h} {order.profile.billing_address.lastname:h} + {order.profile.billing_address.title} {order.profile.billing_address.firstname} {order.profile.billing_address.lastname} - {order.profile.billing_address.title:h} {order.profile.billing_address.firstname:h} {order.profile.billing_address.lastname:h} + {order.profile.billing_address.title} {order.profile.billing_address.firstname} {order.profile.billing_address.lastname} From 34bdb76be27fc06bf9bfe2d0246b5197009cb98a Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 13 Jul 2012 13:48:28 +0400 Subject: [PATCH 225/562] [+] Sign in label is added to translation modules. --- src/classes/XLite/Module/CDev/DeTranslation/install.yaml | 1 + src/classes/XLite/Module/CDev/FrTranslation/install.yaml | 1 + src/classes/XLite/Module/CDev/RuTranslation/install.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/src/classes/XLite/Module/CDev/DeTranslation/install.yaml b/src/classes/XLite/Module/CDev/DeTranslation/install.yaml index bf06719a06..20abf93722 100644 --- a/src/classes/XLite/Module/CDev/DeTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/DeTranslation/install.yaml @@ -789,6 +789,7 @@ XLite\Model\LanguageLabel: - { name: 'Show all labels', translations: [{ code: 'de', label: 'Alle Kennsätze zeigen' }] } - { name: 'Show filter options', translations: [{ code: 'de', label: 'Filteroptionen zeigen' }] } - { name: 'Sign in notification', translations: [{ code: 'de', label: 'Benachrichtigung über Anmeldung' }] } + - { name: 'Sign in', translations: [{ code: 'de', label: 'Einloggen' }] } - { name: 'Sign out', translations: [{ code: 'de', label: 'Abmelden' }] } - { name: 'Size', translations: [{ code: 'de', label: 'Größe' }] } - { name: 'SKU', translations: [{ code: 'de', label: 'Art.-Nr.' }] } diff --git a/src/classes/XLite/Module/CDev/FrTranslation/install.yaml b/src/classes/XLite/Module/CDev/FrTranslation/install.yaml index f2abed622e..c43ffe6342 100644 --- a/src/classes/XLite/Module/CDev/FrTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/FrTranslation/install.yaml @@ -789,6 +789,7 @@ XLite\Model\LanguageLabel: - { name: 'Show all labels', translations: [{ code: 'fr', label: 'Montrer tous les labels' }] } - { name: 'Show filter options', translations: [{ code: 'fr', label: 'Montrer options de filtre' }] } - { name: 'Sign in notification', translations: [{ code: 'fr', label: 'Notification d''enregistrement' }] } + - { name: 'Sign in', translations: [{ code: 'fr', label: 'Se connecter' }] } - { name: 'Sign out', translations: [{ code: 'fr', label: 'Se déconnecter' }] } - { name: 'Size', translations: [{ code: 'fr', label: 'Taille' }] } - { name: 'SKU', translations: [{ code: 'fr', label: 'Réf.' }] } diff --git a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml index 04d94503fe..3db636304d 100644 --- a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml @@ -789,6 +789,7 @@ XLite\Model\LanguageLabel: - { name: 'Show all labels', translations: [{ code: 'ru', label: 'Показать вÑе метки' }] } - { name: 'Show filter options', translations: [{ code: 'ru', label: 'Показать параметры фильтра' }] } - { name: 'Sign in notification', translations: [{ code: 'ru', label: 'Уведомление о региÑтрации' }] } + - { name: 'Sign in', translations: [{ code: 'ru', label: 'Вход' }] } - { name: 'Sign out', translations: [{ code: 'ru', label: 'Выход' }] } - { name: 'Size', translations: [{ code: 'ru', label: 'Размер' }] } - { name: 'SKU', translations: [{ code: 'ru', label: 'Код' }] } From 96e7cc7a550608d94fbc3a2f1cc7ce3512ca45a1 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Fri, 13 Jul 2012 21:41:38 +0400 Subject: [PATCH 226/562] [*] common/js/core.form.js restored from core-3 --- src/skins/common/js/core.form.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/skins/common/js/core.form.js b/src/skins/common/js/core.form.js index d183ccf8bb..e79337f527 100644 --- a/src/skins/common/js/core.form.js +++ b/src/skins/common/js/core.form.js @@ -1093,19 +1093,23 @@ CommonElement.prototype.toggleActivity = function(condition) // Check element activity CommonElement.prototype.isEnabled = function() { - return this.$element.hasClass('disabled'); + return 'disabled' == this.$element.attr('disabled'); } // Disable element CommonElement.prototype.disable = function() { - this.$element.addClass('disabled'); + this.$element + .addClass('disabled') + .attr('disabled', 'disabled'); } // Enable element CommonElement.prototype.enable = function() { - this.$element.removeClass('disabled'); + this.$element + .removeClass('disabled') + .removeAttr('disabled'); } /** From db0e98ba7f9714b715370de7560504a8b6fc74c4 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Sat, 14 Jul 2012 01:22:22 +0400 Subject: [PATCH 227/562] [*] Small changes for formfield widgets --- .../admin/en/categories/modify/parts/description.tpl | 10 ++++++++-- src/skins/admin/en/test_email/body.tpl | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/skins/admin/en/categories/modify/parts/description.tpl b/src/skins/admin/en/categories/modify/parts/description.tpl index c3edf8f5b5..4fceb3f486 100644 --- a/src/skins/admin/en/categories/modify/parts/description.tpl +++ b/src/skins/admin/en/categories/modify/parts/description.tpl @@ -2,7 +2,7 @@ {** * Category description - * + * * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @@ -16,6 +16,12 @@ {t(#Description#)} - + diff --git a/src/skins/admin/en/test_email/body.tpl b/src/skins/admin/en/test_email/body.tpl index 6d1a6001e1..4bb40a83cf 100644 --- a/src/skins/admin/en/test_email/body.tpl +++ b/src/skins/admin/en/test_email/body.tpl @@ -34,7 +34,7 @@ {t(#Email body#)} - + From 0beec183a7aeb511e228854b41ccd7e20aea2367 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 16 Jul 2012 10:31:57 +0400 Subject: [PATCH 228/562] E:41772 [!] Typo fixed --- src/classes/XLite/Controller/Console/Cron.php | 2 +- .../XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Controller/Console/Cron.php b/src/classes/XLite/Controller/Console/Cron.php index 84ad4ab7f0..07a7604d7c 100644 --- a/src/classes/XLite/Controller/Console/Cron.php +++ b/src/classes/XLite/Controller/Console/Cron.php @@ -91,7 +91,7 @@ protected function doNoAction() { $this->startTime = time(); $this->startMemory = memory_get_usage(true); - $this->memoryLimitIni = \XLite\Core\COnverter::convertShortSize(ini_get('memory_limit') ?: '16M'); + $this->memoryLimitIni = \XLite\Core\Converter::convertShortSize(ini_get('memory_limit') ?: '16M'); foreach (\XLite\Core\Database::getRepo('XLite\Model\Task')->getCurrentQuery() as $task) { $task = $task[0]; diff --git a/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php b/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php index 0f818d2615..86bf1d5053 100644 --- a/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php +++ b/src/classes/XLite/Module/CDev/UserPermissions/Controller/Admin/Role.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.17 */ -class Role extends \XLite\COntroller\Admin\AAdmin +class Role extends \XLite\Controller\Admin\AAdmin { /** * Controller parameters From f58ccf37905b066b24c818b86cc08ef777e894d5 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Mon, 16 Jul 2012 15:27:35 +0400 Subject: [PATCH 229/562] [*] Paypal module: PaypalWPS method added to the module; added individual payment settings pages for each methods (Payflo Link, Paypal Advanced and Paypal WPS) --- .../XLite/Controller/Admin/PaymentMethod.php | 8 +- src/classes/XLite/Module/CDev/Paypal/Main.php | 23 +- .../Processor/{Iframe.php => APaypal.php} | 20 +- .../Model/Payment/Processor/PayflowLink.php | 28 +- .../Payment/Processor/PaypalAdvanced.php | 291 +++++++++++ .../Model/Payment/Processor/PaypalWPS.php | 475 ++++++++++++++++++ .../CDev/Paypal/View/PaypalSettings.php | 59 +-- .../XLite/Module/CDev/Paypal/install.yaml | 101 ++-- src/classes/XLite/View/Payment/Method.php | 2 +- .../settings/{ => payflow_link}/body.tpl | 35 +- .../Paypal/settings/paypal_advanced/body.tpl | 88 ++++ .../CDev/Paypal/settings/paypal_wps/body.tpl | 77 +++ .../en/modules/CDev/Paypal/settings/style.css | 3 +- src/skins/admin/en/payment/method/body.tpl | 2 +- 14 files changed, 1069 insertions(+), 143 deletions(-) rename src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/{Iframe.php => APaypal.php} (98%) create mode 100644 src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalWPS.php rename src/skins/admin/en/modules/CDev/Paypal/settings/{ => payflow_link}/body.tpl (66%) create mode 100644 src/skins/admin/en/modules/CDev/Paypal/settings/paypal_advanced/body.tpl create mode 100644 src/skins/admin/en/modules/CDev/Paypal/settings/paypal_wps/body.tpl diff --git a/src/classes/XLite/Controller/Admin/PaymentMethod.php b/src/classes/XLite/Controller/Admin/PaymentMethod.php index 4fef9860e1..2fd8fd3ae1 100644 --- a/src/classes/XLite/Controller/Admin/PaymentMethod.php +++ b/src/classes/XLite/Controller/Admin/PaymentMethod.php @@ -75,7 +75,13 @@ protected function doActionUpdate() \XLite\Core\TopMessage::addInfo('The settings of payment method successfully updated'); - $this->setReturnURL($this->buildURL('payment_methods')); + $this->setReturnURL( + $this->buildURL( + 'payment_method', + null, + array('method_id' => \XLite\Core\Request::getInstance()->method_id) + ) + ); } } } diff --git a/src/classes/XLite/Module/CDev/Paypal/Main.php b/src/classes/XLite/Module/CDev/Paypal/Main.php index 2463cd7be6..67de9c616c 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Main.php +++ b/src/classes/XLite/Module/CDev/Paypal/Main.php @@ -61,39 +61,40 @@ public static function getModuleName() } /** - * Module version + * Module major version * * @return string * @see ____func_see____ * @since 1.0.0 */ - public static function getMinorVersion() + public static function getMajorVersion() { - return '0'; + return '1.1'; } + /** - * Module description + * Module version * * @return string * @see ____func_see____ * @since 1.0.0 */ - public static function getDescription() + public static function getMinorVersion() { - return 'Enables taking payments for your online store via Paypal services.'; + return '0'; } /** - * Determines if we need to show settings form link + * Module description * - * @return boolean + * @return string * @see ____func_see____ * @since 1.0.0 */ - public static function getSettingsForm() + public static function getDescription() { - return 'admin.php?target=paypal_settings'; + return 'Enables taking payments for your online store via Paypal services.'; } /** @@ -105,7 +106,7 @@ public static function getSettingsForm() */ public static function showSettingsForm() { - return true; + return false; } /** diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php similarity index 98% rename from src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php rename to src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php index e1367b7c11..3ae674db31 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/Iframe.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php @@ -33,7 +33,7 @@ * @see ____class_see____ * @since 1.0.0 */ -abstract class Iframe extends \XLite\Model\Payment\Base\Iframe +abstract class APaypal extends \XLite\Model\Payment\Base\Iframe { /** * Request types definition @@ -80,6 +80,24 @@ abstract class Iframe extends \XLite\Model\Payment\Base\Iframe */ protected $secureTokenId = null; + + /** + * getSettingsWidget + * + * @return string + * @see ____func_see____ + * @since 1.1.0 + */ + public function getSettingsWidget() + { + return '\XLite\Module\CDev\Paypal\View\PaypalSettings'; + } + + public function getPaypalMethodCode() + { + return self::PAYPAL_PAYMENT_METHOD_CODE; + } + /** * Get return type of the iframe-method: html redirect with destroying an iframe * diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php index 503d268d4e..855eb27334 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php @@ -34,8 +34,10 @@ * @see ____class_see____ * @since 1.0.0 */ -class PayflowLink extends \XLite\Module\CDev\Paypal\Model\Payment\Processor\Iframe +class PayflowLink extends \XLite\Module\CDev\Paypal\Model\Payment\Processor\APaypal { + const PAYPAL_PAYMENT_METHOD_CODE = 'Payflow Link'; + /** * Get allowed backend transactions * @@ -52,6 +54,18 @@ public function getAllowedTransactions() ); } + /** + * Get settings widget or template + * + * @return string Widget class name or template path + * @see ____func_see____ + * @since 1.0.1 + */ + public function getSettingsTemplateDir() + { + return 'modules/CDev/Paypal/settings/payflow_link'; + } + /** * Get payment method row checkout template * @@ -228,18 +242,6 @@ public function isMerchantCountryAllowed() ); } - /** - * Payment method has settings into Module settings section - * - * @return boolean - * @see ____func_see____ - * @since 1.0.0 - */ - public function hasModuleSettings() - { - return true; - } - /** * Define saved into transaction data schema * diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php new file mode 100644 index 0000000000..1e3a1d6bfa --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php @@ -0,0 +1,291 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\Model\Payment\Processor; + +/** + * Paypal Payments Advanced payment processor + * + * @package XLite + * @see ____class_see____ + * @since 1.0.0 + */ +class PaypalAdvanced extends \XLite\Module\CDev\Paypal\Model\Payment\Processor\APaypal +{ + const PAYPAL_PAYMENT_METHOD_CODE = 'Paypal Payments Advanced'; + + /** + * Get allowed backend transactions + * + * @return string Status code + * @see ____func_see____ + * @since 1.0.0 + */ + public function getAllowedTransactions() + { + return array( + \XLite\Model\Payment\BackendTransaction::TRAN_TYPE_CAPTURE, + \XLite\Model\Payment\BackendTransaction::TRAN_TYPE_VOID, + \XLite\Model\Payment\BackendTransaction::TRAN_TYPE_REFUND, + ); + } + + /** + * Get settings widget or template + * + * @return string Widget class name or template path + * @see ____func_see____ + * @since 1.0.1 + */ + public function getSettingsTemplateDir() + { + return 'modules/CDev/Paypal/settings/paypal_advanced'; + } + + /** + * Get payment method row checkout template + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCheckoutTemplate(\XLite\Model\Payment\Method $method) + { + return 'modules/CDev/Paypal/method.tpl'; + } + + /** + * Get the list of merchant countries where this payment processor can work + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getAllowedMerchantCountries() + { + return array('US', 'CA'); + } + + /** + * Process return + * + * @param \XLite\Model\Payment\Transaction $transaction Return-owner transaction + * + * @return void + * @access public + * @see ____func_see____ + * @since 1.0.0 + */ + public function processReturn(\XLite\Model\Payment\Transaction $transaction) + { + parent::processReturn($transaction); + + \XLite\Module\CDev\Paypal\Main::addLog( + 'processReturn', + \XLite\Core\Request::getInstance()->getData() + ); + + if (\XLite\Core\Request::getInstance()->cancel) { + $this->setDetail( + 'status', + 'Payment transaction is cancelled', + 'Status' + ); + $this->transaction->setNote('Payment transaction is cancelled'); + $this->transaction->setStatus($transaction::STATUS_FAILED); + + } + } + + /** + * Process callback + * + * @param \XLite\Model\Payment\Transaction $transaction Callback-owner transaction + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function processCallback(\XLite\Model\Payment\Transaction $transaction) + { + parent::processCallback($transaction); + + $request = \XLite\Core\Request::getInstance(); + + if (!$request->isPost()) { + // Callback request must be POST + $this->markCallbackRequestAsInvalid(static::t('Request type must be POST')); + + } elseif (!isset($request->RESULT)) { + // RESULT parameter must be presented in all callback requests + $this->markCallbackRequestAsInvalid(static::t('\'RESULT\' argument not found')); + + } else { + + $this->setDetail( + 'status', + isset($request->RESPMSG) ? $request->RESPMSG : 'Unknown', + 'Status' + ); + + $this->saveDataFromRequest(); + + if ('0' === $request->RESULT) { + // Transaction successful if RESULT == '0' + $status = $transaction::STATUS_SUCCESS; + + } else { + $status = $transaction::STATUS_FAILED; + } + + // Amount checking + if (isset($request->AMT) && !$this->checkTotal($request->AMT)) { + $status = $transaction::STATUS_FAILED; + } + + \XLite\Module\CDev\Paypal\Main::addLog( + 'processCallback', + array( + 'request' => $request, + 'status' => $status + ) + ); + + $this->transaction->setStatus($status); + + $this->updateInitialBackendTransaction($this->transaction, $status); + } + } + + public function updateInitialBackendTransaction(\XLite\Model\Payment\Transaction $transaction, $status) + { + $backendTransaction = $transaction->getInitialBackendTransaction(); + + if (isset($backendTransaction)) { + $backendTransaction->setStatus($status); + $this->saveDataFromRequest($backendTransaction); + } + } + + /** + * Check - payment method is configured or not + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @access public + * @see ____func_see____ + * @since 1.0.0 + */ + public function isConfigured(\XLite\Model\Payment\Method $method) + { + return parent::isConfigured($method) + && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->vendor) + && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->pwd) + && $this->isMerchantCountryAllowed(); + } + + /** + * Check - payment processor is applicable for specified order or not + * + * @param \XLite\Model\Order $order Order + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isApplicable(\XLite\Model\Order $order, \XLite\Model\Payment\Method $method) + { + return parent::isApplicable($order, $method) + && in_array(strtoupper($order->getCurrency()->getCode()), $this->getAllowedCurrencies($method)); + } + + /** + * Return true if merchant country is allowed for this payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isMerchantCountryAllowed() + { + return in_array( + \XLite\Core\Config::getInstance()->Company->location_country, + $this->getAllowedMerchantCountries() + ); + } + + /** + * Define saved into transaction data schema + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + protected function defineSavedData() + { + $data = parent::defineSavedData(); + + $data['TRANSTIME'] = 'Transaction timestamp'; + $data['PNREF'] = 'Unique Payflow transaction ID (PNREF)'; + $data['PPREF'] = 'Unique PayPal transaction ID (PPREF)'; + $data['TYPE'] = 'Transaction type'; + $data['RESULT'] = 'Transaction result code (RESULT)'; + $data['RESPMSG'] = 'Transaction result message (RESPMSG)'; + + $data['CORRELATIONID'] = 'Tracking ID'; // Can be provided to PayPal Merchant Technical Services to assist with debugging transactions. + + return $data; + } + + /** + * Get allowed currencies + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return array + * @see ____func_see____ + * @since 1.0.9 + */ + protected function getAllowedCurrencies(\XLite\Model\Payment\Method $method) + { + return array_merge( + parent::getAllowedCurrencies($method), + array( + 'USD', // US Dollar + 'CAD', // Canadian Dollar + 'AUD', // Australian Dollar + 'EUR', // Euro + 'GBP', // British Pound Sterling + 'JPY', // Japanese Yen + ) + ); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalWPS.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalWPS.php new file mode 100644 index 0000000000..91132571de --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalWPS.php @@ -0,0 +1,475 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.1 + */ + +namespace XLite\Module\CDev\Paypal\Model\Payment\Processor; + +/** + * Paypal Website Payments Standard payment processor + * + * @see ____class_see____ + * @since 1.0.1 + */ +class PaypalWPS extends \XLite\Model\Payment\Base\WebBased +{ + const PAYPAL_PAYMENT_METHOD_CODE = 'Paypal Website Payments Standard'; + + /** + * Mode value for testing + */ + const TEST_MODE = 'test'; + + /** + * IPN statuses + */ + const IPN_VERIFIED = 'verify'; + const IPN_DECLINED = 'decline'; + const IPN_REQUEST_ERROR = 'request_error'; + + + /** + * Get settings widget or template + * + * @return string Widget class name or template path + * @see ____func_see____ + * @since 1.0.1 + */ + public function getSettingsWidget() + { + return '\XLite\Module\CDev\Paypal\View\PaypalSettings'; + } + + /** + * Get settings widget or template + * + * @return string Widget class name or template path + * @see ____func_see____ + * @since 1.0.1 + */ + public function getSettingsTemplateDir() + { + return 'modules/CDev/Paypal/settings/paypal_wps'; + } + + /** + * Process callback + * + * @param \XLite\Model\Payment\Transaction $transaction Callback-owner transaction + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function processCallback(\XLite\Model\Payment\Transaction $transaction) + { + parent::processCallback($transaction); + + $request = \XLite\Core\Request::getInstance(); + + $status = $transaction::STATUS_FAILED; + + switch ($this->getIPNVerification()) { + + case self::IPN_DECLINED: + $status = $transaction::STATUS_FAILED; + $this->markCallbackRequestAsInvalid(static::t('IPN verification failed')); + + break; + + case self::IPN_REQUEST_ERROR: + $status = $transaction::STATUS_PENDING; + $this->markCallbackRequestAsInvalid(static::t('IPN HTTP error')); + + break; + + case self::IPN_VERIFIED: + + switch ($request->payment_status) { + case 'Completed': + + if ($transaction->getValue() == $request->mc_gross) { + + $status = $transaction::STATUS_SUCCESS; + + } else { + + $status = $transaction::STATUS_FAILED; + + $this->setDetail( + 'amount_error', + 'Payment transaction\'s amount is corrupted' . PHP_EOL + . 'Amount from request: ' . $request->mc_gross . PHP_EOL + . 'Amount from transaction: ' . $transaction->getValue(), + 'Hacking attempt' + ); + + $this->markCallbackRequestAsInvalid(static::t('Transaction amount mismatch')); + } + + break; + + case 'Pending': + $status = $transaction::STATUS_PENDING; + break; + + default: + + } + + default: + + } + + $this->saveDataFromRequest(); + + $this->transaction->setStatus($status); + } + + /** + * Process return + * + * @param \XLite\Model\Payment\Transaction $transaction Return-owner transaction + * + * @return void + * @see ____func_see____ + * @since 1.0.1 + */ + public function processReturn(\XLite\Model\Payment\Transaction $transaction) + { + parent::processReturn($transaction); + + if (\XLite\Core\Request::getInstance()->cancel) { + + $this->setDetail( + 'cancel', + 'Payment transaction is cancelled' + ); + + $this->transaction->setStatus($transaction::STATUS_FAILED); + + } elseif ($transaction::STATUS_INPROGRESS == $this->transaction->getStatus()) { + + $this->transaction->setStatus($transaction::STATUS_PENDING); + } + } + + /** + * Check - payment method is configured or not + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.1 + */ + public function isConfigured(\XLite\Model\Payment\Method $method) + { + return parent::isConfigured($method) + && $method->getSetting('account'); + } + + + /** + * Return URL for IPN verification transaction + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getIPNURL() + { + return $this->getFormURL() . '?cmd=_notify-validate'; + } + + /** + * Get IPN verification status + * + * @return boolean TRUE if verification status is received + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getIPNVerification() + { + $ipnRequest = new \XLite\Core\HTTP\Request($this->getIPNURL()); + $ipnRequest->body = \XLite\Core\Request::getInstance()->getData(); + + $ipnResult = $ipnRequest->sendRequest(); + + if ($ipnResult) { + + $result = (0 < preg_match('/VERIFIED/i', $ipnResult->body)) + ? self::IPN_VERIFIED + : self::IPN_DECLINED; + } else { + $result = self::IPN_REQUEST_ERROR; + + $this->setDetail( + 'ipn_http_error', + 'IPN HTTP error:' + ); + } + + return $result; + } + + /** + * Get redirect form URL + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getFormURL() + { + return $this->isTestMode() + ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' + : 'https://www.paypal.com/cgi-bin/webscr'; + } + + /** + * Return TRUE if the test mode is ON + * + * @return boolean + * @see ____func_see____ + * @since 1.0.1 + */ + protected function isTestMode() + { + return \XLite\View\FormField\Select\TestLiveMode::TEST === $this->getSetting('mode'); + } + + + /** + * Return ITEM NAME for request + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getItemName() + { + return $this->getSetting('description') . '(Order #' . $this->getOrder()->getOrderId() . ')'; + } + + /** + * Get redirect form fields list + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getFormFields() + { + $orderId = $this->getOrder()->getOrderId(); + + $fields = array( + 'charset' => 'UTF-8', + 'cmd' => '_ext-enter', + 'custom' => $orderId, + 'invoice' => $this->getSetting('prefix') . $orderId, + 'redirect_cmd' => '_xclick', + 'item_name' => $this->getItemName(), + 'rm' => '2', + 'email' => $this->getProfile()->getLogin(), + 'first_name' => $this->getProfile()->getBillingAddress()->getFirstname(), + 'last_name' => $this->getProfile()->getBillingAddress()->getLastname(), + 'business' => $this->getSetting('account'), + 'amount' => $this->getAmountValue(), + 'tax_cart' => 0, + 'shipping' => 0, + 'handling' => 0, + 'weight_cart' => 0, + 'currency_code' => $this->getOrder()->getCurrency()->getCode(), + + 'return' => $this->getReturnURL(null, true), + 'cancel_return' => $this->getReturnURL(null, true, true), + 'shopping_url' => $this->getReturnURL(null, true, true), + 'notify_url' => $this->getCallbackURL(null, true), + + 'country' => $this->getCountryFieldValue(), + 'state' => $this->getStateFieldValue(), + 'address1' => $this->getProfile()->getBillingAddress()->getStreet(), + 'address2' => 'n/a', + 'city' => $this->getProfile()->getBillingAddress()->getCity(), + 'zip' => $this->getProfile()->getBillingAddress()->getZipcode(), + 'upload' => 1, + 'bn' => 'LiteCommerce', + ); + + if ('Y' === $this->getSetting('address_override')) { + $fields['address_override'] = 1; + } + + $fields = array_merge($fields, $this->getPhone()); + + return $fields; + } + + /** + * Return amount value. Specific for Paypal + * + * @return string + * @see ____func_see____ + * @since 1.0.11 + */ + protected function getAmountValue() + { + $value = $this->transaction->getValue(); + + settype($value, 'float'); + + $value = sprintf('%0.2f', $value); + + return $value; + } + + /** + * Return Country field value. if no country defined we should use '' value + * + * @return string + * @see ____func_see____ + * @since 1.0.5 + */ + protected function getCountryFieldValue() + { + return $this->getProfile()->getBillingAddress()->getCountry() + ? $this->getProfile()->getBillingAddress()->getCountry()->getCode() + : ''; + } + + /** + * Return State field value. If country is US then state code must be used. + * + * @return string + * @see ____func_see____ + * @since 1.0.5 + */ + protected function getStateFieldValue() + { + return 'US' === $this->getCountryFieldValue() + ? $this->getProfile()->getBillingAddress()->getState()->getCode() + : $this->getProfile()->getBillingAddress()->getState()->getState(); + } + + /** + * Return Phone structure. specific for Paypal + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getPhone() + { + $result = array(); + + $phone = $this->getProfile()->getBillingAddress()->getPhone(); + + $phone = preg_replace('![^\d]+!', '', $phone); + + if ($phone) { + if ( + $this->getProfile()->getBillingAddress()->getCountry() + && 'US' == $this->getProfile()->getBillingAddress()->getCountry()->getCode() + ) { + $result = array( + 'night_phone_a' => substr($phone, -10, -7), + 'night_phone_b' => substr($phone, -7, -4), + 'night_phone_c' => substr($phone, -4), + ); + } else { + $result['night_phone_b'] = substr($phone, -10); + } + } + + return $result; + } + + /** + * Define saved into transaction data schema + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function defineSavedData() + { + return array( + 'secureid' => 'Transaction id', + 'mc_gross' => 'Payment amount', + 'payment_type' => 'Payment type', + 'payment_status' => 'Payment status', + 'pending_reason' => 'Pending reason', + 'reason_code' => 'Reason code', + 'mc_currency' => 'Payment currency', + 'auth_id' => 'Authorization identification number', + 'auth_status' => 'Status of authorization', + 'auth_exp' => 'Authorization expiration date and time', + 'auth_amount' => 'Authorization amount', + 'payer_id' => 'Unique customer ID', + 'payer_email' => 'Customer\'s primary email address', + 'txn_id' => 'Original transaction identification number', + ); + } + + /** + * Log redirect form + * + * @param array $list Form fields list + * + * @return void + * @see ____func_see____ + * @since 1.0.1 + */ + protected function logRedirect(array $list) + { + $list = $this->maskCell($list, 'account'); + + parent::logRedirect($list); + } + + /** + * Get allowed currencies + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return array + * @see ____func_see____ + * @since 1.0.9 + */ + protected function getAllowedCurrencies(\XLite\Model\Payment\Method $method) + { + return array_merge( + parent::getAllowedCurrencies($method), + array( + 'USD', 'CAD', 'EUR', 'GBP', 'AUD', + 'CHF', 'JPY', 'NOK', 'NZD', 'PLN', + 'SEK', 'SGD', 'HKD', 'DKK', 'HUF', + 'CZK', 'BRL', 'ILS', 'MYR', 'MXN', + 'PHP', 'TWD', 'THB', + ) + ); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php b/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php index a99d092535..16a9ab8a5b 100644 --- a/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php +++ b/src/classes/XLite/Module/CDev/Paypal/View/PaypalSettings.php @@ -28,45 +28,22 @@ namespace XLite\Module\CDev\Paypal\View; /** - * Moneybookers settings dialog + * Paypal payment method settings dialog * * @see ____class_see____ * @since 1.0.0 - * - * @ListChild (list="admin.center", zone="admin") */ class PaypalSettings extends \XLite\View\Dialog { - /** - * Return list of allowed targets - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - public static function getAllowedTargets() - { - $list = parent::getAllowedTargets(); - - $list[] = 'paypal_settings'; + const PARAM_PAYMENT_METHOD = 'paymentMethod'; - return $list; - } - - /** - * Register JS files - * - * @return array - * @see ____func_see____ - * @since 1.0.0 - */ - public function getJSFiles() + protected function defineWidgetParams() { - $list = parent::getJSFiles(); + parent::defineWidgetParams(); - $list[] = $this->getDir() . '/controller.js'; - - return $list; + $this->widgetParams += array( + self::PARAM_PAYMENT_METHOD => new \XLite\Model\WidgetParam\Object('Payment method', null), + ); } /** @@ -86,15 +63,27 @@ public function getCSSFiles() } /** - * Return templates directory name - * + * getPaypalMethodTemplate + * * @return string * @see ____func_see____ - * @since 1.0.0 + * @since 1.1.0 */ protected function getDir() { - return 'modules/CDev/Paypal/settings'; + return $this->getPaymentProcessor() ? $this->getPaymentProcessor()->getSettingsTemplateDir() : null; + } + + /** + * getPaymentProcessor + * + * @return \XLite\Payment\Base\Processor + * @see ____func_see____ + * @since 1.1.0 + */ + public function getPaymentProcessor() + { + return $this->getParam(self::PARAM_PAYMENT_METHOD) ? $this->getParam(self::PARAM_PAYMENT_METHOD)->getProcessor() : null; } // {{{ Content @@ -106,7 +95,7 @@ protected function getDir() * @see ____func_see____ * @since 1.0.0 */ - protected function getRegisterURL() + protected function getPaypalRegisterURL() { return 'http://www.paypal.com/'; } diff --git a/src/classes/XLite/Module/CDev/Paypal/install.yaml b/src/classes/XLite/Module/CDev/Paypal/install.yaml index 9dc97b3efe..b12e0ab080 100644 --- a/src/classes/XLite/Module/CDev/Paypal/install.yaml +++ b/src/classes/XLite/Module/CDev/Paypal/install.yaml @@ -9,69 +9,52 @@ # @since 1.0.0 XLite\Model\Payment\Method: - - { service_name: 'Paypal Payflow Link', class: 'Module\CDev\Paypal\Model\Payment\Processor\PayflowLink', translations: [{ code: en, name: 'Payflow Link' }] } -# - { service_name: 'Paypal Payments Advanced', class: 'Module\CDev\Paypal\Model\Payment\Processor\PayflowLink', translations: [{ code: en, name: 'Paypal Payments Advanced' }] } - -XLite\Model\Config: - - name: vendor - category: 'CDev\Paypal' - type: text - orderby: 100 - value: 12345 - translations: - - code: en - option_name: 'Merchant login' - option_comment: 'Merchant login ID that was created when the merchant registered for their PayPal Payments Advanced or Payflow Link account.' - - name: user - category: 'CDev\Paypal' - type: 'text' - orderby: 200 - value: 12345 - translations: - - code: en - option_name: 'User' - option_comment: 'Username of the user that is authorized to run transactions' - - name: pwd - category: 'CDev\Paypal' - type: text - orderby: 300 - value: 12345 - translations: - - code: en - option_name: 'Password' - option_comment: 'The password that the merchant created for the username specified in the USER field' - - name: partner - category: 'CDev\Paypal' - type: text - orderby: 400 - value: 'Paypal' - translations: - - code: en - option_name: 'Partner' - option_comment: 'The ID provided to the merchant by the authorized PayPal Reseller who registered them for their PayPal Payments Advanced or Payflow Link account. If the merchant registered their account directly through PayPal, the merchant should supply the value PayPal.' - - name: prefix - category: 'CDev\Paypal' - type: text - orderby: 500 - value: 'mystore_' + - service_name: PayflowLink + class: 'Module\CDev\Paypal\Model\Payment\Processor\PayflowLink' translations: - code: en - option_name: 'Invoice number prefix' - option_comment: 'Prefix for identification of the transaction on paypal.com: you would find transaction by this prefix and order ID' - - name: transaction_type - category: 'CDev\Paypal' - type: text - orderby: 600 - value: 'S' + name: 'Payflow Link' + settings: + - name: vendor + - name: user + - name: pwd + - name: partner + value: Paypal + - name: prefix + value: mystore_ + - name: transaction_type + value: S + - name: test + value: Y + + - service_name: PaypalAdvanced + class: 'Module\CDev\Paypal\Model\Payment\Processor\PaypalAdvanced' translations: - code: en - option_name: 'Initial transaction type (S - sale, A - authorize)' - - name: test - category: 'CDev\Paypal' - type: checkbox - orderby: 600 - value: true + name: 'Paypal Payments Advanced' + settings: + - name: vendor + - name: user + - name: pwd + - name: partner + value: Paypal + - name: prefix + value: mystore_ + - name: transaction_type + value: S + - name: test + value: Y + + - service_name: PaypalWPSUS + class: 'Module\CDev\Paypal\Model\Payment\Processor\PaypalWPS' translations: - code: en - option_name: 'Test mode' + name: 'Paypal Website Payments Standard' + settings: + - name: account + - name: description + - name: prefix + - name: mode + - name: address_override + diff --git a/src/classes/XLite/View/Payment/Method.php b/src/classes/XLite/View/Payment/Method.php index a5ccd7fde8..0bef0dac58 100644 --- a/src/classes/XLite/View/Payment/Method.php +++ b/src/classes/XLite/View/Payment/Method.php @@ -106,7 +106,7 @@ public function isWidgetSettings() protected function getHead() { return $this->getPaymentMethod() - ? static::t('{{paymentMethod}} settings', array('paymentMethod' => $this->getPaymentMethod()->getServiceName())) + ? static::t('{{paymentMethod}} settings', array('paymentMethod' => $this->getPaymentMethod()->getName())) : 'Payment method settings'; } diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl b/src/skins/admin/en/modules/CDev/Paypal/settings/payflow_link/body.tpl similarity index 66% rename from src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl rename to src/skins/admin/en/modules/CDev/Paypal/settings/payflow_link/body.tpl index ad441f4b70..d33a1eef7d 100644 --- a/src/skins/admin/en/modules/CDev/Paypal/settings/body.tpl +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/payflow_link/body.tpl @@ -12,40 +12,37 @@

    {t(#Use this page to configure your store to communicate with your Payment Processing Gateway. Complete the required fields below and press the "Update" button.#)}

    -

    {t(#To have access to Paypal services please register here for an account if you don't have one yet#)}: {getRegisterURL()}

    +

    {t(#To have access to Paypal services please register here for an account if you don't have one yet#)}: {getPaypalRegisterURL()}


    - - - - +
    -
      +
      • - +
        {t(#Your merchant login ID that you created when you registered for the account.#)}
      • - +
        {t(#If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users on the account, USER has the same as VENDOR.#)}
      • - +
        {t(#The password that you defined while registering for the account.#)}
      • - +
        {t(#The ID provided to you by the authorized PayPal Reseller who registered you for the Gateway gateway. If you purchased your account directly from PayPal, use PayPal.#)}
      • @@ -57,15 +54,18 @@
      • - + +
      • - +
      • @@ -77,7 +77,7 @@
      • - +
        {t(#(optional: This options is relevant only if you share your Paypal account with other online shops)#)}
      • @@ -85,7 +85,4 @@
        - - - - +
    diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/paypal_advanced/body.tpl b/src/skins/admin/en/modules/CDev/Paypal/settings/paypal_advanced/body.tpl new file mode 100644 index 0000000000..d33a1eef7d --- /dev/null +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/paypal_advanced/body.tpl @@ -0,0 +1,88 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Moneybookers settings + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +

    {t(#Use this page to configure your store to communicate with your Payment Processing Gateway. Complete the required fields below and press the "Update" button.#)}

    + +

    {t(#To have access to Paypal services please register here for an account if you don't have one yet#)}: {getPaypalRegisterURL()}

    + +
    + +
    + + + +
      + +
    • + + +
      {t(#Your merchant login ID that you created when you registered for the account.#)}
      +
    • + +
    • + + +
      {t(#If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users on the account, USER has the same as VENDOR.#)}
      +
    • + +
    • + + +
      {t(#The password that you defined while registering for the account.#)}
      +
    • + +
    • + + +
      {t(#The ID provided to you by the authorized PayPal Reseller who registered you for the Gateway gateway. If you purchased your account directly from PayPal, use PayPal.#)}
      +
    • + +
    + + + +
      + +
    • + + +
    • + +
    • + + +
    • + + +
    + +

    {t(#You can define an order id prefix, which would precede each order number in your shop, to make it unique (each transaction id must be unique for a Paypal account)#)}

    + +
      + +
    • + + +
      {t(#(optional: This options is relevant only if you share your Paypal account with other online shops)#)}
      +
    • + +
    + +
    + +
    diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/paypal_wps/body.tpl b/src/skins/admin/en/modules/CDev/Paypal/settings/paypal_wps/body.tpl new file mode 100644 index 0000000000..ed8e6095b9 --- /dev/null +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/paypal_wps/body.tpl @@ -0,0 +1,77 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Paypal Website Payments Standard configuration page + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.1 + *} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + *{t(#The address specified with automatic fill-in variables overrides the PayPal member’s stored address.
    Buyers see +the addresses that you pass in, but they cannot edit them. PayPal does not show addresses if they are invalid or omitted.#):h} +
    diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/style.css b/src/skins/admin/en/modules/CDev/Paypal/settings/style.css index 1b3426631a..51cbe97ea8 100644 --- a/src/skins/admin/en/modules/CDev/Paypal/settings/style.css +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/style.css @@ -10,7 +10,7 @@ * @since 1.0.0 */ -.paypal-settings #main { +.paypal-settings { max-width: 1000px; } @@ -37,7 +37,6 @@ font-weight: bold; } -.pp-activation label, .pp-secret-word label, .pp-options label { diff --git a/src/skins/admin/en/payment/method/body.tpl b/src/skins/admin/en/payment/method/body.tpl index dcd49ca5e1..4fad221456 100644 --- a/src/skins/admin/en/payment/method/body.tpl +++ b/src/skins/admin/en/payment/method/body.tpl @@ -15,7 +15,7 @@ {if:isWidgetSettings()} - + {else:} {end:} From efbefd1fac3c485b7f65a2b74b1cef1b82d7c808 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Tue, 17 Jul 2012 15:49:47 +0400 Subject: [PATCH 230/562] [*] Paypal: Expres Checkout payment method initially added [*] Common checkout buttons separator widget is added (- OR -) --- src/classes/XLite/Logger.php | 6 + src/classes/XLite/Model/Order.php | 2 +- .../Model/Payment/BackendTransaction.php | 12 + .../XLite/Model/Payment/Base/Processor.php | 16 +- .../Module/CDev/Paypal/Core/PayflowProAPI.php | 95 ---- src/classes/XLite/Module/CDev/Paypal/Main.php | 25 + .../Model/Payment/Processor/APaypal.php | 34 +- .../Payment/Processor/ExpressCheckout.php | 504 ++++++++++++++++++ .../Model/Payment/Processor/PayflowLink.php | 4 +- .../Payment/Processor/PaypalAdvanced.php | 4 +- .../Paypal/View/Button/ButtonsSeparator.php | 52 ++ .../Paypal/View/Button/ExpressCheckout.php | 111 ++++ .../Module/CDev/Paypal/View/Minicart.php | 53 ++ .../XLite/Module/CDev/Paypal/install.yaml | 18 + .../XLite/View/Button/ButtonsSeparator.php | 54 ++ .../Details/Admin/PaymentActionsUnit.php | 2 +- .../Paypal/settings/express_checkout/body.tpl | 88 +++ .../default/en/button/buttons_separator.tpl | 17 + src/skins/default/en/css/lc.css | 18 + .../Paypal/button/cart_express_checkout.tpl | 17 + .../CDev/Paypal/button/express_checkout.tpl | 15 + .../default/en/modules/CDev/Paypal/style.css | 19 + 22 files changed, 1050 insertions(+), 116 deletions(-) delete mode 100644 src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/View/Button/ButtonsSeparator.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/View/Button/ExpressCheckout.php create mode 100644 src/classes/XLite/Module/CDev/Paypal/View/Minicart.php create mode 100644 src/classes/XLite/View/Button/ButtonsSeparator.php create mode 100644 src/skins/admin/en/modules/CDev/Paypal/settings/express_checkout/body.tpl create mode 100644 src/skins/default/en/button/buttons_separator.tpl create mode 100644 src/skins/default/en/modules/CDev/Paypal/button/cart_express_checkout.tpl create mode 100644 src/skins/default/en/modules/CDev/Paypal/button/express_checkout.tpl create mode 100644 src/skins/default/en/modules/CDev/Paypal/style.css diff --git a/src/classes/XLite/Logger.php b/src/classes/XLite/Logger.php index 97a7e21313..98d233a9a9 100644 --- a/src/classes/XLite/Logger.php +++ b/src/classes/XLite/Logger.php @@ -354,6 +354,12 @@ public function logCustom($type, $message, $useBackTrace = false) . 'IP: ' . (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'n/a') . PHP_EOL . PHP_EOL; + // Add debug backtrace + if ($useBackTrace) { + $backTrace = $this->getBackTrace(); + $message .= PHP_EOL . 'Backtrace:' . PHP_EOL . "\t" . implode(PHP_EOL . "\t", $backTrace) . PHP_EOL; + } + @file_put_contents($path, $message, FILE_APPEND); return $path; diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index 2bd2073c53..67b3898062 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -1310,7 +1310,7 @@ protected function addPaymentTransaction(\XLite\Model\Payment\Method $method, $v $transaction->setMethodLocalName($method->getName()); $transaction->setStatus($transaction::STATUS_INITIALIZED); $transaction->setValue($value); - $transaction->setType($method->getProcessor()->getInitialTransactionType()); + $transaction->setType($method->getProcessor()->getInitialTransactionType($method)); \XLite\Core\Database::getEM()->persist($transaction); } diff --git a/src/classes/XLite/Model/Payment/BackendTransaction.php b/src/classes/XLite/Model/Payment/BackendTransaction.php index 85cbb9a857..fdffadf2b1 100644 --- a/src/classes/XLite/Model/Payment/BackendTransaction.php +++ b/src/classes/XLite/Model/Payment/BackendTransaction.php @@ -172,6 +172,18 @@ public function getChargeValueModifier() return $value; } + /** + * Get payment method object related to the parent payment transaction + * + * @return \XLite\Model\Payment\Method + * @see ____func_see____ + * @since 1.1.0 + */ + public function getPaymentMethod() + { + return $this->getPaymentTransaction()->getPaymentMethod(); + } + /** * Check - transaction is failed or not * diff --git a/src/classes/XLite/Model/Payment/Base/Processor.php b/src/classes/XLite/Model/Payment/Base/Processor.php index 9e8d57ee66..b5cd8387c3 100644 --- a/src/classes/XLite/Model/Payment/Base/Processor.php +++ b/src/classes/XLite/Model/Payment/Base/Processor.php @@ -106,7 +106,17 @@ public function isTransactionAllowed(\XLite\Model\Payment\Transaction $transacti return $result; } - public function doTransaction(\XLite\Model\Payment\Transaction $transaction, string $transactionType) + /** + * doTransaction + * + * @param \XLite\Model\Payment\Transaction $transaction Payment transaction object + * @param string $transactionType Backend transaction type + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + public function doTransaction(\XLite\Model\Payment\Transaction $transaction, $transactionType) { if ($this->isTransactionAllowed($transaction, $transactionType)) { @@ -266,11 +276,13 @@ public function getModule() /** * Get initial transaction type (used when customer places order) * + * @param \XLite\Model\Payment\Method $method Payment method object + * * @return string * @see ____func_see____ * @since 1.0.0 */ - public function getInitialTransactionType() + public function getInitialTransactionType($method = null) { return \XLite\Model\Payment\BackendTransaction::TRAN_TYPE_SALE; } diff --git a/src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php b/src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php deleted file mode 100644 index b88cb9f544..0000000000 --- a/src/classes/XLite/Module/CDev/Paypal/Core/PayflowProAPI.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - * @link http://www.litecommerce.com/ - * @see ____file_see____ - * @since 1.0.0 - */ - -namespace XLite\Module\CDev\Paypal\Core; - -/** - * Paypal Payflow Pro API (name-value pairs) implementation - * - * @see ____class_see____ - * @since 1.0.0 - */ -class PayflowProAPI extends \XLite\Base\Singleton -{ - public function preprocessRequestData($data) - { - } - - public function sendRequest($data) - { - } - - public function parseResponse($response) - { - } - - public function getRequestHeaders() - { - } - - public function getRequestTimeout() - { - return 45; // Default value recommended by Paypal; Max value - 120 seconds - } - - public function getCommonRequestParams($trxType) - { - return array( - // Merchant login ID that was created when the merchant registered for their PayPal Payments Advanced or Payflow Link account - 'VENDOR' => \XLite\Core\Config::getInstance()->CDev->Paypal->vendor, - - // Username of the user that is authorized to run transactions - 'USER' => (\XLite\Core\Config::getInstance()->CDev->Paypal->user ?: \XLite\Core\Config::getInstance()->CDev->Paypal->vendor), - - // The ID provided to the merchant by the authorized PayPal Reseller who registered them for their PayPal Payments Advanced or Payflow Link account - 'PARTNER' => 'Paypal', - - // The password that the merchant created for the username specified in the USER field - 'PWD' => \XLite\Core\Config::getInstance()->CDev->Paypal->pwd, - - // Transaction type: - // S (sale) - // A (authorization) - // D (delayed capture) - // V (void) - // C (credit) - 'TRXTYPE' => $trxType, - - 'BUTTONSOURCE' => 'Qualiteam_Cart_LC_PHS', - ); - } - - /* - public function method() - { - } - - public function method() - { - } - */ -} diff --git a/src/classes/XLite/Module/CDev/Paypal/Main.php b/src/classes/XLite/Module/CDev/Paypal/Main.php index 67de9c616c..12a8f409a7 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Main.php +++ b/src/classes/XLite/Module/CDev/Paypal/Main.php @@ -140,4 +140,29 @@ public static function addLog($message = null, $data = null) $msg ); } + + /** + * Returns true if ExpressCheckout payment is enabled + * + * @return boolean + * @see ____func_see____ + * @since 1.1.0 + */ + public static function isExpressCheckoutEnabled() + { + static $result; + + if (!isset($result)) { + $paymentMethod = \XLite\Core\Database::getRepo('XLite\Model\Payment\Method') + ->findOneBy( + array( + 'service_name' => 'ExpressCheckout', + 'enabled' => true + ) + ); + $result = !empty($paymentMethod) && $paymentMethod->isEnabled(); + } + + return $result; + } } diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php index 3ae674db31..9579270c1c 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php @@ -113,13 +113,15 @@ public function getReturnType() /** * Get initial transaction type (used when customer places order) * + * @param \XLite\Model\Payment\Method $method Payment method object + * * @return string * @see ____func_see____ * @since 1.0.0 */ - public function getInitialTransactionType() + public function getInitialTransactionType($method = null) { - return 'A' == \XLite\Core\Config::getInstance()->CDev->Paypal->transaction_type + return 'A' == ($method ? $method->getSetting('transaction_type') : $this->getSetting('transaction_type')) ? \XLite\Model\Payment\BackendTransaction::TRAN_TYPE_AUTH : \XLite\Model\Payment\BackendTransaction::TRAN_TYPE_SALE; } @@ -165,9 +167,7 @@ protected function getAPIURL() */ protected function isTestMode() { - \XLite\Module\CDev\Paypal\Main::addLog('isTestMode()', \XLite\Core\Config::getInstance()->CDev->Paypal->test); - - return true;\XLite\Core\Config::getInstance()->CDev->Paypal->test; + return 'Y' == $this->getSetting('test'); } /** @@ -217,7 +217,7 @@ protected function getIframeParams($token) 'SECURETOKENID=' . $this->getSecureTokenId(), ); - if ($this->isTestMode()) { + if ($this->isTestMode($this->transaction->getPaymentMethod())) { $params[] = 'MODE=TEST'; } @@ -269,7 +269,7 @@ protected function getSecureToken() $token = null; $this->transaction->setPublicId( - \XLite\Core\Config::getInstance()->CDev->Paypal->prefix + $this->getSetting('prefix') . $this->transaction->getTransactionId() ); @@ -401,7 +401,8 @@ protected function doRefund(\XLite\Model\Payment\BackendTransaction $transaction * Do HTTPS request to Paypal server with data set depended on $requestType. * Returns an array represented a parsed response from Paypal * - * @param string $requestType Type of request + * @param string $requestType Type of request + * @param \XLite\Model\Payment\BackendTransaction $transaction Backend transaction object * * @return array * @see ____func_see____ @@ -411,6 +412,10 @@ protected function doRequest($requestType, $transaction = null) { $responseData = array(); + if (!isset($this->transaction)) { + $this->transaction = $transaction; + } + $params = $this->getRequestParams($requestType, $transaction); $request = new \XLite\Core\HTTP\Request($this->getPostURL()); @@ -474,6 +479,9 @@ protected function getParsedResponse($response) /** * Get array of params for CREATESCURETOKEN request * + * @param string $requestType Request type + * @param \XLite\Model\Payment\BackendTransaction $transaction Backend transaction object + * * @return array * @see ____func_see____ * @since 1.0.0 @@ -505,10 +513,10 @@ protected function getRequestParams($requestType, $transaction = null) protected function getCommonRequestParams() { return array( - 'VENDOR' => \XLite\Core\Config::getInstance()->CDev->Paypal->vendor, - 'USER' => \XLite\Core\Config::getInstance()->CDev->Paypal->user ?: \XLite\Core\Config::getInstance()->CDev->Paypal->vendor, - 'PWD' => \XLite\Core\Config::getInstance()->CDev->Paypal->pwd, - 'PARTNER' => \XLite\Core\Config::getInstance()->CDev->Paypal->partner ?: 'Paypal', + 'VENDOR' => $this->getSetting('vendor'), + 'USER' => $this->getSetting('user') ?: $this->getSetting('vendor'), + 'PWD' => $this->getSetting('pwd'), + 'PARTNER' => $this->getSetting('partner') ?: 'Paypal', 'BUTTONSOURCE' => 'Qualiteam_Cart_LC_PHS', 'VERBOSITY' => 'HIGH', ); @@ -526,7 +534,7 @@ protected function getCreateSecureTokenRequestParams() $postData = array( 'CREATESECURETOKEN' => 'Y', 'SECURETOKENID' => $this->getSecureTokenId(), - 'TRXTYPE' => \XLite\Core\Config::getInstance()->CDev->Paypal->transaction_type, + 'TRXTYPE' => $this->getSetting('transaction_type'), 'AMT' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), 'ITEMAMT' => $this->getLineItems($lineItems), 'BILLTOFIRSTNAME' => $this->getProfile()->getBillingAddress()->getFirstname(), diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php new file mode 100644 index 0000000000..d2f6e864ac --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php @@ -0,0 +1,504 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.1 + */ + +namespace XLite\Module\CDev\Paypal\Model\Payment\Processor; + +/** + * Paypal Express Checkout payment processor + * + * @see ____class_see____ + * @since 1.0.1 + */ +class ExpressCheckout extends \XLite\Model\Payment\Base\WebBased +{ + const PAYPAL_PAYMENT_METHOD_CODE = 'Paypal Express Checkout'; + + /** + * Mode value for testing + */ + const TEST_MODE = 'test'; + + /** + * IPN statuses + */ + const IPN_VERIFIED = 'verify'; + const IPN_DECLINED = 'decline'; + const IPN_REQUEST_ERROR = 'request_error'; + + + /** + * Get settings widget or template + * + * @return string Widget class name or template path + * @see ____func_see____ + * @since 1.0.1 + */ + public function getSettingsWidget() + { + return '\XLite\Module\CDev\Paypal\View\PaypalSettings'; + } + + /** + * Get settings widget or template + * + * @return string Widget class name or template path + * @see ____func_see____ + * @since 1.0.1 + */ + public function getSettingsTemplateDir() + { + return 'modules/CDev/Paypal/settings/express_checkout'; + } + + /** + * Process callback + * + * @param \XLite\Model\Payment\Transaction $transaction Callback-owner transaction + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function processCallback(\XLite\Model\Payment\Transaction $transaction) + { + parent::processCallback($transaction); + + $request = \XLite\Core\Request::getInstance(); + + $status = $transaction::STATUS_FAILED; + + switch ($this->getIPNVerification()) { + + case self::IPN_DECLINED: + $status = $transaction::STATUS_FAILED; + $this->markCallbackRequestAsInvalid(static::t('IPN verification failed')); + + break; + + case self::IPN_REQUEST_ERROR: + $status = $transaction::STATUS_PENDING; + $this->markCallbackRequestAsInvalid(static::t('IPN HTTP error')); + + break; + + case self::IPN_VERIFIED: + + switch ($request->payment_status) { + case 'Completed': + + if ($transaction->getValue() == $request->mc_gross) { + + $status = $transaction::STATUS_SUCCESS; + + } else { + + $status = $transaction::STATUS_FAILED; + + $this->setDetail( + 'amount_error', + 'Payment transaction\'s amount is corrupted' . PHP_EOL + . 'Amount from request: ' . $request->mc_gross . PHP_EOL + . 'Amount from transaction: ' . $transaction->getValue(), + 'Hacking attempt' + ); + + $this->markCallbackRequestAsInvalid(static::t('Transaction amount mismatch')); + } + + break; + + case 'Pending': + $status = $transaction::STATUS_PENDING; + break; + + default: + + } + + default: + + } + + $this->saveDataFromRequest(); + + $this->transaction->setStatus($status); + } + + /** + * Process return + * + * @param \XLite\Model\Payment\Transaction $transaction Return-owner transaction + * + * @return void + * @see ____func_see____ + * @since 1.0.1 + */ + public function processReturn(\XLite\Model\Payment\Transaction $transaction) + { + parent::processReturn($transaction); + + if (\XLite\Core\Request::getInstance()->cancel) { + + $this->setDetail( + 'cancel', + 'Payment transaction is cancelled' + ); + + $this->transaction->setStatus($transaction::STATUS_FAILED); + + } elseif ($transaction::STATUS_INPROGRESS == $this->transaction->getStatus()) { + + $this->transaction->setStatus($transaction::STATUS_PENDING); + } + } + + /** + * Check - payment method is configured or not + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return boolean + * @access public + * @see ____func_see____ + * @since 1.0.0 + */ + public function isConfigured(\XLite\Model\Payment\Method $method) + { + return parent::isConfigured($method) + && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->vendor) + && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->pwd) + && $this->isMerchantCountryAllowed(); + } + + /** + * Return true if merchant country is allowed for this payment method + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + public function isMerchantCountryAllowed() + { + return in_array( + \XLite\Core\Config::getInstance()->Company->location_country, + $this->getAllowedMerchantCountries() + ); + } + + /** + * Get the list of merchant countries where this payment processor can work + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getAllowedMerchantCountries() + { + return array('US', 'CA'); + } + + /** + * Return URL for IPN verification transaction + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getIPNURL() + { + return $this->getFormURL() . '?cmd=_notify-validate'; + } + + /** + * Get IPN verification status + * + * @return boolean TRUE if verification status is received + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getIPNVerification() + { + $ipnRequest = new \XLite\Core\HTTP\Request($this->getIPNURL()); + $ipnRequest->body = \XLite\Core\Request::getInstance()->getData(); + + $ipnResult = $ipnRequest->sendRequest(); + + if ($ipnResult) { + + $result = (0 < preg_match('/VERIFIED/i', $ipnResult->body)) + ? self::IPN_VERIFIED + : self::IPN_DECLINED; + } else { + $result = self::IPN_REQUEST_ERROR; + + $this->setDetail( + 'ipn_http_error', + 'IPN HTTP error:' + ); + } + + return $result; + } + + /** + * Get redirect form URL + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getFormURL() + { + return $this->isTestMode() + ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' + : 'https://www.paypal.com/cgi-bin/webscr'; + } + + /** + * Return TRUE if the test mode is ON + * + * @return boolean + * @see ____func_see____ + * @since 1.0.1 + */ + protected function isTestMode() + { + return \XLite\View\FormField\Select\TestLiveMode::TEST === $this->getSetting('mode'); + } + + + /** + * Return ITEM NAME for request + * + * @return string + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getItemName() + { + return $this->getSetting('description') . '(Order #' . $this->getOrder()->getOrderId() . ')'; + } + + /** + * Get redirect form fields list + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getFormFields() + { + $orderId = $this->getOrder()->getOrderId(); + + $fields = array( + 'charset' => 'UTF-8', + 'cmd' => '_ext-enter', + 'custom' => $orderId, + 'invoice' => $this->getSetting('prefix') . $orderId, + 'redirect_cmd' => '_xclick', + 'item_name' => $this->getItemName(), + 'rm' => '2', + 'email' => $this->getProfile()->getLogin(), + 'first_name' => $this->getProfile()->getBillingAddress()->getFirstname(), + 'last_name' => $this->getProfile()->getBillingAddress()->getLastname(), + 'business' => $this->getSetting('account'), + 'amount' => $this->getAmountValue(), + 'tax_cart' => 0, + 'shipping' => 0, + 'handling' => 0, + 'weight_cart' => 0, + 'currency_code' => $this->getOrder()->getCurrency()->getCode(), + + 'return' => $this->getReturnURL(null, true), + 'cancel_return' => $this->getReturnURL(null, true, true), + 'shopping_url' => $this->getReturnURL(null, true, true), + 'notify_url' => $this->getCallbackURL(null, true), + + 'country' => $this->getCountryFieldValue(), + 'state' => $this->getStateFieldValue(), + 'address1' => $this->getProfile()->getBillingAddress()->getStreet(), + 'address2' => 'n/a', + 'city' => $this->getProfile()->getBillingAddress()->getCity(), + 'zip' => $this->getProfile()->getBillingAddress()->getZipcode(), + 'upload' => 1, + 'bn' => 'LiteCommerce', + ); + + if ('Y' === $this->getSetting('address_override')) { + $fields['address_override'] = 1; + } + + $fields = array_merge($fields, $this->getPhone()); + + return $fields; + } + + /** + * Return amount value. Specific for Paypal + * + * @return string + * @see ____func_see____ + * @since 1.0.11 + */ + protected function getAmountValue() + { + $value = $this->transaction->getValue(); + + settype($value, 'float'); + + $value = sprintf('%0.2f', $value); + + return $value; + } + + /** + * Return Country field value. if no country defined we should use '' value + * + * @return string + * @see ____func_see____ + * @since 1.0.5 + */ + protected function getCountryFieldValue() + { + return $this->getProfile()->getBillingAddress()->getCountry() + ? $this->getProfile()->getBillingAddress()->getCountry()->getCode() + : ''; + } + + /** + * Return State field value. If country is US then state code must be used. + * + * @return string + * @see ____func_see____ + * @since 1.0.5 + */ + protected function getStateFieldValue() + { + return 'US' === $this->getCountryFieldValue() + ? $this->getProfile()->getBillingAddress()->getState()->getCode() + : $this->getProfile()->getBillingAddress()->getState()->getState(); + } + + /** + * Return Phone structure. specific for Paypal + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function getPhone() + { + $result = array(); + + $phone = $this->getProfile()->getBillingAddress()->getPhone(); + + $phone = preg_replace('![^\d]+!', '', $phone); + + if ($phone) { + if ( + $this->getProfile()->getBillingAddress()->getCountry() + && 'US' == $this->getProfile()->getBillingAddress()->getCountry()->getCode() + ) { + $result = array( + 'night_phone_a' => substr($phone, -10, -7), + 'night_phone_b' => substr($phone, -7, -4), + 'night_phone_c' => substr($phone, -4), + ); + } else { + $result['night_phone_b'] = substr($phone, -10); + } + } + + return $result; + } + + /** + * Define saved into transaction data schema + * + * @return array + * @see ____func_see____ + * @since 1.0.1 + */ + protected function defineSavedData() + { + return array( + 'secureid' => 'Transaction id', + 'mc_gross' => 'Payment amount', + 'payment_type' => 'Payment type', + 'payment_status' => 'Payment status', + 'pending_reason' => 'Pending reason', + 'reason_code' => 'Reason code', + 'mc_currency' => 'Payment currency', + 'auth_id' => 'Authorization identification number', + 'auth_status' => 'Status of authorization', + 'auth_exp' => 'Authorization expiration date and time', + 'auth_amount' => 'Authorization amount', + 'payer_id' => 'Unique customer ID', + 'payer_email' => 'Customer\'s primary email address', + 'txn_id' => 'Original transaction identification number', + ); + } + + /** + * Log redirect form + * + * @param array $list Form fields list + * + * @return void + * @see ____func_see____ + * @since 1.0.1 + */ + protected function logRedirect(array $list) + { + $list = $this->maskCell($list, 'account'); + + parent::logRedirect($list); + } + + /** + * Get allowed currencies + * + * @param \XLite\Model\Payment\Method $method Payment method + * + * @return array + * @see ____func_see____ + * @since 1.0.9 + */ + protected function getAllowedCurrencies(\XLite\Model\Payment\Method $method) + { + return array_merge( + parent::getAllowedCurrencies($method), + array( + 'USD', 'CAD', 'EUR', 'GBP', 'AUD', + 'CHF', 'JPY', 'NOK', 'NZD', 'PLN', + 'SEK', 'SGD', 'HKD', 'DKK', 'HUF', + 'CZK', 'BRL', 'ILS', 'MYR', 'MXN', + 'PHP', 'TWD', 'THB', + ) + ); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php index 855eb27334..a28f9642f1 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php @@ -206,8 +206,8 @@ public function updateInitialBackendTransaction(\XLite\Model\Payment\Transaction public function isConfigured(\XLite\Model\Payment\Method $method) { return parent::isConfigured($method) - && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->vendor) - && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->pwd) + && $method->getSetting('vendor') + && $method->getSetting('pwd') && $this->isMerchantCountryAllowed(); } diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php index 1e3a1d6bfa..9b3c35ae6e 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PaypalAdvanced.php @@ -206,8 +206,8 @@ public function updateInitialBackendTransaction(\XLite\Model\Payment\Transaction public function isConfigured(\XLite\Model\Payment\Method $method) { return parent::isConfigured($method) - && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->vendor) - && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->pwd) + && $method->getSetting('vendor') + && $method->getSetting('pwd') && $this->isMerchantCountryAllowed(); } diff --git a/src/classes/XLite/Module/CDev/Paypal/View/Button/ButtonsSeparator.php b/src/classes/XLite/Module/CDev/Paypal/View/Button/ButtonsSeparator.php new file mode 100644 index 0000000000..fee2571d99 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/View/Button/ButtonsSeparator.php @@ -0,0 +1,52 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\View\Button; + +/** + * Checkout buttons separator + * + * @see ____class_see____ + * @since 1.0.0 + * + * @ListChild (list="cart.panel.totals", weight="90") + * @ListChild (list="minicart.horizontal.buttons", weight="90") + */ +class ButtonsSeparator extends \XLite\View\Button\ButtonsSeparator +{ + /** + * isExpressCheckoutEnabled + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + protected function isVisible() + { + return parent::isVisible() && \XLite\Module\CDev\Paypal\Main::isExpressCheckoutEnabled(); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/View/Button/ExpressCheckout.php b/src/classes/XLite/Module/CDev/Paypal/View/Button/ExpressCheckout.php new file mode 100644 index 0000000000..678b086f60 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/View/Button/ExpressCheckout.php @@ -0,0 +1,111 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\View\Button; + +/** + * Express Checkout button + * + * @see ____class_see____ + * @since 1.0.0 + * + * @ListChild (list="cart.panel.totals", weight="100") + * @ListChild (list="minicart.horizontal.buttons", weight="100") + */ +class ExpressCheckout extends \XLite\View\Button\Link +{ + /** + * Returns widget default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'modules/CDev/Paypal/button/express_checkout.tpl'; + } + + /** + * Get widget template + * + * @return string + * @see ____func_see____ + * @since 1.1.0 + */ + protected function getTemplate() + { + return 'cart.panel.totals' == $this->viewListName + ? 'modules/CDev/Paypal/button/cart_express_checkout.tpl' + : $this->getDefaultTemplate(); + } + + /** + * Returns true if widget is visible + * + * @return boolean + * @see ____func_see____ + * @since 1.1.0 + */ + protected function isVisible() + { + return \XLite\Module\CDev\Paypal\Main::isExpressCheckoutEnabled(); + } + + /** + * Get CSS class name + * + * @return string + * @see ____func_see____ + * @since 1.1.0 + */ + protected function getClass() + { + return 'pp-ec-button'; + } + + /** + * defineWidgetParams + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + protected function defineWidgetParams() + { + parent::defineWidgetParams(); + + $this->widgetParams[self::PARAM_LOCATION] = new \XLite\Model\WidgetParam\String( + 'Redirect to', + $this->buildURL( + 'checkout', + 'start_express_checkout' + ) + ); + } + +} diff --git a/src/classes/XLite/Module/CDev/Paypal/View/Minicart.php b/src/classes/XLite/Module/CDev/Paypal/View/Minicart.php new file mode 100644 index 0000000000..9345e11f83 --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/View/Minicart.php @@ -0,0 +1,53 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Pubic License (GPL 2.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\View; + +/** + * Extend Minicart widget + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Minicart extends \XLite\View\Minicart implements \XLite\Base\IDecorator +{ + /** + * getCSSFiles + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'modules/CDev/Paypal/style.css'; + + return $list; + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/install.yaml b/src/classes/XLite/Module/CDev/Paypal/install.yaml index b12e0ab080..a70946845e 100644 --- a/src/classes/XLite/Module/CDev/Paypal/install.yaml +++ b/src/classes/XLite/Module/CDev/Paypal/install.yaml @@ -57,4 +57,22 @@ XLite\Model\Payment\Method: - name: mode - name: address_override + - service_name: ExpressCheckout + class: 'Module\CDev\Paypal\Model\Payment\Processor\ExpressCheckout' + translations: + - code: en + name: 'Paypal Express Checkout' + settings: + - name: vendor + - name: user + - name: pwd + - name: partner + value: Paypal + - name: prefix + value: mystore_ + - name: transaction_type + value: S + - name: test + value: Y + diff --git a/src/classes/XLite/View/Button/ButtonsSeparator.php b/src/classes/XLite/View/Button/ButtonsSeparator.php new file mode 100644 index 0000000000..f2cbb03b9c --- /dev/null +++ b/src/classes/XLite/View/Button/ButtonsSeparator.php @@ -0,0 +1,54 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View\Button; + +/** + * Checkout buttons separator + * + * @see ____class_see____ + * @since 1.0.0 + */ +class ButtonsSeparator extends \XLite\View\AView +{ + /** + * Return widget default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'button/buttons_separator.tpl'; + } + + protected function isCartTotalsBlock() + { + return !empty($this->viewListName) && 'cart.panel.totals' == $this->viewListName; + } +} diff --git a/src/classes/XLite/View/Order/Details/Admin/PaymentActionsUnit.php b/src/classes/XLite/View/Order/Details/Admin/PaymentActionsUnit.php index e8a2c81cbb..a66eb3122e 100644 --- a/src/classes/XLite/View/Order/Details/Admin/PaymentActionsUnit.php +++ b/src/classes/XLite/View/Order/Details/Admin/PaymentActionsUnit.php @@ -111,7 +111,7 @@ protected function isTransactionUnitAllowed($transaction, $unit) * @see ____func_see____ * @since 1.0.0 */ - protected function getUnitName($unit) + protected function getUnitName() { return ucfirst($this->getParam(self::PARAM_UNIT)); } diff --git a/src/skins/admin/en/modules/CDev/Paypal/settings/express_checkout/body.tpl b/src/skins/admin/en/modules/CDev/Paypal/settings/express_checkout/body.tpl new file mode 100644 index 0000000000..d33a1eef7d --- /dev/null +++ b/src/skins/admin/en/modules/CDev/Paypal/settings/express_checkout/body.tpl @@ -0,0 +1,88 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Moneybookers settings + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +

    {t(#Use this page to configure your store to communicate with your Payment Processing Gateway. Complete the required fields below and press the "Update" button.#)}

    + +

    {t(#To have access to Paypal services please register here for an account if you don't have one yet#)}: {getPaypalRegisterURL()}

    + +
    + +
    + + + +
      + +
    • + + +
      {t(#Your merchant login ID that you created when you registered for the account.#)}
      +
    • + +
    • + + +
      {t(#If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users on the account, USER has the same as VENDOR.#)}
      +
    • + +
    • + + +
      {t(#The password that you defined while registering for the account.#)}
      +
    • + +
    • + + +
      {t(#The ID provided to you by the authorized PayPal Reseller who registered you for the Gateway gateway. If you purchased your account directly from PayPal, use PayPal.#)}
      +
    • + +
    + + + +
      + +
    • + + +
    • + +
    • + + +
    • + + +
    + +

    {t(#You can define an order id prefix, which would precede each order number in your shop, to make it unique (each transaction id must be unique for a Paypal account)#)}

    + +
      + +
    • + + +
      {t(#(optional: This options is relevant only if you share your Paypal account with other online shops)#)}
      +
    • + +
    + +
    + +
    diff --git a/src/skins/default/en/button/buttons_separator.tpl b/src/skins/default/en/button/buttons_separator.tpl new file mode 100644 index 0000000000..edeb0e3f66 --- /dev/null +++ b/src/skins/default/en/button/buttons_separator.tpl @@ -0,0 +1,17 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Checkout buttons separator template + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +{if:isCartTotalsBlock()}
  • {end:} +
    + {t(#- OR -#)} +
    +{if:isCartTotalsBlock()}
  • {end:} diff --git a/src/skins/default/en/css/lc.css b/src/skins/default/en/css/lc.css index 5b7b7fbc36..ea651fca43 100644 --- a/src/skins/default/en/css/lc.css +++ b/src/skins/default/en/css/lc.css @@ -1426,6 +1426,24 @@ table.list-body-list td padding-left: 10px; } +/** + * Separator of Checkout buttons (- OR -) + */ +.buttons-separator { + padding-top: 7px; + padding-bottom: 10px; +} + +.buttons-separator span { + padding-left: 35px; + color: #8F8F8F; +} + +.button .buttons-separator span { + padding-left: 0px; +} + + /** * Cart */ diff --git a/src/skins/default/en/modules/CDev/Paypal/button/cart_express_checkout.tpl b/src/skins/default/en/modules/CDev/Paypal/button/cart_express_checkout.tpl new file mode 100644 index 0000000000..8b7150c140 --- /dev/null +++ b/src/skins/default/en/modules/CDev/Paypal/button/cart_express_checkout.tpl @@ -0,0 +1,17 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Popup button + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + +
  • + +
  • diff --git a/src/skins/default/en/modules/CDev/Paypal/button/express_checkout.tpl b/src/skins/default/en/modules/CDev/Paypal/button/express_checkout.tpl new file mode 100644 index 0000000000..fed6658d6c --- /dev/null +++ b/src/skins/default/en/modules/CDev/Paypal/button/express_checkout.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Paypal Express Checkout button + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} + + diff --git a/src/skins/default/en/modules/CDev/Paypal/style.css b/src/skins/default/en/modules/CDev/Paypal/style.css new file mode 100644 index 0000000000..dd053fe707 --- /dev/null +++ b/src/skins/default/en/modules/CDev/Paypal/style.css @@ -0,0 +1,19 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * Product attachments page styles + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.10 + */ + +.lc-minicart .pp-ec-button, +#cart-right ul.totals .pp-ec-button { + background: none; + border: none; + margin: 0px; + padding: 0px; +} From 1fff069eb1c3d57fed5fcec5c754d0cfa65ef0f9 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 17 Jul 2012 16:29:45 +0400 Subject: [PATCH 231/562] [!] Wrong is_enabled element definition. --- .../Decorator/Plugin/FinishCacheBuildingHandler/Main.php | 2 ++ src/skins/common/js/core.form.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php b/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php index 99b2da9107..6f759fd356 100644 --- a/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php +++ b/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php @@ -44,6 +44,8 @@ class Main extends \Includes\Decorator\Plugin\APlugin */ public function executeHookHandler() { + \Includes\Utils\FileManager::unlinkRecursive(LC_DIR_CACHE_RESOURCES); + \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setVar(\XLite::CACHE_TIMESTAMP, intval(microtime(true))); } } diff --git a/src/skins/common/js/core.form.js b/src/skins/common/js/core.form.js index e33be94b81..78770b8b40 100644 --- a/src/skins/common/js/core.form.js +++ b/src/skins/common/js/core.form.js @@ -1078,7 +1078,7 @@ CommonElement.prototype.toggleActivity = function(condition) // Check element activity CommonElement.prototype.isEnabled = function() { - return this.$element.hasClass('disabled'); + return !this.$element.hasClass('disabled'); } // Disable element From c1576ffbd896296e917a0a1bef8fe6c5e6af0d97 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 17 Jul 2012 16:41:59 +0400 Subject: [PATCH 232/562] [!] Wrong enabled element definition. --- src/skins/common/js/core.form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skins/common/js/core.form.js b/src/skins/common/js/core.form.js index e79337f527..7d9de08ae7 100644 --- a/src/skins/common/js/core.form.js +++ b/src/skins/common/js/core.form.js @@ -1093,7 +1093,7 @@ CommonElement.prototype.toggleActivity = function(condition) // Check element activity CommonElement.prototype.isEnabled = function() { - return 'disabled' == this.$element.attr('disabled'); + return !this.$element.hasClass('disabled'); } // Disable element From 6fd19b582a5fefde5b80fde0ccac39b16f71a0cd Mon Sep 17 00:00:00 2001 From: Sergei Fundaev Date: Tue, 17 Jul 2012 17:06:15 +0400 Subject: [PATCH 233/562] [*] PHP notice in the Phakefile has been fixed. --- .dev/tests/Grid/Phakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.dev/tests/Grid/Phakefile b/.dev/tests/Grid/Phakefile index 920ee4ccf0..b5d5050fab 100644 --- a/.dev/tests/Grid/Phakefile +++ b/.dev/tests/Grid/Phakefile @@ -114,8 +114,8 @@ group("server", function() { print PHP_EOL . "Starting a new EC2 Instance..."; $server = LcServer::boot_and_acquire_dns($app['lc_ami'], array('keypair_name' => $app['keypair_name'], 'type' => $app['server_instance_type'])); - print PHP_EOL . "Started new lc server at " . $app['cloud']->server->public_dns; $app['cloud']->server = $server; + print PHP_EOL . "Started new lc server at " . $app['cloud']->server->public_dns; $app['cloud']->save(); $server->setup($app); @@ -335,4 +335,4 @@ function setup_ec2($dir = null){ } } -?> \ No newline at end of file +?> From c8cc2bd33ccb39160962f3714bdef5eb79ebe33c Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 17 Jul 2012 18:14:31 +0400 Subject: [PATCH 234/562] [!] Typo errors in CSS styles. --- .../Decorator/Plugin/FinishCacheBuildingHandler/Main.php | 2 -- src/skins/admin/en/css/stickyPanel.css | 6 +++--- src/skins/admin/en/css/style.css | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php b/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php index 6f759fd356..99b2da9107 100644 --- a/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php +++ b/src/Includes/Decorator/Plugin/FinishCacheBuildingHandler/Main.php @@ -44,8 +44,6 @@ class Main extends \Includes\Decorator\Plugin\APlugin */ public function executeHookHandler() { - \Includes\Utils\FileManager::unlinkRecursive(LC_DIR_CACHE_RESOURCES); - \XLite\Core\Database::getRepo('XLite\Model\TmpVar')->setVar(\XLite::CACHE_TIMESTAMP, intval(microtime(true))); } } diff --git a/src/skins/admin/en/css/stickyPanel.css b/src/skins/admin/en/css/stickyPanel.css index f31cae73ee..b81b758487 100644 --- a/src/skins/admin/en/css/stickyPanel.css +++ b/src/skins/admin/en/css/stickyPanel.css @@ -2,8 +2,8 @@ /** * Sticky panel common styles - * - * @author Creative Development LLC + * + * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ @@ -21,7 +21,7 @@ .centered-box { margin: 0px auto; padding: 0px; - height: 100% + height: 100%; overflow: visible; } diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index 1c358133ce..56c557d834 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -1845,7 +1845,7 @@ form.list-form { padding-right: 47px; } -sticky-panel.has-add-buttons .additional { +.sticky-panel.has-add-buttons .additional { position: absolute; top: 4px; right: -26px; From b9747c9cf7b5e497aef9bb5596847842325cce81 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Tue, 17 Jul 2012 18:27:02 +0400 Subject: [PATCH 235/562] [!] Delete zones button was not displayed. --- src/classes/XLite/View/Tabs/ShippingSettings.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/XLite/View/Tabs/ShippingSettings.php b/src/classes/XLite/View/Tabs/ShippingSettings.php index 16f9924ca6..d899ac14d7 100644 --- a/src/classes/XLite/View/Tabs/ShippingSettings.php +++ b/src/classes/XLite/View/Tabs/ShippingSettings.php @@ -170,7 +170,7 @@ public function getShippingZones() */ public function isZonesDefined() { - return (count($this->getShippingZones()) > 2); + return (count($this->getShippingZones()) > 1); } /** @@ -329,10 +329,10 @@ protected function prepareMarkups($markups) } /** - * Get processor methods - * + * Get processor methods + * * @param \XLite\Model\Shipping\Processor\AProcessor $processor Processor - * + * * @return \XLite\Model\Shipping\Method * @see ____func_see____ * @since 1.0.15 From ed31b5253e0f2332d95e9da54b99ea32f461b2b2 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Tue, 17 Jul 2012 18:27:19 +0400 Subject: [PATCH 236/562] [!] Paypal ExpressCheckout: isConfigured() method fixed --- .../CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php index d2f6e864ac..3072f06882 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php @@ -189,8 +189,8 @@ public function processReturn(\XLite\Model\Payment\Transaction $transaction) public function isConfigured(\XLite\Model\Payment\Method $method) { return parent::isConfigured($method) - && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->vendor) - && !empty(\XLite\Core\Config::getInstance()->CDev->Paypal->pwd) + && $method->getSetting('vendor') + && $method->getSetting('pwd') && $this->isMerchantCountryAllowed(); } From cbafed2d99af478455c277cdd574c74bd165cf88 Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Tue, 17 Jul 2012 22:22:59 +0400 Subject: [PATCH 237/562] Workaround for weird hash facebook bug --- .../Module/CDev/SocialLogin/View/AView.php | 53 +++++++++++++++++++ .../modules/CDev/SocialLogin/fb_hash_fix.js | 15 ++++++ 2 files changed, 68 insertions(+) create mode 100644 src/classes/XLite/Module/CDev/SocialLogin/View/AView.php create mode 100644 src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js diff --git a/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php b/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php new file mode 100644 index 0000000000..1766b69996 --- /dev/null +++ b/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php @@ -0,0 +1,53 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Pubic License (GPL 2.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\SocialLogin\View; + +/** + * Abstract widget + * + * @see ____class_see____ + * @since 1.0.0 + */ +abstract class AView extends \XLite\View\AView implements \XLite\Base\IDecorator +{ + /** + * Get a list of JavaScript files required to display the widget properly + * + * @return void + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $result = parent::getJSFiles(); + + $result[] = 'modules/CDev/SocialLogin/fb_hash_fix.js'; + + return $result; + } +} diff --git a/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js b/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js new file mode 100644 index 0000000000..b330d2a9c5 --- /dev/null +++ b/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js @@ -0,0 +1,15 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * A workaround for http://developers.facebook.com/bugs/318390728250352 + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + +if (window.location.hash == '#_=_') { + window.location = window.location.toString().replace(/#_=_/, ''); +} From bff4c607fdf0b2f4f4711dd9c89a87735b58ae1b Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 18 Jul 2012 12:50:44 +0400 Subject: [PATCH 238/562] [!] Wrong disabling elements procedure in JS form core. --- src/skins/common/js/core.form.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/skins/common/js/core.form.js b/src/skins/common/js/core.form.js index 7d9de08ae7..e4d31eeb56 100644 --- a/src/skins/common/js/core.form.js +++ b/src/skins/common/js/core.form.js @@ -1099,17 +1099,13 @@ CommonElement.prototype.isEnabled = function() // Disable element CommonElement.prototype.disable = function() { - this.$element - .addClass('disabled') - .attr('disabled', 'disabled'); + this.$element.addClass('disabled'); } // Enable element CommonElement.prototype.enable = function() { - this.$element - .removeClass('disabled') - .removeAttr('disabled'); + this.$element.removeClass('disabled'); } /** From 4f54a082131f1d598e2b381581bb00d1cf9859c9 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 18 Jul 2012 13:46:32 +0400 Subject: [PATCH 239/562] [*] Small style changes for standalone version. (migrated from drupal based) --- src/skins/default/en/css/theme.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/skins/default/en/css/theme.css b/src/skins/default/en/css/theme.css index cb79a0a555..c6731d0d38 100644 --- a/src/skins/default/en/css/theme.css +++ b/src/skins/default/en/css/theme.css @@ -510,7 +510,8 @@ button:active, background: #f8fdff; } -button.bright +button.bright, + .review-step button.disabled.bright { border-style: none; padding: 5px 17px 5px; @@ -539,6 +540,10 @@ button.disabled color: #fff; } +.review-step button.disabled.bright { + cursor: not-allowed; +} + /* * Definition lists */ From bdbefddf5948db78ebf6bbc03c91aa420cf56837 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 18 Jul 2012 14:59:27 +0400 Subject: [PATCH 240/562] [!] Bug: Wrong width/height attributes for images. --- src/classes/XLite/Model/Base/Image.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Model/Base/Image.php b/src/classes/XLite/Model/Base/Image.php index 7a7d1689a3..3aa35bdf1c 100644 --- a/src/classes/XLite/Model/Base/Image.php +++ b/src/classes/XLite/Model/Base/Image.php @@ -238,8 +238,10 @@ public function getResizedURL($width = null, $height = null) list($newWidth, $newHeight) = $result; } else { - $newWidth = $width; - $newHeight = $height; + list($newWidth, $newHeight) = array( + $this->getWidth(), + $this->getHeight() + ); $url = $this->getURL(); } From 26f0c2ae2dea16ae8179615412efa409a3d39de0 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 18 Jul 2012 15:09:49 +0400 Subject: [PATCH 241/562] E:41773 [!] Bug: "Select one" choice was removed after setting a value to a country selector. --- src/classes/XLite/View/FormField/Select/Country.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/classes/XLite/View/FormField/Select/Country.php b/src/classes/XLite/View/FormField/Select/Country.php index 45a7968bb7..3b900381e9 100644 --- a/src/classes/XLite/View/FormField/Select/Country.php +++ b/src/classes/XLite/View/FormField/Select/Country.php @@ -150,13 +150,8 @@ protected function getDefaultOptions() */ protected function getOptions() { - $list = parent::getOptions(); - - if (!$this->getValue()) { - $list = array('' => 'Select one...') + $list; - } - - return $list; + return array('' => 'Select one...') + + parent::getOptions(); } /** From 67061068e072a23300a1f01a872f4de001041140 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 18 Jul 2012 16:00:42 +0400 Subject: [PATCH 242/562] E:41775 [!] Bug: Shipping rates were not displayed for inactive shipping method in admin area. --- src/classes/XLite/Model/Repo/Shipping/Markup.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/classes/XLite/Model/Repo/Shipping/Markup.php b/src/classes/XLite/Model/Repo/Shipping/Markup.php index 8a733cfcbd..805960034c 100644 --- a/src/classes/XLite/Model/Repo/Shipping/Markup.php +++ b/src/classes/XLite/Model/Repo/Shipping/Markup.php @@ -202,8 +202,7 @@ protected function defineFindMarkupsByZoneAndMethodQuery($zoneId, $methodId) { $qb = $this->createQueryBuilder('m') ->addSelect('sm') - ->innerJoin('m.shipping_method', 'sm') - ->andWhere('sm.enabled = 1'); + ->innerJoin('m.shipping_method', 'sm'); if (isset($zoneId)) { $qb->innerJoin('m.zone', 'zone') From 3eded9f668f5c09da56be4fc0067d0e9f46c8d6f Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Wed, 18 Jul 2012 16:12:49 +0400 Subject: [PATCH 243/562] [!] Bug: Settings table has wrong width parameters. small design changes. --- src/skins/admin/en/css/style.css | 9 +++++++++ src/skins/admin/en/settings/body.tpl | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/skins/admin/en/css/style.css b/src/skins/admin/en/css/style.css index 56c557d834..980d02cf36 100644 --- a/src/skins/admin/en/css/style.css +++ b/src/skins/admin/en/css/style.css @@ -846,6 +846,15 @@ table.form input[type="text"] display: none; } +.general-settings ul.table .table-label +{ + width: 40%; +} + +.general-settings ul.table .table-value { + width: 50%; +} + /* Buttons */ div.buttons diff --git a/src/skins/admin/en/settings/body.tpl b/src/skins/admin/en/settings/body.tpl index 47e4c5909d..e435d26934 100644 --- a/src/skins/admin/en/settings/body.tpl +++ b/src/skins/admin/en/settings/body.tpl @@ -9,6 +9,6 @@ * @link http://www.litecommerce.com/ * @since 1.0.13 *} -
    +
    From af004db89e0c338e2b5f3b7366441a01f61cb949 Mon Sep 17 00:00:00 2001 From: Vladimir Semenov Date: Wed, 18 Jul 2012 16:27:35 +0400 Subject: [PATCH 244/562] [*] Paypal module: Added Express Checkout API --- .../Paypal/Controller/Customer/Checkout.php | 196 +++++++ .../Model/Payment/Processor/APaypal.php | 56 +- .../Payment/Processor/ExpressCheckout.php | 477 +++++++----------- .../Model/Payment/Processor/PayflowLink.php | 12 +- .../XLite/Module/CDev/Paypal/install.yaml | 2 +- 5 files changed, 429 insertions(+), 314 deletions(-) create mode 100644 src/classes/XLite/Module/CDev/Paypal/Controller/Customer/Checkout.php diff --git a/src/classes/XLite/Module/CDev/Paypal/Controller/Customer/Checkout.php b/src/classes/XLite/Module/CDev/Paypal/Controller/Customer/Checkout.php new file mode 100644 index 0000000000..4e4ff8f6ab --- /dev/null +++ b/src/classes/XLite/Module/CDev/Paypal/Controller/Customer/Checkout.php @@ -0,0 +1,196 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Module\CDev\Paypal\Controller\Customer; + +/** + * Checkout controller + * + * @see ____class_see____ + * @since 1.0.0 + */ +class Checkout extends \XLite\Controller\Customer\Checkout implements \XLite\Base\IDecorator +{ + /** + * Modify request to allow start Express Checkout process + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + public function handleRequest() + { + if ( + isset(\XLite\Core\Request::getInstance()->action) + && $this->isExpressCheckoutAction() + && $this->getCart()->checkCart() + ) { + \XLite\Core\Request::getInstanse()->setRequestMethod('POST'); + } + + parent::handleRequest(); + } + + /** + * Returns true if action is related to Express Checkout process + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + protected function isExpressCheckoutAction() + { + return in_array( + \XLite\Core\Request::getInstance()->action, + array('start_express_checkout', 'express_checkout_return') + ); + } + + /** + * doActionStartExpressCheckout + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + protected function doActionStartExpressCheckout() + { + if (\XLite\Module\CDev\Paypal\Main::isExpressCheckoutEnabled()) { + $paymentMethod = $this->getExpressCheckoutPaymentMethod(); + + $this->getCart()->setPaymentMethod($paymentMethod); + + $this->updateCart(); + + $token = $paymentMethod->getProcessor()->doSetExpressCheckout(); + + if (isset($token)) { + $this->getCart()->set('ec_token', $token); + $this->getCart()->set('ec_token_date', time()); + $this->getCart()->set('ec_payer_id', null); + + $paymentMethod->getProcessor()->redirectToPaypal($token); + + } else { + \XLite\Core\TopMessage::getInstance()->addError('Failure to redirect to Paypal.'); + } + } + } + + /** + * doExpressCheckoutReturn + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + protected function doExpressCheckoutReturn() + { + $request = \XLite\Core\Request::getInstance(); + $cart = $this->getCart(); + + if (isset($request->cancel)) { + $cart->set('ec_token', null); + $cart->set('ec_token_date', null); + $cart->set('ec_payer_id', null); + + \XLite\Core\TopMessage::getInstance()->addWarning('Express Checkout process stopped.'); + + } elseif (!isset($request->token) || $request->token != $this->getCart()->get('ec_token')) { + \XLite\Core\TopMessage::getInstance()->addError('Wrong token of Express Checkout.'); + + } elseif (!isset($request->PayerId)) { + \XLite\Core\TopMessage::getInstance()->addError('PayerID value was not returned by Paypal.'); + + } else { + + $cart->set('ec_payer_id', $request->PayerId); + + $buyerData = $this->getExpressCheckoutPaymentMethod()->getProcessor()->doGetExpressCheckoutDetails($request->token); + + if (empty($buyerData)) { + \XLite\Core\TopMessage::getInstance()->addError('Your address data was not received from Paypal.'); + + } else { + // Fill the cart with data received from Paypal + $this->requestData = $this->prepareBuyerData($buyerData); + + $this->updateProfile(); + + if (!$this->getCartProfile() || !$this->getCartProfile()->getBillingAddress()->checkAddress()) { + $this->requestData['billingAddress'] = $this->requestData['shippingAddress']; + $this->requestData['same_address'] = true; + } + + $this->updateShippingAddress(); + + $this->updateBillingAddress(); + } + } + } + + /** + * Translate array of data received from Paypal to the array for updating cart + * + * @param array $paypalData Array of customer data received from Paypal + * + * @return array + * @see ____func_see____ + * @since 1.1.0 + */ + protected function prepareBuyerData($paypalData) + { + $data = array( + 'email' => $paypalData['EMAIL'], + 'create_profile' => false, + 'shippingAddress' => array( + 'name' => $paypalData['SHIPTONAME'], + 'street' => $paypalData['SHIPTOSTREET'] . (!empty($paypalData['SHIPTOSTREET2']) ? ' ' . $paypalData['SHIPTOSTREET2'] : ''), + 'country' => $paypalData['SHIPTOCOUNTRY'], + 'state' => $paypalData['SHIPTOSTATE'], + 'city' => $paypalData['SHIPTOCITY'], + 'zipcode' => $paypalData['SHIPTOZIP'], + 'phone' => $paypalData['PHONENUM'], + ), + ); + + return $data; + } + + /** + * Get Express Checkout payment method + * + * @return \XLite\Model\Payment\Method + * @see ____func_see____ + * @since 1.1.0 + */ + protected function getExpressCheckoutPaymentMethod() + { + return \XLite\Core\Database::getRepo('XLite\Model\Payment\Method') + ->findOneBy(array('service_name' => 'ExpressCheckout')); + } +} diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php index 9579270c1c..66650aae5b 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/APaypal.php @@ -110,6 +110,17 @@ public function getReturnType() return self::RETURN_TYPE_HTML_REDIRECT_WITH_IFRAME_DESTROYING; } + protected function isSuccessResponse($response, $transactionType) + { + $result = in_array($response['PENDINGREASON'], array('none', 'completed')); + + if (!$result) { + $result = ('authorization' == $response['PENDINGREASON'] && \XLite\Model\Payment\BackendTransaction::AUTH == $transactionType); + } + + return $result; + } + /** * Get initial transaction type (used when customer places order) * @@ -408,7 +419,7 @@ protected function doRefund(\XLite\Model\Payment\BackendTransaction $transaction * @see ____func_see____ * @since 1.0.24 */ - protected function doRequest($requestType, $transaction = null) + protected function doRequest($requestType, $transaction = null, $customParams = array()) { $responseData = array(); @@ -416,7 +427,7 @@ protected function doRequest($requestType, $transaction = null) $this->transaction = $transaction; } - $params = $this->getRequestParams($requestType, $transaction); + $params = $this->getRequestParams($requestType, $transaction, $customParams); $request = new \XLite\Core\HTTP\Request($this->getPostURL()); $request->body = $params; @@ -486,11 +497,11 @@ protected function getParsedResponse($response) * @see ____func_see____ * @since 1.0.0 */ - protected function getRequestParams($requestType, $transaction = null) + protected function getRequestParams($requestType, $transaction = null, $customParams = array()) { $methodName = 'get' . $requestType . 'RequestParams'; - $postData = $this->$methodName($transaction) + $this->getCommonRequestParams(); + $postData = $this->$methodName($transaction, $customParams) + $this->getCommonRequestParams(); $data = array(); @@ -536,7 +547,6 @@ protected function getCreateSecureTokenRequestParams() 'SECURETOKENID' => $this->getSecureTokenId(), 'TRXTYPE' => $this->getSetting('transaction_type'), 'AMT' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), - 'ITEMAMT' => $this->getLineItems($lineItems), 'BILLTOFIRSTNAME' => $this->getProfile()->getBillingAddress()->getFirstname(), 'BILLTOLASTNAME' => $this->getProfile()->getBillingAddress()->getLastname(), 'BILLTOSTREET' => $this->getProfile()->getBillingAddress()->getStreet(), @@ -574,7 +584,7 @@ protected function getCreateSecureTokenRequestParams() 'CURRENCY' => $this->getCurrencyCode(), ); - $postData = $postData + $lineItems; + $postData = $postData + $this->getLineItems(); return $postData; } @@ -591,7 +601,9 @@ protected function getCreateSecureTokenRequestParams() protected function getLineItems(&$lineItems) { $lineItems = array(); - $itemsSubtotal = 0; + + $itemsSubtotal = 0; + $itemsTaxAmount = 0; $items = $this->getOrder()->getItems(); @@ -602,12 +614,20 @@ protected function getLineItems(&$lineItems) $lineItems['L_NAME' . $index] = $item->getProduct()->getTranslation()->name; $lineItems['L_SKU' . $index] = $item->getProduct()->getSku(); $lineItems['L_QTY' . $index] = $item->getAmount(); + //$lineItems['L_TAXAMT' . $index] = $this->getOrder()->getCurrency()->roundValue($item->getTaxValue()); $itemsSubtotal = $lineItems['L_COST' . $index] * $lineItems['L_QTY' . $index]; + //$itemsTaxAmount = $lineItems['L_TAXAMT' . $index] * $lineItems['L_QTY' . $index]; $index ++; } + + $items += array('ITEMAMT' => $itemsSubtotal); + + if ($itemsTaxAmount > 0) { + $items += array('TAXAMT' => $itemsTaxAmount); + } } - return $itemsSubtotal; + return $items; } /** @@ -740,4 +760,24 @@ protected function getCreditRequestParams(\XLite\Model\Payment\BackendTransactio return $params; } + + /** + * Update status of backend transaction related to an initial payment transaction + * + * @param \XLite\Model\Payment\Transaction $transaction Payment transaction + * @param string $status Transaction status + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + public function updateInitialBackendTransaction(\XLite\Model\Payment\Transaction $transaction, $status) + { + $backendTransaction = $transaction->getInitialBackendTransaction(); + + if (isset($backendTransaction)) { + $backendTransaction->setStatus($status); + $this->saveDataFromRequest($backendTransaction); + } + } } diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php index 3072f06882..526b584065 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/ExpressCheckout.php @@ -33,21 +33,22 @@ * @see ____class_see____ * @since 1.0.1 */ -class ExpressCheckout extends \XLite\Model\Payment\Base\WebBased +class ExpressCheckout extends \XLite\Module\CDev\Paypal\Model\Payment\Processor\APaypal { const PAYPAL_PAYMENT_METHOD_CODE = 'Paypal Express Checkout'; /** - * Mode value for testing + * Request types definition */ - const TEST_MODE = 'test'; + const REQ_TYPE_SET_EXPRESS_CHECKOUT = 'SetExpressCheckout'; + const REQ_TYPE_GET_EXPRESS_CHECKOUT_DETAILS = 'GetExpressCheckoutDetails'; + const REQ_TYPE_DO_EXPRESS_CHECKOUT_PAYMENT = 'DoExpressCheckoutPayment'; + + const EC_TYPE_SHORTCUT = 'shortcut'; + const EC_TYPE_MARK = 'mark'; - /** - * IPN statuses - */ - const IPN_VERIFIED = 'verify'; - const IPN_DECLINED = 'decline'; - const IPN_REQUEST_ERROR = 'request_error'; + + protected $ecPostURL = 'https://www.paypal.com/cgi-bin/webscr'; /** @@ -74,108 +75,6 @@ public function getSettingsTemplateDir() return 'modules/CDev/Paypal/settings/express_checkout'; } - /** - * Process callback - * - * @param \XLite\Model\Payment\Transaction $transaction Callback-owner transaction - * - * @return void - * @see ____func_see____ - * @since 1.0.0 - */ - public function processCallback(\XLite\Model\Payment\Transaction $transaction) - { - parent::processCallback($transaction); - - $request = \XLite\Core\Request::getInstance(); - - $status = $transaction::STATUS_FAILED; - - switch ($this->getIPNVerification()) { - - case self::IPN_DECLINED: - $status = $transaction::STATUS_FAILED; - $this->markCallbackRequestAsInvalid(static::t('IPN verification failed')); - - break; - - case self::IPN_REQUEST_ERROR: - $status = $transaction::STATUS_PENDING; - $this->markCallbackRequestAsInvalid(static::t('IPN HTTP error')); - - break; - - case self::IPN_VERIFIED: - - switch ($request->payment_status) { - case 'Completed': - - if ($transaction->getValue() == $request->mc_gross) { - - $status = $transaction::STATUS_SUCCESS; - - } else { - - $status = $transaction::STATUS_FAILED; - - $this->setDetail( - 'amount_error', - 'Payment transaction\'s amount is corrupted' . PHP_EOL - . 'Amount from request: ' . $request->mc_gross . PHP_EOL - . 'Amount from transaction: ' . $transaction->getValue(), - 'Hacking attempt' - ); - - $this->markCallbackRequestAsInvalid(static::t('Transaction amount mismatch')); - } - - break; - - case 'Pending': - $status = $transaction::STATUS_PENDING; - break; - - default: - - } - - default: - - } - - $this->saveDataFromRequest(); - - $this->transaction->setStatus($status); - } - - /** - * Process return - * - * @param \XLite\Model\Payment\Transaction $transaction Return-owner transaction - * - * @return void - * @see ____func_see____ - * @since 1.0.1 - */ - public function processReturn(\XLite\Model\Payment\Transaction $transaction) - { - parent::processReturn($transaction); - - if (\XLite\Core\Request::getInstance()->cancel) { - - $this->setDetail( - 'cancel', - 'Payment transaction is cancelled' - ); - - $this->transaction->setStatus($transaction::STATUS_FAILED); - - } elseif ($transaction::STATUS_INPROGRESS == $this->transaction->getStatus()) { - - $this->transaction->setStatus($transaction::STATUS_PENDING); - } - } - /** * Check - payment method is configured or not * @@ -222,261 +121,249 @@ public function getAllowedMerchantCountries() } /** - * Return URL for IPN verification transaction - * + * Perform 'SetExpressCheckout' request and get Token value from Paypal + * * @return string * @see ____func_see____ - * @since 1.0.1 + * @since 1.1.0 */ - protected function getIPNURL() + public function doSetExpressCheckout() { - return $this->getFormURL() . '?cmd=_notify-validate'; - } + $token = null; - /** - * Get IPN verification status - * - * @return boolean TRUE if verification status is received - * @see ____func_see____ - * @since 1.0.1 - */ - protected function getIPNVerification() - { - $ipnRequest = new \XLite\Core\HTTP\Request($this->getIPNURL()); - $ipnRequest->body = \XLite\Core\Request::getInstance()->getData(); - - $ipnResult = $ipnRequest->sendRequest(); - - if ($ipnResult) { + $responseData = $this->doRequest(self::REQ_TYPE_SET_EXPRESS_CHECKOUT); - $result = (0 < preg_match('/VERIFIED/i', $ipnResult->body)) - ? self::IPN_VERIFIED - : self::IPN_DECLINED; - } else { - $result = self::IPN_REQUEST_ERROR; - - $this->setDetail( - 'ipn_http_error', - 'IPN HTTP error:' - ); + if (!empty($responseData['TOKEN'])) { + $token = $token = $responseData['TOKEN']; } - return $result; + return $token; } /** - * Get redirect form URL - * - * @return string - * @see ____func_see____ - * @since 1.0.1 - */ - protected function getFormURL() - { - return $this->isTestMode() - ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' - : 'https://www.paypal.com/cgi-bin/webscr'; - } - - /** - * Return TRUE if the test mode is ON - * - * @return boolean + * Redirect customer to Paypal server for authorization and address selection + * + * @param string $token Express Checkout token + * + * @return void * @see ____func_see____ - * @since 1.0.1 + * @since 1.1.0 */ - protected function isTestMode() + public function redirectToPaypal($token, $type = self::EC_TYPE_SHORTCUT) { - return \XLite\View\FormField\Select\TestLiveMode::TEST === $this->getSetting('mode'); + $url = $this->getPostURL($this->ecPostURL, $this->getPostParams($token, $type)); + + $page = << + + + + + + + +HTML; + + print ($page); + exit (); } - /** - * Return ITEM NAME for request - * - * @return string + * Get array of parameters for redirecting customer to Paypal server + * + * @param string $token Express Checkout token + * + * @return array * @see ____func_see____ - * @since 1.0.1 + * @since 1.1.0 */ - protected function getItemName() + protected function getPostParams($token, $type = self::EC_TYPE_SHORTCUT) { - return $this->getSetting('description') . '(Order #' . $this->getOrder()->getOrderId() . ')'; + return array( + 'cmd' => '_express_checkout', + 'token' => $token, + 'useraction' => (self::EC_TYPE_MARK == $type ? 'commit' : 'continue'), + ); } /** - * Get redirect form fields list + * Get array of parameters for SET_EXPRESS_CHECKOUT request * * @return array * @see ____func_see____ - * @since 1.0.1 + * @since 1.0.0 */ - protected function getFormFields() + protected function getSetExpressCheckoutRequestParams($type = self::EC_TYPE_SHORTCUT) { - $orderId = $this->getOrder()->getOrderId(); - - $fields = array( - 'charset' => 'UTF-8', - 'cmd' => '_ext-enter', - 'custom' => $orderId, - 'invoice' => $this->getSetting('prefix') . $orderId, - 'redirect_cmd' => '_xclick', - 'item_name' => $this->getItemName(), - 'rm' => '2', - 'email' => $this->getProfile()->getLogin(), - 'first_name' => $this->getProfile()->getBillingAddress()->getFirstname(), - 'last_name' => $this->getProfile()->getBillingAddress()->getLastname(), - 'business' => $this->getSetting('account'), - 'amount' => $this->getAmountValue(), - 'tax_cart' => 0, - 'shipping' => 0, - 'handling' => 0, - 'weight_cart' => 0, - 'currency_code' => $this->getOrder()->getCurrency()->getCode(), - - 'return' => $this->getReturnURL(null, true), - 'cancel_return' => $this->getReturnURL(null, true, true), - 'shopping_url' => $this->getReturnURL(null, true, true), - 'notify_url' => $this->getCallbackURL(null, true), - - 'country' => $this->getCountryFieldValue(), - 'state' => $this->getStateFieldValue(), - 'address1' => $this->getProfile()->getBillingAddress()->getStreet(), - 'address2' => 'n/a', - 'city' => $this->getProfile()->getBillingAddress()->getCity(), - 'zip' => $this->getProfile()->getBillingAddress()->getZipcode(), - 'upload' => 1, - 'bn' => 'LiteCommerce', + $postData = array( + 'TRXTYPE' => $this->getSetting('transaction_type'), + 'TENDER' => 'P', + 'ACTION' => 'S', + 'RETURNURL' => urldecode($this->getECReturnURL(null, true)), + 'CANCELURL' => urldecode($this->getECReturnURL(null, true, true)), + 'AMT' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), + 'CURRENCY' => $this->getCurrencyCode(), + 'FREIGHTAMT' => $this->getOrder()->getCurrency()->roundValue($this->getOrder()->getSurchargeSumByType('SHIPPING')), + 'HANDLINGAMT' => 0, + 'INSURANCEAMT' => 0, + 'NOSHIPPING' => 0, + 'INVNUM' => $this->getOrder()->getOrderId(), + 'ALLOWNOTE' => 1, + 'CUSTOM' => $this->getOrder()->getOrderId(), + 'LOCALECODE' => 'EN', + // 'HDRIMG', // The URL for an image to be used as the header image for the PayPal Express Checkout pages + 'PAYFLOWCOLOR' => 'FF0000', // The secondary gradient color for the order summary section of the PayPal Express Checkout pages ); - if ('Y' === $this->getSetting('address_override')) { - $fields['address_override'] = 1; + $postData = $postData + $this->getLineItems(); + + if (self::EC_TYPE_SHORTCUT == $type) { + $postData['REQCONFIRMSHIPPING'] = 0; + + } elseif (self::EC_TYPE_MARK == $type) { + $postData += array( + 'ADDROVERRIDE' => 'N', + 'PHONENUM' => $this->getProfile()->getBillingAddress()->getPhone(), + 'EMAIL' => $this->getProfile()->getLogin(), + 'SHIPTONAME' => $this->getProfile()->getShippingAddress()->getFirstname() . $this->getProfile()->getShippingAddress()->getLastname(), + 'SHIPTOSTREET' => $this->getProfile()->getShippingAddress()->getStreet(), + 'SHIPTOSTREET2' => '', + 'SHIPTOCITY' => $this->getProfile()->getShippingAddress()->getCity(), + 'SHIPTOSTATE' => $this->getProfile()->getShippingAddress()->getState()->getCode(), + 'SHIPTOZIP' => $this->getProfile()->getShippingAddress()->getZipcode(), + 'SHIPTOCOUNTRY' => $this->getProfile()->getShippingAddress()->getCountry()->getCode3(), + ); } - $fields = array_merge($fields, $this->getPhone()); - - return $fields; + return $postData; } /** - * Return amount value. Specific for Paypal - * - * @return string + * processReturnFromExpressCheckout + * + * @param mixed $token ____param_comment____ + * + * @return void * @see ____func_see____ - * @since 1.0.11 + * @since 1.1.0 */ - protected function getAmountValue() + public function doGetExpressCheckoutDetails($token) { - $value = $this->transaction->getValue(); + $data = array(); - settype($value, 'float'); + $params = array('token' => $token); - $value = sprintf('%0.2f', $value); + $responseData = $this->doRequest(self::REQ_TYPE_GET_EXPRESS_CHECKOUT_DETAILS, $params); + + if (!empty($responseData) && '0' == $responseData['RESULT']) { + $data = $responseData; + } - return $value; + return $data; } /** - * Return Country field value. if no country defined we should use '' value + * Return array of parameters for 'GetExpressCheckoutDetails' request * - * @return string + * @return array * @see ____func_see____ - * @since 1.0.5 + * @since 1.0.0 */ - protected function getCountryFieldValue() + protected function getGetExpressCheckoutDetailsRequestParams($transaction = null, $customParams = array()) { - return $this->getProfile()->getBillingAddress()->getCountry() - ? $this->getProfile()->getBillingAddress()->getCountry()->getCode() - : ''; + $params = array( + 'TRXTYPE' => $this->getSetting('transaction_type'), + 'TENDER' => 'P', + 'ACTION' => 'G', + 'TOKEN' => $customParams['token'], + ); + + return $params; } - /** - * Return State field value. If country is US then state code must be used. - * - * @return string - * @see ____func_see____ - * @since 1.0.5 - */ - protected function getStateFieldValue() + + protected function doInitialPayment() { - return 'US' === $this->getCountryFieldValue() - ? $this->getProfile()->getBillingAddress()->getState()->getCode() - : $this->getProfile()->getBillingAddress()->getState()->getState(); + if ('EC_TYPE_MARK' == $this->getCart()->get('ec_type')) { + + } + + $this->transaction->createBackendTransaction($this->getInitialTransactionType()); + + $status = $this->doExpressCheckoutPayment(); + + return $status; } - /** - * Return Phone structure. specific for Paypal - * - * @return array - * @see ____func_see____ - * @since 1.0.1 - */ - protected function getPhone() + protected function doExpressCheckoutPayment() { - $result = array(); - - $phone = $this->getProfile()->getBillingAddress()->getPhone(); - - $phone = preg_replace('![^\d]+!', '', $phone); - - if ($phone) { - if ( - $this->getProfile()->getBillingAddress()->getCountry() - && 'US' == $this->getProfile()->getBillingAddress()->getCountry()->getCode() - ) { - $result = array( - 'night_phone_a' => substr($phone, -10, -7), - 'night_phone_b' => substr($phone, -7, -4), - 'night_phone_c' => substr($phone, -4), - ); + $status = self::FAILED; + + $transaction = $this->transaction; + + $responseData = $this->doRequest(self::REQ_TYPE_DO_EXPRESS_CHECKOUT_PAYMENT); + + $transactionStatus = $transaction::STATUS_FAILED; + + if (!empty($responseData) && '0' == $responseData['RESULT']) { + + if ($this->isSuccessResponse($responseData)) { + $transactionStatus = $transaction::STATUS_SUCCESS; + $status = self::SUCCESS; + } else { - $result['night_phone_b'] = substr($phone, -10); + $transactionStatus = $transaction::STATUS_PENDING; + $status = self::PENDING; } } - return $result; + $transaction->setStatus($transactionStatus); + + $this->updateInitialBackendTransaction($transaction, $transactionStatus); + + return $status; } /** - * Define saved into transaction data schema + * Return array of parameters for 'DoExpressCheckoutPayment' request * * @return array * @see ____func_see____ - * @since 1.0.1 + * @since 1.0.0 */ - protected function defineSavedData() + protected function getDoExpressCheckoutPaymentRequestParams($transaction = null, $customParams = array()) { - return array( - 'secureid' => 'Transaction id', - 'mc_gross' => 'Payment amount', - 'payment_type' => 'Payment type', - 'payment_status' => 'Payment status', - 'pending_reason' => 'Pending reason', - 'reason_code' => 'Reason code', - 'mc_currency' => 'Payment currency', - 'auth_id' => 'Authorization identification number', - 'auth_status' => 'Status of authorization', - 'auth_exp' => 'Authorization expiration date and time', - 'auth_amount' => 'Authorization amount', - 'payer_id' => 'Unique customer ID', - 'payer_email' => 'Customer\'s primary email address', - 'txn_id' => 'Original transaction identification number', + $params = array( + 'TRXTYPE' => $this->getSetting('transaction_type'), + 'TENDER' => 'P', + 'ACTION' => 'D', + 'TOKEN' => $this->getOrder()->get('ec_token'), + 'PAYERID' => $this->getOrder()->get('ec_payer_id'), + 'AMT' => $this->getOrder()->getCurrency()->roundValue($this->transaction->getValue()), + 'CURRENCY' => $this->getCurrencyCode(), + 'FREIGHTAMT' => $this->getOrder()->getCurrency()->roundValue($this->getOrder()->getSurchargeSumByType('SHIPPING')), + 'HANDLINGAMT' => 0, + 'INSURANCEAMT' => 0, + 'NOTIFYURL' => $this->getCallbackURL(null, true), + 'INVNUM' => $this->getOrder()->getOrderId(), + 'ALLOWNOTE' => 1, + 'CUSTOM' => $this->getOrder()->getOrderId(), ); + + $params += $this->getLineItems(); + + return $params; } - /** - * Log redirect form - * - * @param array $list Form fields list - * - * @return void - * @see ____func_see____ - * @since 1.0.1 - */ - protected function logRedirect(array $list) + + protected function getECReturnURL($asCancel = false) { - $list = $this->maskCell($list, 'account'); + $params = $asCancel ? array('cancel' => 1) : array(); - parent::logRedirect($list); + return \XLite::getInstance()->getShopURL( + \XLite\Core\Converter::buildURL('checkout', 'express_checkout_return', $params), + \XLite\Core\Config::getInstance()->Security->customer_security + ); } /** diff --git a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php index a28f9642f1..e84c0ab10d 100644 --- a/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php +++ b/src/classes/XLite/Module/CDev/Paypal/Model/Payment/Processor/PayflowLink.php @@ -183,16 +183,6 @@ public function processCallback(\XLite\Model\Payment\Transaction $transaction) } } - public function updateInitialBackendTransaction(\XLite\Model\Payment\Transaction $transaction, $status) - { - $backendTransaction = $transaction->getInitialBackendTransaction(); - - if (isset($backendTransaction)) { - $backendTransaction->setStatus($status); - $this->saveDataFromRequest($backendTransaction); - } - } - /** * Check - payment method is configured or not * @@ -261,6 +251,8 @@ protected function defineSavedData() $data['RESPMSG'] = 'Transaction result message (RESPMSG)'; $data['CORRELATIONID'] = 'Tracking ID'; // Can be provided to PayPal Merchant Technical Services to assist with debugging transactions. + $data['FEEAMT'] = 'Transaction fee'; // Fee amount charged to the merchant by PayPal for this transaction + $data['PENDINGREASON'] = 'Pending reason'; // Reason why the payment is pending return $data; } diff --git a/src/classes/XLite/Module/CDev/Paypal/install.yaml b/src/classes/XLite/Module/CDev/Paypal/install.yaml index a70946845e..5d06c9093b 100644 --- a/src/classes/XLite/Module/CDev/Paypal/install.yaml +++ b/src/classes/XLite/Module/CDev/Paypal/install.yaml @@ -49,7 +49,7 @@ XLite\Model\Payment\Method: class: 'Module\CDev\Paypal\Model\Payment\Processor\PaypalWPS' translations: - code: en - name: 'Paypal Website Payments Standard' + name: 'Paypal Standard' settings: - name: account - name: description From 413597eab90c43393d7371baf6f9a4647f706b60 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Thu, 19 Jul 2012 11:46:53 +0400 Subject: [PATCH 245/562] E:41791 [*] Resizing refactoring. --- .../Core/ImageOperator/AImageOperator.php | 13 +++------- src/classes/XLite/Model/Base/Image.php | 25 +++++++------------ 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/classes/XLite/Core/ImageOperator/AImageOperator.php b/src/classes/XLite/Core/ImageOperator/AImageOperator.php index eddcdfa914..9bfbb8d625 100644 --- a/src/classes/XLite/Core/ImageOperator/AImageOperator.php +++ b/src/classes/XLite/Core/ImageOperator/AImageOperator.php @@ -216,15 +216,8 @@ public function getMimeType() */ public function resizeDown($width = null, $height = null) { - list($newWidth, $newHeight) = self::getCroppedDimensions( - $this->width, - $this->height, - $width, - $height - ); - - return ($newWidth != $this->width || $newHeight != $this->height) - ? array($newWidth, $newHeight, $this->resize($newWidth, $newHeight)) - : array($newWidth, $newHeight, false); + return ($width != $this->width || $height != $this->height) + ? array($width, $height, $this->resize($width, $height)) + : array($width, $height, false); } } diff --git a/src/classes/XLite/Model/Base/Image.php b/src/classes/XLite/Model/Base/Image.php index 3aa35bdf1c..e195ea06e3 100644 --- a/src/classes/XLite/Model/Base/Image.php +++ b/src/classes/XLite/Model/Base/Image.php @@ -223,25 +223,18 @@ public function getResizedURL($width = null, $height = null) $url = $this->getResizedPublicURL($size, $name); - if ($this->isResizedIconAvailable($path)) { - list($newWidth, $newHeight) = \XLite\Core\ImageOperator::getCroppedDimensions( - $this->getWidth(), - $this->getHeight(), - $width, - $height - ); + list($newWidth, $newHeight) = \XLite\Core\ImageOperator::getCroppedDimensions( + $this->getWidth(), + $this->getHeight(), + $width, + $height + ); - } else { - $result = $this->resizeIcon($width, $height, $path); + if (!$this->isResizedIconAvailable($path)) { - if ($result) { - list($newWidth, $newHeight) = $result; + $result = $this->resizeIcon($newWidth, $newHeight, $path); - } else { - list($newWidth, $newHeight) = array( - $this->getWidth(), - $this->getHeight() - ); + if (!$result) { $url = $this->getURL(); } From 81a6e673be9c77d95dab151b56a5ddc0e6c88823 Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Thu, 19 Jul 2012 16:01:28 +0400 Subject: [PATCH 246/562] Remove hash without page reload --- src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js b/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js index b330d2a9c5..2b8670416c 100644 --- a/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js +++ b/src/skins/default/en/modules/CDev/SocialLogin/fb_hash_fix.js @@ -11,5 +11,5 @@ */ if (window.location.hash == '#_=_') { - window.location = window.location.toString().replace(/#_=_/, ''); + window.location.hash = ''; } From a382fed10bc76e70dfe36280d293839e570ba14c Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Thu, 19 Jul 2012 16:19:36 +0400 Subject: [PATCH 247/562] Do not let to sign into disabled account --- .../SocialLogin/Controller/Customer/SocialLogin.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php b/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php index 6a277cd9b8..5949a47826 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php @@ -62,8 +62,14 @@ protected function doActionLogin() ); if ($profile) { - \XLite\Core\Auth::getInstance()->loginProfile($profile); - $this->setReturnURL($this->buildURL()); + if ($profile->isEnabled()) { + \XLite\Core\Auth::getInstance()->loginProfile($profile); + $this->setReturnURL($this->buildURL()); + + } else { + \XLite\Core\TopMessage::addError('Profile is disabled'); + $this->setReturnURL($this->buildURL('login')); + } } else { $provider = \XLite\Core\Database::getRepo('XLite\Model\Profile') From 250ae04ecccbbac821f7787c57bd94d052e799df Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Thu, 19 Jul 2012 17:11:03 +0400 Subject: [PATCH 248/562] Fix new social profile creation --- .../CDev/SocialLogin/Controller/Customer/SocialLogin.php | 5 +++-- src/classes/XLite/Module/CDev/SocialLogin/Core/Auth.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php b/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php index 5949a47826..22ca8d11b5 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php @@ -73,7 +73,7 @@ protected function doActionLogin() } else { $provider = \XLite\Core\Database::getRepo('XLite\Model\Profile') - ->findOneBy(array('login' => $profileInfo['email'])) + ->findOneBy(array('login' => $profileInfo['email'], 'order' => null)) ->getSocialLoginProvider(); if ($provider) { @@ -115,6 +115,7 @@ protected function getSocialLoginProfile($login, $socialProvider, $socialId) array( 'socialLoginProvider' => $socialProvider, 'socialLoginId' => $socialId, + 'order' => null, ) ); @@ -125,7 +126,7 @@ protected function getSocialLoginProfile($login, $socialProvider, $socialId) $profile->setSocialLoginId($socialId); $existingProfile = \XLite\Core\Database::getRepo('XLite\Model\Profile') - ->findOneBy(array('login' => $login)); + ->findOneBy(array('login' => $login, 'order' => null)); if ($existingProfile) { $profile = null; diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/Auth.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/Auth.php index 75ebd8a310..d87b80d447 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/Auth.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/Auth.php @@ -49,7 +49,7 @@ class Auth extends \XLite\Core\Auth implements \XLite\Base\IDecorator public function login($login, $password, $secureHash = null) { $profile = \XLite\Core\Database::getRepo('XLite\Model\Profile')->findOneBy( - array('login' => $login) + array('login' => $login, 'order' => null) ); if ($profile && $profile->isSocialProfile()) { From d02d701747e729ab679eddf8b4d93b6501acefb1 Mon Sep 17 00:00:00 2001 From: Nikita Pchelintsev <073rus@gmail.com> Date: Thu, 19 Jul 2012 22:15:27 +0400 Subject: [PATCH 249/562] Maintain state between auth request and callback to save final shop redirect url --- .../Controller/Customer/SocialLogin.php | 45 ++++-- .../CDev/SocialLogin/Core/AAuthProvider.php | 119 ++++++++++++++-- .../SocialLogin/Core/FacebookAuthProvider.php | 134 ++++-------------- .../SocialLogin/Core/GoogleAuthProvider.php | 134 ++++-------------- .../XLite/Module/CDev/SocialLogin/Main.php | 4 +- .../Module/CDev/SocialLogin/View/AView.php | 18 +-- .../Module/CDev/SocialLogin/View/Button.php | 27 ++-- .../CDev/SocialLogin/View/FacebookButton.php | 24 +--- .../CDev/SocialLogin/View/GoogleButton.php | 24 +--- 9 files changed, 234 insertions(+), 295 deletions(-) diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php b/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php index 22ca8d11b5..5e941febf3 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Controller/Customer/SocialLogin.php @@ -35,6 +35,7 @@ */ class SocialLogin extends \XLite\Controller\Customer\ACustomer { + /** * Perform login action * @@ -48,27 +49,27 @@ protected function doActionLogin() $requestProcessed = false; - foreach ($authProviders as $provider) { - if ($provider->detectAuth()) { + foreach ($authProviders as $authProvider) { + if ($authProvider->detectAuth()) { - $profileInfo = $provider->processAuth(); + $profileInfo = $authProvider->processAuth(); if ($profileInfo && !empty($profileInfo['id']) && !empty($profileInfo['email'])) { $profile = $this->getSocialLoginProfile( $profileInfo['email'], - $provider->getName(), + $authProvider->getName(), $profileInfo['id'] ); if ($profile) { if ($profile->isEnabled()) { \XLite\Core\Auth::getInstance()->loginProfile($profile); - $this->setReturnURL($this->buildURL()); + $this->setAuthReturnURL($authProvider::STATE_PARAM_NAME); } else { \XLite\Core\TopMessage::addError('Profile is disabled'); - $this->setReturnURL($this->buildURL('login')); + $this->setAuthReturnURL($authProvider::STATE_PARAM_NAME, true); } } else { @@ -84,7 +85,7 @@ protected function doActionLogin() } \XLite\Core\TopMessage::addError($signInVia); - $this->setReturnURL($this->buildURL('login')); + $this->setAuthReturnURL($authProvider::STATE_PARAM_NAME, true); } $requestProcessed = true; @@ -93,8 +94,8 @@ protected function doActionLogin() } if (!$requestProcessed) { - \XLite\Core\TopMessage::addError('We we\'re unable to process this request'); - $this->setReturnURL($this->buildURL('login')); + \XLite\Core\TopMessage::addError('We were unable to process this request'); + $this->setAuthReturnURL('', true); } } @@ -137,4 +138,30 @@ protected function getSocialLoginProfile($login, $socialProvider, $socialId) return $profile; } + + /** + * Set redirect URL + * + * @param string $stateParamName Name of the state parameter containing + * class name of the controller that initialized auth request OPTIONAL + * @param mixed $failure Indicates if auth process failed OPTIONAL + * + * @return void + * @see ____func_see____ + * @since 1.1.0 + */ + protected function setAuthReturnUrl($stateParamName = '', $failure = false) + { + $controller = \XLite\Core\Request::getInstance()->$stateParamName; + + $redirectTo = $failure ? 'login' : ''; + + if ('XLite\Controller\Customer\Checkout' == $controller) { + $redirectTo = 'checkout'; + } elseif ('XLite\Controller\Customer\Profile' == $controller) { + $redirectTo = 'profile'; + } + + $this->setReturnURL($this->buildURL($redirectTo)); + } } diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/AAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/AAuthProvider.php index b6248c0d50..1364844120 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/AAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/AAuthProvider.php @@ -41,40 +41,70 @@ abstract class AAuthProvider extends \XLite\Base\Singleton const AUTH_PROVIDER_PARAM_NAME = 'auth_provider'; /** - * Get unique auth provider name to distinguish it from others + * State parameter is used to maintain state between the request and callback + */ + const STATE_PARAM_NAME = 'state'; + + /** + * Get OAuth 2.0 client ID * * @return string * @see ____func_see____ - * @since 1.0.24 + * @since 1.1.0 + */ + abstract protected function getClientId(); + + /** + * Get OAuth 2.0 client secret + * + * @return string + * @see ____func_see____ + * @since 1.1.0 */ - abstract public function getName(); + abstract protected function getClientSecret(); /** * Get authorization request url * + * @param string $state State parameter to include in request + * * @return string * @see ____func_see____ * @since 1.0.24 */ - abstract public function getAuthRequestUrl(); + public function getAuthRequestUrl($state) + { + return static::AUTH_REQUEST_URL + . '?client_id=' . $this->getClientId() + . '&redirect_uri=' . urlencode($this->getRedirectUrl()) + . '&scope=' . static::AUTH_REQUEST_SCOPE + . '&response_type=code' + . '&' . static::STATE_PARAM_NAME . '=' . urlencode($state); + } /** - * Concrete implementation must process authorization grant from resource owner + * Get unique auth provider name to distinguish it from others * - * @return array Client information containing at least id and e-mail + * @return string * @see ____func_see____ * @since 1.0.24 */ - abstract public function processAuth(); + public function getName() + { + return static::PROVIDER_NAME; + } /** - * Check if auth provider has all options configured + * Get path to small icon to display in header * - * @return boolean + * @return string * @see ____func_see____ * @since 1.0.24 */ - abstract public function isConfigured(); + public function getSmallIconPath() + { + return static::SMALL_ICON_PATH; + } /** * Check if current request belongs to the concrete implementation of auth provider @@ -89,15 +119,76 @@ public function detectAuth() } /** - * Get path to small icon to display in header + * Process authorization grant and return array with profile data * - * @return void + * @return array Client information containing at least id and e-mail * @see ____func_see____ * @since 1.0.24 */ - public function getSmallIconPath() + public function processAuth() + { + $profile = array(); + + $code = \XLite\Core\Request::getInstance()->code; + + if (!empty($code)) { + $accessToken = $this->getAccessToken($code); + + if ($accessToken) { + $request = new \XLite\Core\HTTP\Request($this->getProfileRequestUrl($accessToken)); + $response = $request->sendRequest(); + + if (200 == $response->code) { + $profile = json_decode($response->body, true); + } + } + } + + return $profile; + } + + /** + * Check if auth provider has all options configured + * + * @return boolean + * @see ____func_see____ + * @since 1.0.24 + */ + public function isConfigured() + { + return $this->getClientId() && $this->getClientSecret(); + } + + /** + * Get url to request access token + * + * @param string $code Authorization code + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getTokenRequestUrl($code) + { + return static::TOKEN_REQUEST_URL + . '?client_id=' . $this->getClientId() + . '&redirect_uri=' . urlencode($this->getRedirectUrl()) + . '&client_secret=' . $this->getClientSecret() + . '&code=' . urlencode($code); + } + + /** + * Get url used to access user profile info + * + * @param string $accessToken Access token + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + protected function getProfileRequestUrl($accessToken) { - return ''; + return static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($accessToken); } /** diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php index e6591354a4..f577ad5ec9 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/FacebookAuthProvider.php @@ -46,6 +46,11 @@ class FacebookAuthProvider extends AAuthProvider */ const AUTH_REQUEST_URL = 'https://www.facebook.com/dialog/oauth'; + /** + * Data to gain access to + */ + const AUTH_REQUEST_SCOPE = 'email'; + /** * Url to get access token */ @@ -61,142 +66,51 @@ class FacebookAuthProvider extends AAuthProvider */ const SMALL_ICON_PATH = 'modules/CDev/SocialLogin/icons/facebook_small.png'; - - /** - * Get unique auth provider name to distinguish it from others - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - public function getName() - { - return static::PROVIDER_NAME; - } - /** - * Get authorization request url + * Returns access token based on authorization code * + * @param string $code Authorization code + * * @return string * @see ____func_see____ * @since 1.0.24 */ - public function getAuthRequestUrl() - { - return static::AUTH_REQUEST_URL - . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id - . '&redirect_uri=' . urlencode($this->getRedirectUrl()) - . '&scope=email' - . '&response_type=code'; - } - - /** - * Concrete implementation must process authorization grant from resource owner - * - * @return array Client information containing at least id and e-mail - * @see ____func_see____ - * @since 1.0.24 - */ - public function processAuth() + protected function getAccessToken($code) { - $profile = array(); - - $code = \XLite\Core\Request::getInstance()->code; + $request = new \XLite\Core\HTTP\Request($this->getTokenRequestUrl($code)); + $response = $request->sendRequest(); - if (!empty($code)) { - $accessToken = $this->getAccessToken($code); - - if ($accessToken) { - $request = new \XLite\Core\HTTP\Request($this->getProfileRequestUrl($accessToken)); - $response = $request->sendRequest(); + $accessToken = null; - if (200 == $response->code) { - $profile = json_decode($response->body, true); - } - } + if (200 == $response->code) { + parse_str($response->body, $data); + $accessToken = $data['access_token']; } - return $profile; - } - - /** - * Check if auth provider has all options configured - * - * @return boolean - * @see ____func_see____ - * @since 1.0.24 - */ - public function isConfigured() - { - return !empty(\XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id) - && !empty(\XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret); - } - - /** - * Get path to small icon to display in header - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - public function getSmallIconPath() - { - return static::SMALL_ICON_PATH; - } - - /** - * Get url to request access token - * - * @param string $code Authorization code - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - protected function getTokenRequestUrl($code) - { - return static::TOKEN_REQUEST_URL - . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id - . '&redirect_uri=' . urlencode($this->getRedirectUrl()) - . '&client_secret=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret - . '&code=' . urlencode($code); + return $accessToken; } /** - * Get url used to access user profile info + * Get OAuth 2.0 client ID * - * @param string $accessToken Access token - * * @return string * @see ____func_see____ - * @since 1.0.24 + * @since 1.1.0 */ - protected function getProfileRequestUrl($accessToken) + protected function getClientId() { - return static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($accessToken); + return \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id; } /** - * Returns access token based on authorization code + * Get OAuth 2.0 client secret * - * @param string $code Authorization code - * * @return string * @see ____func_see____ - * @since 1.0.24 + * @since 1.1.0 */ - protected function getAccessToken($code) + protected function getClientSecret() { - $request = new \XLite\Core\HTTP\Request($this->getTokenRequestUrl($code)); - $response = $request->sendRequest(); - - $accessToken = null; - - if (200 == $response->code) { - parse_str($response->body, $data); - $accessToken = $data['access_token']; - } - - return $accessToken; + return \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret; } } diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php b/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php index 5396cff472..ec135db37f 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Core/GoogleAuthProvider.php @@ -67,35 +67,7 @@ class GoogleAuthProvider extends AAuthProvider const SMALL_ICON_PATH = 'modules/CDev/SocialLogin/icons/google_small.png'; /** - * Get unique auth provider name to distinguish it from others - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - public function getName() - { - return static::PROVIDER_NAME; - } - - /** - * Get authorization request url - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - public function getAuthRequestUrl() - { - return static::AUTH_REQUEST_URL - . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id - . '&redirect_uri=' . urlencode($this->getRedirectUrl()) - . '&scope=' . static::AUTH_REQUEST_SCOPE - . '&response_type=code'; - } - - /** - * Concrete implementation must process authorization grant from resource owner + * Process authorization grant and return array with profile data * * @return array Client information containing at least id and e-mail * @see ____func_see____ @@ -103,85 +75,15 @@ public function getAuthRequestUrl() */ public function processAuth() { - $profile = array(); - - $code = \XLite\Core\Request::getInstance()->code; + $profile = parent::processAuth(); - if (!empty($code)) { - $accessToken = $this->getAccessToken($code); - - if ($accessToken) { - $request = new \XLite\Core\HTTP\Request($this->getProfileRequestUrl($accessToken)); - $response = $request->sendRequest(); - - if (200 == $response->code) { - $profile = json_decode($response->body, true); - - $profile['id'] = $profile['email']; - } - } + if (isset($profile['email'])) { + $profile['id'] = $profile['email']; } return $profile; } - /** - * Check if auth provider has all options configured - * - * @return boolean - * @see ____func_see____ - * @since 1.0.24 - */ - public function isConfigured() - { - return !empty(\XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id) - && !empty(\XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_secret); - } - - /** - * Get path to small icon to display in header - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - public function getSmallIconPath() - { - return static::SMALL_ICON_PATH; - } - - /** - * Get url to request access token - * - * @param string $code Authorization code - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - protected function getTokenRequestUrl($code) - { - return static::TOKEN_REQUEST_URL - . '?client_id=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_id - . '&redirect_uri=' . urlencode($this->getRedirectUrl()) - . '&client_secret=' . \XLite\Core\Config::getInstance()->CDev->SocialLogin->fb_client_secret - . '&code=' . urlencode($code); - } - - /** - * Get url used to access user profile info - * - * @param string $accessToken Access token - * - * @return string - * @see ____func_see____ - * @since 1.0.24 - */ - protected function getProfileRequestUrl($accessToken) - { - return static::PROFILE_REQUEST_URL . '?access_token=' . urlencode($accessToken); - } - /** * Returns access token based on authorization code * @@ -196,8 +98,8 @@ protected function getAccessToken($code) $request = new \XLite\Core\HTTP\Request(static::TOKEN_REQUEST_URL); $request->body = array( 'code' => $code, - 'client_id' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id, - 'client_secret' => \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_secret, + 'client_id' => $this->getClientId(), + 'client_secret' => $this->getClientSecret(), 'redirect_uri' => $this->getRedirectUrl(), 'grant_type' => 'authorization_code', ); @@ -212,4 +114,28 @@ protected function getAccessToken($code) return $accessToken; } + + /** + * Get OAuth 2.0 client ID + * + * @return string + * @see ____func_see____ + * @since 1.1.0 + */ + protected function getClientId() + { + return \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_id; + } + + /** + * Get OAuth 2.0 client secret + * + * @return string + * @see ____func_see____ + * @since 1.1.0 + */ + protected function getClientSecret() + { + return \XLite\Core\Config::getInstance()->CDev->SocialLogin->gg_client_secret; + } } diff --git a/src/classes/XLite/Module/CDev/SocialLogin/Main.php b/src/classes/XLite/Module/CDev/SocialLogin/Main.php index d369baad30..c13fad38a1 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/Main.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/Main.php @@ -51,8 +51,8 @@ public static function getAuthorName() * Get module major version * * @return string - * @see ____func_see____ - * @since 1.0.0 + * @see ____func_see____ + * @since 1.0.0 */ public static function getMajorVersion() { diff --git a/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php b/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php index 1766b69996..0dbe0bffb7 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/View/AView.php @@ -3,26 +3,26 @@ /** * LiteCommerce - * + * * NOTICE OF LICENSE - * - * This source file is subject to the GNU General Pubic License (GPL 2.0) + * + * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: - * http://www.gnu.org/licenses/gpl-2.0.html + * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to licensing@litecommerce.com so we can send you a copy immediately. - * + * * PHP version 5.3.0 - * + * * @category LiteCommerce - * @author Creative Development LLC + * @author Creative Development LLC * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Pubic License (GPL 2.0) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @link http://www.litecommerce.com/ * @see ____file_see____ - * @since 1.0.0 + * @since 1.0.24 */ namespace XLite\Module\CDev\SocialLogin\View; diff --git a/src/classes/XLite/Module/CDev/SocialLogin/View/Button.php b/src/classes/XLite/Module/CDev/SocialLogin/View/Button.php index 8901b15534..c62c614009 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/View/Button.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/View/Button.php @@ -35,15 +35,10 @@ */ abstract class Button extends \XLite\View\AView { - /** - * Get auth provider name to display in customer area widgets - * - * @return string - * @see ____func_see____ - * @since 1.0.24 + * Widget icon path */ - abstract public function getName(); + const ICON_PATH = 'modules/CDev/SocialLogin/icons/default.png'; /** * Returns an instance of auth provider @@ -54,6 +49,18 @@ abstract public function getName(); */ abstract protected function getAuthProvider(); + /** + * Get widget display name + * + * @return string + * @see ____func_see____ + * @since 1.0.24 + */ + public function getName() + { + return static::DISPLAY_NAME; + } + /** * Get path to auth provider icon * @@ -63,7 +70,7 @@ abstract protected function getAuthProvider(); */ public function getIconPath() { - return 'modules/CDev/SocialLogin/icons/default.png'; + return static::ICON_PATH; } /** @@ -92,7 +99,9 @@ public function getIconWebPath($iconPath) */ public function getAuthRequestUrl() { - return $this->getAuthProvider()->getAuthRequestUrl(); + $state = get_class(\XLite::getController()); + + return $this->getAuthProvider()->getAuthRequestUrl($state); } /** diff --git a/src/classes/XLite/Module/CDev/SocialLogin/View/FacebookButton.php b/src/classes/XLite/Module/CDev/SocialLogin/View/FacebookButton.php index 7a77b360d6..dc1669f950 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/View/FacebookButton.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/View/FacebookButton.php @@ -39,28 +39,14 @@ class FacebookButton extends Button { /** - * Get auth provider name to display in customer area widgets - * - * @return string - * @see ____func_see____ - * @since 1.0.24 + * Widget display name */ - public function getName() - { - return 'Facebook'; - } - + const DISPLAY_NAME = 'Facebook'; + /** - * Get path to auth provider icon - * - * @return string - * @see ____func_see____ - * @since 1.0.24 + * Widget icon path */ - public function getIconPath() - { - return 'modules/CDev/SocialLogin/icons/facebook.png'; - } + const ICON_PATH = 'modules/CDev/SocialLogin/icons/facebook.png'; /** * Returns an instance of auth provider diff --git a/src/classes/XLite/Module/CDev/SocialLogin/View/GoogleButton.php b/src/classes/XLite/Module/CDev/SocialLogin/View/GoogleButton.php index 9c3a36a1c9..c649d98dcd 100644 --- a/src/classes/XLite/Module/CDev/SocialLogin/View/GoogleButton.php +++ b/src/classes/XLite/Module/CDev/SocialLogin/View/GoogleButton.php @@ -39,28 +39,14 @@ class GoogleButton extends Button { /** - * Get auth provider name to display in customer area widgets - * - * @return string - * @see ____func_see____ - * @since 1.0.24 + * Widget display name */ - public function getName() - { - return 'Google'; - } - + const DISPLAY_NAME = 'Google'; + /** - * Get path to auth provider icon - * - * @return string - * @see ____func_see____ - * @since 1.0.24 + * Widget icon path */ - public function getIconPath() - { - return 'modules/CDev/SocialLogin/icons/google.png'; - } + const ICON_PATH = 'modules/CDev/SocialLogin/icons/google.png'; /** * Returns an instance of auth provider From e8bd9fb831868af7200d739b5510e277874ee7b1 Mon Sep 17 00:00:00 2001 From: Maxim Mukhin Date: Fri, 20 Jul 2012 01:32:54 +0400 Subject: [PATCH 250/562] [+] Order history is added. --- src/classes/XLite/Controller/Admin/Order.php | 4 +- src/classes/XLite/Core/Mailer.php | 2 + src/classes/XLite/Core/OrderHistory.php | 77 +++++++++ src/classes/XLite/Model/Order.php | 22 ++- .../XLite/Model/OrderHistoryEvents.php | 121 ++++++++++++++ src/classes/XLite/Model/Profile.php | 12 ++ .../XLite/Model/Repo/OrderHistoryEvents.php | 77 +++++++++ src/classes/XLite/View/OrderHistory.php | 155 ++++++++++++++++++ src/skins/admin/en/order/history.tpl | 12 ++ src/skins/admin/en/order/history/body.tpl | 14 ++ .../admin/en/order/history/parts/block.tpl | 17 ++ .../admin/en/order/history/parts/event.tpl | 18 ++ .../history/parts/event_block_header.tpl | 13 ++ .../en/order/history/parts/event_clear.tpl | 13 ++ .../en/order/history/parts/event_date.tpl | 13 ++ .../order/history/parts/event_description.tpl | 13 ++ .../history/parts/event_details_action.tpl | 15 ++ .../history/parts/event_details_info.tpl | 15 ++ src/skins/admin/en/order/history/script.js | 35 ++++ src/skins/admin/en/order/history/style.css | 53 ++++++ 20 files changed, 696 insertions(+), 5 deletions(-) create mode 100644 src/classes/XLite/Core/OrderHistory.php create mode 100644 src/classes/XLite/Model/OrderHistoryEvents.php create mode 100644 src/classes/XLite/Model/Repo/OrderHistoryEvents.php create mode 100644 src/classes/XLite/View/OrderHistory.php create mode 100644 src/skins/admin/en/order/history.tpl create mode 100644 src/skins/admin/en/order/history/body.tpl create mode 100644 src/skins/admin/en/order/history/parts/block.tpl create mode 100644 src/skins/admin/en/order/history/parts/event.tpl create mode 100644 src/skins/admin/en/order/history/parts/event_block_header.tpl create mode 100644 src/skins/admin/en/order/history/parts/event_clear.tpl create mode 100644 src/skins/admin/en/order/history/parts/event_date.tpl create mode 100644 src/skins/admin/en/order/history/parts/event_description.tpl create mode 100644 src/skins/admin/en/order/history/parts/event_details_action.tpl create mode 100644 src/skins/admin/en/order/history/parts/event_details_info.tpl create mode 100644 src/skins/admin/en/order/history/script.js create mode 100644 src/skins/admin/en/order/history/style.css diff --git a/src/classes/XLite/Controller/Admin/Order.php b/src/classes/XLite/Controller/Admin/Order.php index d31f758daf..907e7c300e 100644 --- a/src/classes/XLite/Controller/Admin/Order.php +++ b/src/classes/XLite/Controller/Admin/Order.php @@ -37,7 +37,7 @@ class Order extends \XLite\Controller\Admin\AAdmin { /** * Controller parameters - * + * * @var array * @see ____var_see____ * @since 1.0.11 @@ -134,6 +134,7 @@ public function getPages() { $list = parent::getPages(); $list['default'] = 'General info'; + $list['history'] = 'History'; return $list; } @@ -149,6 +150,7 @@ protected function getPageTemplates() { $list = parent::getPageTemplates(); $list['default'] = 'order/info.tpl'; + $list['history'] = 'order/history.tpl'; return $list; } diff --git a/src/classes/XLite/Core/Mailer.php b/src/classes/XLite/Core/Mailer.php index 63fe3b3c2f..2b1db0f541 100644 --- a/src/classes/XLite/Core/Mailer.php +++ b/src/classes/XLite/Core/Mailer.php @@ -322,8 +322,10 @@ public static function sendProcessOrder(\XLite\Model\Order $order) ); static::sendProcessOrderAdmin(); + \XLite\Core\OrderHistory::getInstance()->registerAdminEmailSent($order->getOrderId()); static::sendProcessOrderCustomer($order); + \XLite\Core\OrderHistory::getInstance()->registerCustomerEmailSent($order->getOrderId()); } /** diff --git a/src/classes/XLite/Core/OrderHistory.php b/src/classes/XLite/Core/OrderHistory.php new file mode 100644 index 0000000000..2ce3ccab92 --- /dev/null +++ b/src/classes/XLite/Core/OrderHistory.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Core; + +/** + * Order history main point of execution + * + * @see ____class_see____ + * @since 1.0.0 + */ +class OrderHistory extends \XLite\Base\Singleton +{ + /** + * Codes for registered events of order history + */ + const CODE_PLACE_ORDER = 'PLACE ORDER'; + const CODE_CHANGE_STATUS_ORDER = 'CHANGE STATUS ORDER'; + const CODE_CHANGE_ORDER = 'CHANGE ORDER'; + const CODE_EMAIL_CUSTOMER_SENT = 'EMAIL CUSTOMER SENT'; + const CODE_EMAIL_ADMIN_SENT = 'EMAIL ADMIN SENT'; + const CODE_TRANSACTION = 'TRANSACTION'; + + public function registerEvent($orderId, $code, $description, $details = '') + { + \XLite\Core\Database::getRepo('XLite\Model\OrderHistoryEvents')->registerEvent($orderId, $code, $description, $details); + } + + public function registerPlaceOrder($orderId) + { + $this->registerEvent($orderId, static::CODE_PLACE_ORDER, 'Order was placed'); + } + + public function registerChangeStatusOrder($orderId, $oldStatus, $newStatus) + { + $this->registerEvent($orderId, static::CODE_CHANGE_STATUS_ORDER, 'Order status was changed from "' . $oldStatus . '" to "' . $newStatus . '"'); + } + + public function registerCustomerEmailSent($orderId) + { + $this->registerEvent($orderId, static::CODE_EMAIL_CUSTOMER_SENT, 'Email was sent to the customer'); + } + + public function registerAdminEmailSent($orderId) + { + $this->registerEvent($orderId, static::CODE_EMAIL_ADMIN_SENT, 'Email was sent to the admin'); + } + + public function registerTransaction($orderId, $transactionData) + { + $this->registerEvent($orderId, static::CODE_TRANSACTION, 'Transaction was made', $transactionData); + } +} diff --git a/src/classes/XLite/Model/Order.php b/src/classes/XLite/Model/Order.php index 0474f44700..17862b8b07 100644 --- a/src/classes/XLite/Model/Order.php +++ b/src/classes/XLite/Model/Order.php @@ -200,6 +200,18 @@ class Order extends \XLite\Model\Base\SurchargeOwner */ protected $details; + /** + * Order events queue + * + * @var \Doctrine\Common\Collections\Collection + * @see ____var_see____ + * @since 1.0.0 + * + * @OneToMany (targetEntity="XLite\Model\OrderHistoryEvents", mappedBy="order", cascade={"all"}) + * @OrderBy ({"name" = "ASC"}) + */ + protected $events; + /** * Order items * @@ -850,6 +862,8 @@ public function processSucceed() $list = array(self::STATUS_PROCESSED, self::STATUS_COMPLETED, self::STATUS_INPROGRESS); + \XLite\Core\OrderHistory::getInstance()->registerPlaceOrder($this->getOrderId()); + $send = \XLite\Core\Config::getInstance()->Email->enable_init_order_notif || \XLite\Core\Config::getInstance()->Email->enable_init_order_notif_customer; @@ -1564,7 +1578,7 @@ public function renewSoft() } /** - * Reinitialie currency + * Reinitialize currency * * @return void * @see ____func_see____ @@ -1797,9 +1811,7 @@ public function prepareEntityBeforeCommit($type) */ public function setStatus($value) { - if ($this->getStatus() != $value && !$this->isStatusChanged()) { - $this->oldStatus = $this->getStatus(); - } + $this->oldStatus = $this->status != $value ? $this->status : null; $this->status = $value; @@ -1851,6 +1863,8 @@ protected function changeStatusPostprocess($old, $new) foreach ($this->getStatusHandlers($old, $new) as $handler) { $this->{'process' . ucfirst($handler)}(); } + + \XLite\Core\OrderHistory::getInstance()->registerChangeStatusOrder($this->getOrderId(), $old, $new); } /** diff --git a/src/classes/XLite/Model/OrderHistoryEvents.php b/src/classes/XLite/Model/OrderHistoryEvents.php new file mode 100644 index 0000000000..46f2595b99 --- /dev/null +++ b/src/classes/XLite/Model/OrderHistoryEvents.php @@ -0,0 +1,121 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Model; + +/** + * Order history events + * + * @see ____class_see____ + * @since 1.0.0 + * + * @Entity + * @Table (name="order_history_events") + */ +class OrderHistoryEvents extends \XLite\Model\AEntity +{ + /** + * Order history event unique id + * + * @var mixed + * @see ____var_see____ + * @since 1.0.0 + * + * @Id + * @GeneratedValue (strategy="AUTO") + * @Column (type="integer") + */ + protected $event_id; + + /** + * Code of event + * + * @var string + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="string", length=255) + */ + protected $code; + + /** + * Human-readable description of event + * + * @var string + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="string", length=1024, nullable=true) + */ + protected $description; + + /** + * Details of event + * + * @var string + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="text") + */ + protected $details; + + /** + * Event creation timestamp + * + * @var integer + * @see ____var_see____ + * @since 1.0.0 + * + * @Column (type="integer") + */ + protected $date; + + /** + * Relation to a order entity + * + * @var \XLite\Model\Order + * @see ____var_see____ + * @since 1.0.0 + * + * @ManyToOne (targetEntity="XLite\Model\Order", inversedBy="events", fetch="LAZY") + * @JoinColumn (name="order_id", referencedColumnName="order_id") + */ + protected $order; + + /** + * Author profile of the event + * + * @var \XLite\Model\Profile + * @see ____var_see____ + * @since 1.0.0 + * + * @ManyToOne (targetEntity="XLite\Model\Profile", cascade={"all"}) + * @JoinColumn (name="author_id", referencedColumnName="profile_id") + */ + protected $author; +} diff --git a/src/classes/XLite/Model/Profile.php b/src/classes/XLite/Model/Profile.php index cc52daa5b9..88b6245ae6 100644 --- a/src/classes/XLite/Model/Profile.php +++ b/src/classes/XLite/Model/Profile.php @@ -206,6 +206,18 @@ class Profile extends \XLite\Model\AEntity */ protected $order; + /** + * Order events queue + * + * @var \Doctrine\Common\Collections\Collection + * @see ____var_see____ + * @since 1.0.0 + * + * @OneToMany (targetEntity="XLite\Model\OrderHistoryEvents", mappedBy="author", cascade={"all"}) + * @OrderBy ({"name" = "ASC"}) + */ + protected $events; + /** * Language code * diff --git a/src/classes/XLite/Model/Repo/OrderHistoryEvents.php b/src/classes/XLite/Model/Repo/OrderHistoryEvents.php new file mode 100644 index 0000000000..e37a25d460 --- /dev/null +++ b/src/classes/XLite/Model/Repo/OrderHistoryEvents.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\Model\Repo; + +/** + * Order history events repository + * + * @see ____class_see____ + * @since 1.0.0 + */ +class OrderHistoryEvents extends \XLite\Model\Repo\ARepo +{ + /** + * Search for events of the given order + * + * @param integer $orderId Order identificator + * + * @return \Doctrine\ORM\PersistentCollection|integer + * @see ____func_see____ + * @since 1.0.0 + */ + public function search($orderId) + { + $queryBuilder = $this->createQueryBuilder('ohe') + ->andWhere('ohe.order = :order_id') + ->setParameter('order_id', $orderId) + ->addOrderBy('ohe.date', 'DESC'); + + return $queryBuilder->getResult(); + } + + public function registerEvent($orderId, $code, $description, $details = '') + { + $event = new \XLite\Model\OrderHistoryEvents(array( + 'code' => $code, + 'description' => $description, + 'details' => $details, + 'date' => time(), + )); + + $order = \XLite\Core\Database::getRepo('XLite\Model\Order')->find($orderId); + $profile = \XLite\Core\Auth::getInstance()->getProfile(); + + $event->setAuthor($profile); + $event->setOrder($order); + + $order->addEvents($event); + $profile->addEvents($event); + + $this->insert($event); + } +} diff --git a/src/classes/XLite/View/OrderHistory.php b/src/classes/XLite/View/OrderHistory.php new file mode 100644 index 0000000000..64165fd5c7 --- /dev/null +++ b/src/classes/XLite/View/OrderHistory.php @@ -0,0 +1,155 @@ + + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @see ____file_see____ + * @since 1.0.0 + */ + +namespace XLite\View; + +/** + * Order history widget + * + * @see ____class_see____ + * @since 1.0.0 + * + */ +class OrderHistory extends \XLite\View\AView +{ + /** + * Widget parameters + */ + const PARAM_ORDER = 'order'; + + /** + * Date presentation format + */ + const DAY_DATE_FORMAT = 'M j, Y'; + const EVENT_DATE_FORMAT = 'h:i a'; + + /** + * Get order + * + * @return \XLite\Model\Order + * @see ____func_see____ + * @since 1.0.0 + */ + public function getOrderId() + { + return \XLite\Core\Request::getInstance()->order_id; + } + + /** + * Register CSS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getCSSFiles() + { + $list = parent::getCSSFiles(); + + $list[] = 'order/history/style.css'; + + return $list; + } + + /** + * Register JS files + * + * @return array + * @see ____func_see____ + * @since 1.0.0 + */ + public function getJSFiles() + { + $list = parent::getJSFiles(); + + $list[] = 'order/history/script.js'; + + return $list; + } + + /** + * Return default template + * + * @return string + * @see ____func_see____ + * @since 1.0.0 + */ + protected function getDefaultTemplate() + { + return 'order/history/body.tpl'; + } + + /** + * Check widget visibility + * + * @return boolean + * @see ____func_see____ + * @since 1.0.0 + */ + protected function isVisible() + { + return parent::isVisible() + && $this->getOrderId(); + } + + protected function getOrderHistoryEventsBlock() + { + $result = array(); + + foreach (\XLite\Core\Database::getRepo('XLite\Model\OrderHistoryEvents')->search($this->getOrderId()) as $event) { + + $result[$this->getDayDate($event->getDate())][] = $event; + } + + return $result; + } + + protected function getDate(\XLite\Model\OrderHistoryEvents $event) + { + return date(static::EVENT_DATE_FORMAT, $event->getDate()); + } + + protected function getDescription(\XLite\Model\OrderHistoryEvents $event) + { + return $event->getDescription(); + } + + protected function getDetails(\XLite\Model\OrderHistoryEvents $event) + { + return $event->getDetails(); + } + + protected function getDayDate($date) + { + return date(static::DAY_DATE_FORMAT, $date); + } + + protected function getHeaderBlock($index) + { + return $index; + } +} diff --git a/src/skins/admin/en/order/history.tpl b/src/skins/admin/en/order/history.tpl new file mode 100644 index 0000000000..9979905f20 --- /dev/null +++ b/src/skins/admin/en/order/history.tpl @@ -0,0 +1,12 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.11 + *} + diff --git a/src/skins/admin/en/order/history/body.tpl b/src/skins/admin/en/order/history/body.tpl new file mode 100644 index 0000000000..41326cce42 --- /dev/null +++ b/src/skins/admin/en/order/history/body.tpl @@ -0,0 +1,14 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + *} +
      + +
    diff --git a/src/skins/admin/en/order/history/parts/block.tpl b/src/skins/admin/en/order/history/parts/block.tpl new file mode 100644 index 0000000000..297f920f61 --- /dev/null +++ b/src/skins/admin/en/order/history/parts/block.tpl @@ -0,0 +1,17 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history block + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base", weight="10") + *} +
  • +
      + +
    +
  • diff --git a/src/skins/admin/en/order/history/parts/event.tpl b/src/skins/admin/en/order/history/parts/event.tpl new file mode 100644 index 0000000000..c974617b4b --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event.tpl @@ -0,0 +1,18 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events", weight="20") + *} +
  • +
      + +
    + +
  • \ No newline at end of file diff --git a/src/skins/admin/en/order/history/parts/event_block_header.tpl b/src/skins/admin/en/order/history/parts/event_block_header.tpl new file mode 100644 index 0000000000..61e3d6ec9b --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event_block_header.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events", weight="10") + *} +
  • {getHeaderBlock(index)}
  • \ No newline at end of file diff --git a/src/skins/admin/en/order/history/parts/event_clear.tpl b/src/skins/admin/en/order/history/parts/event_clear.tpl new file mode 100644 index 0000000000..5f1bfdf361 --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event_clear.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event date + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events.details", weight="9999") + *} +
  • \ No newline at end of file diff --git a/src/skins/admin/en/order/history/parts/event_date.tpl b/src/skins/admin/en/order/history/parts/event_date.tpl new file mode 100644 index 0000000000..7e8f78fa66 --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event_date.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event date + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events.details", weight="10") + *} +
  • {getDate(event)}
  • \ No newline at end of file diff --git a/src/skins/admin/en/order/history/parts/event_description.tpl b/src/skins/admin/en/order/history/parts/event_description.tpl new file mode 100644 index 0000000000..5b2fb17c51 --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event_description.tpl @@ -0,0 +1,13 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event date + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events.details", weight="20") + *} +
  • {getDescription(event)}
  • \ No newline at end of file diff --git a/src/skins/admin/en/order/history/parts/event_details_action.tpl b/src/skins/admin/en/order/history/parts/event_details_action.tpl new file mode 100644 index 0000000000..590062030a --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event_details_action.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event date + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events.details", weight="30") + *} +
  • +
    >>>
    +
  • \ No newline at end of file diff --git a/src/skins/admin/en/order/history/parts/event_details_info.tpl b/src/skins/admin/en/order/history/parts/event_details_info.tpl new file mode 100644 index 0000000000..8822907711 --- /dev/null +++ b/src/skins/admin/en/order/history/parts/event_details_info.tpl @@ -0,0 +1,15 @@ +{* vim: set ts=2 sw=2 sts=2 et: *} + +{** + * Order history event date + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + * @ListChild (list="order.history.base.events.details.info", weight="20") + *} +
    +
    {getDetails(event)}
    +
    diff --git a/src/skins/admin/en/order/history/script.js b/src/skins/admin/en/order/history/script.js new file mode 100644 index 0000000000..1907257651 --- /dev/null +++ b/src/skins/admin/en/order/history/script.js @@ -0,0 +1,35 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * ____file_title____ + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + +function OrderEventDetails() +{ + jQuery(this.base).each(function (index, elem) { + var $elem = jQuery(elem); + + jQuery('.action', $elem) + .bind('click', function(event) { + jQuery('*', $elem).trigger('toggle-action'); + }) + .bind('toggle-action', function() { + jQuery(this).toggleClass('show-details'); + }); + + + jQuery('.details', $elem).bind('toggle-action', function() { + jQuery(this).toggleClass('show-details'); + }); + }); +} + +OrderEventDetails.prototype.base = 'li.event'; + +core.autoload('OrderEventDetails'); \ No newline at end of file diff --git a/src/skins/admin/en/order/history/style.css b/src/skins/admin/en/order/history/style.css new file mode 100644 index 0000000000..40e1a15dd0 --- /dev/null +++ b/src/skins/admin/en/order/history/style.css @@ -0,0 +1,53 @@ +/* vim: set ts=2 sw=2 sts=2 et: */ + +/** + * ____file_title____ + * + * @author Creative Development LLC + * @copyright Copyright (c) 2011 Creative Development LLC . All rights reserved + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @link http://www.litecommerce.com/ + * @since 1.0.0 + */ + + +ul.event-details { + list-style: none; +} + +ul.event-details li { + float: left; + margin: 3px 2px 5px 2px; +} + +ul.event-details li.clearfix { + float: none; +} + +.order-history .block-item .head { + color: #456583; + margin: 2px 0px 10px 2px; + font-size: 14px; +} + +ul.event-details li.date { + color: #8f8f8f; +} + +ul.event-details li.description { + margin-left: 10px; +} + +.event-details .details .action { + cursor: pointer; + color: #154E9C; +} + +.order-event-details .details { + display: none; +} + +.order-event-details .details.show-details { + display: block; +} + From ee14520179d60205ecafc59c9e5453a9f7c5faa3 Mon Sep 17 00:00:00 2001 From: Sergei Fundaev Date: Fri, 20 Jul 2012 15:48:30 +0400 Subject: [PATCH 251/562] E:0041372 [*] Some labels have been corrected. --- .../Module/CDev/DeTranslation/install.yaml | 18 +++++++++--------- .../Module/CDev/FrTranslation/install.yaml | 18 +++++++++--------- .../XLite/Module/CDev/MarketPrice/Main.php | 2 +- .../Module/CDev/Moneybookers/install.yaml | 2 +- .../Module/CDev/RuTranslation/install.yaml | 16 ++++++++-------- src/classes/XLite/Upgrade/Cell.php | 2 +- src/classes/XLite/View/AdminPanel.php | 4 ++-- .../XLite/View/Model/Address/Address.php | 4 ++-- src/skins/admin/en/benchmark_summary/empty.tpl | 2 +- src/skins/admin/en/db/backup.tpl | 2 +- src/skins/admin/en/db/restore.tpl | 2 +- src/skins/admin/en/import_export/import.tpl | 2 +- .../en/modules/CDev/Moneybookers/register.tpl | 2 +- src/skins/admin/en/orders_stats.tpl | 2 +- .../en/top_links/storefront/parts/status.tpl | 2 +- src/skins/storefront_closed.html | 2 +- src/sql/demo/xlite_demo_data.yaml | 2 +- src/sql/xlite_data.yaml | 10 +++++----- 18 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/classes/XLite/Module/CDev/DeTranslation/install.yaml b/src/classes/XLite/Module/CDev/DeTranslation/install.yaml index 20abf93722..b8b9939ee7 100644 --- a/src/classes/XLite/Module/CDev/DeTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/DeTranslation/install.yaml @@ -460,7 +460,7 @@ XLite\Model\LanguageLabel: - { name: 'Import', translations: [{ code: 'de', label: 'Import' }] } - { name: 'Import / Export', translations: [{ code: 'de', label: 'Import/Export' }] } - { name: 'Import from file', translations: [{ code: 'de', label: 'Aus Dateien importieren' }] } - - { name: 'Import in progress', translations: [{ code: 'de', label: 'Import im Gang' }] } + - { name: 'The import is in progress', translations: [{ code: 'de', label: 'Import im Gang' }] } - { name: 'Import mechanism does not know the field of X and it can not be imported', translations: [{ code: 'de', label: 'Der Importvorgang kennt einen Feld ''{{name}}'' nicht, das Feld kann nicht importiert werden' }] } - { name: 'Import/Export', translations: [{ code: 'de', label: 'Import/Export' }] } - { name: 'Importing will overwrite the existing product information. This operation connot be undone.', translations: [{ code: 'de', label: 'Der Importvorgang wird die vorhandene Produktinformationen überschreiben. Dieser Betrieb ist nicht rückgängig zu machen.' }] } @@ -519,7 +519,7 @@ XLite\Model\LanguageLabel: - { name: 'Low stock', translations: [{ code: 'de', label: 'knappe Vorräte' }] } - { name: 'Maintenance', translations: [{ code: 'de', label: 'Wartung' }] } - { name: 'Maintenance and operation', translations: [{ code: 'de', label: 'Wartung und Betrieb' }] } - - { name: 'Make back-up of your store database', translations: [{ code: 'de', label: 'Datenbanksicherung' }] } + - { name: 'Back up your store database', translations: [{ code: 'de', label: 'Datenbanksicherung' }] } - { name: 'Manage add-ons', translations: [{ code: 'de', label: 'Add-ons verwalten' }] } - { name: 'Manage categories', translations: [{ code: 'de', label: 'Kategorien verwalten' }] } - { name: 'Manage customer and administrator accounts', translations: [{ code: 'de', label: 'Verwaltung der Kunden- und Administrator-Accounts' }] } @@ -600,7 +600,7 @@ XLite\Model\LanguageLabel: - { name: 'Notes', translations: [{ code: 'de', label: 'Notizen' }] } - { name: 'of', translations: [{ code: 'de', label: 'von' }] } - { name: 'Official website', translations: [{ code: 'de', label: 'Offizielle Website' }] } - - { name: 'Online catalog structure set-up', translations: [{ code: 'de', label: 'Erstellung der Online-Katalogstruktur' }] } + - { name: 'Online catalog structure setup', translations: [{ code: 'de', label: 'Erstellung der Online-Katalogstruktur' }] } - { name: 'Open Graph meta tags', translations: [{ code: 'de', label: 'Graph Meta-Tage offen' }] } - { name: 'Open storefront', translations: [{ code: 'de', label: 'Ladenfront öffnen' }] } - { name: 'Operating system', translations: [{ code: 'de', label: 'Betriebssystem' }] } @@ -652,7 +652,7 @@ XLite\Model\LanguageLabel: - { name: 'Please enable JavaScript in your web browser.', translations: [{ code: 'de', label: 'Aktivieren Sie bitte JavaScript in Ihrem Browser' }] } - { name: 'Please identify yourself', translations: [{ code: 'de', label: 'Bitte, identifizieren Sie sich' }] } - { name: 'Please note that some of these modules are definitely incompatible with the upcoming upgrade and will be disabled in order to prevent the system crash', translations: [{ code: 'de', label: 'Bitte beachten Sie, dass einige von Modulen nicht zum kommenden Upgrade kompatibel sind. Diese Module werden deaktiviert werden, um System-Crash zu verhindern.' }] } - - { name: 'Please run the benchmark test in order to estimate your server performance', translations: [{ code: 'de', label: 'Bitte, führen Sie den Benchmark-Test aus, um die Serverleistung einzuschätzen.' }] } + - { name: 'Run benchmark to assess your server performance', translations: [{ code: 'de', label: 'Bitte, führen Sie den Benchmark-Test aus, um die Serverleistung einzuschätzen.' }] } - { name: 'Please select one', translations: [{ code: 'de', label: 'Bitte wählen Sie eins' }] } - { name: 'Please specify a pattern to find the required labels', translations: [{ code: 'de', label: 'Bitte, geben Sie ein Muster an um die obligatorischen Kennsätze zu finden' }] } - { name: 'Please specify text labels for each language', translations: [{ code: 'de', label: 'Geben Sie ein Textkennsatz für jede Sprache ein. Wenn gibt es kein Wert für einige Sprache, wird die {{language}} Kennsatz gebraucht.' }] } @@ -807,7 +807,7 @@ XLite\Model\LanguageLabel: - { name: 'Statistics', translations: [{ code: 'de', label: 'Statistik' }] } - { name: 'Status', translations: [{ code: 'de', label: 'Zustand' }] } - { name: 'Store is closed', translations: [{ code: 'de', label: 'Shop geschlossen' }] } - - { name: 'Store is opened', translations: [{ code: 'de', label: 'Shop eröffnet' }] } + - { name: 'Store is open', translations: [{ code: 'de', label: 'Shop eröffnet' }] } - { name: 'Store Maintenance', translations: [{ code: 'de', label: 'Shop-Wartung' }] } - { name: 'Storefront', translations: [{ code: 'de', label: 'Internet-Schaufenster' }] } - { name: 'Subcategories', translations: [{ code: 'de', label: 'Unterkategorien' }] } @@ -874,7 +874,7 @@ XLite\Model\LanguageLabel: - { name: 'The product option groups have been updated successfully', translations: [{ code: 'de', label: 'Die Produktoptionsgruppen sind erfolgreich aktualisiert worden' }] } - { name: 'The product option groups have not been successfully updated', translations: [{ code: 'de', label: 'Die Produktoptionsgruppen sind nicht erfolgreich aktualisiert worden' }] } - { name: 'The requested page could not be found.', translations: [{ code: 'de', label: 'Leider konnte die angeforderte Seite nicht gefunden werden' }] } - - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back your present database data up before restoring one of the previous states from a back-up.', translations: [{ code: 'de', label: 'Umspeichern ist unumkehrbar und löscht alle Daten von der Shop-Datenbank aus. Es wird empfohlen, die gegenwärtige Datenbank sicherzustellen, bevor Rücksicherung einer alten Kopie aus der Datensicherung.' }] } + - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back up your present database data before restoring one of the previous states from a back-up.', translations: [{ code: 'de', label: 'Umspeichern ist unumkehrbar und löscht alle Daten von der Shop-Datenbank aus. Es wird empfohlen, die gegenwärtige Datenbank sicherzustellen, bevor Rücksicherung einer alten Kopie aus der Datensicherung.' }] } - { name: 'The same as shipping', translations: [{ code: 'de', label: 'Gleichbedeutend wie Versand' }] } - { name: 'The selected shipping markups have been deleted successfully', translations: [{ code: 'de', label: 'Der ausgewählte Versandzuschlag ist erfolgreich gelöscht worden' }] } - { name: 'The selected shipping method has been deleted successfully', translations: [{ code: 'de', label: 'Die gewählte Versandart ist erfolgreich gelöscht worden' }] } @@ -928,7 +928,7 @@ XLite\Model\LanguageLabel: - { name: 'This product has been added to your bag', translations: [{ code: 'de', label: 'Das Produkt ist zu Ihrem Warenkorb hinzugefügt worden' }] } - { name: 'This product is out of stock or it has been disabled for sale', translations: [{ code: 'de', label: '(!) Dieses Produkt ist leider ausverkauft oder deaktiviert' }] } - { name: 'This section displays 10 top-selling products for today, this week and this month', translations: [{ code: 'de', label: 'Dieser Bereich zeigt die heutigen, dieswöchigen, und diesmonatigen Top Ten Artikel' }] } - - { name: 'This section displays order placement statistics', translations: [{ code: 'de', label: 'Dieser Bereich zeigt die Auftragseingangsstatistik an' }] } + - { name: 'This section displays order processing statistics', translations: [{ code: 'de', label: 'Dieser Bereich zeigt die Auftragseingangsstatistik an' }] } - { name: 'This site requires JavaScript to function properly.', translations: [{ code: 'de', label: 'Für das einwandfreies Funktionieren, erfordert die Website Java Script.' }] } - { name: 'This tax is calculated based on customer''s billing address', translations: [{ code: 'de', label: 'Die Mehrwertsteuer wird gerechnet nach der Rechnungadresse des Kunden.' }] } - { name: 'This user name is used for an existing account. Enter another user name or sign in', translations: [{ code: 'de', label: 'Dieser Benutzername ist bereits besetzt. Geben Sie einen anderen Benutzername ein oder ' }] } @@ -985,7 +985,7 @@ XLite\Model\LanguageLabel: - { name: 'Use this component to add an extra charge for every item ordered.', translations: [{ code: 'de', label: 'Diese Komponente ermöglicht die Festlegung des Zuschlags für jeden bestellten Artikel' }] } - { name: 'Use this component to adjust shipping rates according to order subtotals.', translations: [{ code: 'de', label: 'Diese Komponente ermöglicht die Festlegung der Versandkosten nach Zwischensumme' }] } - { name: 'Use this component to specify weight-based charges.', translations: [{ code: 'de', label: 'Diese Komponente ermöglicht die Festlegung der Kosten nach Gewicht' }] } - - { name: 'Use this section to back the database of your online store up. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'de', label: 'In diesem Bereich kann die Shopdatenbank gesichert werden. Merke: die Datenbanksicherung kann bis zu mehreren Minuten dauern.' }] } + - { name: 'Use this section to back up the database of your online store. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'de', label: 'In diesem Bereich kann die Shopdatenbank gesichert werden. Merke: die Datenbanksicherung kann bis zu mehreren Minuten dauern.' }] } - { name: 'Use this section to define shipping rates calculation rules', translations: [{ code: 'de', label: 'In diesem Bereich können die Regeln für Versandkostenberechnung definiert werden.' }] } - { name: 'Use this section to define shipping zones.', translations: [{ code: 'de', label: 'In diesem Bereich können Sie die Versandzonen definieren.' }] } - { name: 'Use this section to define your store''s shipping methods.', translations: [{ code: 'de', label: 'In diesem Bereich können Sie Versandarten definieren.' }] } @@ -1228,4 +1228,4 @@ XLite\Model\LanguageLabel: - { name: 'Downloaded components', translations: [{ code: 'de', label: 'Heruntergeladene Komponenten' }] } - { name: 'If there are some critical errors occured you can do the following', translations: [{ code: 'de', label: 'Wenn einige kritischer Fehler entstehen, unternehmen Sie die folgenden Schritte ' }] } - { name: 'Loading...', translations: [{ code: 'de', label: 'Ladevorgang' }] } - - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'de', label: 'Ist diese Option aktiviert, haben alle Preise im Produktkatalog eine Bezeichnung "inkl. MwSt/exkl. MwSt" je nachdem, ob alle Preise sind inklusiv der Mehrwertsteuer oder nicht. Wenn Sie wünschen diese Bezeichnung nicht zeigen, sollen Sie die VAT-Informationen auf einigen Produktkatalog-Seiten geben, weil, ob die Preise sind inklusiv der Mehrwertsteuer oder nicht, soll allen Kunden klar sein.' }] } \ No newline at end of file + - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'de', label: 'Ist diese Option aktiviert, haben alle Preise im Produktkatalog eine Bezeichnung "inkl. MwSt/exkl. MwSt" je nachdem, ob alle Preise sind inklusiv der Mehrwertsteuer oder nicht. Wenn Sie wünschen diese Bezeichnung nicht zeigen, sollen Sie die VAT-Informationen auf einigen Produktkatalog-Seiten geben, weil, ob die Preise sind inklusiv der Mehrwertsteuer oder nicht, soll allen Kunden klar sein.' }] } diff --git a/src/classes/XLite/Module/CDev/FrTranslation/install.yaml b/src/classes/XLite/Module/CDev/FrTranslation/install.yaml index c43ffe6342..d18dc585d3 100644 --- a/src/classes/XLite/Module/CDev/FrTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/FrTranslation/install.yaml @@ -460,7 +460,7 @@ XLite\Model\LanguageLabel: - { name: 'Import', translations: [{ code: 'fr', label: 'Importation' }] } - { name: 'Import / Export', translations: [{ code: 'fr', label: 'Importer/Exporter' }] } - { name: 'Import from file', translations: [{ code: 'fr', label: 'Importer du fichier' }] } - - { name: 'Import in progress', translations: [{ code: 'fr', label: 'L''importation est en cours' }] } + - { name: 'The import is in progress', translations: [{ code: 'fr', label: 'L''importation est en cours' }] } - { name: 'Import mechanism does not know the field of X and it can not be imported', translations: [{ code: 'fr', label: 'Le mécanisme d''importation ne connaît pas le champ de ''{{name}} et il ne peut pas être importé' }] } - { name: 'Import/Export', translations: [{ code: 'fr', label: 'Importer/Exporter' }] } - { name: 'Importing will overwrite the existing product information. This operation connot be undone.', translations: [{ code: 'fr', label: 'L''importation va écraser les informations existantes des produits. Cette opération ne peut pas être annulée.' }] } @@ -519,7 +519,7 @@ XLite\Model\LanguageLabel: - { name: 'Low stock', translations: [{ code: 'fr', label: 'Quantité limitée' }] } - { name: 'Maintenance', translations: [{ code: 'fr', label: 'Maintenance' }] } - { name: 'Maintenance and operation', translations: [{ code: 'fr', label: 'Opération et maintenance' }] } - - { name: 'Make back-up of your store database', translations: [{ code: 'fr', label: 'Sauvegarder la base de données de votre magasin' }] } + - { name: 'Back up your store database', translations: [{ code: 'fr', label: 'Sauvegarder la base de données de votre magasin' }] } - { name: 'Manage add-ons', translations: [{ code: 'fr', label: 'Gérer les modules' }] } - { name: 'Manage categories', translations: [{ code: 'fr', label: 'Gérer les catégories' }] } - { name: 'Manage customer and administrator accounts', translations: [{ code: 'fr', label: 'Gérer les comptes des clients et administrateur' }] } @@ -600,7 +600,7 @@ XLite\Model\LanguageLabel: - { name: 'Notes', translations: [{ code: 'fr', label: 'Notes' }] } - { name: 'of', translations: [{ code: 'fr', label: 'de' }] } - { name: 'Official website', translations: [{ code: 'fr', label: 'Site officiel' }] } - - { name: 'Online catalog structure set-up', translations: [{ code: 'fr', label: 'Configuration de la structure de votre catalogue en ligne' }] } + - { name: 'Online catalog structure setup', translations: [{ code: 'fr', label: 'Configuration de la structure de votre catalogue en ligne' }] } - { name: 'Open Graph meta tags', translations: [{ code: 'fr', label: 'méta-tag Open Graph' }] } - { name: 'Open storefront', translations: [{ code: 'fr', label: 'Ouvrir le magasin' }] } - { name: 'Operating system', translations: [{ code: 'fr', label: 'Système d''exploitation' }] } @@ -652,7 +652,7 @@ XLite\Model\LanguageLabel: - { name: 'Please enable JavaScript in your web browser.', translations: [{ code: 'fr', label: 'Veuillez activer JavaScript dans votre navigateur Web.' }] } - { name: 'Please identify yourself', translations: [{ code: 'fr', label: 'Identifiez-vous, s''il vous plaît' }] } - { name: 'Please note that some of these modules are definitely incompatible with the upcoming upgrade and will be disabled in order to prevent the system crash', translations: [{ code: 'fr', label: 'Note: certains de ces modules sont incompatibles avec la mise à niveau à venir et seront désactivés pour prévenir la panne du système.' }] } - - { name: 'Please run the benchmark test in order to estimate your server performance', translations: [{ code: 'fr', label: 'Lancez le test de référence afin d''estimer les performances de votre serveur, s''il vous plaît.' }] } + - { name: 'Run benchmark to assess your server performance', translations: [{ code: 'fr', label: 'Lancez le test de référence afin d''estimer les performances de votre serveur, s''il vous plaît.' }] } - { name: 'Please select one', translations: [{ code: 'fr', label: 'Veuillez choisir' }] } - { name: 'Please specify a pattern to find the required labels', translations: [{ code: 'fr', label: 'Spécifiez un modèle pour rechercher des labels requis, s''il vous plat' }] } - { name: 'Please specify text labels for each language', translations: [{ code: 'fr', label: 'Spécifiez les labels de texte à chacune langue, s''il vous plaît. Si vous ne spécifiez pas une valeur à une langue, le {{language}} label sera utilisé' }] } @@ -807,7 +807,7 @@ XLite\Model\LanguageLabel: - { name: 'Statistics', translations: [{ code: 'fr', label: 'Statistiques' }] } - { name: 'Status', translations: [{ code: 'fr', label: 'Statut' }] } - { name: 'Store is closed', translations: [{ code: 'fr', label: 'Magasin fermé' }] } - - { name: 'Store is opened', translations: [{ code: 'fr', label: 'Magasin ouvert' }] } + - { name: 'Store is open', translations: [{ code: 'fr', label: 'Magasin ouvert' }] } - { name: 'Store Maintenance', translations: [{ code: 'fr', label: 'Maintenance du magasin' }] } - { name: 'Storefront', translations: [{ code: 'fr', label: 'Magasin' }] } - { name: 'Subcategories', translations: [{ code: 'fr', label: 'Souscatégories' }] } @@ -874,7 +874,7 @@ XLite\Model\LanguageLabel: - { name: 'The product option groups have been updated successfully', translations: [{ code: 'fr', label: 'Les groupes d''options de produits sont mis à jour avec succès' }] } - { name: 'The product option groups have not been successfully updated', translations: [{ code: 'fr', label: 'Les groupes d''options de produits n''ont pas été correctement misent à jour' }] } - { name: 'The requested page could not be found.', translations: [{ code: 'fr', label: 'La page demandée est introuvable' }] } - - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back your present database data up before restoring one of the previous states from a back-up.', translations: [{ code: 'fr', label: 'La procédure de restauration est irréversible et efface toutes les tables de données de base de votre magasin. Il est fortement recommandé de sauvegarder vos données de la base de données actuelle avant de restauration.' }] } + - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back up your present database data before restoring one of the previous states from a back-up.', translations: [{ code: 'fr', label: 'La procédure de restauration est irréversible et efface toutes les tables de données de base de votre magasin. Il est fortement recommandé de sauvegarder vos données de la base de données actuelle avant de restauration.' }] } - { name: 'The same as shipping', translations: [{ code: 'fr', label: 'La même que celle d''expédition' }] } - { name: 'The selected shipping markups have been deleted successfully', translations: [{ code: 'fr', label: 'Les marges d''expédition sélectionnés sont supprimées avec succès' }] } - { name: 'The selected shipping method has been deleted successfully', translations: [{ code: 'fr', label: 'Le mode de transport choisi est effacé avec succès' }] } @@ -928,7 +928,7 @@ XLite\Model\LanguageLabel: - { name: 'This product has been added to your bag', translations: [{ code: 'fr', label: 'Ce produit est ajouté à votre panier' }] } - { name: 'This product is out of stock or it has been disabled for sale', translations: [{ code: 'fr', label: '(!) Ce produit est épuisé ou il est désactivé pour la vente.' }] } - { name: 'This section displays 10 top-selling products for today, this week and this month', translations: [{ code: 'fr', label: 'Cette section affiche 10 produits les plus vendus pour aujourd''hui, cette semaine, et ce mois.' }] } - - { name: 'This section displays order placement statistics', translations: [{ code: 'fr', label: 'Cette section affiche les statistiques de passage des commandes.' }] } + - { name: 'This section displays order processing statistics', translations: [{ code: 'fr', label: 'Cette section affiche les statistiques de passage des commandes.' }] } - { name: 'This site requires JavaScript to function properly.', translations: [{ code: 'fr', label: 'Ce site exige la mise en place JavaScript pour fonctionnement correct.' }] } - { name: 'This tax is calculated based on customer''s billing address', translations: [{ code: 'fr', label: 'Cette taxe est calculée en fonction d''adresse de facturation du client' }] } - { name: 'This user name is used for an existing account. Enter another user name or sign in', translations: [{ code: 'fr', label: 'Ce nom d''utilisateur est utilisé pour un compte existant. Entrez un autre nom d''utilisateur ou ' }] } @@ -985,7 +985,7 @@ XLite\Model\LanguageLabel: - { name: 'Use this component to add an extra charge for every item ordered.', translations: [{ code: 'fr', label: 'Utilisez ce composant pour ajouter des frais supplémentaires pour chaque article commandé.' }] } - { name: 'Use this component to adjust shipping rates according to order subtotals.', translations: [{ code: 'fr', label: 'Utilisez ce composant pour ajuster les taux d''expédition en fonction de sous-totaux de commande.' }] } - { name: 'Use this component to specify weight-based charges.', translations: [{ code: 'fr', label: 'Utilisez ce composant pour spécifier les frais liés au poids.' }] } - - { name: 'Use this section to back the database of your online store up. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'fr', label: 'Utilisez cette section pour sauvegarder la base de données de votre magasin en ligne. Note: la procédure de sauvegarde de bases de données peut prendre jusqu''à plusieurs minutes.' }] } + - { name: 'Use this section to back up the database of your online store. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'fr', label: 'Utilisez cette section pour sauvegarder la base de données de votre magasin en ligne. Note: la procédure de sauvegarde de bases de données peut prendre jusqu''à plusieurs minutes.' }] } - { name: 'Use this section to define shipping rates calculation rules', translations: [{ code: 'fr', label: 'Utilisez cette section pour définir les règles de calcul des tarifs d''expédition.' }] } - { name: 'Use this section to define shipping zones.', translations: [{ code: 'fr', label: 'Utilisez cette section pour définir les zones d''expédition.' }] } - { name: 'Use this section to define your store''s shipping methods.', translations: [{ code: 'fr', label: 'Utilisez cette section pour définir les méthodes d''expédition de votre magasin.' }] } @@ -1228,4 +1228,4 @@ XLite\Model\LanguageLabel: - { name: 'Downloaded components', translations: [{ code: 'fr', label: 'Components téléchargés' }] } - { name: 'If there are some critical errors occured you can do the following', translations: [{ code: 'fr', label: 'Si il y a quelques erreurs critiques, vous pouvez effectuer les opérations suivantes' }] } - { name: 'Loading...', translations: [{ code: 'fr', label: 'Téléchargement...' }] } - - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'fr', label: 'Si cette option est cochée tous les prix dans le catalogue seront affichés avec le label "TTC" ou "TVA non comprise" selon que la TVA est incluse dans le prix ou non. Si vous ne choisissez pas afficher ce label, il vous faut placer des informations à ce sujet quelque part sur les pages du catalogue comme cela doît être clair pour les clients.' }] } \ No newline at end of file + - { name: 'If this option is ticked all prices in the catalog will be shown with ''inc VAT'' or ''ex VAT'' label depending on whether included VAT into the price or not. If you choose do not display this label, you have to place information about it somewhere on the cat', translations: [{ code: 'fr', label: 'Si cette option est cochée tous les prix dans le catalogue seront affichés avec le label "TTC" ou "TVA non comprise" selon que la TVA est incluse dans le prix ou non. Si vous ne choisissez pas afficher ce label, il vous faut placer des informations à ce sujet quelque part sur les pages du catalogue comme cela doît être clair pour les clients.' }] } diff --git a/src/classes/XLite/Module/CDev/MarketPrice/Main.php b/src/classes/XLite/Module/CDev/MarketPrice/Main.php index 65981e2e42..6a43a3384f 100644 --- a/src/classes/XLite/Module/CDev/MarketPrice/Main.php +++ b/src/classes/XLite/Module/CDev/MarketPrice/Main.php @@ -92,7 +92,7 @@ public static function getMinorVersion() */ public static function getDescription() { - return 'Add support for the product market price.'; + return 'Adds support for the product market price.'; } /** diff --git a/src/classes/XLite/Module/CDev/Moneybookers/install.yaml b/src/classes/XLite/Module/CDev/Moneybookers/install.yaml index 528f1a747d..0d94e702fb 100644 --- a/src/classes/XLite/Module/CDev/Moneybookers/install.yaml +++ b/src/classes/XLite/Module/CDev/Moneybookers/install.yaml @@ -100,4 +100,4 @@ XLite\Model\LanguageLabel: - { name: "Moneybookers Quick Checkout enables you to take direct payment from credit cards, debit cards and over 60 other local payment options in over 200 countries as well as the Moneybookers eWallet.", translations: [{ code: en, label: "Moneybookers Quick Checkout enables you to take direct payment from credit cards, debit cards and over 60 othe local payment options in over 200 countries as well as the Moneybookers eWallet. The highly competitive rates for this service are published on the Moneybookers website at www.moneybookers.com" }] } - { name: "Contact Moneybookers on ecommerce@moneybookers.com or by phone +44 (0) 870 383 0762", translations: [{ code: en, label: "Contact Moneybookers on ecommerce@moneybookers.com or by phone +44 (0) 870 383 0762" }] } - { name: "You have sent a request for activation on the X.", translations: [{ code: en, label: "You have sent a request for activation on the {{date}}. Please be aware that the verification process to use Moneybookers Quick Checkout could take up to 72 hours. You will be contacted by Moneybookers when the verification process has been completed. After activation, Moneybookers will give you access to a new section in your Moneybookers Account called Merchant Tools. Please choose a secret word (NOT the same as your password) there and also enter it in the section below to connect to Moneybookers. The secret word is the last step of your activation process and encrypts your payments securely. After successful submission you are ready to use all direct payment options of Moneybookers." }] } - - { name: "If you don't have a moneybookers account yet, please sign up for a free moneybookers account at: http://www.moneybookers.com", translations: [{ code: en, label: "If you don't have a moneybookers account yet, please sign up for a free moneybookers account at: http://www.moneybookers.com" }] } + - { name: "To process your customers' payments with Moneybookers, you need a Moneybookers account. If you do not have one yet, you can sign up for free at http://www.moneybookers.com", translations: [{ code: en, label: "To process your customers' payments with Moneybookers, you need a Moneybookers account. If you do not have one yet, you can sign up for free at http://www.moneybookers.com" }] } diff --git a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml index 3db636304d..877963cca6 100644 --- a/src/classes/XLite/Module/CDev/RuTranslation/install.yaml +++ b/src/classes/XLite/Module/CDev/RuTranslation/install.yaml @@ -460,7 +460,7 @@ XLite\Model\LanguageLabel: - { name: 'Import', translations: [{ code: 'ru', label: 'Импорт' }] } - { name: 'Import / Export', translations: [{ code: 'ru', label: 'Импорт / ЭкÑпорт' }] } - { name: 'Import from file', translations: [{ code: 'ru', label: 'Импортировать из файла' }] } - - { name: 'Import in progress', translations: [{ code: 'ru', label: 'ВыполнÑетÑÑ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚' }] } + - { name: 'The import is in progress', translations: [{ code: 'ru', label: 'ВыполнÑетÑÑ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚' }] } - { name: 'Import mechanism does not know the field of X and it can not be imported', translations: [{ code: 'ru', label: 'ÐеизвеÑтное поле ''{{name}}'', Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñтого Ð¿Ð¾Ð»Ñ Ð½Ðµ могут быть импортированы.' }] } - { name: 'Import/Export', translations: [{ code: 'ru', label: 'Импорт/ЭкÑпорт' }] } - { name: 'Importing will overwrite the existing product information. This operation connot be undone.', translations: [{ code: 'ru', label: 'Ð’ процеÑÑе импорта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ ÑущеÑтвующих товарах будет перепиÑана. Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°.' }] } @@ -519,7 +519,7 @@ XLite\Model\LanguageLabel: - { name: 'Low stock', translations: [{ code: 'ru', label: 'Маленький оÑтаток' }] } - { name: 'Maintenance', translations: [{ code: 'ru', label: 'ОбÑлуживание' }] } - { name: 'Maintenance and operation', translations: [{ code: 'ru', label: 'ОбÑлуживание и работа' }] } - - { name: 'Make back-up of your store database', translations: [{ code: 'ru', label: 'Создать резервную копию базы данных' }] } + - { name: 'Back up your store database', translations: [{ code: 'ru', label: 'Создать резервную копию базы данных' }] } - { name: 'Manage add-ons', translations: [{ code: 'ru', label: 'Управление дополнениÑми' }] } - { name: 'Manage categories', translations: [{ code: 'ru', label: 'Управление категориÑми' }] } - { name: 'Manage customer and administrator accounts', translations: [{ code: 'ru', label: 'Управление пользователÑми' }] } @@ -600,7 +600,7 @@ XLite\Model\LanguageLabel: - { name: 'Notes', translations: [{ code: 'ru', label: 'ПримечаниÑ' }] } - { name: 'of', translations: [{ code: 'ru', label: 'из' }] } - { name: 'Official website', translations: [{ code: 'ru', label: 'Официальный Ñайт' }] } - - { name: 'Online catalog structure set-up', translations: [{ code: 'ru', label: 'ÐаÑтройка Ñтруктуры каталога магазина' }] } + - { name: 'Online catalog structure setup', translations: [{ code: 'ru', label: 'ÐаÑтройка Ñтруктуры каталога магазина' }] } - { name: 'Open Graph meta tags', translations: [{ code: 'ru', label: 'Мета Ñ‚Ñги Open Graph' }] } - { name: 'Open storefront', translations: [{ code: 'ru', label: 'Открыть магазин' }] } - { name: 'Operating system', translations: [{ code: 'ru', label: 'ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ ÑиÑтема' }] } @@ -652,7 +652,7 @@ XLite\Model\LanguageLabel: - { name: 'Please enable JavaScript in your web browser.', translations: [{ code: 'ru', label: 'ПожалуйÑта, включите JavaScript в браузере.' }] } - { name: 'Please identify yourself', translations: [{ code: 'ru', label: 'ПожалуйÑта, войдите в ÑиÑтему' }] } - { name: 'Please note that some of these modules are definitely incompatible with the upcoming upgrade and will be disabled in order to prevent the system crash', translations: [{ code: 'ru', label: 'Ðекоторые модули полноÑтью неÑовмеÑтимы Ñ Ð¿Ñ€ÐµÐ´ÑтоÑщим обновлением и будут отключены во избежание отказа ÑиÑтемы.' }] } - - { name: 'Please run the benchmark test in order to estimate your server performance', translations: [{ code: 'ru', label: 'ПожалуйÑта, запуÑтите теÑÑ‚, чтобы оценить производительноÑть вашего Ñервера' }] } + - { name: 'Run benchmark to assess your server performance', translations: [{ code: 'ru', label: 'ПожалуйÑта, запуÑтите теÑÑ‚, чтобы оценить производительноÑть вашего Ñервера' }] } - { name: 'Please select one', translations: [{ code: 'ru', label: 'ПожалуйÑта, выберите' }] } - { name: 'Please specify a pattern to find the required labels', translations: [{ code: 'ru', label: 'ПожалуйÑта, введите текÑÑ‚ иÑкомой метки' }] } - { name: 'Please specify text labels for each language', translations: [{ code: 'ru', label: 'ПожалуйÑта, задайте метки Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ Ñзыка. ЕÑли вы не укажете значение Ð´Ð»Ñ ÐºÐ°ÐºÐ¾Ð³Ð¾-либо Ñзыка, будет иÑпользовано значение {{language}} Ñзыка.' }] } @@ -807,7 +807,7 @@ XLite\Model\LanguageLabel: - { name: 'Statistics', translations: [{ code: 'ru', label: 'СтатиÑтика' }] } - { name: 'Status', translations: [{ code: 'ru', label: 'СтатуÑ' }] } - { name: 'Store is closed', translations: [{ code: 'ru', label: 'Магазин закрыт' }] } - - { name: 'Store is opened', translations: [{ code: 'ru', label: 'Магазин открыт' }] } + - { name: 'Store is open', translations: [{ code: 'ru', label: 'Магазин открыт' }] } - { name: 'Store Maintenance', translations: [{ code: 'ru', label: 'ОбÑлуживание' }] } - { name: 'Storefront', translations: [{ code: 'ru', label: 'Магазин' }] } - { name: 'Subcategories', translations: [{ code: 'ru', label: 'Подкатегории' }] } @@ -874,7 +874,7 @@ XLite\Model\LanguageLabel: - { name: 'The product option groups have been updated successfully', translations: [{ code: 'ru', label: 'Группы опций товара уÑпешно обновлены' }] } - { name: 'The product option groups have not been successfully updated', translations: [{ code: 'ru', label: 'Группа опций товара не была обновлена' }] } - { name: 'The requested page could not be found.', translations: [{ code: 'ru', label: 'Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ð°Ñ Ñтраница не найдена' }] } - - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back your present database data up before restoring one of the previous states from a back-up.', translations: [{ code: 'ru', label: 'Процедура воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°. Ð’Ñе текущие данные будут Ñтерты и перезапиÑаны данными из архива. ÐаÑтоÑтельно рекомендуетÑÑ Ñоздать резервную копию текущей базы данных до начала процеÑÑа воÑÑтановлениÑ.' }] } + - { name: 'The restoration procedure is irreversible and erases all data tables from your store database. It is highly recommended that you back up your present database data before restoring one of the previous states from a back-up.', translations: [{ code: 'ru', label: 'Процедура воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÐ¾Ð±Ñ€Ð°Ñ‚Ð¸Ð¼Ð°. Ð’Ñе текущие данные будут Ñтерты и перезапиÑаны данными из архива. ÐаÑтоÑтельно рекомендуетÑÑ Ñоздать резервную копию текущей базы данных до начала процеÑÑа воÑÑтановлениÑ.' }] } - { name: 'The same as shipping', translations: [{ code: 'ru', label: 'Совпадает Ñ Ð°Ð´Ñ€ÐµÑом получателÑ' }] } - { name: 'The selected shipping markups have been deleted successfully', translations: [{ code: 'ru', label: 'Выбранные надбавки к ÑтоимоÑти доÑтавки уÑпешно удалены' }] } - { name: 'The selected shipping method has been deleted successfully', translations: [{ code: 'ru', label: 'Указанный метод доÑтавки уÑпешно удален' }] } @@ -928,7 +928,7 @@ XLite\Model\LanguageLabel: - { name: 'This product has been added to your bag', translations: [{ code: 'ru', label: 'Этот товар добавлен в вашу корзину' }] } - { name: 'This product is out of stock or it has been disabled for sale', translations: [{ code: 'ru', label: '(!) Товар отÑутÑтвует на Ñкладе или ÑнÑÑ‚ Ñ Ð¿Ñ€Ð¾Ð´Ð°Ð¶Ð¸.' }] } - { name: 'This section displays 10 top-selling products for today, this week and this month', translations: [{ code: 'ru', label: 'Ð”Ð°Ð½Ð½Ð°Ñ ÑÐµÐºÑ†Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑтавлÑет 10 наиболее чаÑто покупаемых товаров на ÑегоднÑшний день, за текущую неделю и меÑÑц.' }] } - - { name: 'This section displays order placement statistics', translations: [{ code: 'ru', label: 'Ð’ данной Ñекции показана ÑтатиÑтика Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð¾Ð².' }] } + - { name: 'This section displays order processing statistics', translations: [{ code: 'ru', label: 'Ð’ данной Ñекции показана ÑтатиÑтика Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·Ð¾Ð².' }] } - { name: 'This site requires JavaScript to function properly.', translations: [{ code: 'ru', label: 'Ð”Ð»Ñ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ð¾Ð¹ работы данного Ñайта необходим JavaScript. ПожалуйÑта, включите поддержку JavaScript в Ñвоем браузере.' }] } - { name: 'This tax is calculated based on customer''s billing address', translations: [{ code: 'ru', label: 'Ðалоги раÑÑчитаны по адреÑу плательщика' }] } - { name: 'This user name is used for an existing account. Enter another user name or sign in', translations: [{ code: 'ru', label: 'Такое Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ ÑƒÐ¶Ðµ зарегиÑтрировано. Укажите другое Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð»Ð¸ ' }] } @@ -985,7 +985,7 @@ XLite\Model\LanguageLabel: - { name: 'Use this component to add an extra charge for every item ordered.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñтот компонент Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ð°Ñ†ÐµÐ½ÐºÐ¸ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ единицы заказываемого товара.' }] } - { name: 'Use this component to adjust shipping rates according to order subtotals.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñтот компонент Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÑтоимоÑти доÑтавки в завиÑимоÑти от Ñуммы заказа.' }] } - { name: 'Use this component to specify weight-based charges.', translations: [{ code: 'ru', label: 'ИÑпользуйте Ñтот компонент Ð´Ð»Ñ Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð½Ð°Ñ†ÐµÐ½Ð¾Ðº в завиÑимоÑти от веÑа заказа.' }] } - - { name: 'Use this section to back the database of your online store up. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð³Ð¾ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð‘Ð” магазина. Примечание: Ñоздание резервной копии БД может занÑть продолжительное времÑ.' }] } + - { name: 'Use this section to back up the database of your online store. Please note that the database backup procedure can take up to several minutes.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð³Ð¾ ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð‘Ð” магазина. Примечание: Ñоздание резервной копии БД может занÑть продолжительное времÑ.' }] } - { name: 'Use this section to define shipping rates calculation rules', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию, чтобы определить правила раÑчета ÑтоимоÑти доÑтавки.' }] } - { name: 'Use this section to define shipping zones.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð·Ð¾Ð½ доÑтавки.' }] } - { name: 'Use this section to define your store''s shipping methods.', translations: [{ code: 'ru', label: 'ИÑпользуйте данную Ñекцию Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¼ÐµÑ‚Ð¾Ð´Ð¾Ð² доÑтавки, доÑтупных в магазине.' }] } diff --git a/src/classes/XLite/Upgrade/Cell.php b/src/classes/XLite/Upgrade/Cell.php index 36f40d8046..23b6b6d787 100644 --- a/src/classes/XLite/Upgrade/Cell.php +++ b/src/classes/XLite/Upgrade/Cell.php @@ -558,7 +558,7 @@ public function getErrorMessages() } /** - * Check if there is enpugh disk free space. + * Check if there is enough disk free space. * Return message on error * * @return string diff --git a/src/classes/XLite/View/AdminPanel.php b/src/classes/XLite/View/AdminPanel.php index edf4b099bc..1a4371bb6e 100644 --- a/src/classes/XLite/View/AdminPanel.php +++ b/src/classes/XLite/View/AdminPanel.php @@ -125,7 +125,7 @@ protected function defineItems() self::ITEM_TARGET => 'categories', self::ITEM_ICON => 'images/menu/icon_categories.gif', self::ITEM_TITLE => 'Categories', - self::ITEM_DESCRIPTION => 'Online catalog structure set-up', + self::ITEM_DESCRIPTION => 'Online catalog structure setup', ), array( self::ITEM_TARGET => 'orders_stats', @@ -155,7 +155,7 @@ protected function defineItems() self::ITEM_TARGET => 'db_backup', self::ITEM_ICON => 'images/menu/icon_catalog.gif', self::ITEM_TITLE => 'Store Maintenance', - self::ITEM_DESCRIPTION => 'Make back-up of your store database', + self::ITEM_DESCRIPTION => 'Back up your store database', ), ); } diff --git a/src/classes/XLite/View/Model/Address/Address.php b/src/classes/XLite/View/Model/Address/Address.php index 256c1c0527..66068c0430 100644 --- a/src/classes/XLite/View/Model/Address/Address.php +++ b/src/classes/XLite/View/Model/Address/Address.php @@ -57,7 +57,7 @@ class Address extends \XLite\View\Model\AModel ), 'firstname' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Firstname', + self::SCHEMA_LABEL => 'First name', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-firstname', self::SCHEMA_MODEL_ATTRIBUTES => array( @@ -66,7 +66,7 @@ class Address extends \XLite\View\Model\AModel ), 'lastname' => array( self::SCHEMA_CLASS => '\XLite\View\FormField\Input\Text', - self::SCHEMA_LABEL => 'Lastname', + self::SCHEMA_LABEL => 'Last name', self::SCHEMA_REQUIRED => true, \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'address-lastname', self::SCHEMA_MODEL_ATTRIBUTES => array( diff --git a/src/skins/admin/en/benchmark_summary/empty.tpl b/src/skins/admin/en/benchmark_summary/empty.tpl index 9135e80b27..3d9e67111e 100644 --- a/src/skins/admin/en/benchmark_summary/empty.tpl +++ b/src/skins/admin/en/benchmark_summary/empty.tpl @@ -9,7 +9,7 @@ * @link http://www.litecommerce.com/ * @since 1.0.0 *} -

    {t(#Please run the benchmark test in order to estimate your server performance#)}

    +

    {t(#Run benchmark to assess your server performance#)}

    -{t(#Use this section to back the database of your online store up. Please note that the database backup procedure can take up to several minutes.#)} +{t(#Use this section to back up the database of your online store. Please note that the database backup procedure can take up to several minutes.#)} {t(#How to back up your store database#)} >>>