Пример #1
0
 /**
  * Constructs a reflection property with value
  *
  * @example
  * $pv = new Reflection_Property_Value('Class_Name', 'property_name', $object);
  *
  * @param $class_name    string
  * @param $property_name string
  * @param $object        object|mixed the object containing the value, or the value itself
  *        (in this case set $final_value tu true)
  * @param $final_value   boolean set to true if $object is a final value instead of the object
  *        containing the valued property
  * @param $user          boolean set to true if the property value will be used into an user
  *        display (ie an HTML template)
  */
 public function __construct($class_name, $property_name, $object = null, $final_value = false, $user = false)
 {
     parent::__construct($class_name, $property_name);
     $this->final_value = $final_value;
     $this->path = $property_name;
     if (!isset($this->object)) {
         $this->object = $object;
     } else {
         echo 'DEAD CODE ? object is set for ' . $class_name . '::' . $property_name . BR;
     }
     $this->user = $user;
 }