Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:controller:categoriesapicontroller

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:controller:categoriesapicontroller [2026/09/26 09:09] – admin adminscriptlog:lib:controller:categoriesapicontroller [2026/09/26 09:34] (current) – admin admin
Line 14: Line 14:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Controller Class | +| ''@category'' | Controller Class | 
-  | ''@author'' | Blogware Team | +| ''@author'' | Blogware Team | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 | +| ''@version'' | 1.0 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
  
-  ^ Relation ^ Type ^ Meaning ^ +^ Relation ^ Type ^ Meaning ^ 
-  | extends | [[scriptlog:lib:controller:apicontroller|''ApiController'']] | parent class/interface |+| extends | [[scriptlog:lib:controller:apicontroller|''ApiController'']] | parent class/interface |
  
 ======= Constants (0) ======= ======= Constants (0) =======
Line 30: Line 30:
 //None.// //None.//
  
-======= Properties (0) =======+======= Properties (4) =======
  
-//None declared.//+^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
 +| ''private'' | ''(untyped)'' | ''$topicDao'' |  | 35 | 
 +| ''private'' | ''(untyped)'' | ''$topicService'' |  | 40 | 
 +| ''private'' | ''(untyped)'' | ''$sanitizer'' |  | 45 | 
 +| ''private'' | ''(untyped)'' | ''$hateoas'' |  | 50 |
  
 ======= Methods (8) ======= ======= Methods (8) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | Constructor | 55 | +| public | ''__construct()'' | Constructor | 55 | 
-  | public | ''index()'' | Get all categories (public endpoint) | 76 | +| public | ''index()'' | Get all categories (public endpoint) | 76 | 
-  | public | ''show()'' | Get a single category by ID (public endpoint) | 118 | +| public | ''show()'' | Get a single category by ID (public endpoint) | 118 | 
-  | public | ''posts()'' | Get posts in a category (public endpoint) | 150 | +| public | ''posts()'' | Get posts in a category (public endpoint) | 150 | 
-  | public | ''store()'' | Create a new category (requires authentication) | 218 | +| public | ''store()'' | Create a new category (requires authentication) | 218 | 
-  | public | ''update()'' | Update an existing category (requires authentication) | 268 | +| public | ''update()'' | Update an existing category (requires authentication) | 268 | 
-  | public | ''destroy()'' | Delete a category (requires authentication) | 328 | +| public | ''destroy()'' | Delete a category (requires authentication) | 328 | 
-  | private | ''generateSlug()'' | Generate URL-friendly slug | 370 |+| private | ''generateSlug()'' | Generate URL-friendly slug | 370 |
  
  
Line 72: Line 76:
 GET /api/v1/categories GET /api/v1/categories
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Query parameters |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Query parameters |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 90: Line 94:
 GET /api/v1/categories/{id} GET /api/v1/categories/{id}
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 108: Line 112:
 GET /api/v1/categories/{id}/posts GET /api/v1/categories/{id}/posts
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 126: Line 130:
 POST /api/v1/categories POST /api/v1/categories
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$_params'' | ''(untyped)'' | ''[]'' | //none// |+|  ''$_params'' |  ''(untyped)'' |  ''[]'' |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 144: Line 148:
 PUT /api/v1/categories/{id} PUT /api/v1/categories/{id}
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 162: Line 166:
 DELETE /api/v1/categories/{id} DELETE /api/v1/categories/{id}
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$params'' | ''(untyped)'' | ''[]'' | Route parameters including 'id' |+|  ''$params'' |  ''(untyped)'' |  ''[]'' |  Route parameters including 'id' |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 178: Line 182:
 Generate URL-friendly slug Generate URL-friendly slug
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$title'' | ''(untyped)'' | //required// | //none// |+|  ''$title'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — string **Returns:** ''(none declared)'' — string
Line 185: Line 189:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''ApiController'' | [[scriptlog:lib:controller:apicontroller|''Scriptlog\Controller\ApiController'']] | +| ''ApiController'' | [[scriptlog:lib:controller:apicontroller|''Scriptlog\Controller\ApiController'']] | 
-  | ''ApiHateoas'' | [[scriptlog:lib:core:apihateoas|''Scriptlog\Core\ApiHateoas'']] | +| ''ApiHateoas'' | [[scriptlog:lib:core:apihateoas|''Scriptlog\Core\ApiHateoas'']] | 
-  | ''ApiResponse'' | [[scriptlog:lib:core:apiresponse|''Scriptlog\Core\ApiResponse'']] | +| ''ApiResponse'' | [[scriptlog:lib:core:apiresponse|''Scriptlog\Core\ApiResponse'']] | 
-  | ''FormValidator'' | [[scriptlog:lib:core:formvalidator|''Scriptlog\Core\FormValidator'']] | +| ''FormValidator'' | [[scriptlog:lib:core:formvalidator|''Scriptlog\Core\FormValidator'']] | 
-  | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | +| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | 
-  | ''TopicDao'' | [[scriptlog:lib:dao:topicdao|''Scriptlog\Dao\TopicDao'']] | +| ''TopicDao'' | [[scriptlog:lib:dao:topicdao|''Scriptlog\Dao\TopicDao'']] | 
-  | ''PostApiDto'' | [[scriptlog:lib:dto:postapidto|''Scriptlog\Dto\Api\PostApiDto'']] | +| ''PostApiDto'' | [[scriptlog:lib:dto:postapidto|''Scriptlog\Dto\Api\PostApiDto'']] | 
-  | ''TopicApiDto'' | [[scriptlog:lib:dto:topicapidto|''Scriptlog\Dto\Api\TopicApiDto'']] | +| ''TopicApiDto'' | [[scriptlog:lib:dto:topicapidto|''Scriptlog\Dto\Api\TopicApiDto'']] | 
-  | ''TopicService'' | [[scriptlog:lib:service:topicservice|''Scriptlog\Service\TopicService'']] |+| ''TopicService'' | [[scriptlog:lib:service:topicservice|''Scriptlog\Service\TopicService'']] |
  
  
scriptlog/lib/controller/categoriesapicontroller.1790413760.txt.gz · Last modified: by admin