An extreme minification of Redaktilo.
Usage:
<?php
require_once __DIR__.'/r.php';
<artifacts_info> | |
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
# Good artifacts are... | |
- Substantial content (>15 lines) | |
- Content that the user is likely to modify, iterate on, or take ownership of | |
- Self-contained, complex content that can be understood on its own, without context from the conversation | |
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
- Content likely to be referenced or reused multiple times |
<?php | |
use Assert\Assertion; | |
class RegisterNewMember | |
{ | |
public $email; | |
public $subscribeToNewsletter = true; | |
public function __construct($email, $subscribeToNewsletter = null) |
<?php | |
// File: app/config/importer.php | |
use Symfony\Component\Finder\Finder; | |
$finder = new Finder(); | |
$files = $finder->files()->name('*.yml')->in(__DIR__.'/services')->in(__DIR__.'/vendors'); | |
foreach ($files as $file) { | |
$loader->import($file->getRealpath()); | |
} |
<?php | |
namespace Gnugat\StackRollback; | |
use Doctrine\DBAL\Connection; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
/** | |
* Example: |
<?php | |
if (!isset($argv[1])) { | |
die('Usage: '.$argv[0].' <path>'); | |
} | |
$path = $argv[1]; | |
$fqcns = array(); | |
$allFiles = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); |
<?php | |
namespace Gnugat\Ripozi\Service; | |
class HttpHeader | |
{ | |
const AUTHORIZATION_HEADER = 'Authorization'; | |
const CONTENT_TYPE = 'Content-Type'; | |
const FORM_CONTENT_TYPE = 'application/x-www-form-urlencoded'; |
<?php | |
namespace Gnugat\Ripozi\Test; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Symfony\Component\Console\Output\NullOutput; | |
/** | |
* Assumes that the application kernel is named AppKernel and has been loaded |
<?php | |
namespace Gnugat\Ripozi\EventListener; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
/** |
<?php | |
namespace Gnugat\Ripozi\Test; | |
/** | |
* Assumes that the application kernel is named AppKernel and has been loaded | |
*/ | |
class ApiTestClient | |
{ | |
/** |
An extreme minification of Redaktilo.
Usage:
<?php
require_once __DIR__.'/r.php';