siwwy :3 #3
					 6 changed files with 113 additions and 131 deletions
				
			
		Move classes to models folder
				commit
				
					
					
						20e394e9f2
					
				
			
		
							
								
								
									
										29
									
								
								app/Models/Bookmark.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								app/Models/Bookmark.php
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,29 @@
 | 
				
			||||||
 | 
					<?php
 | 
				
			||||||
 | 
					class Bookmark {
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The name of the bookmark.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The URL of the bookmark.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $url;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The description of the bookmark.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Bookmark constructor.
 | 
				
			||||||
 | 
					     * @param string $name The name of the bookmark.
 | 
				
			||||||
 | 
					     * @param string $url The URL of the bookmark.
 | 
				
			||||||
 | 
					     * @param string $description The description of the bookmark.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function __construct($name, $url, $description) {
 | 
				
			||||||
 | 
					        $this->name = $name;
 | 
				
			||||||
 | 
					        $this->url = $url;
 | 
				
			||||||
 | 
					        $this->description = $description;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										22
									
								
								app/Models/BookmarkCategory.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/Models/BookmarkCategory.php
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					<?php
 | 
				
			||||||
 | 
					class BookmarkCategory {
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The name of the bookmark category.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var array An array of Bookmark objects.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $bookmarks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * BookmarkCategory constructor.
 | 
				
			||||||
 | 
					     * @param string $name The name of the bookmark category.
 | 
				
			||||||
 | 
					     * @param array $bookmarks An array of Bookmark objects.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function __construct($name, $bookmarks = array()) {
 | 
				
			||||||
 | 
					        $this->name = $name;
 | 
				
			||||||
 | 
					        $this->bookmarks = $bookmarks;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										36
									
								
								app/Models/Project.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								app/Models/Project.php
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,36 @@
 | 
				
			||||||
 | 
					<?php
 | 
				
			||||||
 | 
					class Project {
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The name of the project.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The description of the project.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The URL of the project.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $url;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var array Languages used in the project.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $languages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * BookmarkCategory constructor.
 | 
				
			||||||
 | 
					     * @param string $name The name of the project.
 | 
				
			||||||
 | 
					     * @param string $description The description of the project.
 | 
				
			||||||
 | 
					     * @param string The URL of the project.
 | 
				
			||||||
 | 
					     * @param array  $languages Languages used in the project.s
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function __construct($name, $description, $url, $languages = array()) {
 | 
				
			||||||
 | 
					        $this->name = $name;
 | 
				
			||||||
 | 
					        $this->description = $description;
 | 
				
			||||||
 | 
					        $this->url = $url;
 | 
				
			||||||
 | 
					        $this->languages = $languages;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										22
									
								
								app/Models/ProjectCategory.php
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/Models/ProjectCategory.php
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					<?php
 | 
				
			||||||
 | 
					class ProjectCategory {
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var string The name of the bookmark category.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @var array An array of Project objects.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public $projects;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * BookmarkCategory constructor.
 | 
				
			||||||
 | 
					     * @param string $name The name of the bookmark category.
 | 
				
			||||||
 | 
					     * @param array $projects An array of Project objects.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function __construct($name, $projects = array()) {
 | 
				
			||||||
 | 
					        $this->name = $name;
 | 
				
			||||||
 | 
					        $this->projects = $projects;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,55 +1,6 @@
 | 
				
			||||||
<?php
 | 
					<?php
 | 
				
			||||||
class Bookmark {
 | 
					include 'app/Models/Bookmark.php';
 | 
				
			||||||
    /**
 | 
					include 'app/Models/BookmarkCategory.php';
 | 
				
			||||||
     * @var string The name of the bookmark.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The URL of the bookmark.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $url;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The description of the bookmark.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $description;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * Bookmark constructor.
 | 
					 | 
				
			||||||
     * @param string $name The name of the bookmark.
 | 
					 | 
				
			||||||
     * @param string $url The URL of the bookmark.
 | 
					 | 
				
			||||||
     * @param string $description The description of the bookmark.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function __construct($name, $url, $description) {
 | 
					 | 
				
			||||||
        $this->name = $name;
 | 
					 | 
				
			||||||
        $this->url = $url;
 | 
					 | 
				
			||||||
        $this->description = $description;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class BookmarkCategory {
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The name of the bookmark category.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var array An array of Bookmark objects.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $bookmarks;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * BookmarkCategory constructor.
 | 
					 | 
				
			||||||
     * @param string $name The name of the bookmark category.
 | 
					 | 
				
			||||||
     * @param array $bookmarks An array of Bookmark objects.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function __construct($name, $bookmarks = array()) {
 | 
					 | 
				
			||||||
        $this->name = $name;
 | 
					 | 
				
			||||||
        $this->bookmarks = $bookmarks;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
return [
 | 
					return [
 | 
				
			||||||
    new BookmarkCategory("Friends' Websites", [
 | 
					    new BookmarkCategory("Friends' Websites", [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,84 +1,6 @@
 | 
				
			||||||
<?php
 | 
					<?php
 | 
				
			||||||
class ProjectURL {
 | 
					include 'app/Models/Project.php';
 | 
				
			||||||
    /**
 | 
					include 'app/Models/ProjectCategory.php';
 | 
				
			||||||
     * @var string The name of the ProjectURL.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The URL of the ProjectURL.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $url;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * Bookmark constructor.
 | 
					 | 
				
			||||||
     * @param string $name The name of the ProjectURL.
 | 
					 | 
				
			||||||
     * @param string $url The URL of the ProjectURL.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function __construct($name, $url) {
 | 
					 | 
				
			||||||
        $this->name = $name;
 | 
					 | 
				
			||||||
        $this->url = $url;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class Project {
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The name of the project.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The description of the project.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $description;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The URL of the project.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $url;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var array Languages used in the project.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $languages;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * BookmarkCategory constructor.
 | 
					 | 
				
			||||||
     * @param string $name The name of the project.
 | 
					 | 
				
			||||||
     * @param string $description The description of the project.
 | 
					 | 
				
			||||||
     * @param string The URL of the project.
 | 
					 | 
				
			||||||
     * @param array  $languages Languages used in the project.s
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function __construct($name, $description, $url, $languages = array()) {
 | 
					 | 
				
			||||||
        $this->name = $name;
 | 
					 | 
				
			||||||
        $this->description = $description;
 | 
					 | 
				
			||||||
        $this->url = $url;
 | 
					 | 
				
			||||||
        $this->languages = $languages;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class ProjectCategory {
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var string The name of the bookmark category.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @var array An array of Project objects.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public $projects;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * BookmarkCategory constructor.
 | 
					 | 
				
			||||||
     * @param string $name The name of the bookmark category.
 | 
					 | 
				
			||||||
     * @param array $projects An array of Project objects.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function __construct($name, $projects = array()) {
 | 
					 | 
				
			||||||
        $this->name = $name;
 | 
					 | 
				
			||||||
        $this->projects = $projects;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
return [
 | 
					return [
 | 
				
			||||||
    new ProjectCategory("Websites", [
 | 
					    new ProjectCategory("Websites", [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue