src/Post.php
public function get_terms( $taxonomy = '', $args = array() ) {
		if ( isset( $this->{$taxonomy} ) && empty( $args ) ) {
			return $this->{$taxonomy};
		} else {
			$name = $taxonomy . '_' . md5( json_encode( $args ) );
			if ( isset( $this->{$name} ) ) {
				return $this->{$name};
			}
			$data          = \wp_get_post_terms( $this->id(), $taxonomy, $args );
			$this->{$name} = $data;
			return $data;
		}
	}
public function get_terms( $taxonomy = '', $args = array() ) {
		if ( isset( $this->{$taxonomy} ) && empty( $args ) ) {
			return $this->{$taxonomy};
		} else {
			$name = $taxonomy . '_' . md5( json_encode( $args ) );
			if ( isset( $this->{$name} ) ) {
				return $this->{$name};
			}
			$data          = \wp_get_post_terms( $this->id(), $taxonomy, $args );
			$this->{$name} = $data;
			return $data;
		}
	}
public function get_terms ( $ taxonomy = '' , $ args = array ( ) ) { if ( isset ( $ this -> { $ taxonomy } ) && empty ( $ args ) ) { return $ this -> { $ taxonomy } ; } else { $ name = $ taxonomy . '_' . md5 ( json_encode ( $ args ) ) ; if ( isset ( $ this -> { $ name } ) ) { return $ this -> { $ name } ; } $ data = \ wp_get_post_terms ( $ this -> id ( ) , $ taxonomy , $ args ) ; $ this -> { $ name } = $ data ; return $ data ; } }
Returns All Terms From Post.

@param string $taxonomy
@param array  $args

@return array|\WP_Error
Returns All Terms From Post .