#6525: Deprecate ife(), a(), am(), r(), up(), low(), and e()
---------------------------------------------------+------------------------
    Reporter:  michaelc                            |         Owner:           
        Type:  Enhancement                         |        Status:  new      
    Priority:  Low                                 |     Milestone:  1.3.x.x  
   Component:  Core Libs                           |       Version:  1.2 Final
    Severity:  Minor                               |    Resolution:           
    Keywords:  deprecate ife am a r up low echo e  |   Php_version:  PHP 5    
Cake_version:                                      |  
---------------------------------------------------+------------------------
Comment (by michaelc):

 {{{
 e():
 grep -R '[^a-zA-Z]e(' cake/*
 cake/console/libs/templates/skel/views/layouts/xml/default.ctp:<?php
 e($xml->header()); ?>
 cake/libs/model/datasources/dbo_source.php:
 e('<div style = "font: Verdana bold 12px; color: #FF0000">' .
 sprintf(__('SQL Error in model %s:', true), $model->alias) . ' ');
 cake/libs/model/datasources/dbo_source.php:
 e($this->error);
 cake/libs/model/datasources/dbo_source.php:
 e('</div>');
 cake/libs/model/datasources/dbo/dbo_oracle.php:
 e('<div style = "font: Verdana bold 12px; color: #FF0000">' .
 sprintf(__('SQL Error in model %s:', true), $model->alias) . ' ');
 cake/libs/model/datasources/dbo/dbo_oracle.php:
 e($this->error);
 cake/libs/model/datasources/dbo/dbo_oracle.php:
 e('</div>');
 cake/libs/view/layouts/xml/default.ctp:<?php e($xml->header()); ?>
 cake/libs/view/helpers/ajax.php:
 e($this->__ajaxBuffer[$divs[0]]);
 cake/libs/view/helpers/ajax.php:
 e($this->Javascript->codeBlock($out, false));
 cake/libs/view/helpers/ajax.php:
 e($this->Javascript->codeBlock($scripts, false));

 ife():
 grep -R 'ife(' cake/*
 cake/console/libs/acl.php:              $id =
 ife(is_numeric($this->args[1]), intval($this->args[1]), $this->args[1]);
 cake/console/libs/acl.php:                      $key =
 ife(is_numeric($this->args[1]), $secondary_id, 'alias');
 cake/console/libs/acl.php:              $key =
 (ife(is_numeric($this->args[1]), $secondary_id, 'alias'));
 cake/console/libs/acl.php:              $aro =
 ife(is_numeric($this->args[0]), intval($this->args[0]), $this->args[0]);
 cake/console/libs/acl.php:              $aco =
 ife(is_numeric($this->args[1]), intval($this->args[1]), $this->args[1]);
 cake/console/libs/acl.php:              $vars['secondary_id'] =
 ife(strtolower($class) == 'aro', 'foreign_key', 'object_id');
 cake/libs/validation.php:               $_this->regex =
 '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . ife($strict, '', '?') .
 cake/libs/view/helpers/javascript.php:          return ife($safe, "\n" .
 '//]]>' . "\n", '').$this->tags['javascriptend'];
 cake/libs/view/helpers/javascript.php:                          $val =
 ife($val, 'true', 'false');

 a():
 grep -R '[^a-zA-Z_]a(' cake/*
 cake/libs/xml.php:                      a('<' . '?', '?' . '>'),
 cake/libs/xml.php:                      a('', ''),

 am():
 grep -R '[^a-zA-Z_]am(' cake/*
 (nothing, excellent)

 r():
 grep -R '[^a-zA-Z_]r(' cake/*
 cake/console/libs/console.php:                  $class =
 Inflector::camelize(r('.php', '', $model));
 cake/console/libs/api.php:
 'comment' => r(array('/*', '*/', '*'), '', trim($result[1][$key])),
 cake/console/libs/shell.php:            return r(DS.DS, DS, $shortPath);
 cake/libs/view/helpers/time.php:                $tmp = r(' ', '',
 $timeInterval);

 up():
 grep -R '[^a-zA-Z_]up(' cake/*
 cake/console/libs/shell.php:                    while ($in == '' || ($in
 && (!in_array(low($in), $options) && !in_array(up($in), $options)) &&
 !in_array($in, $options))) {

 low():
 grep -R '[^a-zA-Z_]low(' cake/*
 cake/basics.php:                switch (low($target)) {
 cake/console/libs/acl.php:              } elseif
 (isset($commands[low($this->args[0])])) {
 cake/console/libs/acl.php:
 $this->out($commands[low($this->args[0])] . "\n\n");
 cake/console/libs/tasks/view.php:               $this->controllerPath =
 low(Inflector::underscore($this->controllerName));
 cake/console/libs/tasks/view.php:               if (low($interactive) ==
 'y' || low($interactive) == 'yes') {
 cake/console/libs/tasks/view.php:               if (low($wannaDoScaffold)
 == 'y' || low($wannaDoScaffold) == 'yes') {
 cake/console/libs/tasks/view.php:               if ((low($wannaDoAdmin) ==
 'y' || low($wannaDoAdmin) == 'yes')) {
 cake/console/libs/tasks/view.php:               if (low($wannaDoScaffold)
 == 'y' || low($wannaDoScaffold) == 'yes') {
 cake/console/libs/tasks/view.php:                       if
 (low($looksGood) == 'y' || low($looksGood) == 'yes') {
 cake/console/libs/tasks/model.php:              if (low($tableIsGood) ==
 'n' || low($tableIsGood) == 'no') {
 cake/console/libs/tasks/model.php:              while ($tableIsGood ==
 false && low($useTable) != 'null') {
 cake/console/libs/tasks/model.php:              if
 (array_search($useTable, $this->__tables) !== false &&
 (low($wannaDoValidation) == 'y' || low($wannaDoValidation) == 'yes')) {
 cake/console/libs/tasks/model.php:              if ((low($wannaDoAssoc) ==
 'y' || low($wannaDoAssoc) == 'yes')) {
 cake/console/libs/tasks/model.php:              if (low($looksGood) == 'y'
 || low($looksGood) == 'yes') {
 cake/console/libs/tasks/model.php:
 if ('n' == low($response) || 'no' == low($response)) {
 cake/console/libs/tasks/model.php:
 if ('n' == low($alternateAlias) || 'no' == low($alternateAlias)) {
 cake/console/libs/tasks/model.php:                      while
 ((low($wannaDoMoreAssoc) == 'y' || low($wannaDoMoreAssoc) == 'yes')) {
 cake/console/libs/tasks/project.php:            if (low($looksGood) == 'y'
 || low($looksGood) == 'yes') {
 cake/console/libs/tasks/project.php:                    if (low($verbose)
 == 'y' || low($verbose) == 'yes') {
 cake/console/libs/tasks/project.php:            } elseif (low($looksGood)
 == 'q' || low($looksGood) == 'quit') {
 cake/console/libs/tasks/controller.php:         $controllerFile =
 low(Inflector::underscore($controllerName));
 cake/console/libs/tasks/controller.php:         if (low($doItInteractive)
 == 'y' || low($doItInteractive) == 'yes') {
 cake/console/libs/tasks/controller.php:                 if
 (low($wannaUseScaffold) == 'n' || low($wannaUseScaffold) == 'no') {
 cake/console/libs/tasks/controller.php:                         if
 (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') {
 cake/console/libs/tasks/controller.php:                         if
 (low($wannaDoHelpers) == 'y' || low($wannaDoHelpers) == 'yes') {
 cake/console/libs/tasks/controller.php:                         if
 (low($wannaDoComponents) == 'y' || low($wannaDoComponents) == 'yes') {
 cake/console/libs/tasks/controller.php:                 if
 (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') {
 cake/console/libs/tasks/controller.php:         if ((low($wannaDoAdmin) ==
 'y' || low($wannaDoAdmin) == 'yes')) {
 cake/console/libs/tasks/controller.php:         if
 (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') {
 cake/console/libs/tasks/controller.php:                 $actions =
 $this->bakeActions($controllerName, null, in_array(low($wannaUseSession),
 array('y', 'yes')));
 cake/console/libs/tasks/controller.php:                         $actions
 .= $this->bakeActions($controllerName, $admin,
 in_array(low($wannaUseSession), array('y', 'yes')));
 cake/console/libs/tasks/controller.php:                 if
 (low($wannaUseScaffold) == 'y' || low($wannaUseScaffold) == 'yes') {
 cake/console/libs/tasks/controller.php:                 if
 (low($looksGood) == 'y' || low($looksGood) == 'yes') {
 cake/console/libs/tasks/controller.php:         if (low($actions) ==
 'scaffold') {
 cake/console/libs/tasks/db_config.php:                  if
 (low($persistent) == 'n') {
 cake/console/libs/tasks/db_config.php:                  if (low($port) ==
 'n') {
 cake/console/libs/tasks/db_config.php:                  if (low($prefix)
 == 'n') {
 cake/console/libs/tasks/db_config.php:                  if (low($encoding)
 == 'n') {
 cake/console/libs/tasks/db_config.php:                  if (low($schema)
 == 'n') {
 cake/console/libs/tasks/db_config.php:                  if (low($doneYet
 == 'n')) {
 cake/console/libs/tasks/db_config.php:          if (low($looksGood) == 'y'
 || low($looksGood) == 'yes') {
 cake/console/libs/tasks/plugin.php:             if (low($looksGood) == 'y'
 || low($looksGood) == 'yes') {
 cake/console/libs/tasks/plugin.php:                     if (low($verbose)
 == 'y' || low($verbose) == 'yes') {
 cake/console/libs/api.php:              $type = low($this->args[0]);
 cake/console/libs/api.php:              } elseif
 (isset($commands[low($this->args[1])])) {
 cake/console/libs/api.php:
 $this->out($commands[low($this->args[1])] . "\n\n");
 cake/console/libs/shell.php:                    if (strpos($this->name,
 low(Inflector::camelize($this->args[0]))) !== false) {
 cake/console/libs/shell.php:                    if (low($this->command) ==
 low(Inflector::variable($this->args[0])) && method_exists($this,
 $this->command)) {
 cake/console/libs/shell.php:                    while ($in == '' || ($in
 && (!in_array(low($in), $options) && !in_array(up($in), $options)) &&
 !in_array($in, $options))) {
 cake/console/libs/shell.php:                    if (low($key) == 'q') {
 cake/console/libs/shell.php:                    } elseif (low($key) !=
 'y') {
 cake/console/libs/shell.php:            $result = low($unitTest) == 'y' ||
 low($unitTest) == 'yes';
 cake/console/libs/shell.php:            return
 low(Inflector::underscore($name));

 So, I admit that I was wrong - it was not only the bake code :/.
 }}}

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6525#comment:4>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to