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
119c4eca
Commit
119c4eca
authored
Mar 18, 2010
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixing coding standards of generated proxies
parent
af65410a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
ProxyFactory.php
lib/Doctrine/ORM/Proxy/ProxyFactory.php
+12
-6
No files found.
lib/Doctrine/ORM/Proxy/ProxyFactory.php
View file @
119c4eca
...
...
@@ -197,7 +197,8 @@ class ProxyFactory
}
}
$methods
.=
$parameterString
.
') {'
.
PHP_EOL
;
$methods
.=
$parameterString
.
')'
;
$methods
.=
PHP_EOL
.
' {'
.
PHP_EOL
;
$methods
.=
' $this->_load();'
.
PHP_EOL
;
$methods
.=
' return parent::'
.
$method
->
getName
()
.
'('
.
$argumentString
.
');'
;
$methods
.=
PHP_EOL
.
' }'
.
PHP_EOL
;
...
...
@@ -242,19 +243,23 @@ class ProxyFactory
/** Reference Proxy class code template */
private
static
$_proxyClassTemplate
=
'<?php
namespace <namespace> {
namespace <namespace>
{
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class <proxyClassName> extends \<className> implements \Doctrine\ORM\Proxy\Proxy {
class <proxyClassName> extends \<className> implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
public $__isInitialized__ = false;
public function __construct($entityPersister, $identifier) {
public function __construct($entityPersister, $identifier)
{
$this->_entityPersister = $entityPersister;
$this->_identifier = $identifier;
}
private function _load() {
private function _load()
{
if (!$this->__isInitialized__ && $this->_entityPersister) {
$this->__isInitialized__ = true;
if ($this->_entityPersister->load($this->_identifier, $this) === null) {
...
...
@@ -267,7 +272,8 @@ namespace <namespace> {
<methods>
public function __sleep() {
public function __sleep()
{
if (!$this->__isInitialized__) {
throw new \RuntimeException("Not fully loaded proxy can not be serialized.");
}
...
...
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