private function GetParamString($param)
    {
        if ($param === null)
            return "null";
        if (is_string($param))
            return "'" .  addcslashes($param, "'") . "'";
        
        else if (is_bool($param))
            return $param ? "true" : "false";
        
        else if (is_int($param) || is_float($param))
            return (string)$param;
        
        else if ($param instanceof WritableClass)
            return $param->GetNewStatement();
        
        else if (is_array($param))
        {
            $resultArr = array();
            foreach ($param as $key=>$val)
            {
                $resultArr[] = $this->GetParamString($key) . '=>' . $this->GetParamString($val);
            }
            return 'array(' . join (', ' , $resultArr) .')';
        }
        else if ($param instanceof \Phine\Framework\System\Enum)
        {
            $value = $param->Value();
            $class = get_class($param);
            return "\\$class::ByValue('$value')";
        }
        throw new \InvalidArgumentException('A writable class must have primitive types, Enums, arrays and PhpWritable classes as construct params only.');
    }