samples/PhotoAlbum/lib/rb.php
private function getTypeFromCast($cast) {
		if ($cast=='string') {
			$typeno = $this->writer->scanType('STRING');
		}
		elseif ($cast=='id') {
			$typeno = $this->writer->getTypeForID();
		}
		elseif(isset($this->writer->sqltype_typeno[$cast])) {
			$typeno = $this->writer->sqltype_typeno[$cast];
		}
		else {
			throw new RedBean_Exception('Invalid Cast');
		}
		return $typeno;
	}
private function getTypeFromCast($cast) {
		if ($cast=='string') {
			$typeno = $this->writer->scanType('STRING');
		}
		elseif ($cast=='id') {
			$typeno = $this->writer->getTypeForID();
		}
		elseif(isset($this->writer->sqltype_typeno[$cast])) {
			$typeno = $this->writer->sqltype_typeno[$cast];
		}
		else {
			throw new RedBean_Exception('Invalid Cast');
		}
		return $typeno;
	}
private function getTypeFromCast ( $ cast ) { if ( $ cast == 'string' ) { $ typeno = $ this -> writer -> scanType ( 'STRING' ) ; } elseif ( $ cast == 'id' ) { $ typeno = $ this -> writer -> getTypeForID ( ) ; } elseif ( isset ( $ this -> writer -> sqltype_typeno [ $ cast ] ) ) { $ typeno = $ this -> writer -> sqltype_typeno [ $ cast ] ; } else { throw new RedBean_Exception ( 'Invalid Cast' ) ; } return $ typeno ; }
Figures out the desired type given the cast string ID.

@param string $cast cast identifier

@return integer $typeno
Figures out the desired type given the cast string ID .