Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Factories::models breaks __callStatic function arguments passed to the class
Post: RE: Factories::models breaks __callStatic function...

I used to call my models trough CI Factory -> Models which previously allowed me to pass custom arguments, here's what my typical CI model looks (stripped comments for this thread): PHP Code: -- c...
1,799 Views
4 Replies
10-27-2022, 02:54 AM
stopz
    Thread: Factories::models breaks __callStatic function arguments passed to the class
Post: Factories::models breaks __callStatic function arg...

Hey everyone just a quick note that within framework/system/Config/Factories.php there's public static function models that calls __callStatic where new $class (...$arguments) is called and the only o...
1,799 Views
4 Replies
09-28-2022, 01:34 AM
stopz
    Thread: Language file in rule group error?
Post: RE: Language file in rule group error?

Yes and there are two ways how to achieve it, I'll explain you the easy way. First, you are facing your problem because in PHP you cannot run methods when doing class properties declaration out of ...
2,188 Views
3 Replies
12-20-2021, 03:18 PM
stopz
    Thread: How to clean Entity fields before saving
Post: RE: How to clean Entity fields before saving

As kilishan has already mentioned you should define $allowedFields within you model that's handling the entity. This performs array_intersect_keys against any given array or entity that your are try...
4,641 Views
7 Replies
12-20-2021, 02:52 PM
stopz
    Thread: Entities and relationship
Post: RE: Entities and relationship

Hey there Ignited fellows'! As of my understanding each CodeIgniter model should essentially have one corresponding Entity if any.  And in your model you should define it in: PHP Code: -- $th...
10,201 Views
9 Replies
12-20-2021, 02:33 PM
stopz
    Thread: CI 4 Output Compression
Post: RE: CI 4 Output Compression

In your Controller you can call for negotiator service to set gzip encoding. PHP Code: -- service('negotiator')->encoding(['gzip']); -- In your public/.htaccess you may define other resources by f...
11,580 Views
7 Replies
09-02-2021, 12:19 AM
stopz
    Thread: Loading vendor helper into global namespace
Post: RE: Loading vendor helper into global namespace

InsiteFX Wrote: (05-31-2021, 08:58 PM) -- Look in the root of the app folder just under the Views folder see the file Common.php that is for loading things you need first. -- I've looked into Comm...
2,312 Views
2 Replies
06-01-2021, 02:22 AM
stopz
    Thread: Loading vendor helper into global namespace
Post: Loading vendor helper into global namespace

Hey! Is there a convenient way to load a helper from vendor package into global namespace? Currently what works (and what I could not find anywhere by googling) is to set it into App/Config/Autoloa...
2,312 Views
2 Replies
05-31-2021, 12:53 AM
stopz
    Thread: .mo file support in CodeIgniter
Post: RE: .mo file support in CodeIgniter

Alright i solved my issue. So what helped me alot was https://stackoverflow.com/questions/1949162/how-could-i-parse-gettext-mo-files-in-php4-without-relying-on-setlocale-locales (https://stackoverflow...
4,481 Views
4 Replies
05-29-2021, 01:40 PM
stopz
    Thread: .mo file support in CodeIgniter
Post: RE: .mo file support in CodeIgniter

InsiteFX Wrote: (05-29-2021, 05:15 AM) -- This would never be put into the framework this is an addon to the application. -- Which has nothing to do with what I was looking for :) Anyone else has a...
4,481 Views
4 Replies
05-29-2021, 07:34 AM
stopz
    Thread: .mo file support in CodeIgniter
Post: .mo file support in CodeIgniter

I'm making Composer packages for CodeIgniter and next step is to translate them into few languages using .mo files. Let me explain why .mo is important: * Easier standard to work with across companie...
4,481 Views
4 Replies
05-29-2021, 12:40 AM
stopz
    Thread: Issue with HTTP Feature Testing
Post: RE: Issue with HTTP Feature Testing

Alright i found an aswer for my own question. I think it has to do with Quote: -- The $params array does not make sense for every HTTP verb, but is included for consistency. -- as written in the...
1,671 Views
2 Replies
05-27-2021, 03:40 AM
stopz
    Thread: orderBy() function is not working when delete() function is used in query builder.
Post: RE: orderBy() function is not working when delete(...

I've looked in to your situation and i could say that ->orderBy not taken into delete query account is a bug. In order to benefit from CodeIgniter deleted_at perks: your temporary solution for you wo...
3,400 Views
5 Replies
05-26-2021, 11:49 AM
stopz
    Thread: Issue with HTTP Feature Testing
Post: Issue with HTTP Feature Testing

I'll try to be as short with this as i can: so I have a test file with contents: PHP Code: --
1,671 Views
2 Replies
05-26-2021, 11:14 AM
stopz
    Thread: Bug? Vendor Routes are loaded before Filters
Post: RE: Bug? Vendor Routes are loaded before Filters

MGatner Wrote: (05-24-2021, 04:33 AM) -- If you workaround is something appropriate for a core solution then I encourage you to submit it as a Pull Request! Our team relies on the community for work ...
4,836 Views
9 Replies
05-24-2021, 02:41 PM
stopz
    Thread: Bug? Vendor Routes are loaded before Filters
Post: RE: Bug? Vendor Routes are loaded before Filters

iRedds Wrote: (05-22-2021, 10:51 PM) -- It also does not work in version 4.1.1. -- I'm working with 4.1.2 and this bug is kinda rock in my way- made a quick workaround for myself here but thanks for...
4,836 Views
9 Replies
05-24-2021, 01:18 AM
stopz
    Thread: Bug? Vendor Routes are loaded before Filters
Post: Bug? Vendor Routes are loaded before Filters

I have an issue where i am trying to set up a route filter in vendor/myname/packagename Autoloader works fine everything gets discovered but i get Code: -- my-auth filter must have a matching ali...
4,836 Views
9 Replies
05-21-2021, 07:16 AM
stopz
    Thread: Call to a member function validate() on a non-object using own library
Post: RE: Call to a member function validate() on a non-...

try: Code: -- $result = $this->generate_token->generate(); --
14,651 Views
0 Replies
01-26-2015, 04:29 AM
stopz
    Thread: How to loop through userdata?
Post: RE: How to loop through userdata?

RobertSF Explained the technical reason why you are not getting any output by calling Code: -- $this->session->userdata[$j]; -- cause Code: -- $j = 17 -- but Code: -- array_key = '17' -- there's...
4,998 Views
0 Replies
01-26-2015, 04:26 AM
stopz
    Thread: Call to a member function validate() on a non-object using own library
Post: RE: Call to a member function validate() on a non-...

I'm assuming this error means $CI is not an object. Like its not being defined like Code: -- $CI = New Generate_token(); -- If you loaded this like Code: -- $this->load->library('generate_token'); -...
14,651 Views
0 Replies
01-26-2015, 04:15 AM
stopz

Theme © iAndrew 2016 - Forum software by © MyBB