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

Commit50e696d

Browse files
committed
[CssSelector] remove ConverterInterface
1 parenta76eae8 commit50e696d

File tree

3 files changed

+50
-80
lines changed

3 files changed

+50
-80
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 theConverter implementation as a non-static API for the component.
7+
* Added the`Converter` 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/Converter.php‎

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,48 @@
1919
useSymfony\Component\CssSelector\XPath\Translator;
2020

2121
/**
22-
* @author Christophe Coevoet <stof@notk.org>
22+
* Converter is the main entry point of the component and can convert CSS
23+
* selectors to XPath expressions.
24+
*
25+
* This component is a port of the Python cssselect library,
26+
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
27+
*
28+
* Copyright (c) 2007-2012 Ian Bicking and contributors. See AUTHORS
29+
* for more details.
30+
*
31+
* All rights reserved.
32+
*
33+
* Redistribution and use in source and binary forms, with or without
34+
* modification, are permitted provided that the following conditions are
35+
* met:
2336
*
24-
* @api
37+
* 1. Redistributions of source code must retain the above copyright
38+
* notice, this list of conditions and the following disclaimer.
39+
*
40+
* 2. Redistributions in binary form must reproduce the above copyright
41+
* notice, this list of conditions and the following disclaimer in
42+
* the documentation and/or other materials provided with the
43+
* distribution.
44+
*
45+
* 3. Neither the name of Ian Bicking nor the names of its contributors may
46+
* be used to endorse or promote products derived from this software
47+
* without specific prior written permission.
48+
*
49+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IAN BICKING OR
53+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
54+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
55+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
56+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
57+
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
58+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
59+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60+
*
61+
* @author Christophe Coevoet <stof@notk.org>
2562
*/
26-
class Converterimplements ConverterInterface
63+
class Converter
2764
{
2865
private$translator;
2966

@@ -47,7 +84,15 @@ public function __construct($html = true)
4784
}
4885

4986
/**
50-
* {@inheritdoc}
87+
* Translates a CSS expression to its XPath equivalent.
88+
*
89+
* Optionally, a prefix can be added to the resulting XPath
90+
* expression with the $prefix parameter.
91+
*
92+
* @param string $cssExpr The CSS expression.
93+
* @param string $prefix An optional prefix for the XPath expression.
94+
*
95+
* @return string
5196
*/
5297
publicfunctiontoXPath($cssExpr,$prefix ='descendant-or-self::')
5398
{

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

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp