/** * Monta clausulas where a partir das propriedades da classe * * @author Hugo Ferreira da Silva * @link http://www.hufersil.com.br/lumine * @return string String contendo as condicoes montadas a partir dos campos */ protected function _makeWhereFromFields() { $where = array(); foreach ($this->metadata()->getFields() as $name => $def) { $val = $this->fieldValue($name); if (gettype($val) == 'NULL') { continue; } $str = sprintf('{%s.%s} = ?', $this->metadata()->getClassname(), $name); $where[] = Lumine_Parser::parsePart($this, $str, array($val)); } $str_where = implode(' AND ' . PHP_EOL . "\t", $where); $str_where = $str_where; return $str_where; }