You are here

private function ProxyGenerator::getLazyLoadedPublicProperties in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php \Doctrine\Common\Proxy\ProxyGenerator::getLazyLoadedPublicProperties()

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 vendor/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 vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the array representation of lazy loaded public properties and their default values.
ProxyGenerator::generateMagicGet in vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the magic getter invoked when lazy loaded public properties are requested.
ProxyGenerator::generateMagicIsset in vendor/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 vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
Generates the magic setter (currently unused).

... See full list

File

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

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;
}