Created
March 7, 2013 18:37
-
-
Save natelenart/5110547 to your computer and use it in GitHub Desktop.
Entity with callable type-hint and generated proxy missing callable type-hint.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace DoctrineProxies\__CG__; | |
/** | |
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR | |
*/ | |
class Entity extends \Entity implements \Doctrine\ORM\Proxy\Proxy | |
{ | |
/** | |
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with | |
* three parameters, being respectively the proxy object to be initialized, the method that triggered the | |
* initialization process and an array of ordered parameters that were passed to that method. | |
* | |
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer | |
*/ | |
public $__initializer__; | |
/** | |
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object | |
* | |
* @see \Doctrine\Common\Persistence\Proxy::__setCloner | |
*/ | |
public $__cloner__; | |
/** | |
* @var boolean flag indicating if this object was already initialized | |
* | |
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized | |
*/ | |
public $__isInitialized__ = false; | |
/** | |
* @var array properties to be lazy loaded, with keys being the property | |
* names and values being their default values | |
* | |
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties | |
*/ | |
public static $lazyPropertiesDefaults = array(); | |
/** | |
* @param \Closure $initializer | |
* @param \Closure $cloner | |
*/ | |
public function __construct($initializer = null, $cloner = null) | |
{ | |
$this->__initializer__ = $initializer; | |
$this->__cloner__ = $cloner; | |
} | |
/** | |
* | |
* @return array | |
*/ | |
public function __sleep() | |
{ | |
if ($this->__isInitialized__) { | |
return array('__isInitialized__', 'id'); | |
} | |
return array('__isInitialized__', 'id'); | |
} | |
/** | |
* | |
*/ | |
public function __wakeup() | |
{ | |
if ( ! $this->__isInitialized__) { | |
$this->__initializer__ = function (Entity $proxy) { | |
$proxy->__setInitializer(null); | |
$proxy->__setCloner(null); | |
$existingProperties = get_object_vars($proxy); | |
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) { | |
if ( ! array_key_exists($property, $existingProperties)) { | |
$proxy->$property = $defaultValue; | |
} | |
} | |
}; | |
} | |
} | |
/** | |
* | |
*/ | |
public function __clone() | |
{ | |
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array()); | |
} | |
/** | |
* Forces initialization of the proxy | |
*/ | |
public function __load() | |
{ | |
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific loading logic | |
*/ | |
public function __isInitialized() | |
{ | |
return $this->__isInitialized__; | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific loading logic | |
*/ | |
public function __setInitialized($initialized) | |
{ | |
$this->__isInitialized__ = $initialized; | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific loading logic | |
*/ | |
public function __setInitializer(\Closure $initializer = null) | |
{ | |
$this->__initializer__ = $initializer; | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific loading logic | |
*/ | |
public function __getInitializer() | |
{ | |
return $this->__initializer__; | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific loading logic | |
*/ | |
public function __setCloner(\Closure $cloner = null) | |
{ | |
$this->__cloner__ = $cloner; | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific cloning logic | |
*/ | |
public function __getCloner() | |
{ | |
return $this->__cloner__; | |
} | |
/** | |
* {@inheritDoc} | |
* @internal generated method: use only when explicitly handling proxy specific loading logic | |
* @static | |
*/ | |
public function __getLazyProperties() | |
{ | |
return self::$lazyPropertiesDefaults; | |
} | |
/** | |
* {@inheritDoc} | |
*/ | |
public function setFoo($foo) | |
{ | |
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setFoo', array($foo)); | |
return parent::setFoo($foo); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"doctrine/orm": "*" | |
}, | |
"minimum-stability": "dev" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hash": "6a8847fa8835c6a00de7926c165c6a07", | |
"packages": [ | |
{ | |
"name": "doctrine/annotations", | |
"version": "v1.0", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/annotations.git", | |
"reference": "v1.0" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://github.com/doctrine/annotations/archive/v1.0.zip", | |
"reference": "v1.0", | |
"shasum": "" | |
}, | |
"require": { | |
"doctrine/lexer": "1.*", | |
"php": ">=5.3.2" | |
}, | |
"require-dev": { | |
"doctrine/cache": "1.*" | |
}, | |
"type": "library", | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\Common\\Annotations\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
}, | |
{ | |
"name": "Johannes Schmitt", | |
"email": "schmittjoh@gmail.com", | |
"homepage": "https://github.com/schmittjoh", | |
"role": "Developer of wrapped JMSSerializerBundle" | |
} | |
], | |
"description": "Docblock Annotations Parser", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"annotations", | |
"docblock", | |
"parser" | |
], | |
"time": "2013-01-12 19:23:32" | |
}, | |
{ | |
"name": "doctrine/cache", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/cache.git", | |
"reference": "f82e2e24d429d36a02266a584b889bd2d09e4fd2" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/cache/zipball/f82e2e24d429d36a02266a584b889bd2d09e4fd2", | |
"reference": "f82e2e24d429d36a02266a584b889bd2d09e4fd2", | |
"shasum": "" | |
}, | |
"require": { | |
"php": ">=5.3.2" | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "1.0.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\Common\\Cache\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
}, | |
{ | |
"name": "Johannes Schmitt", | |
"email": "schmittjoh@gmail.com", | |
"homepage": "https://github.com/schmittjoh", | |
"role": "Developer of wrapped JMSSerializerBundle" | |
} | |
], | |
"description": "Caching library offering an object-oriented API for many cache backends", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"cache", | |
"caching" | |
], | |
"time": "2013-03-07 12:15:13" | |
}, | |
{ | |
"name": "doctrine/collections", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/collections.git", | |
"reference": "560f29c39cfcfbcd210e5d549d993a39d898b04b" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/collections/zipball/560f29c39cfcfbcd210e5d549d993a39d898b04b", | |
"reference": "560f29c39cfcfbcd210e5d549d993a39d898b04b", | |
"shasum": "" | |
}, | |
"require": { | |
"php": ">=5.3.2" | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "1.1.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\Common\\Collections\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
}, | |
{ | |
"name": "Johannes Schmitt", | |
"email": "schmittjoh@gmail.com", | |
"homepage": "https://github.com/schmittjoh", | |
"role": "Developer of wrapped JMSSerializerBundle" | |
} | |
], | |
"description": "Collections Abstraction library", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"array", | |
"collections", | |
"iterator" | |
], | |
"time": "2013-03-07 12:15:54" | |
}, | |
{ | |
"name": "doctrine/common", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/common.git", | |
"reference": "e211821c719d33ad2cd1186fafb4dadb5f74d6ed" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/common/zipball/e211821c719d33ad2cd1186fafb4dadb5f74d6ed", | |
"reference": "e211821c719d33ad2cd1186fafb4dadb5f74d6ed", | |
"shasum": "" | |
}, | |
"require": { | |
"doctrine/annotations": "1.*", | |
"doctrine/cache": "1.*", | |
"doctrine/collections": "1.*", | |
"doctrine/inflector": "1.*", | |
"doctrine/lexer": "1.*", | |
"php": ">=5.3.2" | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "2.4.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\Common\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
}, | |
{ | |
"name": "Johannes Schmitt", | |
"email": "schmittjoh@gmail.com", | |
"homepage": "https://github.com/schmittjoh", | |
"role": "Developer of wrapped JMSSerializerBundle" | |
} | |
], | |
"description": "Common Library for Doctrine projects", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"annotations", | |
"collections", | |
"eventmanager", | |
"persistence", | |
"spl" | |
], | |
"time": "2013-02-19 09:37:33" | |
}, | |
{ | |
"name": "doctrine/dbal", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/dbal.git", | |
"reference": "55128a6549b777ec91d7808989df236dbd508111" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/dbal/zipball/55128a6549b777ec91d7808989df236dbd508111", | |
"reference": "55128a6549b777ec91d7808989df236dbd508111", | |
"shasum": "" | |
}, | |
"require": { | |
"doctrine/common": "2.4.x-dev", | |
"php": ">=5.3.2" | |
}, | |
"require-dev": { | |
"phpunit/phpunit": "3.7.*", | |
"symfony/console": "2.*" | |
}, | |
"suggest": { | |
"symfony/console": "For helpful console commands such as SQL execution and import of files." | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "2.4.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\DBAL\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
} | |
], | |
"description": "Database Abstraction Layer", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"database", | |
"dbal", | |
"persistence", | |
"queryobject" | |
], | |
"time": "2013-03-04 22:33:37" | |
}, | |
{ | |
"name": "doctrine/inflector", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/inflector.git", | |
"reference": "04d0ec2dc46453e0da3161ed6fd1496159547ae7" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/inflector/zipball/04d0ec2dc46453e0da3161ed6fd1496159547ae7", | |
"reference": "04d0ec2dc46453e0da3161ed6fd1496159547ae7", | |
"shasum": "" | |
}, | |
"require": { | |
"php": ">=5.3.2" | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "1.0.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\Common\\Inflector\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
}, | |
{ | |
"name": "Johannes Schmitt", | |
"email": "schmittjoh@gmail.com", | |
"homepage": "https://github.com/schmittjoh", | |
"role": "Developer of wrapped JMSSerializerBundle" | |
} | |
], | |
"description": "Common String Manipulations with regard to casing and singular/plural rules.", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"inflection", | |
"pluralize", | |
"singularize", | |
"string" | |
], | |
"time": "2013-03-07 12:15:34" | |
}, | |
{ | |
"name": "doctrine/lexer", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/lexer.git", | |
"reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/lexer/zipball/bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", | |
"reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", | |
"shasum": "" | |
}, | |
"require": { | |
"php": ">=5.3.2" | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "1.0.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\Common\\Lexer\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Johannes Schmitt", | |
"email": "schmittjoh@gmail.com", | |
"homepage": "https://github.com/schmittjoh", | |
"role": "Developer of wrapped JMSSerializerBundle" | |
} | |
], | |
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"lexer", | |
"parser" | |
], | |
"time": "2013-03-07 12:15:25" | |
}, | |
{ | |
"name": "doctrine/orm", | |
"version": "dev-master", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/doctrine2.git", | |
"reference": "399584db4c3db4846dd7038ec0ca5bec8dcafe54" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/doctrine/doctrine2/zipball/399584db4c3db4846dd7038ec0ca5bec8dcafe54", | |
"reference": "399584db4c3db4846dd7038ec0ca5bec8dcafe54", | |
"shasum": "" | |
}, | |
"require": { | |
"doctrine/dbal": ">=2.4-dev,<2.5-dev", | |
"ext-pdo": "*", | |
"php": ">=5.3.2", | |
"symfony/console": "2.*" | |
}, | |
"suggest": { | |
"symfony/yaml": "If you want to use YAML Metadata Mapping Driver" | |
}, | |
"bin": [ | |
"bin/doctrine", | |
"bin/doctrine.php" | |
], | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "2.4.x-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Doctrine\\ORM\\": "lib/" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Jonathan Wage", | |
"email": "jonwage@gmail.com", | |
"homepage": "http://www.jwage.com/" | |
}, | |
{ | |
"name": "Christoph Dorn", | |
"email": "guilhermeblanco@gmail.com", | |
"homepage": "http://www.instaclick.com" | |
}, | |
{ | |
"name": "Roman Borschel", | |
"email": "roman@code-factory.org" | |
}, | |
{ | |
"name": "Benjamin Eberlei", | |
"email": "kontakt@beberlei.de" | |
} | |
], | |
"description": "Object-Relational-Mapper for PHP", | |
"homepage": "http://www.doctrine-project.org", | |
"keywords": [ | |
"database", | |
"orm" | |
], | |
"time": "2013-03-04 22:39:01" | |
}, | |
{ | |
"name": "symfony/console", | |
"version": "dev-master", | |
"target-dir": "Symfony/Component/Console", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/symfony/Console.git", | |
"reference": "aa28bbe2c3c4210f9e9f44df16d71d63c53adf9b" | |
}, | |
"dist": { | |
"type": "zip", | |
"url": "https://api.github.com/repos/symfony/Console/zipball/aa28bbe2c3c4210f9e9f44df16d71d63c53adf9b", | |
"reference": "aa28bbe2c3c4210f9e9f44df16d71d63c53adf9b", | |
"shasum": "" | |
}, | |
"require": { | |
"php": ">=5.3.3" | |
}, | |
"type": "library", | |
"extra": { | |
"branch-alias": { | |
"dev-master": "2.3-dev" | |
} | |
}, | |
"autoload": { | |
"psr-0": { | |
"Symfony\\Component\\Console\\": "" | |
} | |
}, | |
"notification-url": "https://packagist.org/downloads/", | |
"license": [ | |
"MIT" | |
], | |
"authors": [ | |
{ | |
"name": "Fabien Potencier", | |
"email": "fabien@symfony.com" | |
}, | |
{ | |
"name": "Symfony Community", | |
"homepage": "http://symfony.com/contributors" | |
} | |
], | |
"description": "Symfony Console Component", | |
"homepage": "http://symfony.com", | |
"time": "2013-03-06 17:50:21" | |
} | |
], | |
"packages-dev": [ | |
], | |
"aliases": [ | |
], | |
"minimum-stability": "dev", | |
"stability-flags": [ | |
], | |
"platform": [ | |
], | |
"platform-dev": [ | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @Entity */ | |
class Entity | |
{ | |
/** @Id @Column(type="integer") @GeneratedValue **/ | |
public $id; | |
public function setFoo(callable $foo) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment