lib/db/cortex.php
public function filter($key, $filter=null, $option=null) {
		if (is_int(strpos($key,'.'))) {
			list($key,$fkey) = explode('.',$key,2);
			if (!isset($this->relFilter[$key.'.']))
				$this->relFilter[$key.'.'] = array();
			$this->relFilter[$key.'.'][$fkey] = array($filter,$option);
		} else
			$this->relFilter[$key] = array($filter,$option);
		return $this;
	}
public function filter($key, $filter=null, $option=null) {
		if (is_int(strpos($key,'.'))) {
			list($key,$fkey) = explode('.',$key,2);
			if (!isset($this->relFilter[$key.'.']))
				$this->relFilter[$key.'.'] = array();
			$this->relFilter[$key.'.'][$fkey] = array($filter,$option);
		} else
			$this->relFilter[$key] = array($filter,$option);
		return $this;
	}
public function filter ( $ key , $ filter = null , $ option = null ) { if ( is_int ( strpos ( $ key , '.' ) ) ) { list ( $ key , $ fkey ) = explode ( '.' , $ key , 2 ) ; if ( ! isset ( $ this -> relFilter [ $ key . '.' ] ) ) $ this -> relFilter [ $ key . '.' ] = array ( ) ; $ this -> relFilter [ $ key . '.' ] [ $ fkey ] = array ( $ filter , $ option ) ; } else $ this -> relFilter [ $ key ] = array ( $ filter , $ option ) ; return $ this ; }
add filter for loading related models
@param string $key
@param array $filter
@param array $option
@return $this
add filter for loading related models