public function readTask()
	{
		$model = $this->resolveModel();

		// Load record
		$model = $model
			->whereEquals($model->getPrimaryKey(), Request::getVar($model->getPrimaryKey()))
			->row();

		if ($model->isNew())
		{
			App::abort(404, Lang::txt('JLIB_APPLICATION_ERROR_ITEM_NOT_FOUND'));
		}

		// Format timestamps before sending output
		$properties = $model->getStructure()->getTableColumns($model->getTableName());
		$properties = $this->normalizeProperties($properties);

		foreach ($properties as $property => $type)
		{
			if ($type == 'date' && $model->get($property) && $model->get($property) != '0000-00-00 00:00:00')
			{
				$model->set($property, with(new Date($model->get($property)))->format('Y-m-d\TH:i:s\Z'));
			}
		}

		// Send results
		$this->send($model->toObject());
	}
public function readTask()
	{
		$model = $this->resolveModel();

		// Load record
		$model = $model
			->whereEquals($model->getPrimaryKey(), Request::getVar($model->getPrimaryKey()))
			->row();

		if ($model->isNew())
		{
			App::abort(404, Lang::txt('JLIB_APPLICATION_ERROR_ITEM_NOT_FOUND'));
		}

		// Format timestamps before sending output
		$properties = $model->getStructure()->getTableColumns($model->getTableName());
		$properties = $this->normalizeProperties($properties);

		foreach ($properties as $property => $type)
		{
			if ($type == 'date' && $model->get($property) && $model->get($property) != '0000-00-00 00:00:00')
			{
				$model->set($property, with(new Date($model->get($property)))->format('Y-m-d\TH:i:s\Z'));
			}
		}

		// Send results
		$this->send($model->toObject());
	}
public function readTask ( ) { $ model = $ this -> resolveModel ( ) ; // Load record $ model = $ model -> whereEquals ( $ model -> getPrimaryKey ( ) , Request :: getVar ( $ model -> getPrimaryKey ( ) ) ) -> row ( ) ; if ( $ model -> isNew ( ) ) { App :: abort ( 404 , Lang :: txt ( 'JLIB_APPLICATION_ERROR_ITEM_NOT_FOUND' ) ) ; } // Format timestamps before sending output $ properties = $ model -> getStructure ( ) -> getTableColumns ( $ model -> getTableName ( ) ) ; $ properties = $ this -> normalizeProperties ( $ properties ) ; foreach ( $ properties as $ property => $ type ) { if ( $ type == 'date' && $ model -> get ( $ property ) && $ model -> get ( $ property ) != '0000-00-00 00:00:00' ) { $ model -> set ( $ property , with ( new Date ( $ model -> get ( $ property ) ) ) -> format ( 'Y-m-d\TH:i:s\Z' ) ) ; } } // Send results $ this -> send ( $ model -> toObject ( ) ) ; }
Read an entry

@apiMethod GET
@apiUri    /{component}/{controller}/{primary key}
@return    void
Read an entry