Skip to main content
deleted 3 characters in body
Source Link
Jimajamma
  • 17.1k
  • 1
  • 28
  • 35

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm'foo.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm'foo.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK.inc
}

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK.inc
}

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');         // bring in our define()s
module_load_include('inc', 'foo', 'foo.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'foo.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK.inc
}
added 4 characters in body
Source Link
Jimajamma
  • 17.1k
  • 1
  • 28
  • 35

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK.inc
}

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK
}

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK.inc
}
added 39 characters in body
Source Link
Jimajamma
  • 17.1k
  • 1
  • 28
  • 35

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK
}

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);
}

Any major project I have worked on has broken things up into manageable and easily assignable pieces; basically ending up like @tenken mentioned here, or to the point where foo.module ends up being only includes:

<?php

module_load_include('inc', 'foo', 'foo.defines');          // bring in our define()s
module_load_include('inc', 'foo', 'lrfm.HOOK1');           // bring in our HOOK1 functions
module_load_include('inc', 'foo', 'lrfm.HOOK2');           // bring in our HOOK2 functions

// ...etc

Of course, I have also seen, and used, situations where admin only or otherwise rarely used hooks are included like:

function foo_HOOK(/* $args */) {
  module_load_include('inc', 'foo', 'foo.HOOK');
  return _foo_HOOK(/* $args */);  // _foo_hook() is defined in foo.HOOK
}
Source Link
Jimajamma
  • 17.1k
  • 1
  • 28
  • 35
Loading