Anteru's blog
  • Consulting
  • Research
    • Assisted environment probe placement
    • Assisted texture assignment
    • Edge-Friend: Fast and Deterministic Catmull-Clark Subdivision Surfaces
    • Error Metrics for Smart Image Refinement
    • High-Quality Shadows for Streaming Terrain Rendering
    • Hybrid Sample-based Surface Rendering
    • Interactive rendering of Giga-Particle Fluid Simulations
    • Quantitative Analysis of Voxel Raytracing Acceleration Structures
    • Real-time Hybrid Hair Rendering
    • Real-Time Procedural Generation with GPU Work Graphs
    • Scalable rendering for very large meshes
    • Spatiotemporal Variance-Guided Filtering for Motion Blur
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
    • Towards Practical Meshlet Compression
  • About
  • Archive

New comp running, bugtracker API ideas

February 28, 2005
  • General
  • Hardware
  • Programming
  • Web
approximately 1 minutes to read

In case you wonder why I didn’t post for some days… On Friday, my 480W PSU arrived, and I got my new comp up & running! Yeah! :) Had to move my development environment from my old disk to the new one, install all the tools I’m used to etc. so I didn’t have time for updating my blog. It really rocks, and although it sports 7 fans, it’s damn silent (thanks to temperature control). Really comfortable. After looking at the Mantis source code, I also started thinking about some API for my bugtracker. It should allow plugin developers to access core functionality in a clean, consistent manner, and also separate the core functions from the processing logic and the display logic.

Bugtracker API

At the moment, the API does support modules and classes. The difference between the two is:

  • A class is - well, a class, that needs an instance in order to work properly, as it stores some local data. An example is the Bug class, after a getData() call it stores the results for reuse. Classes can be loaded by the API using API::getClass ('className', [... constructor]);. In order to get this working, two things have to happen:

    • A class instance has to be created.

    • The constructor needs to be called Unfortunately, I couldn’t find a way to call the class constructor directly, so I use this workaround:

      php $instance = @new $class_name (); // Silence the missing parameters call_user_func_array (array (&$instance, '__construct'), $args); // Now the real one

      This one does work, the warning that parameters are missing is silenced and everything is fine.

  • Modules are basically classes that have only static methods - there is no need to create a class instance, you can directly call the functions. They’re accessed using API::getModule ('moduleName');.

I’ll move over all includes I can find to the API and try to clean up the code a bit before I continue working on the bugtracker. Stay tuned :)

Previous post
Next post

Recent posts

  • Data formats: Why CSV and JSON aren't the best
    Posted on 2024-12-29
  • Replacing cron with systemd-timers
    Posted on 2024-04-21
  • Open Source Maintenance
    Posted on 2024-04-02
  • Angular, Caddy, Gunicorn and Django
    Posted on 2023-10-21
  • Effective meetings
    Posted on 2022-09-12
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

Anteru NIV_Anteru
Contents © 2005-2025
Anteru
Imprint/Impressum
Privacy policy/Datenschutz
Made with Liara
Last updated February 03, 2019