src/Budkit/Datastore/Model/Entity.php
public function setPropertyValue($property, $value = NULL, $objectId = NULL)
    {

        $property = strtolower($property);
        //1. Check that the property exists in $dataModel;
        if (!array_key_exists($property, $this->propertyModel))
            return false; //@TODO Raise error? specified column not found
        //2. Validate the Value?
        if (empty($value)):
            //Attempt to get the default value;
            if (isset($this->propertyModel[$property][3])) //the third item in the array should be the default value;
                $value = $this->propertyModel[$property][3];
        endif;
        //3. Store the value with the property name in $propertyData;
        if (empty($objectId) || (int)$objectId == $this->objectId):
            $this->propertyData[$property] = $value;
            //elseif(!empty($objectId)):
            //@TODO Go to the database set the property value for this object
        endif;

        return $this;
    }
public function setPropertyValue($property, $value = NULL, $objectId = NULL)
    {

        $property = strtolower($property);
        //1. Check that the property exists in $dataModel;
        if (!array_key_exists($property, $this->propertyModel))
            return false; //@TODO Raise error? specified column not found
        //2. Validate the Value?
        if (empty($value)):
            //Attempt to get the default value;
            if (isset($this->propertyModel[$property][3])) //the third item in the array should be the default value;
                $value = $this->propertyModel[$property][3];
        endif;
        //3. Store the value with the property name in $propertyData;
        if (empty($objectId) || (int)$objectId == $this->objectId):
            $this->propertyData[$property] = $value;
            //elseif(!empty($objectId)):
            //@TODO Go to the database set the property value for this object
        endif;

        return $this;
    }
public function setPropertyValue ( $ property , $ value = NULL , $ objectId = NULL ) { $ property = strtolower ( $ property ) ; //1. Check that the property exists in $dataModel; if ( ! array_key_exists ( $ property , $ this -> propertyModel ) ) return false ; //@TODO Raise error? specified column not found //2. Validate the Value? if ( empty ( $ value ) ) : //Attempt to get the default value; if ( isset ( $ this -> propertyModel [ $ property ] [ 3 ] ) ) //the third item in the array should be the default value; $ value = $ this -> propertyModel [ $ property ] [ 3 ] ; endif ; //3. Store the value with the property name in $propertyData; if ( empty ( $ objectId ) || ( int ) $ objectId == $ this -> objectId ) : $ this -> propertyData [ $ property ] = $ value ; //elseif(!empty($objectId)): //@TODO Go to the database set the property value for this object endif ; return $ this ; }
Sets the property Value before save

@param string $property Proprety ID or Property Name
@param type $value
Sets the property Value before save