Search for Resources and Solutions

Sources Interface

To create a new source for the Midrub SmartRepost app, you have to follow the interface from the file interfaces/sources.php. 

The sources interface has this code:

interface Sources {

    

    /**

     * The public method source_content contains the source's content

     * 

     * @param array args cntains the parameters

     * 

     * @since 0.0.8.2

     * 

     * @return array with source's content

     */ 

    public function source_content( $args );

    

    /**

     * The public method source_update_setup saves source's setup

     * 

     * @since 0.0.8.2

     * 

     * @return void

     */ 

    public function source_update_setup();

    

    /**

     * The public method source_get_setup gets the source's setup

     * 

     * @param array args cntains the parameters

     * 

     * @since 0.0.8.2

     * 

     * @return void

     */ 

    public function source_get_setup( $args );    

    

    /**

     * The public method source_connect contains the source's connection settings

     * 

     * @since 0.0.8.2

     * 

     * @return array with settings

     */ 

    public function source_connect();

    

    /**

     * The public method source_info contains the source's information

     * 

     * @since 0.0.8.2

     * 

     * @return array with tempate's information

     */ 

    public function source_info();


}

Your created sources should be copied in the folder sources. Once copied there, the source will be displayed in the Midrub SmartPost app if the network dependency is enabled for the user's plan where you are logged in.


Was this article helpful?