Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param   JInput            $input  The input object.
  * @param   JApplicationBase  $app    The application object.
  */
 public function __construct(JInput $input = null, JApplicationBase $app = null)
 {
     parent::__construct($input, $app);
     // Use the default database.
     $this->setDatabase();
     // Set the controller options.
     $serviceOptions = array('contentType' => 'application/vnd.joomla.item.v1; schema=weblinks.v1', 'describedBy' => 'http://docs.joomla.org/Schemas/weblinks/v1', 'primaryRel' => 'joomla:weblinks', 'resourceMap' => __DIR__ . '/resource.json', 'self' => '/joomla:weblinks/' . (int) $this->input->get('id'), 'tableName' => '#__weblinks');
     $this->setOptions($serviceOptions);
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param   JInput            $input  The input object.
  * @param   JApplicationBase  $app    The application object.
  */
 public function __construct(JInput $input = null, JApplicationBase $app = null)
 {
     parent::__construct($input, $app);
     // Use the default database.
     $this->setDatabase();
     // Set the controller options.
     $serviceOptions = array('contentType' => 'application/vnd.joomla.item.v1; schema=articles.v1', 'describedBy' => 'http://docs.joomla.org/Schemas/articles/v1', 'primaryRel' => 'joomla:articles', 'resourceMap' => __DIR__ . '/resource.json', 'tableName' => '#__content', 'tableClass' => 'Content');
     $this->setOptions($serviceOptions);
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param   JInput            $input  The input object.
  * @param   JApplicationBase  $app    The application object.
  */
 public function __construct(JInput $input = null, JApplicationBase $app = null)
 {
     parent::__construct($input, $app);
     jimport('joomla.filesystem.file');
     // Use the default database.
     $this->_db = JFactory::getDBO();
     // Set the controller options.
     $serviceOptions = array('contentType' => 'application/vnd.joomla.item.v1; schema=webservices.v1', 'describedBy' => 'http://docs.joomla.org/Schemas/articles/v1', 'primaryRel' => 'webservices:time', 'resourceMap' => __DIR__ . '/resource.json', 'self' => '/webservices:time/');
     // Set the service options
     $this->setOptions($serviceOptions);
 }