/**
  * Sets the filepath of the metadata file
  *
  * @throws \phpbb\extension\exception
  */
 private function set_metadata_file()
 {
     $ext_filepath = $this->extension_manager->get_extension_path($this->ext_name);
     $metadata_filepath = $this->phpbb_root_path . $ext_filepath . 'composer.json';
     $this->metadata_file = $metadata_filepath;
     if (!file_exists($this->metadata_file)) {
         throw new \phpbb\extension\exception($this->user->lang('FILE_NOT_FOUND', $this->metadata_file));
     }
 }
示例#2
0
 /**
  * Return ext name
  *
  * @param	bool	$web_root_path Whether the path should be relative to web root
  * @return	string					Path to an extension
  */
 public function get_ext_name($web_root_path = false)
 {
     return ($web_root_path ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name);
 }