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
7c359905
Commit
7c359905
authored
Sep 01, 2009
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixed classloader issue.
parent
691aa923
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
ClassLoader.php
lib/Doctrine/Common/ClassLoader.php
+12
-4
No files found.
lib/Doctrine/Common/ClassLoader.php
View file @
7c359905
...
...
@@ -49,7 +49,7 @@ class ClassLoader
/**
* @var string Namespace separator
*/
private
$_namespaceSeparator
=
array
(
'\\'
,
'_'
)
;
private
$_namespaceSeparator
=
'\\'
;
/**
* @var string File extension used for classes
...
...
@@ -131,12 +131,20 @@ class ClassLoader
if
(
class_exists
(
$className
,
false
)
||
interface_exists
(
$className
,
false
))
{
return
false
;
}
$prefix
=
substr
(
$className
,
0
,
strpos
(
$className
,
$this
->
_namespaceSeparator
));
$prefix
=
''
;
$separator
=
$this
->
_namespaceSeparator
;
if
((
$pos
=
strpos
(
$className
,
$this
->
_namespaceSeparator
))
!==
false
)
{
$prefix
=
substr
(
$className
,
0
,
strpos
(
$className
,
$this
->
_namespaceSeparator
));
}
else
if
((
$pos
=
strpos
(
$className
,
'_'
))
!==
false
)
{
// Support for '_' namespace separator for compatibility with Zend/PEAR/...
$prefix
=
substr
(
$className
,
0
,
strpos
(
$className
,
'_'
));
$separator
=
'_'
;
}
// If we have a custom path for namespace, use it
$class
=
((
isset
(
$this
->
_basePaths
[
$prefix
]))
?
$this
->
_basePaths
[
$prefix
]
.
DIRECTORY_SEPARATOR
:
''
)
.
str_replace
(
$
this
->
_namespaceS
eparator
,
DIRECTORY_SEPARATOR
,
$className
)
.
$this
->
_fileExtension
;
.
str_replace
(
$
s
eparator
,
DIRECTORY_SEPARATOR
,
$className
)
.
$this
->
_fileExtension
;
// Assure file exists in codebase before require if flag is active
if
(
$this
->
_checkFileExists
)
{
...
...
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