Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
b102ebf9
Commit
b102ebf9
authored
Oct 16, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
76bd8b76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
Search.php
lib/Doctrine/Search.php
+9
-1
Standard.php
lib/Doctrine/Search/Analyzer/Standard.php
+4
-0
File.php
lib/Doctrine/Search/File.php
+4
-0
No files found.
lib/Doctrine/Search.php
View file @
b102ebf9
...
...
@@ -61,6 +61,15 @@ class Doctrine_Search extends Doctrine_Plugin
}
}
public
function
search
(
$query
)
{
$q
=
new
Doctrine_Search_Query
(
$this
->
_options
[
'pluginTable'
]);
$q
->
search
(
$query
);
return
$q
->
execute
();
}
public
function
analyze
(
$text
)
{
...
...
@@ -93,7 +102,6 @@ class Doctrine_Search extends Doctrine_Plugin
$index
->
save
();
}
else
{
print
'joo'
;
foreach
(
$fields
as
$field
)
{
$value
=
$data
[
$field
];
...
...
lib/Doctrine/Search/Analyzer/Standard.php
View file @
b102ebf9
...
...
@@ -59,6 +59,7 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
'any'
,
'are'
,
'area'
,
'arent'
,
'around'
,
'as'
,
'at'
,
...
...
@@ -263,12 +264,15 @@ class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Inte
'will'
,
'with'
,
'would'
,
'yet'
,
'you'
,
'your'
,
'yours'
);
public
function
analyze
(
$text
)
{
$text
=
preg_replace
(
'/[\'`´"]/'
,
''
,
$text
);
$text
=
preg_replace
(
'/[^A-Za-z0-9]/'
,
' '
,
$text
);
$text
=
str_replace
(
' '
,
' '
,
$text
);
...
...
lib/Doctrine/Search/File.php
View file @
b102ebf9
...
...
@@ -57,6 +57,10 @@ class Doctrine_Search_File extends Doctrine_Search
RecursiveIteratorIterator
::
LEAVES_ONLY
);
foreach
(
$it
as
$file
)
{
if
(
strpos
(
$file
,
DIRECTORY_SEPARATOR
.
'.svn'
)
!==
false
)
{
continue
;
}
$this
->
updateIndex
(
array
(
'url'
=>
$file
->
getPathName
(),
'content'
=>
file_get_contents
(
$file
)));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment