Attila/core/Model.php
public function findOneBy(array $aArguments)
    {
    	$sEntityNamespace = preg_replace('/^(.*)Model\\\\.+$/', '$1Entity\\', get_called_class());
    	
    	$aResults = $this->orm
    					 ->select(array('*'))
    					 ->from($this->_sTableName)
    					 ->where($aArguments)
    					 ->limit(1)
    					 ->load(false, $sEntityNamespace);

    	if (isset($aResults[0]) && $this->_isFilter()) { $aResults[0] = $this->_applyFilter($aResults[0]); }
    	
    	if (isset($aResults[0])) { return $aResults[0]; }
    	else { return false; }
    }
public function findOneBy(array $aArguments)
    {
    	$sEntityNamespace = preg_replace('/^(.*)Model\\\\.+$/', '$1Entity\\', get_called_class());
    	
    	$aResults = $this->orm
    					 ->select(array('*'))
    					 ->from($this->_sTableName)
    					 ->where($aArguments)
    					 ->limit(1)
    					 ->load(false, $sEntityNamespace);

    	if (isset($aResults[0]) && $this->_isFilter()) { $aResults[0] = $this->_applyFilter($aResults[0]); }
    	
    	if (isset($aResults[0])) { return $aResults[0]; }
    	else { return false; }
    }
public function findOneBy ( array $ aArguments ) { $ sEntityNamespace = preg_replace ( '/^(.*)Model\\\\.+$/' , '$1Entity\\' , get_called_class ( ) ) ; $ aResults = $ this -> orm -> select ( array ( '*' ) ) -> from ( $ this -> _sTableName ) -> where ( $ aArguments ) -> limit ( 1 ) -> load ( false , $ sEntityNamespace ) ; if ( isset ( $ aResults [ 0 ] ) && $ this -> _isFilter ( ) ) { $ aResults [ 0 ] = $ this -> _applyFilter ( $ aResults [ 0 ] ) ; } if ( isset ( $ aResults [ 0 ] ) ) { return $ aResults [ 0 ] ; } else { return false ; } }
return an entity that it is found with the arguments

@access public
@param  array $aArguments
@return object

@example	$oModel->findOneBy(array('id' => 12);
return an entity that it is found with the arguments