carlhannes / find-namespace-php
Find namespaces in PHP projects using this php cli tool
Installs: 37
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/carlhannes/find-namespace-php
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2020-01-22 02:07:03 UTC
README
This PHP CLI software simplifies searching and finding class names and interface's Namespaces.
Installation - manual
Copy the raw contents of the fns file and place it in your software/framework root folder.
Run it by opening a terminal and executing php fns
Installation - composer
Add carlhannes/find-namespace-php to your composer.json
"require": { "carlhannes/find-namespace-php": "*" }
Run it by opening a terminal and using php vendor/carlhannes/find-namespace-php/fns,
it should find out your working directory by default. Otherwise you can use CD.
Usage
When running, it will start an interactive shell where you can search for classes. Type help for a complete list of commands.
cd <path>change current working directory (when no path, same aspwd)clearclear the screen (shorthandles:cls)copy <index>copy an item after usingfind(shorthandles:c,get,g)configto view the current configuration (shorthandles:cfg)exitto exit the application (shorthandles:quit,end,q)find <search>to search for a class or interface with a namespace (shorthandles:f)helplist commandslistlist all FQCNS (shorthandles:l)lslist items in current directory (shorthandles:dir)pwdshow the full path of the current working directoryreloadreload the cache/db (shorthandles:r)toggle <var>toggle a var fromconfigon or off (shorthandles:t)
Example
php fns
laravel fns > find view
Array
(
[0] => Illuminate\Foundation\Console\ViewPublishCommand
[1] => Illuminate\Foundation\ViewPublisher
[2] => Illuminate\Support\Facades\View
)
laravel fns > copy 2
Illuminate\Support\Facades\View copied to clipboard
Tips
Add .fns.data.json to your .gitignore file
Created by https://github.com/carlhannes