public function find( $key, $disableLateLoading = null )
    {

        // $disableLateLoading default value management
        if( !is_bool( $disableLateLoading ) ) {
            $disableLateLoading = false;
        }

        // empty key
        if( is_null( $key ) or !is_scalar( $key ) or strlen( trim( $key ) ) === 0 ) {
            return null;
        }

        $class = $this->entityClass;

        try {
            return $this->entityFactory( $key, $disableLateLoading );
        } catch( \Exception $e ) {
            return null;
        }

    }
public function find( $key, $disableLateLoading = null )
    {

        // $disableLateLoading default value management
        if( !is_bool( $disableLateLoading ) ) {
            $disableLateLoading = false;
        }

        // empty key
        if( is_null( $key ) or !is_scalar( $key ) or strlen( trim( $key ) ) === 0 ) {
            return null;
        }

        $class = $this->entityClass;

        try {
            return $this->entityFactory( $key, $disableLateLoading );
        } catch( \Exception $e ) {
            return null;
        }

    }
public function find ( $ key , $ disableLateLoading = null ) { // $disableLateLoading default value management if ( ! is_bool ( $ disableLateLoading ) ) { $ disableLateLoading = false ; } // empty key if ( is_null ( $ key ) or ! is_scalar ( $ key ) or strlen ( trim ( $ key ) ) === 0 ) { return null ; } $ class = $ this -> entityClass ; try { return $ this -> entityFactory ( $ key , $ disableLateLoading ) ; } catch ( \ Exception $ e ) { return null ; } }
Lookup a entity based on it's 'primary key' or key column
This will either return null or a Entity
@param mixed $key
@param bool $disableLateLoading
Lookup a entity based on it s primary key or key column This will either return null or a Entity