Skip to content

Commit

Permalink
Corrects composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstandiford committed Nov 23, 2021
1 parent 5e5a1b2 commit 5c98fde
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 28 deletions.
12 changes: 12 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

use Underpin\Abstracts\Underpin;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

// Add this loader.
Underpin::attach( 'setup', new \Underpin\Factories\Observers\Loader( 'meta', [
'class' => 'Underpin\Meta\Loaders\Meta',
] ) );
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"underpin/underpin": "^2.0"
},
"autoload": {
"psr-4": {"Underpin\\Meta\\": "lib/"},
"files": [
"meta.php"
"bootstrap.php"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Underpin_Meta\Abstracts;
namespace Underpin\Meta\Abstracts;

use Underpin\Traits\Feature_Extension;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Underpin_Meta\Factories;
namespace Underpin\Meta\Factories;

use Underpin\Traits\Instance_Setter;
use Underpin_Meta\Abstracts\Meta_Record_Type;
use Underpin\Meta\Abstracts\Meta_Record_Type;

if ( ! defined( 'ABSPATH' ) ) {
exit;
Expand Down
10 changes: 5 additions & 5 deletions lib/loaders/Meta.php → lib/Loaders/Meta.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Underpin_Meta\Loaders;
namespace Underpin\Meta\Loaders;

if ( ! defined( 'ABSPATH' ) ) {
exit;
Expand All @@ -10,17 +10,17 @@

class Meta extends Object_Registry {

protected $abstraction_class = 'Underpin_Meta\Abstracts\Meta_Record_Type';
protected $abstraction_class = 'Underpin\Meta\Abstracts\Meta_Record_Type';

protected $default_factory = 'Underpin_Meta\Factories\Meta_Record_Type_Instance';
protected $default_factory = 'Underpin\Meta\Factories\Meta_Record_Type_Instance';

protected function set_default_items() {
}

/**
* @param string $key
*
* @return \Underpin_Meta\Abstracts\Meta_Record_Type|\WP_Error Post Meta instance, if it exists. WP_Error, otherwise.
* @return \Underpin\Meta\Abstracts\Meta_Record_Type|\WP_Error Post Meta instance, if it exists. WP_Error, otherwise.
*/
public function get( $key ) {
return parent::get( $key );
Expand All @@ -34,7 +34,7 @@ public function get( $key ) {
* @param bool $single Optional. If true, return only the first value of the specified meta_key.
* This parameter has no effect if meta_key is not specified. Default false.
*
* @return mixed|\Underpin_Meta\Abstracts\Meta_Record_Type|void|\WP_Error
* @return mixed|\Underpin\Meta\Abstracts\Meta_Record_Type|void|\WP_Error
*/
public function get_meta( $key, $object_id, $single = false ) {
$value = $this->get( $key );
Expand Down
19 changes: 0 additions & 19 deletions meta.php

This file was deleted.

0 comments on commit 5c98fde

Please sign in to comment.