public function get($class, $mapping)
    {
        if (is_object($class)) {
            $class = get_class($class);
        }
        if (array_key_exists($class, $this->handlers)) {
            $handler = $this->handlers[$class];

            $field = call_user_func($handler, $mapping, $this->em);
        } else {
            $field = new $class($mapping, $this->em);
        }

        if ($field instanceof SanitiserAwareInterface) {
            $field->setSanitiser($this->sanitiser);
        }

        return $field;
    }
public function get($class, $mapping)
    {
        if (is_object($class)) {
            $class = get_class($class);
        }
        if (array_key_exists($class, $this->handlers)) {
            $handler = $this->handlers[$class];

            $field = call_user_func($handler, $mapping, $this->em);
        } else {
            $field = new $class($mapping, $this->em);
        }

        if ($field instanceof SanitiserAwareInterface) {
            $field->setSanitiser($this->sanitiser);
        }

        return $field;
    }
public function get ( $ class , $ mapping ) { if ( is_object ( $ class ) ) { $ class = get_class ( $ class ) ; } if ( array_key_exists ( $ class , $ this -> handlers ) ) { $ handler = $ this -> handlers [ $ class ] ; $ field = call_user_func ( $ handler , $ mapping , $ this -> em ) ; } else { $ field = new $ class ( $ mapping , $ this -> em ) ; } if ( $ field instanceof SanitiserAwareInterface ) { $ field -> setSanitiser ( $ this -> sanitiser ) ; } return $ field ; }
Gets the field instance for the supplied class.

@param string $class
@param array  $mapping

@return FieldTypeBase
Gets the field instance for the supplied class .