/** * Get the taxonomy key */ public function getTaxonomyKey() { $class = get_called_class(); return is_null($this->taxonomy_key) ? Str::machine(Str::camelToHuman($class), parent::SEPARATOR) : $this->taxonomy_key; }
/** * Get the post type * @return string */ public function getPostType() { $called_class_segments = explode('\\', get_called_class()); $class_name = end($called_class_segments); return is_null($this->post_type) ? Str::machine(Str::camelToHuman($class_name), Base::SEPARATOR) : $this->post_type; }
/** * Get the taxonomy key */ public function getTaxonomyKey() { $called_class_segments = explode('\\', get_called_class()); $class_name = end($called_class_segments); return is_null($this->taxonomy_key) ? Str::machine(Str::camelToHuman($class_name), Base::SEPARATOR) : $this->taxonomy_key; }
/** * Get the post type */ public function getPostType() { return is_null($this->post_type) ? Str::machine(Str::camelToHuman(get_called_class()), Base::SEPARATOR) : $this->post_type; }