Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions manuals/1.0/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,30 @@ permalink: /manuals/1.0/en/getting-started.html
## Installation

```bash
git clone https://github.com/be-framework/app my-project
composer create-project be-framework/skeleton:0.x-dev my-project
cd my-project
rm -rf .git
composer install
```

## Run the Example

```bash
php bin/app.php
composer dev
```

This runs `php bin/be.php 'hello?name=World'` and writes a semantic log to `var/log/<timestamp>.json`.

Output:

```txt
Hello World
```

You can also invoke directly with a BEAR.Sunday-style URI:

```bash
php bin/be.php 'hello?name=Alice'
```

That's it! Let's look at the code.

## Project Structure
Expand Down Expand Up @@ -126,16 +132,10 @@ The input didn't "do" anything—it **became** Hello through metamorphosis.

## Try Semantic Validation

Edit `bin/app.php` to pass an empty name:

```php
$input = new HelloInput('');
```

Run again:
Run with an empty name:

```bash
php bin/app.php
php bin/be.php 'hello?name='
```

You'll see an error message because `Semantic/Name.php` validates that name cannot be empty.
Expand Down