1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

$fetchOptions ?

Discussion in 'XenForo Development Discussions' started by DroidHost, Jun 29, 2011.

  1. DroidHost

    DroidHost Well-Known Member

    what is $fetchOptions ?
    and how should I write these options ?
    is this a good description : @param array $fetchOptions Collection of options related to fetching ?
    I want to Fetch threads from a specific forum ...
  2. Onimua

    Onimua Well-Known Member

    Fetch options are fetch options. :p

    They're options you can pick that's applied to the information you're querying from the database. They are options, not necessarily required for basic information being fetched, but if you want the extra information you need to specify it. Look at XenForo_Model_Thread::prepareThreadFetchOptions and XenForo_Model_Post::preparePostJoinOptions. Anytime you specify data in the $fetchOptions array, it's passed through one of the two methods.

    Check out its usage in various ControllerPublic scripts, like XenForo_ControllerPublic_Forum or XenForo_ControllerPublic_Thread, specifically where threads or posts are being fetched.

Share This Page