Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd3fefb

Browse files
committed
[CssSelector] remove ConverterInterface
1 parentb630972 commitfd3fefb

File tree

4 files changed

+53
-74
lines changed

4 files changed

+53
-74
lines changed

‎src/Symfony/Component/CssSelector/CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
2.8.0
55
-----
66

7-
* Added theConverterInterface and the Converter implementation as a non-static API for the component.
7+
* Added the`CssSelectorConverter` class as a non-static API for the component.
88
* Deprecated the`CssSelector` static API of the component.
99

1010
2.1.0

‎src/Symfony/Component/CssSelector/ConverterInterface.php‎

Lines changed: 0 additions & 71 deletions
This file was deleted.

‎src/Symfony/Component/CssSelector/Converter.php‎renamed to ‎src/Symfony/Component/CssSelector/CssSelectorConverter.php‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@
1919
useSymfony\Component\CssSelector\XPath\Translator;
2020

2121
/**
22+
* CssSelectorConverter is the main entry point of the component and can convert CSS
23+
* selectors to XPath expressions.
24+
*
2225
* @author Christophe Coevoet <stof@notk.org>
2326
*/
24-
classConverterimplements ConverterInterface
27+
classCssSelectorConverter
2528
{
2629
private$translator;
2730

@@ -45,7 +48,15 @@ public function __construct($html = true)
4548
}
4649

4750
/**
48-
* {@inheritdoc}
51+
* Translates a CSS expression to its XPath equivalent.
52+
*
53+
* Optionally, a prefix can be added to the resulting XPath
54+
* expression with the $prefix parameter.
55+
*
56+
* @param string $cssExpr The CSS expression.
57+
* @param string $prefix An optional prefix for the XPath expression.
58+
*
59+
* @return string
4960
*/
5061
publicfunctiontoXPath($cssExpr,$prefix ='descendant-or-self::')
5162
{

‎src/Symfony/Component/CssSelector/README.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,42 @@ You can run the unit tests with the following command:
4545
$ cd path/to/Symfony/Component/CssSelector/
4646
$ composer install
4747
$ phpunit
48+
49+
License
50+
-------
51+
52+
This component is a port of the Python cssselect library,
53+
which is copyright Ian Bicking,@seehttps://github.com/SimonSapin/cssselect.
54+
55+
Copyright (c) 2007-2012 Ian Bicking and contributors. See AUTHORS
56+
for more details.
57+
58+
All rights reserved.
59+
60+
Redistribution and use in source and binary forms, with or without
61+
modification, are permitted provided that the following conditions are
62+
met:
63+
64+
1. Redistributions of source code must retain the above copyright
65+
notice, this list of conditions and the following disclaimer.
66+
67+
2. Redistributions in binary form must reproduce the above copyright
68+
notice, this list of conditions and the following disclaimer in
69+
the documentation and/or other materials provided with the
70+
distribution.
71+
72+
3. Neither the name of Ian Bicking nor the names of its contributors may
73+
be used to endorse or promote products derived from this software
74+
without specific prior written permission.
75+
76+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
77+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
78+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
79+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IAN BICKING OR
80+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
81+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
82+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
83+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
84+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
85+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
86+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp