1 <?php
2 /**
3 * Admin Page Framework
4 *
5 * http://en.michaeluno.jp/admin-page-framework/
6 * Copyright (c) 2013-2014 Michael Uno; Licensed MIT
7 *
8 */
9 if ( ! class_exists( 'AdminPageFramework_PostType_Router' ) ) :
10 /**
11 * Provides routing methods for the post type factory class.
12 *
13 * @abstract
14 * @since 3.0.4
15 * @package AdminPageFramework
16 * @subpackage PostType
17 */
18 abstract class AdminPageFramework_PostType_Router extends AdminPageFramework_Factory {
19
20 /**
21 * Redirects undefined callback methods or to the appropriate methods.
22 *
23 * @internal
24 */
25 public function __call( $sMethodName, $aArgs=null ) {
26
27 if ( 'setup_pre' == $sMethodName ) {
28 $this->_setUp();
29 $this->oUtil->addAndDoAction( $this, "set_up_{$this->oProp->sClassName}", $this );
30 $this->oProp->_bSetupLoaded = true;
31 return;
32 }
33 /* if ( substr( $sMethodName, 0, strlen( "cell_" ) ) == "cell_" ) return $aArgs[0];
34 if ( substr( $sMethodName, 0, strlen( "sortable_columns_" ) ) == "sortable_columns_" ) return $aArgs[0];
35 if ( substr( $sMethodName, 0, strlen( "columns_" ) ) == "columns_" ) return $aArgs[0];
36 if ( substr( $sMethodName, 0, strlen( "style_ie_common_" ) )== "style_ie_common_" ) return $aArgs[0];
37 if ( substr( $sMethodName, 0, strlen( "style_common_" ) )== "style_common_" ) return $aArgs[0];
38 if ( substr( $sMethodName, 0, strlen( "style_ie_" ) )== "style_ie_" ) return $aArgs[0];
39 if ( substr( $sMethodName, 0, strlen( "style_" ) )== "style_" ) return $aArgs[0];
40 */
41 if ( has_filter( $sMethodName ) ) {
42 return isset( $aArgs[ 0 ] ) ? $aArgs[ 0 ] : null;
43 }
44
45 parent::__call( $sMethodName, $aArgs );
46
47 }
48
49 }
50 endif;