Thumbnail Posted September 25, 2012 Share Posted September 25, 2012 Hi all. I was reading the class "ObjectModel.php" and I found the following code. Where is the Reflection class and who does? public static function getDefinition($class, $field = null) { $reflection = new ReflectionClass($class); $definition = $reflection->getStaticPropertyValue('definition'); $definition['classname'] = $class; if (!empty($definition['multilang'])) $definition['associations'][Collection::LANG_ALIAS] = array( 'type' => self::HAS_MANY, 'field' => $definition['primary'], 'foreign_field' => $definition['primary'], ); if ($field) return isset($definition['fields'][$field]) ? $definition['fields'][$field] : null; return $definition; } Thanks! Link to comment Share on other sites More sharing options...
razaro Posted September 25, 2012 Share Posted September 25, 2012 Think here is all info you need http://php.net/manual/en/class.reflectionclass.php Link to comment Share on other sites More sharing options...
Thumbnail Posted September 25, 2012 Author Share Posted September 25, 2012 ... I thought it was a PrestaShop Class. Thanks razaro Link to comment Share on other sites More sharing options...
Recommended Posts