Yoast\WP\SEO\Models

Indexable_Extension{}Yoast 1.0

Abstract class for indexable extensions.

Хуков нет.

Использование

$Indexable_Extension = new Indexable_Extension();
// use class methods

Методы

  1. public indexable()

Код Indexable_Extension{} Yoast 22.4

abstract class Indexable_Extension extends Model {

	/**
	 * Holds the Indexable instance.
	 *
	 * @var Indexable
	 */
	protected $indexable = null;

	/**
	 * Returns the indexable this extension belongs to.
	 *
	 * @return Indexable The indexable.
	 */
	public function indexable() {
		if ( $this->indexable === null ) {
			$this->indexable = $this->belongs_to( 'Indexable', 'indexable_id', 'id' )->find_one();
		}

		return $this->indexable;
	}
}