Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'zf2/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 284 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

14 changes: 0 additions & 14 deletions .travis/run-tests.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .travis/skipped-components

This file was deleted.

61 changes: 0 additions & 61 deletions .travis/tested-components

This file was deleted.

16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zendframework/zend-dom",
"description": "Zend\\Dom component",
"description": "provides tools for working with DOM documents and structures",
"license": "BSD-3-Clause",
"keywords": [
"zf2",
Expand All @@ -9,26 +9,26 @@
"homepage": "https://github.com/zendframework/zend-dom",
"autoload": {
"psr-4": {
"Zend\\Dom\\": "src/"
"Zend\\Dom": "src/"
}
},
"require": {
"php": ">=5.3.23"
"php": ">=5.3.3"
},
"extra": {
"branch-alias": {
"dev-master": "2.4-dev",
"dev-develop": "2.5-dev"
}
},
"require-dev": {
"fabpot/php-cs-fixer": "1.7.*",
"satooshi/php-coveralls": "dev-master",
"phpunit/PHPUnit": "~4.0"
},
"autoload-dev": {
"psr-4": {
"ZendTest\\Dom\\": "test/"
}
},
"require-dev": {
"fabpot/php-cs-fixer": "1.7.*",
"satooshi/php-coveralls": "dev-master",
"phpunit/PHPUnit": "~4.0"
}
}
30 changes: 9 additions & 21 deletions src/Css2Xpath.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* 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 license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Dom
*/

namespace Zend\Dom;
Expand All @@ -25,8 +15,6 @@
*
* @package Zend_Dom
* @subpackage Query
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Css2Xpath
{
Expand Down Expand Up @@ -112,7 +100,7 @@ function ($matches) {
$expression = preg_replace_callback(
'|\[([a-z0-9_-]+)~=[\'"]([^\'"]+)[\'"]\]|i',
function ($matches) {
return "[contains(concat(' ', normalize-space(@" . strtolower($matches[1]) . "), ' '), ' "
return "[contains(concat(' ', normalize-space(@" . strtolower($matches[1]) . "), ' '), ' "
. $matches[2] . " ')]";
},
$expression
Expand All @@ -122,16 +110,16 @@ function ($matches) {
$expression = preg_replace_callback(
'|\[([a-z0-9_-]+)\*=[\'"]([^\'"]+)[\'"]\]|i',
function ($matches) {
return "[contains(@" . strtolower($matches[1]) . ", '"
return "[contains(@" . strtolower($matches[1]) . ", '"
. $matches[2] . "')]";
},
$expression
);

// Classes
$expression = preg_replace(
'|\.([a-z][a-z0-9_-]*)|i',
"[contains(concat(' ', normalize-space(@class), ' '), ' \$1 ')]",
'|\.([a-z][a-z0-9_-]*)|i',
"[contains(concat(' ', normalize-space(@class), ' '), ' \$1 ')]",
$expression
);

Expand Down
22 changes: 5 additions & 17 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* 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 license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Dom
*/

namespace Zend\Dom\Exception;
Expand All @@ -25,8 +15,6 @@
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface
{
Expand Down
26 changes: 6 additions & 20 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* 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 license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Dom
*/

namespace Zend\Dom\Exception;
Expand All @@ -25,11 +15,7 @@
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException
extends \RuntimeException
implements ExceptionInterface
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
34 changes: 11 additions & 23 deletions src/NodeList.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* 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 license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Dom
*/

namespace Zend\Dom;

use Iterator,
Countable,
DOMDocument,
DOMNodeList,
DOMXPath,
DOMElement;
use Countable;
use DOMDocument;
use DOMElement;
use DOMNodeList;
use DOMXPath;
use Iterator;

/**
* Nodelist for DOM XPath query
*
* @package Zend_Dom
* @subpackage Query
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class NodeList implements Iterator, Countable
{
Expand Down
Loading

0 comments on commit 9dc42d7

Please sign in to comment.