* You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions & limitations
 * under the License.
 */
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
require_once "Able.php";
require_once "errors.php";
require_once "settings.php";
// Instantiate the object Able
$able = new Able();
// Sets the simplified text value to "Error"
$able->setTextSimplified("Error");
// Check if the parameter text is correctly received
if (isset($_GET['text']) && strlen(trim($_GET['text'])) > 0) {
    // Store the value of the text and sets the inputText
    $text = trim($_GET['text']);
    $able->setTextInput($text);
    // Checks if the parameter language is correctly received
    if (isset($_GET['language']) && strlen(trim($_GET['language'])) > 0) {
        // Store the value of the language
        $language = trim($_GET['language']);
        // Checks if the language is supported
        if (strcmp($language, "spanish") != 0 && strcmp($language, "english") != 0) {
            // The language is not supported
            $able->setStatus(LANGUAGE_NOT_SUPPORTED);
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions & limitations
 * under the License.
 */
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
require_once "Able.php";
require_once "errors.php";
require_once "settings.php";
// Instantiate the object Able
$able = new Able();
function getPictosFromText($var)
{
    return explode(' ', $var);
}
if (isset($_GET['pictos']) && strlen(trim($_GET['pictos'])) > 0) {
    $pictos = trim($_GET['pictos']);
    //$able->setTextInput($text);
    $pictoArray = getPictosFromText($pictos);
    $able->setPictos($pictoArray);
    if (isset($_GET['language']) && strlen(trim($_GET['language'])) > 0) {
        $language = trim($_GET['language']);
        if (isset($_GET['type']) && strlen(trim($_GET['type'])) > 0) {
            //Parameters are ok
            $type = trim($_GET['type']);
            if (strcmp($language, "spanish") != 0 && strcmp($language, "english") != 0 && strcmp($language, "dutch") != 0) {
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions & limitations
 * under the License.
 */
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
require_once "Able.php";
require_once "errors.php";
require_once "settings.php";
require_once "arasaac.php";
// Instantiate the object Able
$able = new Able();
// Sets the pictos value to "Error"
$able->setPictos("Error");
if (isset($_GET['text']) && strlen(trim($_GET['text'])) > 0) {
    $text = trim($_GET['text']);
    $able->setTextInput($text);
    if (isset($_GET['language']) && strlen(trim($_GET['language'])) > 0) {
        $language = trim($_GET['language']);
        if (isset($_GET['type']) && strlen(trim($_GET['type'])) > 0) {
            //Parameters are ok
            $type = trim($_GET['type']);
            if (strcmp($language, "spanish") != 0 && strcmp($language, "english") != 0 && strcmp($language, "dutch") != 0) {
                $able->setStatus(LANGUAGE_NOT_SUPPORTED);
            } else {
                //Language is supported
                if (strcmp($type, "beta") != 0 && strcmp($type, "sclera") != 0) {