balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

base.php (639B)


      1 <?php
      2 /**
      3  * Base walker.
      4  * Walkers must inherit this class and overwrite methods with its own.
      5  *
      6  * @package Meta Box
      7  */
      8 
      9 /**
     10  * Base walker class.
     11  */
     12 abstract class RWMB_Walker_Base extends Walker {
     13 	/**
     14 	 * Field settings.
     15 	 *
     16 	 * @var array
     17 	 */
     18 	public $field;
     19 
     20 	/**
     21 	 * Field meta data.
     22 	 *
     23 	 * @var array
     24 	 */
     25 	public $meta;
     26 
     27 	/**
     28 	 * Constructor.
     29 	 *
     30 	 * @param array $field Field parameters.
     31 	 * @param mixed $meta  Meta value.
     32 	 */
     33 	public function __construct( $field, $meta ) {
     34 		$this->db_fields = array(
     35 			'id'     => 'value',
     36 			'parent' => 'parent',
     37 		);
     38 
     39 		$this->field = $field;
     40 		$this->meta  = (array) $meta;
     41 	}
     42 }