App\Ninja\Transformers\ClientTransformer::transform PHP 메소드

transform() 공개 메소드

public transform ( Client $client ) : array
$client app\models\Client
리턴 array
    public function transform(Client $client)
    {
        return array_merge($this->getDefaults($client), ['id' => (int) $client->public_id, 'name' => $client->name, 'balance' => (double) $client->balance, 'paid_to_date' => (double) $client->paid_to_date, 'updated_at' => $this->getTimestamp($client->updated_at), 'archived_at' => $this->getTimestamp($client->deleted_at), 'address1' => $client->address1, 'address2' => $client->address2, 'city' => $client->city, 'state' => $client->state, 'postal_code' => $client->postal_code, 'country_id' => (int) $client->country_id, 'work_phone' => $client->work_phone, 'private_notes' => $client->private_notes, 'last_login' => $client->last_login, 'website' => $client->website, 'industry_id' => (int) $client->industry_id, 'size_id' => (int) $client->size_id, 'is_deleted' => (bool) $client->is_deleted, 'payment_terms' => (int) $client->payment_terms, 'vat_number' => $client->vat_number, 'id_number' => $client->id_number, 'language_id' => (int) $client->language_id, 'currency_id' => (int) $client->currency_id, 'custom_value1' => $client->custom_value1, 'custom_value2' => $client->custom_value2]);
    }