Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

7.x 2.x typed data

Andy Truong edited this page Mar 17, 2014 · 2 revisions

TypedData API was built to helper developer validate input value must match its schema:

<?php

$schema = array('type' => 'constant');
$input = 'MENU_LOCAL_TASK';
$data = at_data($schema, $input);

// Validate
echo $data->validate($error) ? $data->getValue() : $error;

Clone this wiki locally