protected function createResult(array &$data, $type = null) {
		if ($type === null) {
			$type = $this->getResultType();
		}

		if ($type & self::RESULT_ARRAY) {
			return $data;
		}

		if ($type & self::RESULT_OBJECT) {
			return (object) $data;
		}

		if ($type & self::RESULT_MODEL) {
			return $this->create($data);
		}

		throw new Exceptions\InvalidResultType('Nothing to do with the type #' . $type);
	}
protected function createResult(array &$data, $type = null) {
		if ($type === null) {
			$type = $this->getResultType();
		}

		if ($type & self::RESULT_ARRAY) {
			return $data;
		}

		if ($type & self::RESULT_OBJECT) {
			return (object) $data;
		}

		if ($type & self::RESULT_MODEL) {
			return $this->create($data);
		}

		throw new Exceptions\InvalidResultType('Nothing to do with the type #' . $type);
	}
protected function createResult ( array & $ data , $ type = null ) { if ( $ type === null ) { $ type = $ this -> getResultType ( ) ; } if ( $ type & self :: RESULT_ARRAY ) { return $ data ; } if ( $ type & self :: RESULT_OBJECT ) { return ( object ) $ data ; } if ( $ type & self :: RESULT_MODEL ) { return $ this -> create ( $ data ) ; } throw new Exceptions \ InvalidResultType ( 'Nothing to do with the type #' . $ type ) ; }
Create the result

@param  array $data
@param  int   $type
@return mixed
Create the result