PHP code example of atlas / symfony
1. Go to this page and download the library: Download atlas/symfony library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
atlas / symfony example snippets
namespace App;
use Atlas\Orm\Atlas;
use App\DataSource\Thread\Thread
use App\DataSource\Thread\ThreadRecord;
class ApplicationService
{
public function __construct(Atlas $atlas)
{
$this->atlas = $atlas;
}
public function fetchThreadById($thread_id) : ThreadRecord
{
return $this->atlas->fetchRecord(Thread::class, $thread_id);
}
}
> cp ./vendor/atlas/orm/resources/phpstorm.meta.php ./.phpstorm.meta.php
>
mkdir src/DataSource
php bin/console atlas:skeleton