You are here

private function ProxyGenerator::getLazyLoadedPublicProperties in Plug 7

Generates the list of public properties to be lazy loaded, with their default values.

Parameters

\Doctrine\Common\Persistence\Mapping\ClassMetadata $class:

Return value

mixed[]

7 calls to ProxyGenerator::getLazyLoadedPublicProperties()
ProxyGenerator::generateConstructorImpl in lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the constructor code (un-setting public lazy loaded properties, setting identifier field values).
ProxyGenerator::generateLazyPropertiesDefaults in lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the array representation of lazy loaded public properties and their default values.
ProxyGenerator::generateMagicGet in lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the magic getter invoked when lazy loaded public properties are requested.
ProxyGenerator::generateMagicIsset in lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the magic issetter invoked when lazy loaded public properties are checked against isset().
ProxyGenerator::generateMagicSet in lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the magic setter (currently unused).

... See full list

File

lib/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php, line 871

Class

ProxyGenerator
This factory is used to generate proxy classes. It builds proxies from given parameters, a template and class metadata.

Namespace

Doctrine\Common\Proxy

Code

private function getLazyLoadedPublicProperties(ClassMetadata $class) {
  $defaultProperties = $class
    ->getReflectionClass()
    ->getDefaultProperties();
  $properties = array();
  foreach ($class
    ->getReflectionClass()
    ->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
    $name = $property
      ->getName();
    if (($class
      ->hasField($name) || $class
      ->hasAssociation($name)) && !$class
      ->isIdentifier($name)) {
      $properties[$name] = $defaultProperties[$name];
    }
  }
  return $properties;
}