public function get($property_name = null)
    {
        if (!isset($property_name)) {
            return $this->property_values;
        }

        // @todo: This probably needs a refactor.
        // If this is a component itself just return the component.
        if (isset($this->property_values->$property_name)
            && is_object($this->property_values->$property_name)
            && get_class($this) == get_class($this->property_values->$property_name)) {
            return $this->property_values->$property_name;
        }
        // If this property is a component itself, just return it's get() method.
        if (isset($this->property_values->$property_name)
            && is_object($this->property_values->$property_name)
            && $this->property_values->$property_name instanceof PropertyInterface) {
            return $this->property_values->$property_name->get();
        } elseif (isset($this->property_values->$property_name)) {
            return $this->property_values->$property_name;
        }

        return;
    }
public function get($property_name = null)
    {
        if (!isset($property_name)) {
            return $this->property_values;
        }

        // @todo: This probably needs a refactor.
        // If this is a component itself just return the component.
        if (isset($this->property_values->$property_name)
            && is_object($this->property_values->$property_name)
            && get_class($this) == get_class($this->property_values->$property_name)) {
            return $this->property_values->$property_name;
        }
        // If this property is a component itself, just return it's get() method.
        if (isset($this->property_values->$property_name)
            && is_object($this->property_values->$property_name)
            && $this->property_values->$property_name instanceof PropertyInterface) {
            return $this->property_values->$property_name->get();
        } elseif (isset($this->property_values->$property_name)) {
            return $this->property_values->$property_name;
        }

        return;
    }
public function get ( $ property_name = null ) { if ( ! isset ( $ property_name ) ) { return $ this -> property_values ; } // @todo: This probably needs a refactor. // If this is a component itself just return the component. if ( isset ( $ this -> property_values -> $ property_name ) && is_object ( $ this -> property_values -> $ property_name ) && get_class ( $ this ) == get_class ( $ this -> property_values -> $ property_name ) ) { return $ this -> property_values -> $ property_name ; } // If this property is a component itself, just return it's get() method. if ( isset ( $ this -> property_values -> $ property_name ) && is_object ( $ this -> property_values -> $ property_name ) && $ this -> property_values -> $ property_name instanceof PropertyInterface ) { return $ this -> property_values -> $ property_name -> get ( ) ; } elseif ( isset ( $ this -> property_values -> $ property_name ) ) { return $ this -> property_values -> $ property_name ; } return ; }
Get a properties value.

@param string $property_name The property to get the current value for.

@return mixed The properties current value. Null if the property does not exist.
Get a properties value .