nikolai 3 anos atrás
pai
commit
e52272ea33
3 arquivos alterados com 94 adições e 1 exclusões
  1. 5 1
      README.md
  2. 51 0
      app/internship/bo/Article.php
  3. 38 0
      composer.json

+ 5 - 1
README.md

@@ -1,3 +1,7 @@
 # InternshipPlayground
 
-InternshipPlayground
+In diesem Dokument sind die Anweisungen um die API zu nutzen.
+
+Die benutzten Coding-Standards findest du hier: https://dev.n2n.rocks/de/n2n/docs/coding-standards
+
+Nutze PostMan um die API zu testen.

+ 51 - 0
app/internship/bo/Article.php

@@ -0,0 +1,51 @@
+<?php
+
+namespace internship;
+
+class Article {
+	private string $categoryName;
+	private string $text;
+	private string $title;
+
+	/**
+	 * @return string
+	 */
+	public function getCategoryName(): string {
+		return $this->categoryName;
+	}
+
+	/**
+	 * @param string $categoryName
+	 */
+	public function setCategoryName(string $categoryName): void {
+		$this->categoryName = $categoryName;
+	}
+
+	/**
+	 * @return string
+	 */
+	public function getText(): string {
+		return $this->text;
+	}
+
+	/**
+	 * @param string $text
+	 */
+	public function setText(string $text): void {
+		$this->text = $text;
+	}
+
+	/**
+	 * @return string
+	 */
+	public function getTitle(): string {
+		return $this->title;
+	}
+
+	/**
+	 * @param string $title
+	 */
+	public function setTitle(string $title): void {
+		$this->title = $title;
+	}
+}

+ 38 - 0
composer.json

@@ -0,0 +1,38 @@
+{
+	"name" : "hnm/internship-playground",
+	"description" : "playground for using rest api",
+	"type" : "project",
+	"minimum-stability" : "dev",
+	"prefer-stable" : false,
+	"require" : {
+		"n2n/n2n" : "^7.3",
+		"n2n/n2n-batch" : "^7.3",
+		"n2n/n2n-context" : "^7.3",
+		"n2n/n2n-impl-persistence-meta" : "^7.3",
+		"n2n/n2n-impl-persistence-orm" : "^7.3",
+		"n2n/rocket" : "^3.0",
+		"n2n/page" : "^1.6",
+		"lcobucci/jwt" : "4.0.4",
+		"n2n/n2n-bind": "^7.3"
+    },
+	"require-dev" : {
+		"n2n/hangar" : "^8.0",
+		"n2n/n2n-test" : "^7.3",
+		"phpunit/phpunit" : "^9.5.25@stable"
+	},
+	"autoload" : {
+		"psr-4" : {
+			"em\\" : "app/em"
+		}
+	},
+	"autoload-dev" : {
+		"psr-4" : {
+			"em\\" : "app/em"
+		}
+	},
+	"config": {
+		"allow-plugins": {
+			"n2n/n2n-composer-module-installer": true
+		}
+	}
+}