Is it possible to use the model in bootstrap.php to get an array using find () from the database?
like this:
$Setting = ClassRegistry::init('Setting'); $Settings = $Setting->find('all');
thanks
You need to manually load the classes you use, if you really have to use the basic internal things that used to be.
to try
App::uses('ClassRegistry', 'Utility');
before using ClassRegistry.
Write to bootstrap.php
App::uses('ClassRegistry', 'Utility'); $Setting = ClassRegistry::init('ModelName');
Source: https://habr.com/ru/post/913025/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/913020/passing-emacs-variables-to-minibuffer-shell-commands&usg=ALkJrhjXhAwDKBcO2c0482mHV3OYgJX9aQDbExpress key specified / No - delphiCapture node.js cause of failure - node.jsdbExpress "Record not found or modified by another user" - delphiHow to access ValueStack objects in a Struts iterator? - javaWhere are all the possible locations of the UninstallString registry entries? - uninstallif else if else in a prolog similar to C / C ++ - prologexecute mysql query present in variable - sqlString truncation when passing to ClientDataset - delphiWhy use an empty abstract class instead of an interface? - javaAll Articles