url_persisted = $url_persisted; $this->resolve_url = $resolve_url; } /** * @param string $url * @param string $lang * * @return false|string Will return `false` if the URL could not be resolved */ public function resolve_object_url( $url, $lang ) { $resolved_url = $this->url_persisted->get( $url, $lang ); if ( null === $resolved_url ) { $resolved_url = $this->resolve_url->resolve_object_url( $url, $lang ); $this->url_persisted->set( $url, $lang, $resolved_url ); } return $resolved_url; } }